A simple system without freeze protection
All's well as long as the sun shines. But on cold nights there can be trouble because the water in the panels will freeze. Since ice expands with tremendous force it can easily damage the panels.
The "Classic" drainback system
One of the most common solutions was the simple drainback system shown below. Here a drainback tank is inserted in the return line from the solar water heater panels. When the system is installed, and before the pump is running, enough air is left in the pipes and panels and of course the drainback tank to eliminate all water from the upper portions of the system. In this state there is no possibility of freezing. However once the pump is started water is pushed up to the panels towards the drainback tank. The air that was previously there collects in the upper part of the drainback tank.
This type of setup requires a drainback tank that can withstand whatever water pressure is present in the house. The only other requirement for the tank is that it be large enough to contain enough air to fill everything that is exposed to freezing temperatures with air when the pump is off.
Advantages are extreme simplicity and affordability. In fact it is possible to make a drainback tank like this yourself out of large diameter pipe.
There is one significant drawback though. Imagine a small leak somewhere in the upper part of the system. During the day when the pump is working water will leak out, but at night after all the water has drained back the leak will let out air. Slowly the amount of air available will decrease until there is not enough to replace all the water in the exposed section with air. Another problem that shows itself over time is that the water coming from the street or the well has some air dissolved in it that bubbles out when the water is heated. So if you have no leak after some time there will be too much air in the system.
It is probably due to these reasons that the classic drainback tank has fallen out of favor.
Drainback tanks with built-in heat exchanger
The most common drainback tanks for sale today are ones that have a built-in heat exchanger. These tanks separate the loop that contains the water heating panels and the main house water system. In the picture below you can see that the solar loop contains the drainback tank's main chamber, the cool pipe to the collector, the collector, and the hot return pipe. Like in the simple version there is enough air in this loop to prevent any freezing when the pump is off. Once the pump starts it pushes the air out of the upper portions of the solar loop and into the drainback tank. The solar loop is generally not under pressure. Because the water in the solar loop is always the same and because there is no pressure the amount of air in this loop is stable over long periods of time.
The second loop contains the water heater. The water from the water heater or tank is pumped through the heat exchanger in the drainback tank back to the water heater. On the way through the heat exchanger it picks up any heat that the solar loop has collected.
The advantage is long time stable operation without maintenance. For this advantage you have to have two pumps and a substantially more expensive drainback tank. It's very difficult for all but the best equipped do it yourselfer to build such a tank so most people are stuck having to buy one. On the brighter side the pressure requirements on the pump in the solar loop are not high, and because that water never enters the tap the pump could also be made of materials that are not permitted in drinking water plumbing. Of course the second pump has to be rated for line pressure and high temperatures, as well as drinking water use.
A few considerations when installing a drainback tank
Before installing a drainback tank (with or without heat exchanger) you have to check and make sure that the pump can push the water all the way to the highest point in the system in the morning upon start-up. The capabilities of most pumps in terms of lifting are given in terms of feet of water, so it's quite easy to determine where the drainback tank (and therefore the air level) can go. For instance if your pump is specified to support a "head" of 6 ft. the drainback tank has to be AT MOST 6 ft below the highest point in the system.
When you select your tank you should also make sure it has ample capacity to contain enough air to allow everything above the tank to be filled with air. If you have the kind with a heat exchanger also remember that even when all the air in the system has been pushed into the drainback tank the heat exchanger coils still have to be completely submerged in the water because otherwise the heat from the solar collector cannot be transferred to the main tank.