Project in progress
Generator ATS

Generator ATS © CC BY-NC

Automatic switch controller and generator monitor.

  • 47 respects

Components and supplies

Ph a000066 iso (1) ztbmubhmho
Arduino UNO
12V Sealed Lead Acid Battery 1.2Ah
Mechanical Changeover Auto Switch
Two required to isolate genset output
8 module Arduino Relay board 5V
12v to 5v Power supply 2A
230V 12v Intelligent battery trickle charger

About this project

An Automatic Transfer Switch is the device that starts the Generator and connects it to the installation Automatically when there is a power outage.

Importantly, when the Generator is connected the Mains supply must be completely Isolated from the installation. The Changeover Switching must be linked Mechanically. Using relays and Arduino uno in conjunction with mechanically linked Auto changeover switch, this ATS will start and run generator and monitor Engine and alternator output.

The mechanical changeover switch detects a supply failure and switches the mains over to the generator supply. This is not good, because the generator has not been started and the Load should not be connected immediately. To overcome this, a 25A Relay activated from the Arduino keeps the Gen circuit open until the Genset set has started and is up to speed.

The arduino is coded to Switch on the Generator via Relay when the power fails, it also uses a relay to close the Starter motor circuit for an adjustable period of time, and repeated until the Arduino detects the Generator voltage is constant. After a short delay to allow the engine speed to settle and voltage output to stabilise, the Arduino closes the 25A Relay to connect the Load on to the generator supply.

The generators Low oil warning circuit will be used to monitor and if detected shut down the generator.

Generators should not be shut down with a Load connected, so the shutdown procedure will controlled by the Arduino, first disconnecting the Load, allowing the generator to run off load for a short while to cool Alternator then shutting of Engine.

The parts for this project cost around the £150 mark, commercial ATS cost from £500 upwards depending upon functionality. Using the arduino allows greater expansion and connectivity with perhaps remote sensing


CODING IN ProgressPython
Any suggestions will be gratefully received, very new to Python coding, last coding experience was Loco Basic 1985 ish :)
 // set pin numbers:
const int MainsSupplyPin = 2;     // the number of the pushbutton pin
const int RelayPin3 =  3;      // the number of the Relay pin
const int RelayPin4 =  4;
const int GenSwitchPin5 =  5;
// variables will change:
int MainsSupplyState = 0;         // variable for reading the MainsSupplybutton status
int GenSwitchState = 0;         // variable for reading the GenSwitchbutton status

void setup() {
  // initialize the Relay pin3 as an output:
  pinMode(RelayPin3, OUTPUT);
  pinMode(RelayPin4, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(MainsSupplyPin, INPUT);
  pinMode(GenSwitchPin5, INPUT);

void loop() {
  // read the state of the pushbutton value:
  digitalWrite(GenSwitchPin5, LOW);
  MainsSupplyState = digitalRead(MainsSupplyPin);

  // check if the MainsSupplybutton is pressed.
  // if it is, the MainsSupplyState is HIGH:
  if (MainsSupplyState == HIGH) {
    // turn Relay on:
    digitalWrite(RelayPin4, HIGH);
    digitalWrite(RelayPin3, HIGH);
  } else {
    // turn Relay off:
    digitalWrite(RelayPin3, LOW);
    digitalWrite(RelayPin4, LOW);


Block Diag. Gen ATS
Screen shot 2017 05 05 at 23 23 59 r1tm6yi63f


Similar projects you might like

A Tone Generator With LCD Display!

Project tutorial by cronenborg

  • 13 respects

Signal Generator with Arduino Using DDS and Pico

Project tutorial by pokitMeter

  • 1 comment
  • 11 respects

Random Number Generator with 8x8 LED Matrix and Arduino

Project tutorial by LAGSILVA

  • 18 respects

Persistence of Vision Arduino Code Generator

Project showcase by Team Chusocreations

  • 6 respects

ANDI - Random Rhythm Generator - Electronics

Project tutorial by ANDinstruments

  • 1 comment
  • 29 respects
Add projectSign up / Login