2 way lighting circuit control with blynk and feedback updates

OK So now for part two the heating control for the two room sin the shed via the Blynk app.

Each room has a 1.5kw oil filled radiator in it(see pic in part 1), a DHT22 temp and hunmidty sensor and a PIR occupancy detector. THere is also an externaL DHT22 mounted externally to monitor outside temp and humidity as well. Each of the radiators is controlled by a 30A mechanical relay which can be seen in the centre of the control box - the board with two of them on.

The blynk app displays temp and humidty in each room and outside. It also shows todays runtime for the heating, and yesterdays runtime, and the current status of the heating ie on or off.

This is all shown in the first screen below.

The clever bit of this is the occupancy control. On the next screen are the thermostat settings for each room. There are two sliders per heater- one to set the desired temp and one for the away temp. The software works by sensing if there is anyone present in the room via the PIR occupancy sensor(shown below red circle)

Here is the blynk screen for this…

Blynk will set the temp back to the away temp when no movement is detected in each of the rooms for one hour, and inversley it remembers the required temp for each room, so as someone enters the room it will automatically turn the heating back up to the required temp, set originally by the temp slider.
ie room set to 20c away temp set to 15c, after 1 hour of inactivity pinshack temp slider will drop back to what the away temp slider says, ie 15c, and if someone re-enters the room the pinshack temp slider will jump back up to 20c heating the room.

The principal behind this is to save energy when you leave the room, and to turn heating off or down if you forget to do it yourself. It also gives a constant background temp(away temp) to keep the rooms stable. Of course if you don’t want to wait until you enter the room to heat it up you can just move the temp slider up to what you want to preheat the room, but if you dont enter within the hour it will go back to the away temp!

This works a treat and has proved economical

Also on the temp screen I record and display the Max and Min temps for each DHT22 sensor (ignore the slider for my lounge light!! thats another project)

Finally I have another screen that displays stats and has a hidden slide up again to be abel to reset various values.

Here is the screen…

So on this screen I have a grpah that displays on it, Pinshack temp and Hunmidity, Outside temp and Workshop temp.
The widgets underneath show electricity consumption per room and a total. So we have KwH of elec used per room, Todays elec cost per room, Yesterdays cost per room, Each rooms total cost since last reset and finally the total cost to heat the whole shed.

All of these stats can be indivdually reset by sliding up this screen to reveal the buttons shown below…

On here I also have the ability to remotely switch the sauna on and display it’s on time(runtime).
I have widgets to reset pinshack runtime stats, workshop runtime stats, maxmin temps reset and finally a button to reset all the elec stats back to zero. I also hav hidden the amil and timer widgets here as well.

Thats it !!!

For those interested here is a pinout spreadsheet for all the inputs and outputs to Arduino Mega.

And here is the software - be warned it’s huge, but well commented!!!

codes too big not sure how I add it??? shout if anyone wants it

Cheers

kev

2 Likes