Let me bring this topic back from the dead.
My 1st Prototype Generator controller has been running since February at a clients house (although they do not know that it was a prototype). It was built on Single Sided board that I used the Toner Transfer method to produce. Almost all through hole components, except for the SMD transistors, some resistors and decoupling caps, as well as a lot of bodge wires, which are all on the underside of the board.
I had a few problems (with a lot of trips out to the customer during Loadshedding times).
1) Software did not account for the generator stopping unexpectedly (stalling for dirty / no fuel, etc). So basically it would stop, and that would be it. the software sounded an alarm but did not restore mains, or anything (oops)
Fixed that by changing the code so that the Mains Contactor only drops out just before it transfers load to the generator contactor (and yes, they are mechanically and electrically interlocked).
If there is any stall, or anything, it immediately changes back to the mains contactor, and shuts off the engine relay, and sounds the alarm.
Then after 10 minutes, it tries to restart the generator. After 3 times with it failing, it then locks out (silencing the alarm so they do not get annoyed, keeps the mains relay in (so that when mains is back they have power), and it stops the generator from restarting.
A power cycle then resets this.
Then the next time
2) MCLR pin Pullup was too weak, randomly causes it not to work.
Changed it.
Then the next time
2) the LVP Pin decided to keep on jumping into LVP programming mode (even though that fuse was turned off). This caused it to not start the program several times, or as soon as a contactor pulls in, or there is the slightest change in the field in the enclosure, it resets and locks up.
It did have the LVP pin on a header for the Pickit 3 programmer, and I think that acted like an antenna.
Pulling LVP low with a resistor sorted that out.
Then the next time
3) Exhaust had come uncoupled and was pointing right at the steel enclosure. It had melted the LED pilot lights on the enclosure. The Slotted Trunking inside was also melted, and the 85degree caps were rippling like crazy. Replaced the caps and LED's. Tightened the exhaust and all was fine again.
Then the next time
4) The customer did not know that her generator does not run when it has gone through all its fuel. I sent her to get the fuel, and then it was fine again.
Then the next time
5) Corrosion on the battery terminal caused the charger's negative wire to corrode off.
This genset does not have a 12v output to charge its battery when running, so eventually it got too low for the controller, which caused the PIC to keep resetting each time it tried to crank.
And her battery was had it.
Sorted that out, and it was all fine again.
So the MCLR and LVP, and Software were the only hickups with the controller itself, the rest were lack of maintenance (and not understanding that if your generator has already done 95 Hours, that it will need some petrol, even if it does not have a fancy controller).
My Father in Law is an electrician, and his company has just ordered 2 of the controllers (complete with Contactors, Chargers, etc for his customers - Basically the whole panel), so I finished my Double Sided PCB design on Sunday, and have sent it to ITEAD to be made up (10 Prototype PCB's, and DHL'ed to me (total of about ZAR750 / 63USD) Most of that cost being the DHL).
So I thought I would update you,
and once I have this version up and running, I will post some pics of it....
P
So hopefully this newer version will be better