Thanks for the encouragement. I don't know much about PLCs but do know about raspberry pi's and python so I figured I would go that route.
Mentally putting it down, my logic would look something like this (welcome your input):
- Attached a sensor attached the pi that would give ambient temperature.
- Have some logic if the temperature is between x-y then preheat for x seconds (would have few different ranges here)
- Prime for 2 seconds
- Energize the crank circuit for 15 seconds (along with the prime, preheat and run circuits)
- Check for oil pressure at the TB5-9 pin (keeping the run and prime circuit energized only)
- If oil pressure- do nothing else except for keeping run & prime circuits energized (assuming generator is running at this point)
- If not preheat for x seconds (dropping the run circuit) and start the process over again at prime.
- If I were to go though 2-3 cycles and still no oil pressure stop.
For shutdown:
Removing 24v from any S1 circuits that are closed (prime,run)
My assumption would be once power is removed from S1 position 14 (or TB5-7) the generator will shutoff?
My thoughts behind using a Pi is, once I get things autostarting, I could get a little more fancy about voltage output, load, engine temp, etc.
My logic is,
1. Poll a GPIO pin every second, if True count to 6, if still true start generator if false reset counts (GPIO is going through one of the relays on the Pi board, this relay is powered by a 120V AC to 5V DC power supply)
2. Set S1 to Run for 3 seconds
3. Set S1 to Start for 3 seconds
4. Wait 5 Seconds then check hour meter for power (during my initial setup this seemed to be the best place to check if the set was running. It does have a flaw though)
5. If hour meter has power let Generator warm up for 30 seconds.
6. Close AC Contactor
7. Close a relay to send 12V DC to my Generac ATS
8. House is now on Generator Power
9. Monitor the GPIO Pin from step 1 and wait for False, when power comes back count to 120, if still False Stop sending power 12V power to ATS
10. Open AC contactor
11. Let generator cooldown for 60 seconds then shutdown
12. Reset all parameters so the program starts over from the beginning.
IF power is not found on Hour Meter from step 5
1. Set S1 to off
2. Set S1 to preheat for 15 seconds
3. Set S1 to run for 3 seconds
4. Set S1 to Start for 6 seconds (added 3 seconds)
5. Check hour meter again
6. If it fails again it tries 1 more time but with 30 seconds of preheat and 9 seconds of cranking
7. If the 3rd attempt fails set everything off and print an error in the terminal with a date stamp
Now about this problem with measuring power from the hour meter to check if the engine is running, during my testing I found IF the 803a goes off on a safety it shuts off power to everything except the indicator warning panel, including the hour meter. So if the set fails to start due to low oil pressure (most often happens in the extreme cold) the program can "see" that and attempt a restart.
Now the problem, I just found out the "safeties" only come on IF the MPU disengages the starter. Meaning the engine has to "almost but not quite" start.
IF the set just cranks without even trying to start apparently the Hour Meter still has power so my program "thinks" the engine is running and continues.
I'm still working on a solution to this problem.
PLEASE keep in mind my set is an 803a, not a 003a like yours so some things will be different. I purposely didn't give exact wire numbers or terminal positions for this reason. I only hope that my thought process helps you in making your program.