Author Topic: In Design Phase of Generator Controller  (Read 5716 times)

0 Members and 1 Guest are viewing this topic.

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
In Design Phase of Generator Controller
« on: January 21, 2015, 08:09:06 pm »
Hi All.
I am in the process of designing my own Generator Controller (With AutoLoad Transfer)
I am loosely basing it on a similar system that I had to repair the other day. (The PIC in that one had died, and manufacturer still hasn't gotten back to me with a hex file, So I wrote my own code for it).

So I have the code, and the basic operation of the system, Now I want to start making my own controller PC Boards.
Attached is a PDF of an Eagle Schematic I am working on.

The Inputs are:
A test Button Input (N/O, when closed applies 12v to the TEST Terminal)
A Mains Input (230vac) that goes through an opto into the uC
A Generator Input (240vac) that goes through an opto into the uC
A 12v Input from the Generator's Battery
Some buttons, and an analogue Pout.

The Outputs are:
2 x Status LED's
1 x Ignition Relay (12v)
1 x Starter Relay (12v)
1 x Alarm Relay (12v)
1 x 230v Mains Relay (to pull in the Mains Contactor)
1 x 230v Gens Relay (to pull in the Generator Contactor)
The Relays all have an LED across them to Indicate operation

Other Stuff :
ICSP Header
The Mains and Generator Contactors themselves are Electrically Interlocked using their N/C Contacts, as well as a mechanical Interlock
I am planning on using as much SMD as possible (except for the Caps, Connectors, and anthing that is on the 230v Side of things).

Please feel free to look at the schematic, and tell me if you spot anything wrong.

BTW, The controller I am basing this on is on my site http://plus.org.za if you want to see pictures

Thanks
Peter
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #1 on: January 24, 2015, 01:20:42 pm »
Hmm?
Just bumping this to the top of the list,
I cannot believe that with all the pro's on this forum,
that nobody has any comment on this?

P
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: In Design Phase of Generator Controller
« Reply #2 on: January 24, 2015, 01:45:09 pm »
C4, 5 are shown with wrong polarity.

Those AMF units are selling for around R3500 at the moment, which is a lot to pay for a simple collection of relays and sensors. you probably could build a few boards and sell them as replacements if the original ones are dead. Generally the electric start gensets all come with an AMF option available at an extra cost, and that is something you probably could make up and sell, and add extra code to make it more reliable.
 

Offline Phoenix

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: au
Re: In Design Phase of Generator Controller
« Reply #3 on: January 25, 2015, 09:59:31 am »
I cannot believe that with all the pro's on this forum,
that nobody has any comment on this?

OK, I'll bite. Your optocouplers have the wrong net labels. I.e. GENS -> MIN and MAINS->GIN. They should be swapped.

What's the purpose of D6 and D7?

Perhaps you should have some relay interlocking mechanism on K4 and K5 (using 2 pole relays instead). The main change over contactors would/should be interlocked anyway, but that's beyond your control if you only make this card and others make the box.
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #4 on: January 25, 2015, 03:06:43 pm »
Quote
Your optocouplers have the wrong net labels. I.e. GENS -> MIN and MAINS->GIN. They should be swapped.
D'oh. Thanks, I fixed that now.

Quote
What's the purpose of D6 and D7?
Quote
I dont really know. That is how I think looks in the controller I reverse engineered. Unfortuantely the way I reverse engineered their schematic was through photos I took of the front and back of the board, so I cannot see some of the traces. Maybe it is to protect the LED in the opto from too high a reverse voltage? Anybody care to comment?
Quote
Perhaps you should have some relay interlocking mechanism on K4 and K5 (using 2 pole relays instead). The main change over contactors would/should be interlocked anyway, but that's beyond your control if you only make this card and others make the box.
Good Idea. Whenever I make up a box, I always Mechanically and Electrically Interlock the contactors. But other panelbuilders might be too lazy, or too cheap to do that.

Thanks for the insight. Guess I need to prototype (veroboard) before I get a board made.
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: In Design Phase of Generator Controller
« Reply #5 on: January 25, 2015, 03:42:39 pm »
The diodes are reverese voltage protection for teh optocouplers LED. Nothin' more or less.

You can't put 300V in reverse to the LED. So the current is passed through the external antiparallel diode. But that makes twice the power dissipation in the 220k resistors. Better to use 1N4007 in series.
« Last Edit: January 25, 2015, 03:44:20 pm by Yansi »
 

Offline Phoenix

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: au
Re: In Design Phase of Generator Controller
« Reply #6 on: January 25, 2015, 11:10:01 pm »
The diodes are reverese voltage protection for teh optocouplers LED. Nothin' more or less.

Ah, that makes sense.
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2608
  • Country: us
Re: In Design Phase of Generator Controller
« Reply #7 on: January 26, 2015, 12:00:11 am »
I'd make the relay that controls the utility power contactor a double pole, and place the spare NC terminals in series with the NO terminals of the relay for the generator contactor.  That gives you an interlock that prevents both contactors from being energized at the same time should your PIC lose its mind for some reason.  Even better would be to use a set of auxiliary contacts on the utility contactor as the generator contactor interlock.  Better still would be to do both.

You're going to want some serious protection on the 12V input.  Look to automotive appnotes for hints.
 

Offline VintageTekFan

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: In Design Phase of Generator Controller
« Reply #8 on: January 26, 2015, 02:54:55 pm »
I would definatly look at including some engine status back to the controller - and figure out what to do in case of an engine
  • overheat
  • low oil
  • low fuel
The three laws of thermodynamics:
1. You can't win.
2. You can't even break even.
3. You can't get out of the game.
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #9 on: January 26, 2015, 04:01:18 pm »
This controller is more for the smaller (6KVA Single phase and under) gensets.
These are normally keyswitch operated. The circuit basically gets paralelled with the switch, so that the genset can still be operated manually.

As I understand it, there is an oil pressure switch on the genset, that kills the ignition if there is low oil anyway.

They do not have fuel level sensors, temp sensors, etc.

I am also trying to design it, so that the installer does not need to hack more sensors, etc, into it. Because most of the installers down here are not too clued up.

P
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #10 on: February 01, 2015, 09:32:32 am »
Just Checking on this, as it confused me a bit last night.
Take my Input Circuitry :


Does this mean that I have to enable Pullups on PORTB, in order for it to float high, until the Opto conducts, then it goes low.

What I would Ideally like is for the pin to be held low, until there is a voltage coming into the opto...
Would this work :
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: In Design Phase of Generator Controller
« Reply #11 on: February 01, 2015, 01:10:23 pm »
Hi All.
I am in the process of designing my own Generator Controller (With AutoLoad Transfer)
Sorry OP for not seeing this earlier...!
I did a superset of what you're looking for about five years ago, with a stack of control and monitoring options including an onboard RTC and scheduling.  At the time it was PIC16F887 based - and worked beautifully.
It may have more functionality than you need, but I'm happy to work through with you offline.

There are many factors you may want to consider for failsafe operation and other situations - along with multiple start attempts etc.  One variation in mine was use of a third-party transfer switch... that just worked (and was type approved).

The controller included other plug-in options:-
  • RS485 external buss (support one or more LCD keypad for local operation)
  • Wireless keychain remote start/stop
  • AC load sense & auto start / stop
  • SMS/GPRS operation and reporting (text & email) + web & telnet operation and configuration (also on RS485)
--- and more.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: In Design Phase of Generator Controller
« Reply #12 on: February 01, 2015, 06:28:12 pm »
Whichever one you do ( and I lean to the second one as it has a better defined logic level ) add a series resistor between the capacitor and the optocoupler transistor. 100R will do, to limit the transient current in the switch as the opto transistor turns on after it has been off and the capacitor has charged to 5V. The transistors are only rated for 100mA max, and a few hundred cycles of the capacitor discharging through it will at best lead to parameter shift and at worst to it going open circuit.
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #13 on: May 18, 2015, 06:54:33 pm »
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
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: In Design Phase of Generator Controller
« Reply #14 on: May 18, 2015, 07:19:35 pm »
Great work
It sounds like we had the same customers!
The LVP issue was interesting.
Good luck, I'm looking forward to the build pics.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #15 on: May 25, 2015, 07:08:20 pm »
Well, My boards from ITEAD arrived today.
Damn! I forgot to order the Darlington Array SMD chips the other day.
Glad RS does next day delivery....
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #16 on: June 10, 2015, 07:03:00 pm »
Ok, Here are the pics of the assembled control unit.
I have installed 1 yesterday (at a local car Dealership showroom), and will be installing another 2 next week (one at a house, and one at another car Dealership.
They are run with a PIC micro, and (so far) the software is only 170 lines of C code.
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: In Design Phase of Generator Controller
« Reply #17 on: June 10, 2015, 07:11:17 pm »
Nice, and almost idiot proof........
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: In Design Phase of Generator Controller
« Reply #18 on: June 11, 2015, 03:35:47 pm »
Well, No matter how idiot proof you make something,
you will always get a more resourceful idiot....

I do have electrical Interlocking with the NC Auxiliaries on the contactors,
and also the Mechanical interlock between them.

Also, the fact that my clients are scared of touching anything electrical, means that it should be fairly ok.....

====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: In Design Phase of Generator Controller
« Reply #19 on: June 11, 2015, 06:07:53 pm »
Just need labels now and an extra one with your contact details for when they break it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf