Introduction: Too Many Chargers
With all the gadgets we carry around or have at home we all end up with so many chargers that a simple recharge task requires:
- finding the right charger within a pile
- plug it in to the wall
- check when it's completed
- unplug from wall
- tidy up the chager back to the pile
I'm already exhausted and if you happen to have a few gadgets this may be needed every day!
My plan to attack this problem is to have all the chargers connected to a multisocket but instead of leaving this multisocket plugged in all the time, a kind of timer would be required to disconnect the power once the charge is complete. Instead of setting every time how many hours I want a charge to take place, a fast an easy way would allow me to select the duration from a predefined list of options.
I spent some time checking my gadgets's required charging time and came up with 3 options. 3 hour (most electronic gadgets), 12 hours (my AA battery charger) and 24 hours (electric toothbrush).
One last feature I wanted was to not have my little project powered on all the time. While I wouldn't be charging anything it should not consume any energy. ANY!
So let's try and explain how we did it...
Step 1: List of Materials
First off... your shopping list
- Linkit ONE
- Single channel relay module running @ 5V
- USB mains charger (upcycle yor old phone's charger from that pile)
- 3 x SPST buttons
- 3 x 10kΩ 1/4W resistors
- 3 x LED
- 2 x 220Ω 1/4W resistors
- Mains male plug
- Mains female socket
- A nice box for the final project (99% of my projects stay in my drawer if they don't have a nice and safe box)
Step 2: Wiring
Follow the schematic attached. Use D4, D5, D6, D7, D8 and D9 of Linkit for the LEDs, the +/- and power buttons and the main relay.
Button Plus = 4
Button Minus = 5
LED1 = 9
LED2 = 8
LED3 = 7
Relay = 6
Please note a strange wiring on the power button. Once pressed it triggers directly the relay which then powers up the Linkit. Once the Linkit powers up it triggers itself the relay to stay on and maintain power supply to Linkit. If you release the power button too fast, Linkit will not get the chance to survive. Press it for 2 seconds and then release.
Step 3: Load the Code
Load the attached code to save some time.
The + button cycles around these 3 timing options 3h > 12h > 24h > back to 3h...
The - button if pressed while in 3h mode, it will turn off the relay and kill the whole project until the power button is pressed again.
While in charging mode the highest applicable LED will blink untill the remaining time is of the next smalest period. So if you start a 12h charge, the 3h LED will start solid and the 12h LED will blink for the first 9 hours. After 9 hours the 12h LED will turn off and the 3h LED will change from solid to blinking for 3 more hours. When all 12h are gone the device will automatically turn off disconnecting its own power supply from mains.
Step 4: Add the Case
Find a case that will fit all your toys and drill holes for the 3 buttons, the 3 LEDs and the 2 mains cables (mains in and out). I used 3mm LEDs here. If you have access to a printer with adhesive clear film, use the attached template for labeling the buttons and LEDs.
Once all is done, double check before you connect to mains.
Checkout the video of my final version.
Participated in the
Arduino All The Things! Contest