I want to make an energy management system taking advantage of the solar energy surplus of my house. I am using two current sensors, one voltage sensor and relays with an Arduino Mega 2560. I have the code for read the current, read the voltage but don't know how to program that when current sensor measurements (production-consumption>240 watts) the relay is activated and also, when the voltage sensor measures a minimum voltage of 10,5 V the relay is activated too.
Moreover, I want to save the current, power and voltage data in a SD card.
Thanks in advance!
my project. take what you need.
I read the solar production data over modbus from smart meter. I regulate the power of a heater. I measure the current consumed by the heater. I log all the data to SD card.
Watts is Volts x Amps. You want > 240 Watts net OR V > 10.5 to trip a relay.
Relay goes on at 10.51V and the drain takes V down to 10.49 before it turns off. It might do that many times a second until the relay burns up or just heat the room a little. You want to switch ON at higher V than you switch OFF, the least you save on are the surge and sink effects right after switching.