This project started with a DS18B20 sensor and Flowcode V5. The aim was to build a controller to maintain the temperature within a greenhouse. It has been developed overtime to its current incarnation using a PIC18F4550 at the heart of the design.
I have added a humidity sensor from Honeywell – the HIH5031 and a RTC clock module using the DS1307, which is freely available on the net. I was starting to run out of connections on the PIC, so I had to come up with a way of reducing the number of menu buttons for controller everything. The menu system was the result, requiring just four buttons to input all of the required settings for controlling the four outputs – Heater; Extractor fan(s); DE-Humidifier and lights, including their respective OFFSETs.
Everything seemed to be working fine until I had the thought – how could I be sure the controller had been working between my visits to the geenhouse. What I needed was someway of recording at regular intervals the values of – temperature; humidity and status of the four outputs. To achieve this goal, the SD_Card module was added. I had problems with the timing ‘write-to-SD_Card’. This was overcome by using the hardware SPI port of the PIC18F4550, which involved changing many of the original port connections. However, once this was done the system continued to perform well as it had done before adding the SD_Card module. The system records at 30 minute intervals its current status in the form of a .txt file over a 24 hour period. On inserting a blank memory card, the system detects the card and creates the necessary file ready to start recording. After 24 hours it stops recording. This allows the file to be checked to see if everything had been working correctly.
When it came to put the circuit design into EagleCad, well it has been a steep learning curve. I need help from someone to produce a PCB for this project. The controller would look good in a BOPLA housing as this would keep it watertight but still keeping the display visible. The Eagle schematic and HEX file is in with the zip file, also details of PIC connections is included.
I have included details of the Honeywell Humidifier sensor HIH-5031 formula, as this may not be clear on how to use the one given in the original components documentation.