Completed Projects

The Microchip 16F876A Solar Controller Computer Design

The Microchip 16F877A Solar Controller Plus RS232 Data Logger

Based on the Microchip 16F876A this controller manages the temperature of Solar Panels, Hot Water Tanks (can be up to three) or Hot water Tank, Jacuzzi and Pool ensuring the hot water supply takes precedence then the Jacuzzi then the pool. The Solar Panel, Water Tank, Jacuzzi and Pool temperatures are monitored by five separate LM35 devices. This design has been running my hot water system for the past two years without any Issues. To enable me to fine tune the software I re-designed the mother board and inroduced a Data Logger interface, see below.



The choice of a 400 Litre water tank, was limited by the space available for it in the outside wash room, a smaller tank therefore determined a larger solar panel array which would capture a lot more energy during the winter months and should provide sufficient hot water, as long as the period without sun did not extend longer than three to four days. If the period without sun extends beyond this period the controller will initiate the Immersion heater.

If the solar panels start to collect sufficient energy during the Immersion “on” period, the controller will re-connect the solar panels to the tank and these would then supplement the immersion heater speeding up the heating of the tank and the immersion heater disconnection. This feature significantly reduces the external supplier energy costs.

The problem with installing high performance vacuum tube solar panels in hot climates is that during the summer they WOULD overheat and boil the tank and/or panels. This overheating could then cause considerable damage and would put life at risk (400 litres of boiling water). To counter this possible condition, the controller monitors the tank and panels and when they reach a predicted maximum temperature, the controller initiates an alarm and will connect all panels to the pool heat exchanger and start the pool pump dumping the entire spare energy. The alarm sounder would make the occupants aware of an issue so they could cover the panel if so required.


RS232 Logger Interface


To enable the system timers and temperature settings to be fine tuned to obtain maximum possible cost saving, there is an RS232 serial interface constructed on the Relay Board that transmits all the relevant temperature data from the CPU Board to an external data logger, the data logger is an external device that is not part of this system. The data logger format is coma delimited file with a CR/LF at the end of each frame. Each frame sent is in 1 second intervals at a data rate of 2400 Bauds (this can be increased if required) with Xon Xoff flow control.

The file is formatted such that the data can be captured by any RS232 compliant data logger and could be imported to a spread sheet similar to that of the Microsoft Excel Spread Sheet.

Graphs generated by the Excel application, or similar, could then show times, temperatures, Relay Status and Errors. This information could be then used to optimise the whole system improving reliability and reducing the overall annual cost of ownership.


In Circuit Serial Programming Interface (ICSP)


In Circuit programming is provided to enable the operating system software to be updated from an external source without dismantling the controller. To accomplish this five connections are required to program the on-board PIC microcontroller. These are Power, ground, a programming voltage, clock and data.

+ (Vdd)/-(Vss) are the power & ground connections (Vdd, Vss). If you are using a programmer with 'real' voltage levels, the application can run from its own power supply when being programmed, eliminating these connections.

Vpp This is the programming voltage. PICs enter programming mode when ~12 volts are placed on the MCLR/Vpp pin 1.

Clock/Data or PGC/PGD The clock and data lines are used to write and read the PIC firmware. For the PIC16FXXX controller these are pins PORTB.6 & PORTB.7.


Copyright © All Rights Reserved