I'm in the process of building a computerized controller for my generator. I have finished wiring the controller, now I'm debugging it and writing software. Unfortunately writing code is more like work for me so my pace is not as fast as when I'm doing something fun. Once finished, I'll be able to close a switch at the house and the generator will start itself and warm up. Once running, I can throw the transfer switch and the lights come back on... All without having to go out to the generator shed.
Based on following several of the threads on the subject, I am monitoring the following items:
RPM (via optical pickup on flywheel)
oil pressure
water temperature
injector line temperature
fuel level (WVO and diesel)
run/stop
emergency stop
I am providing the following outputs:
Starter relay
decompression relay
fuel relay (WVO/diesel)
speed control (via stepper motor)
glow plug relay (If I ever add one to my engine)
I'm using a stepper motor to move the speed control on the engine. I'll be able to start the engine and allow it to warm up at a reasonable speed before raising the rpm to 1800 to generate power.
Once the engine is fully up to temperature and the injector line is at least 70ºC I will switch from diesel to WVO fuel. On shutdown, the controller will switch to diesel fuel for a couple of minutes to purge the WVO from the system. An emergency shutdown (low oil pressure etc...) will immediately move the speed control to stop and open the decompression lever until all rotation has stopped.
After shutdown, the controller will move the speed control back to the nominal 1800 rpm setting so I can manually start the engine in case of a dead battery or a failed controller.
Eventually I will build in a software PID controller to keep the RPM exactly at 1800 rpm (the Changfa governor is not perfect).
I am using an Atmel ATMega8 AVR cpu as the heart of the controller. The AVR is similar to the PIC cpu. At work, one of our customers uses AVR cpus, so I've had some exposure to using them.
Here is my first version of the schematic:
I am open to suggestions for ways to improve the system.