Timer for Automotive Battery Charger

by JRV31 in Workshop > Motorcycles

3933 Views, 23 Favorites, 0 Comments

Timer for Automotive Battery Charger

Screenshot from 2014-11-13 09:00:32.png

This instructable uses an Arduino to control an automotive battery trickle charger.

The charger will come on for 1/2 hour every three days.

Your battery will stay charged when you store your car or motorcycle over the long winter.

Timer for Automotive Battery Charger

Screenshot from 2014-11-13 09:00:32.png

If you store a car or motorcycle over the winter this timer will make sure that the battery stays charged.
It uses an Arduino to turn the charger on for half an hour every three days.

The Arduino sketch is simple. It is the blink program with longer delays.

You will need:

1 Powerswitch tail (http://www.adafruit.com/product/268)

1 Arduino (http://www.adafruit.com/products/50)

1 USB cable (http://www.adafruit.com/products/62)

1 Power supply for Arduino (http://www.adafruit.com/products/63)

2 Jumper wires (different colors)

1 Automotive battery trickle charger

1 Small Screwdriver

Learn How to Upload a Program to the Arduino

If you already know how to use an Arduino you can skip to step three.

If you are not familiar with Arduino this page will help you get started:

http://arduino.cc/en/Guide/HomePage

Use the USB cable to connect the Arduino to your computer.

Start the Arduino IDE program.

Click on Tools=>Board and select your Arduino board. (I used an Uno)

The Arduino Should find the correct serial port.

Click on Tools=>Programmer and select "AVRISP mkII".

Copy and paste this small program into the Arduino IDE.

//  Blink
//  Turns on an LED on for one second,
//  then off for one second, repeatedly

// The setup() method runs once, when the sketch starts 
void setup()
{   
  pinMode(13, OUTPUT);   // initialize the digital pin as an output 
}

// the loop() method runs over and over again, 
// as long as the Arduino has power void loop()            
{
  digitalWrite(13, HIGH);   // set the LED on   
  delay(1000);               // wait for a second   
  digitalWrite(13, LOW);    // set the LED off   
  delay(1000);              // wait for a second 
} 

Click on the right arrow to upload the program to your Arduino.

There is an LED on the Arduino board connected to pin 13, this should be blinking on for one second and off for one second.

Congratulations, you have your Arduino working.

Now that you have this test program working you can load the actual timer program, it is just the same program with longer delays.

Upload the Timer Program to the Arduino

Copy the following code into the Arduino IDE and upload it to your Arduino.

//  Timer<br>//  Turns on an LED on for 1/2 hour, 
//  then off for 71 1/2 hour, repeatedly.

// The setup() method runs once, when the sketch starts
void setup()
{
  pinMode(13, OUTPUT);   // initialize the digital pin as an output
}

// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()            
{
  digitalWrite(13, HIGH);    // set the LED on
  delay(1800000);            // wait for 1/2 hour
  digitalWrite(13, LOW);     // set the LED off
  delay(257400000);          // wait 71 1/2 hours
}

Final Assembly

Screenshot from 2014-11-13 08:59:01.png

Insert the jumper wires into terminals one and two on the powerswitch tail
and tighten the screws on top to hold the wires in place.

The wire from terminal one goes to pin thirteen of the Arduino.

The wire from terminal two goes to ground on the Arduino

Terminal three is not used.

Hook up your battery charger, plug everything in.

The Arduino will automaticly reset every 49 days, don't worry about this.