Charging a Single Cell Li-Po Battery–Disco Bike Light Part 2


In last week’s exciting episode of “Disco Bike Light” I covered some of the issues I had with this electronic design.  In summary, I’ve decided to convert my bike light to a multi-color kaleidoscope of mobile joy.

Of course, saying I’m going to do that, and actually doing it, are two different things.  Some major problems I’ve run into revolve around “requirements” I placed on myself to use a Schwinn bike light case I already own AND not destroy the bike light in the process.

Here are what I currently see as my major design hurdles…

1.  I’ve got to fit it into an existing enclosure.  And it’s one that’s not super big.
2.  I promised myself I wouldn’t destroy the bike light I’m converting.  That means I can’t drill holes in it to fit switches and potentiometers.
3.  I’ve got to fit it into an existing enclosure.  And it’s one that’s not super big.

Yeah, 1 and 3 are the same.  My design is nestled in a size-constraint sandwich.

Power supply:  The first thing I need to tackle is the power supply.  Obviously I’m looking for a battery powered system.  I also know the RGB LED I’m going to use will draw 200-400mA.  Thirdly, I have to put this all in a cylindrical package that replaces 3-AAA batteries.  I looked around online, took some measurements, and a Li-Po or Li-Ion AA battery will probably work.  It’s the right size, outputs 3.6V (nominally), and can run my system for a couple hours before requiring a recharge.

I know I’ll want a USB to serial converter on the design, so I want to try and charge the battery with my USB interface.  I found Microchips MCP738xx series of single cell battery chargers.  The MCP73833 is tiny, and simple.

Referencing U1 above, you set the charge current with a resistor at the PROG pin.  A value of 10K ohm sets the charge current to 100mA, the most a low power USB device can request.  You monitor the charging status using three i/o pins, STAT1, STAT2, and _PG.  Or you can connect those pins to LEDs.  In this design I’m only going to use two i/o connections to monitor the charge status.  The _PG pin will get pulled low when the charger (USB) is plugged in.  The STAT2 pin will be pulled to ground when the charge is complete.  The THERM connection of the MCP73833 is used to monitor the temperature of your charge circuit.  Normally you would place a 10K ohm thermistor between this pin and ground, and as close to the battery as possible.  I’m not going to worry about the charge temperature, since my charge current is so low.  So for this design a 10K ohm resistor can be tied to THERM.

Using the MCP73833 offloads the need to design a charge algorithm, design a charge current pass element, and allocate analog inputs on the microcontroller for measuring the battery and charge voltages.  Plus, the part comes in a tiny 10-pin TSSOP package.  And at $0.65 each in hundreds, they are priced nicely.

So my problems still go back to space and connectivity.  On the space issue, I’ve come up with a  printed circuit-board (PCB) design with end-cap PCBs.  On one side the end-cap will prevent a grounded spring on the bike light assembly from touching my battery’s positive terminal.  On the other end, it will be a place to put my high power RGB LED.

Here’s the design concept.  It shows the AA battery holder resting on top of the PCB with two end caps.  The electrical components will mostly be placed on the underside of this assembly.  The LEDs need to be placed within the 0.35” circle shown on the front end cap.  That’s where the bike lights existing mirror fits.  The end caps will be mechanically connected to the main PCB via mating cutouts on both boards.  Electrical connections will be made by soldering together surface mount pads that will be at right angles where the PCBs meet.  These solder points will also provide additional mechanical stability.


Since I want the end caps to be fabricated as part of a single PCB I needed to create a flat side so they can connect to the larger PCB the battery mount will set upon.  Below is the modified end cap.


I also decided that I wanted to do two styles of bike light.  One that was multi-color, and one that was just a higher output white light.  So below you’ll see the PCB design that will be fabricated with two front end caps and a single rear end cap.


At this point a lot of design tradeoffs start to occur.  I may have to change ICs, remove some parts that I can do without, switch to parts with smaller footprints, and probably more just to get everything to fit on the circuit boards.  But I’m starting to feel like the mechanics are 85% complete.

Next update I’ll go into the circuitry a little more.


  1. […] to another edition of “Disco Bike Light: adventures in electronic design”.  In last week’s blog I talked a little about the printed-circuit-board (PCB) design and the Lithium battery charging […]

Speak Your Mind