Introduction: Automated Power Tool Charger
Electric power tools changed the way most of us work around the house. Simple and quick, as no extension cords are needed. But they do come with some effort. I still have some power tools that are powered by old Ni-Cad or Ni-Mh batteries. They work great, but if they are not used on a weekly basis, the chances are good that their batteries will be drained when you want to use then. Thus, they need to be charged first before use. And some of the charges can take up to 14 hours to fully charge the batteries.
When the tools are not in use, a daily charge of around 30 minutes will keep the batteries fully charged, and the tool ready for use. So a normal programmable daily timer will work great in keeping the batteries full.
However, after using the power tools, their batteries will not be fully charged anymore. And a daily timer of 30 minutes will take several days, if at all, to recharge the batteries. Most programmable daily timer do have a manual override function that can be turned on to first charge the batteries. Then, after the batteries are charged, one needs to switch off the override function to continue the daily charge.
The idea of this project was to switch on the battery chargers on a daily basis. But after using the power tools, I also wanted to have the option to extend the charging time to recharge the batteries first.
Step 1: The Concept
- To create a device that will automatically turn on for a set duration on a daily basis.
- To have an override function that will turn on the device for an extended period, then automatically reset the override.
Step 2: Using a Microchip PIC12F675
I decided to make use of a PIC 12F675 controller. They are cheap, and I had some spare. But keeping time with the 12F675 over a long period of time, will require some external components.
Their are three ways to keep time on a micro controller:
- Via software routines and delays - Good for short delays, or non-time critical applications. Will not work for this project.
- External Real Time Clock - Obvious the best option, regarding accuracy. But too expensive and more components.
- Power Line Frequency - Sounded like a good, cheap and relatively accurate option.
Step 3: How the Circuit Works
Power for the electronics is via a 220/14V transformer, which is rectified and filtered (D1 .. D4, C1). There are two regulators, a 7805 for the +5V for electronics (IC2, C3, C5), and a 7812 for the +12V (IC1, C2, C4) needed for the relay. I did not have 5V relays at hand, so this can be changed.
Relay and Driver
The relay is switched on/of by pin 3 of the chip. This in turn is used to switch the power on/off to the chargers (R1, R2, Q1, D5, K1).
Timer Override Switch
The override switch (S2) is connected to pin 7 of the chip. R5 is a pull-up resistor to keep the input pin at +5V when the button is not pressed.
The is a power indication LED (D6 and R6) and a charge indication LED (D7 and R7) to indicate the state of the timer.
To get relative accurate timing over a long period, I decided to make use of the line frequency. R3 is connected to the AC output of the transformer, before the rectifiers. Thus pin 2 of the chip will see a pulse every 20ms (50Hz) or 16.66ms (60Hz). This is then counted by the chip to get an accurate time base.
R4 and J2 is used to select between 50Hz and 60Hz.
I created the software using MicroChip MPLab. I have included the ASM and HEX file.
Step 4: PC Board
To keep the size small, I decided to construct the timer on PC Board. All components, except the LEDs and buttons are fitted to the PC board.
After the board was assembled and tested, the solder side of the PC Board was treated with clear lacquer to increase the electrical insulation of the mains wiring.
Note the mini jumper just below the PIC 12F675. This jumper is used to select between 50Hz or 60Hz.
Step 5: Assembly
The project is housed inside a plastic light switch box. There are two switches:
The left switch is a standard On/Off light switch used to turn the unit on or off.
The right switch is a Bell of Dimmer switch, which is a spring loaded push button. This button is used to start or stop the bypass timer.
The two LEDs are mounted above the switches for indication.
The unit was then connected to my existing electrical Lights/Plugs, and the output connected to a multiplug.
Step 6: Setting of Timers
The code supplied, will turn on the relay for 30 minutes every day. Or if the bypass is pressed, the timer will turn on for 8 hours, then return to normal daily charging.
This times can be adjusted in the code as required.
See attached image.
Step 7: Using the Timer
Simply plug your chargers and electrical power tools into the multiplug.
Turn on the system with the power switch. Both LEDs will turn on. This will indicate that the power is on, and the tools are charging. After 30 minutes, the charging LED will turn off, together with the chargers. The chargers will be turned on every day for 30 minutes.
After you used the power tolls, simply plug them back into the charger, and press the Charge button. The Charge LED and chargers will now stay on for 8 hours. After 8 hours, the chargers will turn off automatically, and continue with normal daily charging of 30 minutes.
Pressing the Charge button while charging, will turn off the chargers.
Participated in the
Automation Contest 2016