Automatic Charger Sharing for Motorcycle Battery Charger using PIC16F628A
This project came about because I have three motorbikes and being a bit of a fair weather biker they don’t get used much over the winter months. I have an OptiMate™ 4 charger
that I connect to the bikes but this needs me to manually swap it from one bike to the next and between forgetting to do it and not remembering which bike it was last connected to it’s all a bit unreliable.
So this project is an four-way automatic battery charger sharing controller. The circuit is powered from the battery(s) of the connected motorbikes. Current consumption is about 40-50mA and since it draws its power from the battery under charge it doesn’t discharge the batteries on the other bikes.
The circuit continually monitors which of the four connections are in use so it only connects the charger to outputs that are currently connected to a bike. If a bike is disconnected part way through charging the circuit immediately switches to the next connected output.
Status LEDs show which output is currently connected to the charger, which outputs are connected to a bike but not currently charging and a heartbeat LED to indicate the microcontroller is operating normally.
This controller project has only been tested using an OptiMate™ 4 ‘smart’ charger in standard mode (not CAN-bus). It should work with other chargers, however, it hasn’t been tested and I am unable to advise on this.
The controller connects each output to the charger for approximately 8 hours. The controller cycles through all four outputs over a 32 hour period (4 x 8hrs)
When switching from one bike to the next, all outputs are disconnected for about 30 seconds to allow the charger to see the disconnection and reset itself.
If no bike is detected on an output the controller simply skips that output and goes to the next one in the cycle. If only one bike is connected, after eight hours it is disconnected for 30 seconds and then reconnects for another 8 hours.
There are five LEDs on the control board.
The green heartbeat LED blinks continually, once per second to show the controller is operating.
Four orange LEDs indicate the status of each output/bike connection.
- If the LED is off, no bike is detected and the channel is skipped.
- If the LED is steady on, the charger is connected to the output.
- If the LED blinks briefly every 2.5 seconds, a bike connection is detected on the output but the charger isn’t currently connected to it. This just gives visual confirmation that the controller knows the bike is connected.
- If a battery is disconnected while charging, the controller waits 30 seconds before assuming the battery has disconnected. The output LED stays on during this time.
Any of the outputs can be connected at any time. They don’t need to be connected sequentially. The controller will skip outputs that aren’t connected. However, you should note that when you connect another bike it may be up to 24 hours (3 x 8 hours) before its output gets connected to the charger.
- The charger is designed to work with 12 volt electrics and charging currents not exceeding 3 amps.
- Before using this controller, all the batteries should be in good condition and charge state, if necessary charge then directly from the charger.
- The charge share controller will help to maintain healthy batteries in a good state of charge. If you have a battery that is heavily discharged or sulphated don’t connect it to this controller.
- Don’t use on bikes equipped with a CAN-bus or charger set to CAN-bus mode as switching from one battery to another can confuse the ‘smart’ charger.
- When the charging is done through the controller the status indicators on the charger only show the condition of the battery currently being charged. Therefore periodically you should connect the charger directly to each bike to ensure the batteries are all charging correctly.
- When the control board output(s) are connected to one or more motorbikes, the controller starts to operate. This occurs even if the battery charger isn’t connected so you should make sure the controller isn’t connected to the bike(s) if the charger is turned off or disconnected for any length of time. Although the controller only uses about 50mA it will eventually run the bikes battery down if the charger isn’t present for several days.
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w
Current Project / Post can also be found using:
- battery charger using pic microcontroller
- best motorcycle charger