Hi All,
I have wrote the code for using an arduino to control a solar water heating system.
It requires a Mega2560, 2 onewire dallas sensors and a DFRobot LCD with buttons.
It has a menu to alter settings for upper tank limit, start temp, stop difference and assign pin's to use and serial for each sensor.
All settings are saved to the eeprom and loaded upon starting.
With the mysensor support it reports 4 sensors, Tank Temp, Solar Temp, Pump Status and Tank Temp Reached, this therefore allows you to monitor it all in Domoticz.
hope it's helpful to others!
Solar Controller with Arduino and Mysensor support
Moderator: leecollings
-
sijones
- Posts: 70
- Joined: Wednesday 15 October 2014 14:16
- Target OS: Linux
- Domoticz version: Git
- Location: UK
- Contact:
Solar Controller with Arduino and Mysensor support
Last edited by sijones on Saturday 21 November 2015 21:27, edited 1 time in total.
-
sijones
- Posts: 70
- Joined: Wednesday 15 October 2014 14:16
- Target OS: Linux
- Domoticz version: Git
- Location: UK
- Contact:
Re: Solar Controller with Arduino and Mysensor support
Updated to version 0.9
1. Bug fixes for first time run with mysensors enabled, the board would display not configured but not respond to button presses.
2. After setup and saving values the mega would lock up if mysensors was enabled and require a reset to start working
A bit of a helpfile...
Once uploaded to a Arduino on first start it will display "Not Configured", "Press Select", press select to enter menu mode. Once configuration is done you can enter menu mode any time by pressing Select.
Once in menu mode, use left and right to go through the menu, up and down change the value.
The following is available:
Min Solar Temp: This is the minimum temp you want it to start at. Default 5c
Max Tank Temp: Maximum Temp the tank should be heated to. Default 60c
Start Temp Diff: The Temperature difference between solar and tank for the pump to be turned on
Stop Temp Diff: The Temperature different to stop the pump.
Pump GPIO Pin: The Pin that the pump is attached to, this pin will be set high for "ON"
Temp GPIO Pin: The Pin the Dallas sensors are attached to, don't forget the pull up resistor.
Temp Reached Pin: This Pin will go high once the tank temperature is at or above the Max Tank Temp
Solar Serial: The unique serial number of the Dallas Sensor, choose the serial to assign to being the Solar Sensor. Use Read Serials first then assign here, when selecting the temperature will be displayed so you can see the actual value and should help choosing the correct one.
Tank Serial: The unique serial number of the Dallas Sensor, choose the serial to assign to being the Tank Sensor. Use Read Serials first then assign here, when selecting the temperature will be displayed so you can see the actual value and should help choosing the correct one.
Read Serials: Press select to read the onewire bus and search for sensors, this will read the serials.
Save & Start: Press select to save your changes to EEPROM and start the controller running.
Once running, a flashing symbol will appear on the top right, * means it's running but waiting for temps to be reached etc, P means the pump is running, T means tank temp is reached. If it's not flashing it means it's locked up, it hasn't locked up for me but I wanted an easy way to look at the display and know it is working and not locked so I made this flash so I know it must be looping.
1. Bug fixes for first time run with mysensors enabled, the board would display not configured but not respond to button presses.
2. After setup and saving values the mega would lock up if mysensors was enabled and require a reset to start working
A bit of a helpfile...
Once uploaded to a Arduino on first start it will display "Not Configured", "Press Select", press select to enter menu mode. Once configuration is done you can enter menu mode any time by pressing Select.
Once in menu mode, use left and right to go through the menu, up and down change the value.
The following is available:
Min Solar Temp: This is the minimum temp you want it to start at. Default 5c
Max Tank Temp: Maximum Temp the tank should be heated to. Default 60c
Start Temp Diff: The Temperature difference between solar and tank for the pump to be turned on
Stop Temp Diff: The Temperature different to stop the pump.
Pump GPIO Pin: The Pin that the pump is attached to, this pin will be set high for "ON"
Temp GPIO Pin: The Pin the Dallas sensors are attached to, don't forget the pull up resistor.
Temp Reached Pin: This Pin will go high once the tank temperature is at or above the Max Tank Temp
Solar Serial: The unique serial number of the Dallas Sensor, choose the serial to assign to being the Solar Sensor. Use Read Serials first then assign here, when selecting the temperature will be displayed so you can see the actual value and should help choosing the correct one.
Tank Serial: The unique serial number of the Dallas Sensor, choose the serial to assign to being the Tank Sensor. Use Read Serials first then assign here, when selecting the temperature will be displayed so you can see the actual value and should help choosing the correct one.
Read Serials: Press select to read the onewire bus and search for sensors, this will read the serials.
Save & Start: Press select to save your changes to EEPROM and start the controller running.
Once running, a flashing symbol will appear on the top right, * means it's running but waiting for temps to be reached etc, P means the pump is running, T means tank temp is reached. If it's not flashing it means it's locked up, it hasn't locked up for me but I wanted an easy way to look at the display and know it is working and not locked so I made this flash so I know it must be looping.
- Attachments
-
- Solar_Controller 0.9.zip
- (10.89 KiB) Downloaded 143 times
Who is online
Users browsing this forum: No registered users and 1 guest