Uncle Bill's Homebuilt Solar Water Heater

Electrical system and electronics


The electronics is constructed from the following main building blocks:

  1. An interface board, which has all the input conditioning and output drivers, plus connectors.
  2. An <Arduino (actually a Freeduino) with an Atmega 328.
  3. A 4 x 20 character LCD from Robot Electronics which provides a continuous readout of system parameters. This is driven through the I2C interface.
  4. An optional data logger from Wulfden, which can be set when required to record selected events and data. It is driven through the same I2C interface as the LCD.

The interface board contains the following items:

  1. A standard 7805 which provides 5V for other devices such as the Freeduino from the 12V supply.
  2. An OP 495 quad op-amp which conditions the 4 inputs to the ADCs.
  3. A MOSFET which drives the water pump.
  4. An L298N H-bridge which controls the winch motor.
  5. A second MOSFET for the cooling fan.
  6. Connectors for the 12V supply and all inputs and outputs.

The system takes inputs from the following sensors:

Outputs from the board are provided for the water pump, winch motor, LCD, cooling fan, and optional data logger.

The controller assembly installed

The controller assembly installation

This photo shows the Arduino based controller with the cover removed. At the top is a piece of aluminium which acts as a heatsink to cool the 7805 5V regulator. The blue board underneath is the Freeduino controller (Arduino compatible). Mounted on that is the interface board, which handles all the inputs and outputs. Connectors are provided for all the inputs and outputs.

The lid of the plastic box is normally in place to protect the electronics against water. With plumbing nearby inside the box and weather (rain) outside the box there is the potential for water damage. The cables all enter through the bottom of the box to prevent water from entering.

The controller assembly 2

The controller assembly

In the above photo you can see the controller assembly. Arduino users will know that one of the connectors is offset with the result that the board cannot be used directly with 0.1" pitch matrix board. The solution adopted here is to file out the holes in the matrix board slightly, then it is possible to assemble the connectors to the board and Freeduino (without soldering). Then, with the components still loosley assembled, the connectors are soldered to the matrix board. The pins remain slightly angled, as can be seen in this photo.

Although all 7 DS18B20 temperature sensors are on the same bus, 4 separate connectors are provided for them. This is because it is not practical to connect all the sensors together, from the point of view of assembling and disassembling the system. There is one connector each for the inlet sensor (on the lower reflector), the outlet sensor (on the top reflector), the two sensors at the water tank (on a 10m cable), and lastly one for the two environment sensors.

5V Supply

7805 circuit

The 5V regulator circuit

This is a standard 7805 power supply circuit. The input is from the 12V supply (see below), and is normally in the range 12 to 15V. It provides a stable 5V supply for the Arduino, interface board, LCD and optional data logger. The Arduino has its own 5V supply, but this will not supply enough current to operate the other devices. It has been found that the backlight in the LCD draws enough current to make the 7805 very hot, so a small heatsink has been added so that it runs cooler. This is just a piece of thin aluminium bolted to the device. (see photos).

Components are as follows:

  • C1 0.1 μF
  • C2 10μF
  • C3 10μF
  • C4 0.1μF

Gravity Sensor Interface

graviy sensor buffer circuit

The gravity sensor buffer circuit

This sensor is used as a tilt sensor. It measures the elevation angle of the heat collectors.

The circuit is far from optimal. It would have been better to have started with a single axis accelerometer (unbuffered), and added a buffer interface with the appropriate gain. However, since I already had the 2 axis accelerometer, it was simpler to use that. This circuit provides a gain of about 3 to increase the sensitivity of the sensor, without approaching the limits of the ADC.

Component details are:

  • C1 0.1 μF. This needs to be close to the integrated circuit, one per IC. Since there are 4 op-amps in the IC, this capacitor is shared between all 4.
  • C2 0.1μF
  • C3 100μF. This was an afterthought. It was added because the readings from the gravity sensors were not very stable, they seemed to be picking up some interference, presumably because of the long leads – about 1.2m.
  • R1 33kΩ
  • R2, R3 100kΩ
  • R4 68kΩ
  • R5 1kΩ
  • IC OP495 This is a quad rail to rail op amp. It is good for ADC input conditioning because both the input and output include the full range of 0 to 5V. Only one op-amp is used here, so the other 3 can be used for other things.

R2, R3 and C2 provide a 2.5V reference voltage.

LED Light Sensor Interfaces

LED light sensor buffer circuit

The LED light sensor buffer circuit

The LED output varies from 0 to about 1.6V. No reading is obtained if the LED is connected directly to the ADC input, because the LED will only drive a high impedance input - the ADC is fairly low impedance. This circuit does the impedance matching and provides a gain of about 2.7. This amplifies the LED output up to a maximum of 4.3V. The maximum needs to be safely within the 5V, because if the maximum is reached, the output stops being proportional to the input, so defeating the purpose of the ADC.

Component details are:

  • LED This can be any LED. I used a cheap green one, as I found that green LEDs give a higher output.
  • C1 0.1 μF. This is the same capacitor as listed above under the gravity sensor interface. It needs to be close to the integrated circuit, one per IC. Since there are 4 op-amps in the IC, this capacitor is shared between all 4.
  • C2 0.01 μF.
  • R1 1MΩ
  • R2 33KΩ
  • R3 56KΩ
  • R4 1kΩ

You can read more about using an LED as a light sensor here.

Winch motor driver

The motor runs from 12V and takes a maximum (stall) current of 1A, so an L293D haw been used. The L293D contains 2 H-bridges, which can be used in parallel. They have been used in parallel here since the outputs are rated at only 0.6A continuous. No additional components are required.

The L293D takes logic level inputs, and can drive outputs from a separate, higher voltage. On the input side there is a logic level power supply, here 5V, and 3 logic level inputs. Two of the input pins decide the direction of the motor. If these pins are both high or low, the motor will not run. Otherwise, if one input is high and the other is low, it runs in one direction or the other but only when the third input pin (enable) is high. The PWM output from the Arduino is connected to the enable input which permits the motor speed to be controlled.

For the output side, there is a separate power supply pin, here connected to 12V, and two output pins, that go to the motor.

Pump and fan MOSFET drivers

MOSFET driver

The MOSFET driver circuit

The pump and fan both run from 12V. The pump draws approximately 1.2A, and the fan draws 0.2A, so as the voltage and current are both small, a simple MOSFET can be used as shown here in both cases.

Communications interfaces (I2C and DS18B20)

The LCD and optional datalogger use the standard I2C interface which is on (dual purpose) pins analog 4 and 5. No circuitry is required. They can be distinguished by the software because they have different addresses on the I2C bus.

The DS18B20 temperature sensors are all on the same bus, and require a pull up resistor of 4.7kΩ. This is adequate for the 7 sensors. They too have separate addresses.

Solar panel and 12V supply

This consists of a 60W solar panel, a charge controller and a 12V 76Ah battery. This system was adequate to run the system. However, we have since modified the system to include some lights: see the design tab.

The charge controller is a part of the system that is awaiting improvement. The maximum output from the solar panel is at around 19V. This is to make sure there is enough voltage to charge under all conditions. The battery could rise to a maximum of 15V, and there is also a voltage drop across the controller. A 60W panel at 19V produces only 3.1A, not the 60/12=5A you might expect. Typically, if the battery voltage is 13V, the other 6V are lost, so the system is inefficient. What is needed is a controller that efficiently converts the maximum available power from the panel down to the battery voltage. This is another Arduino project for another day.