SolArduino - Camping solar heater panels control with Arduino


#1

About This Project

Having recently installed new solar heater panels, for hot water production, in my camping site, I required a way to comfortably control the system, keep things under control when I am not around, and activate or disattivate some items from remote.

What’s Connected

I have used an Arduino Uno board, with a W5100 network shield. To this I have attached 5 DS18B20 temperature sensors and a 4 relay board.

Triggers & Alerts

I have not yet completed all the trigger and alert that I envisage I will require, but this will be done by the way, as the system gets working and I will get the hang of things.
So far I have set some triggers to shut down some elements of the heating system, should the temperature of particular items should drop lower than some set limits. This is done mainly to preserve energy and hot water.
Alerts are going to ve very important to warn me should some temperature drop to values considered too low, thus indicating a fault somewhere in the system, or rising too high. In case of temperature too low, it is a question of limiting problems to the customers before the issue even becomes a problem. In case of temperature too high, not only it preserve from overlooking system faults, but it should warn me of potential dangerous situations.

Scheduling

Scheduling is active to turn off some items at night, when people do not usually use much hot water, here too it is done to preserve energy and limit waste.

Dashboard Screenshots

(Paste screenshots of dashboard, triggers & alerts, Scheduling)

Photos of the Project

Video

(Upload a YouTube video showcasing your project in action!)


#2

Hello, when you finish it, you can upload some picture and share source code.
Thanks!


#3

Hi, I will sure do that, but I did not managed to find out how to post images. I am a little slow on this things, so I will need some time, or guidance, to be able to do that.


#4

It is quite easy, you can drag and drop it in the text editor :stuck_out_tongue:


#5

OK, it was easy, i am not so quick in getting this things nowadays… :expressionless:
In the next days (or weeks) I will post more pics…


#6

You don’t have to make it fast :slight_smile: Have a nice day :slight_smile:


#7

Hi @gchiaretta,

Cool project, excited to see the pics! Good luck my friend.

-Benny


#8

I like the updated pics and screenshots! Looks good.

Cheers,

-B


#9

As I had to move to a new account, I have waited for the MQTT changeover and I have then completed the migration. The project is now moved to the “Camping” account.
I am encountering some important issue on the new MQTT setup. Some slow response of the dashboard and, most important and critical, the fact that relays command do not keep as set in case of Arduino reset o power down. This is extremely critical and, if not resolved, it will cancel the entire project as it is crucial that settings remain even in case of (frequent) momentary power cut.
I have already posted a bug report for this issue, with the Camping account.
Regards, Giorgio


#10

Unfortunately the bug posting has been hidden by the antispam system…


#11

this is because Sending MQTT messages within rate limits

you can store the value of eeprom and on reset write the value to the relay as well to the dashboard. do a search of eeprom in community and you will find plenty of topics on it


#12

Thank you, but this way it will still not ensure the dashboard state and the local state are always aligned. This can cause big problems.


#13

Thank you for pointing out “Sending MQTT messages within rate limits”, I had actually missed this. Much obliged.


#14

This is interesting.

  Can you point out some links for me, I would like to learn more

about it.

Thank you


#15

yes sure it can be aligned. the value stored in eeprom can be assigned to both cayenne dashboard and relay in void setup ,


#16

Hi, I have tried to do that, but it did not seem to work. Plus I am still experiancing a very, very, very, slow response from the dashboard…

This is the code of the setup after modification to do “… assigned to both cayenne dashboard and relay in void setup ,”.
void setup()
{
// set digital pin to output
pinMode(RELAY_DIGITAL_PIN1, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN2, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN3, OUTPUT);// relè pin
digitalWrite(RELAY_DIGITAL_PIN1, LOW);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN2, HIGH);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN3, HIGH);// set relay to off at startup

// Serial.begin(9600);
Cayenne.begin(username, password, clientID);// not used: arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac
delay (100);
Cayenne.virtualWrite(1, 0, “digital_sensor”, “d”);
Cayenne.virtualWrite(2, 1, “digital_sensor”, “d”);
Cayenne.virtualWrite(3, 1, “digital_sensor”, “d”);

sensors1.begin();
sensors2.begin();
sensors3.begin();
sensors4.begin();
sensors5.begin();
}


#17

Sorry, just saw my own error (I must be getting tired…).

Here is the correct code, and it seems to work:
void setup()
{
// set digital pin to output
pinMode(RELAY_DIGITAL_PIN1, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN2, OUTPUT);// relè pin
pinMode(RELAY_DIGITAL_PIN3, OUTPUT);// relè pin
digitalWrite(RELAY_DIGITAL_PIN1, LOW);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN2, HIGH);// set relay to off at startup
digitalWrite(RELAY_DIGITAL_PIN3, HIGH);// set relay to off at startup

// Serial.begin(9600);
Cayenne.begin(username, password, clientID);// not used: arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac
delay (100);
Cayenne.virtualWrite(7, 0, “digital_actuator”, “d”);
Cayenne.virtualWrite(8, 1, “digital_actuator”, “d”);
Cayenne.virtualWrite(9, 1, “digital_actuator”, “d”);

sensors1.begin();
sensors2.begin();
sensors3.begin();
sensors4.begin();
sensors5.begin();
}


#18

first remove all the widget from your dashboard, add 3 button on dashboard from add new > widget/device > custom widget > button and use correct channel (7, 8 , 9).
then in your code change this

to

Cayenne.virtualWrite(7, 0);
Cayenne.virtualWrite(8, 0);
Cayenne.virtualWrite(9, 0);

#19

Thank you shramiksalgaonkar for your kind advice, I will try this.


#20

Hello shramiksalgaonkar,
I have tried your suggestion but I seem to get a very strange and erratic behavior.
If I reset the Arduino, then the dashboard seem to get in line OK, but then, if I refresh the browser, the widgets all fall back into OFF position, regardless of what was their original state.

Moreover, I still experience a very, very, very slow response from dashboard commands. That is, if I click on one of the actuator icons, it can act immediately or it can take lots of seconds, even one minute, before it sends the relevant command back to Arduino. Much, much to slow.

Finally, I can get the App of the smartphone (Android) and the dashboard on the PC totally misaligned . So I can have, for example, all icon on the off state on the dashboard and some on some off on the Applet. This is totally confusing and creates problems. In short, I will never be sure of what the situation is from a remote location, I may believe the pump is ON while in fact it is off or vice versa. This, if not fixed, makes the system totally useless.

I believe Cayenne staff should not have force the move over to the new system until all such aspect where fixed, it was, in may view, a little rushed decision that could really cause lots of unhappy users, such as myself :frowning:
Do hope a complete fix is done or that they consider rolling back to the previous system until a more stable situation is found.
Sorry, cannot be optimistic as for now.