Automate start/stop of a power generator

Hi all!

The idea is to generate an automatic starting mechanism for a home power
generator (not industrial).

I guess this could be done with a PLC, but this I think it would a very
expensive alternative, so I thought maybe, if it possible, the control
device could be replaced by Arduino.

I think to have defined the connection logic, but I would analyze and
translate this logic to the real model in which each component would be
physically connected with the intermediate elements necessary.

Then We would have the Arduino being fed by UPS, which receives line
voltage (220 V). When there is a power interruption, the UPS goes into
"Battery", feeding the Arduino, which controls at all times the line
voltage. If the voltage is zero, the power generator is activated.
In case of finding a value greater than zero, the generator is disabled.

The generator is also connected to the same power line to provide power
to the input of UPS. Here I am not sure whether an intermediate element
should be connected between the generator and the line to ensure that
the electrical current to flow only in the direction from the generator
to line if:

a) in the case when the power generator is turned off, the current
coming from the line in what would be the output of the power
generator could eventually cause damage.

b) in the case that the power supply is restored and during the interval
of time the generator is on, the meeting of the incoming stream of
the line with that provided by the generator could even cause some
damage to the electrical system.

Perhaps placing an electric device in the line before the generator is
connected to it, so as to interrupt the current from the line while the
generator is activated can avoid potential problems may occur by a) and
b).

This whole issue is worth resolving if is there any way of connecting
the home power generator to the Arduino. As I was researching, those
generators without autostart, allow be turned on via a key or button. I
I don't know if it will come with another alternative mechanism. The
issue would be how to change this manual mechanism for a form where the
on/off is controlled by Arduino.

Moreover, to have a more complete control, also I thought Arduino
perform the monitoring of the load level on the tank. Here the issue is
where to put the sensor in the tank, in case really necessary that the
sensor is inside, as the tank should be always closed or clogged.
Although I read some time ago that there are sensors to measuring levels
from outside (capacitive sensors?). I think the further away the
electric sensor of the fuel, better for security.

This Arduino would be connected to a computer which monitoring through
Nagios [1] so that it sends a message about the state of tank level as
well if the generator is stared or not.

To completely automate this circuit and make the generator is turned
once a week, maybe I could develop a script that runs with crond on the
computer that is connected to the Arduino, so that the script sends a
start command to the generator during a short period of time at a
certain time a given day of the week for the generator starts by
maintenance, but well... this would be the icing on the cake :smiley: So I
did not add this in the attached graph.

I was thinking the part that would make switching between the power line
and the generator. Also I attach this diagram to tell me if I am well
oriented. Beyond the general appreciation you can give me, I doubt if
the connection that I marked with the circle is well done.

Thanks in advance for your reply.

Regards,
Daniel

[1] http://www.nagios.org/

How does the arduino control the line voltage ?

There are a whole bunch of legal issues everywhere, if you want your generator feeding into the same power supply in your house as the normal external supply runs into.

It requires a foolproof method of ensuring that the generator cannot be connected to the outside supply. This is an issue if the power comes back on. It is also an issue if the power flows from the generator to the outside of your house, and can injure workers who may be trying to fix the power lines outside your house.

There are ways of implementing a foolproof changeover method, it is not something a hobbyist should fool with.

The other part of your project, is to automatically start the generator. That is certainly something you could do with the arduino, provided the issues mentioned above are dealt with. Does your generator have an electric starter ?

The only way I can imagine this being done safely (other than buying a product that does the job) is to use a mechanical switch to connect the load to EITHER the incoming mains supply OR the generator output but never both. You will have deal with any issues from switching circuits that are under load and coping with the inrush current when you switch over.

I can't think of any really foolproof algorithms for deciding when to start the generator but I suppose you could just use the mechanical switch to connect a 'demand' signal when the load is connected to the generator and have a controller to start the generator if there is a demand and it isn't running, and stop if if it is running and there is no demand.

I'm glossing over any issues to do with starting the generator reliably, but it may not be trivial to automate.

Hi michinyon.

My idea is that Arduino controls the line voltage using a circuit
similar to that proposed by vrgomes with DC 3V Adapter [1]. If the
voltage at the analog input is zero, then the relays are activated.

What do you think?

Do you think is correct the wiring between relays, UPS, generator
and line?

Thanks for your reply.

Regards,
Daniel

[1] Arduino Forum

The item you need is automatic transfer switch ;-

  1. When utility power is out, the automatic transfer switch immediately send signals the generator to start.
  2. Once the generator is running at proper speed, most is after 20-30 seconds delay, the automatic transfer switch shuts off the utility line and opens the generator power line.
  3. When the automatic transfer switch senses the utility line back, it re-switch the electrical load back to the utility line and resumes monitoring for next utility loss.
  4. The generator will continue to run for an engine cool-down period of time then shut down by automatic transfer switch.

Since this is the Arduino forum and u like Nagios, so do I, We could add Arduino as nagios agent connect with automatic transfer switch. which send out alert to Nagios then Nagios send out email, sms, fax, voice call ( via TTS text to speech), as well as send out automatic order for food delivery from take out restaurant.

I think order food is most important, since we are out of power and can not afford out of food same time.

You hook up a sensor to monitor the whether there is power in the mains. You cut the incoming mains line immediately after that sensor and put a relay on it.
The line from the generator is also connected via relay to the network you want powered.
When the sensor detects there is no power in the mains it decoupled the mains relay, starts up the generator and closes the generator relay. When the mains receive the power, the sensor again sends the signal, the generator is turned off, generator relay decoupled and the mains relay activated.

It requires a foolproof method of ensuring that the generator cannot be connected to the outside supply.

This is not necessary true, not even from day one we use electronic. we got AC from AC power grid, in the grid there are a lot of power plants/generators interconnect each other, all is need is sync. The tech behind is power grid feed-in.

for people installed solar panel, solar power grid feed-in is very popular and profitable since utility corp pay for feed back power. The device is Grid-tie inverter.

sonnyyu:

It requires a foolproof method of ensuring that the generator cannot be connected to the outside supply.

This is not necessary true, not even from day one we use electronic. we got AC from AC power grid, in the grid there are a lot of power plants/generators interconnect each other, all is need is sync. The tech behind is power grid feed-in.

for people installed solar panel, solar power grid feed-in is very popular and profitable since utility corp pay for feed back power. The device is Grid-tie inverter.

The issue is, when you lose power the power utility company will send out people to repair it. Those people flip a breaker at the pole, so they know THEIR generators are not providing any power to the section of line they are working on. If you don't have a transfer switch or disconnect, YOUR generator can be sending power down a line that the workers think is off. Your generator could severely injure or kill someone working on the power lines. Do you really want to take that chance?

sonnyyu:
This is not necessary true

I strongly disagree.

If you connect your own AC power supply to the mains WITHOUT PERMISSION AND APPROVAL FROM YOUR ELECTRICITY SUPPLIER then it can be extremely dangerous and might even be illegal in some situations. There are lots of conditions that have to be met for this to be done safely. Simply connecting a generator output to the mains absolutely is not safe. Connecting it via a grid feed-in unit of the sort you show is also NOT SAFE unless your electrical supplier has explicitly authorised that, and that pretty much means that they will have installed it for you. Suffice to say if you know how to do that safely, you won't be coming to forums like this asking for advice on how to do it. For anyone asking here, the only safe answer is that you must not allow your generator to connect to the incoming mains supply under any circumstances. The most reliable way to ensure that IMO is to have a mechanical switchover system wired so that it is physically impossible for the two sources to be connected together.

If you connect your own AC power supply to the mains WITHOUT PERMISSION AND APPROVAL FROM YOUR ELECTRICITY SUPPLIER

You can't do, ELECTRICITY SUPPLIER might need updated ELECTRICITY meter to support both way measurement.

Connecting it via a grid feed-in unit of the sort you show is also NOT SAFE unless your electrical supplier has explicitly authorised that

electrical supplier has to, otherwise you not get monthly check.

I am the person vote automatic transfer switch which normally has CE or UL certificate and require PRO installed, Now we only deal with arduino via TTL level (5/3.3V).

The most reliable way to ensure that IMO is to have a mechanical switchover system wired so that it is physically impossible for the two sources to be connected together.

Yes, I strong agree.
Not long ago the place I live in has very long power shortage.

We run out food, gas, heat, hot water, even Verizon run out old pots (Plain old telephone) line at some aera.

This item at my to do list.

Reliance Controls 100 Amp Utility / Generator Transfer Switch, from HomeDepot $139.99

Some time UPS (Uninterruptible power supply) is far less important than UFS (Uninterruptible food supply) ,UGS (Uninterruptible gas supply) ...
Since u can not automatic all of them. only automatic one is over kill.

Hi all!

First of all, I want to thank you for all the responses received.

michinyon: with respect to the generator, the idea is to buy one with
electronic ignition. I think this would simplify the operation with
Arduino.

Moreover, some advised me to use an automatic transfer switch. These are
devices that are purchased, or is it an electrical installation that we
put together with a disposition of contactors?

sonnyyu: why you said that under these circumstances we only deal with
arduino via TTL level (5/3.3V). As you said above, the automatic
transfer switch is who is responsible for turning on the generator, so
if this device is purchased prefabricated, then we would not need the
Arduino to detect when the utility power is out nor it send signals the
generator to start.

I was investigating the Reliance Controls site, but I did not find the
model you mentioned. Anyway, I would have to see if there is a
distributor of this company here in Argentina.

Regards,
Daniel

[1] http://www.reliancecontrols.com/

automatic transfer switch

Hi, late to the party, but:

I built automatic generator controls for Broadcast Stations years ago. Arduino would be a LOT easier.

The Safety/Transfer issue: There are solenoid-driven transfer relays that mechanically lock out the possibility of generator to utility mains connection. Looking at them in detail in catalog I realized that they were identical to "elevator starting relays" which cost 1/2 the price. Elevators HAVE to be protected against any possibility of trying to go up and down at the same time :slight_smile:

I ran the whole system from +5V from a regulator from the 12V generator starting batteries. That's your "UPS". This could be done with Arduino.

Other interesting issues are timing ones: What are the statistics for power-off and power-on times in disturbances. There is better data today I am sure but I used something like:

  • If the power is off continuously for > 20 seconds the probability it will be off 5 minutes later is high. Start the generator. (This handles those quick drop-outs and the 5 second dropouts which are automatically restored.

  • If the power is on continuously for > 5 minutes the probability that the power will remain on for hours is high. Transfer back to mains power. Run the generator at no load for 5 minutes, then shut down.

I may build one for home use here. I have a friend who is an elevator repair guy who has offered me a relay.

** ALSO LATE TO THE CONVERSATION **

I made a comprehensive auto-starter back in the 00's
Unfortunately the project owner was a piece of work, and I walked away, but it had some very useful features. Auto demand-start, wireless remotes, SMS & net-connectivity among others.

Temperature, quality of fuel and others will affect the ease of starting.
The transfer switch must be an approved item, and the legality of how you connect the rest is between you, your skills, the local supplier and your preferred deity.

Ideally any starter will make several informed attempts with different sequence and timing strategies (choke, ignition-on time, crank duration etc), and determine run state from some form of feedback (RPM, existing 'run' indicator etc)... the sequencing is different for diesel and gas powered engines.

AND MOST IMPORTANTLY
Regardless of manual isolation switches - ALWAYS label outlets or equipment that can be activated automatically - with the dangers and instructions on how to isolate them!

I recently posted a link to my current 3G / SMS controller at www.SL4P.net
It may be worth re-engineering this as a dedicated engine controller... any interested takers?