Left for reference see post 2 for current progress.
My brother tasked me with setting up a Generator Auto Start.
I found a decent project on Instructables.
Its not exactly what I was after though.
Instead of monitoring the Generator RPS and installing the components to do so,
I would prefer to monitor the voltage to signal the generators on.
I changed a bit of the code and it all works fine, Line power on/off detected, Generator start Sequence
initiated on power off, Shut down on Failure or Line Voltage restored.
I am aware or creating multiple energy monitor instances, just not sure how to replace the program checking the rpms and replace it with the energy monitor to indicate Generator status.
In fact we can do away with all the rpm stuff.
If some one could help clear that up I'd be so thankful.
Hardware at the moment Mega 2560, 1-12v double relay
(the gas valve is power +/- to open & -/+ to close, so I have the leads to common and the NO/NC opposite NO +/- NC -/+)
1-5volt relay (power) to turn off the 12 volt when not needed, so only the Arduino,power supply and the 5v.relay are the only loads.on the battery.
RTC module
OLED
zmpt101b Voltage sensors.
The other stuff I'm waiting on.
I have tried to duplicate the first instance under the Gen status just like the line power (which works fine) but then I get a cascade of "Error a function-definition is not allowed here before '{' token" on compiling.
Not sure how to do the INO in post so its attached.
GENERATORAUTOSTART-1.ino (15.9 KB)