Mountain Bike Reviews Forum banner
1 - 16 of 16 Posts

·
Light freak
Joined
·
3,022 Posts
Discussion Starter · #1 ·
Thought I would post this question here to all of the "homebrewers". I would like to incoporate a battery level monitor into my "homebrew" lighting system somehow. Jet lights has a slick looking one that is incorporated into their battery pack. Most that I have seen are very big and bulky. Then I stumbled onto this one.



This is originally designed to be used with a 6V battery. Would it be possible to modify this somehow so that it would work with a 14.4V battery?
 

·
Registered
Joined
·
1,281 Posts
Not sure on that one scar, as is probably set up based on the % of expected voltage... What does one of these run? I picked up the Light Brain for my homebrew, and if you get the Twin Plus it gives you a warning, plus an auto-power down to prevent damage to the battery. That, and 5 brightness levels (if you use two bulbs) for $38US.

Dan
 

·
Registered
Joined
·
301 Posts
scar said:
Thought I would post this question here to all of the "homebrewers". I would like to incoporate a battery level monitor into my "homebrew" lighting system somehow. Jet lights has a slick looking one that is incorporated into their battery pack. Most that I have seen are very big and bulky. Then I stumbled onto this one.



This is originally designed to be used with a 6V battery. Would it be possible to modify this somehow so that it would work with a 14.4V battery?
Almost certainly. Whether it's feasible is another question. In theory all you should need to do is replace a few resistors on the board, but assuming it's a surface mount board (what I can see looks like SM LEDs), that's not the easiest thing if you've never worked with it before, and even with quite a bit of experience I use bigger parts for hand soldering than I'd expect you to find on a commercial board.

I'm actually planning on putting a battery monitor into my homebrew system, but then I also have homebrew UI code for an AVR controller, so can program my own discharge curves into that. and simply connect a bar graph display.
 

·
Gone riding
Joined
·
3,350 Posts
I assume it’s simply a glorified volt meter. Using resistors to bias transistors or perhaps the LED’s directly, each individual LED can be made to turn on or off at a certain voltage threshold set by the resistors value.

Depending on the chemistry of the cells used it can be a reasonable indication, certainly if you choose your voltages well, but really it’s not a real capacity meter as such.

There are a number of ways you could make your own relatively cheaply. ;)

Dave.
 

·
Registered
Joined
·
1,281 Posts
Gonz,
Its set up to use the battery monitor circuit (same one used on some smart chargers). My water bottle battery pack has two pairs of wires coming out of it, the larger for the lights/charger and the smaller for detecting voltage (I presume). This would plug into the second pair.

Chris, I guess I was thinking more about the feasability of the project when I said "not sure." If it does use resistors to control the LED's, and isn't any more complicated, then you could run the calcs and set one up to work with whatever battery voltage you want. But as Low Rider said, its not really a capacity meter. However, it would at least warn you before you drained your battery too far. Somebody get one and dissect it so we can know for certain. Heck, post a link and maybe I'll tackle it...
 

·
Gone riding
Joined
·
3,350 Posts
Some battery packs for laptops and other devices have an extra pair of wires for communication with a “smart” device housed inside the battery pack. Usually they measure and record various electrical aspects of the pack like temperature, voltage, total discharge time and remaining / discharged capacity. That information is logged, and can be accessed from a laptop / charger or whatever.

Most packs used for bike lights that have an extra pair of wires just have an embedded temperature sensor, which is used by the charger to either detect full charge, or to prevent overheating.

It’s still just a volt meter, but in the past I have built my own “battery monitor” using a Maxim MAX8211 programmable voltage detector. It’s easily built with a single capacitor for filtering (not really needed in our application) and a few resistors to form a voltage divider which the chip uses to compare against a self generated precision reference voltage. You can rig it up to turn a LED on or off when the battery voltage drops past a certain point, set with the voltage divider. Obviously you could have a number of these rigged up to trip at different voltages. ;)

Dave.
 

·
Registered
Joined
·
301 Posts
Low_Rider said:
Depending on the chemistry of the cells used it can be a reasonable indication, certainly if you choose your voltages well, but really it's not a real capacity meter as such.
If it's linear with voltage (which is presumably the case) then you're right. However if you do battery profiling and set the voltages to follow the discharge curve then it is possible to make a reasonably accurate capacity meter based on just voltage.

This is in fact what I plan to do with mine, though by also taking into account the varying voltage drop at different power outputs and working out the capacity of the pack from the discharge rate, it should even be accurate with different packs and at different dim levels. However I've actually now come up with a slightly different idea for the indicator - rather than a bar graph I'll have a single LED which is driven with a 0.5Hz PWM with the duty cycle based upon the discharge level - ie fully charged the LED will be steady, half full it will be on for as long as it is off, and nearly empty, the LED will flash only briefly each cycle. I'm interested to see user friendly this is, but it has the advantage of needing only a single pin output from the uController, and more importantly much lower current draw than a bar-graph display.
 

·
Registered
Joined
·
251 Posts
I wouldn't try to mod that monitor, when you only have to change a few resistors it will become a mess.
The idea from Chrism for a battery monitor sounds cool to me, it is some programming work but the result will be nice I guess. The battery monitor in the picture above looks quite big to me, a single Led is much nicer.

The easiest way to make a battery monitor is choose a Zener diode with the right voltage and connect it with a led in serie. You solder the zenerdiode to your + pole and the led to the -. When you picked the right zenerdiode the Led will turn of when the voltage of the batterypack is below the zener voltage + forward voltage of the led. To choose the right zenerdiode a quick look to the datasheet of your batteries is enough.
An other option that needs a bit more components is what I am probably going to do for my new batteries (that will be in a bottlecage). I grab an opamp (3130 for example), at the non-inverting input of the opamp I will put a Schotky diode, the inverting input will be connected with the output of the Li-ion pack with a voltage divider. I connect a red led directly at the output of the opamp and it is ready. I should make a schematic so it is easier to understand what I mean...

Mark
 

·
Registered
Joined
·
752 Posts
chrism said:
This is in fact what I plan to do with mine, though by also taking into account the varying voltage drop at different power outputs and working out the capacity of the pack from the discharge rate, it should even be accurate with different packs and at different dim levels. However I've actually now come up with a slightly different idea for the indicator - rather than a bar graph I'll have a single LED which is driven with a 0.5Hz PWM with the duty cycle based upon the discharge level - ie fully charged the LED will be steady, half full it will be on for as long as it is off, and nearly empty, the LED will flash only briefly each cycle. I'm interested to see user friendly this is, but it has the advantage of needing only a single pin output from the uController, and more importantly much lower current draw than a bar-graph display.
I've been a lurker on MTBR for quite a while and avoided becoming actively involved thinking I really didn't need yet another activity. But the new GPS and Lighting forum has been very interesting reading and I figured it was only a matter of time before I couldn't help but jump in. Well, chrism's post has finally done the trick.

First a tiny bit of background, hopefully avoiding enough of the gory details to keep from hijacking the thread. I started building my own bike lights in 1993 mainly because I didn't like the commercially available systems at the time. Now, like most people on this forum it's really become more of a hobby than a necessity. The other factor is my whole family rides, I have to keep 8 helmet/bar systems running and you can do the math on the cost for that.....

After going through 4 generations of various halogen systems, I built my first HID system in early 2002. With minor tweaks, I'm still actively using the HID systems today. I built a prototype LED based system a while back but then didn't work on it very much. Now I'm actively working on a new LED based system that I hope to have in final form within the new few weeks....but I'll post more on that later.

Now to the point, my HID system includes an electronic controller that clips to my camelback strap for the helmet light and connects to the bottom of the mount for the bar light. I use a technique for indicated the remaining battery capacity that's very similar to what chrism is proposing. The main difference being the use of a dual color LED. The LED goes through a cycle every 1.5 seconds where it's green or red the first second based on the remaining battery capacity. Then it's always off for half a second to denote the start of the cycle. Here's a couple of very short video clips to show what it looks like.

This is with 75% battery capacity remaining
http://www.mbldesignworks.com/bikelights/75percent.avi

This is with 25% battery capacity remaining
http://www.mbldesignworks.com/bikelights/25percent.avi

I find it pretty intuitive, but I'm curious what other folks think. I'm also not against re-programming the uC and taking a video of other techniques for grins, but I played with a few different one when I built it and thought this worked the best.
 

·
Gone riding
Joined
·
3,350 Posts
Welcome to MTBR MtbMacgyver!

I think I may have seen a couple of your systems posted on another forum or website a couple of years ago. Very nice work indeed! :thumbsup:

And maintaining eight complete systems… wow! I'm assuming they're all obviously of your creation too! :D

User interfaces are always a very personal thing, and it's hard to please everyone as there are countless different ways you can go about it. Personally I would rather a constant colour to show the system is on / full charge, and then have the system change to another colour flashing on and off at say one second intervals at the set trip point to show low charge. As you say at the end of the day it's what works for you.

I'm looking forward to your future posts! ;)

Cheers, Dave.
 

·
Registered
Joined
·
7 Posts
I saw somewhere, that you can buy infinite-color LED's, that show different colors based on voltage. You could get one of those on there, and just know that purple means 25%, red means 50% and green means 75% (or something like that). Basically, I would do this:
1. Charge the battery pack fully
2. Leave the light on, while you watch TV or something, noting the time you turned it on
3. When it goes off, you know how long it will last on a full charge. So if it lasts 4 hours, say, then you know that it discharges at a rate of 25% an hour.
4. Charge it up again, and turn the light on this time, attach the multi-color LED on there after 1 hour, 2 hours, 3 hours, and 3.5 hours. Note the color that appears at each time period
5. Mount the LED on your bike, and give it a pushbutton to check the status.
6. Print the colors in a legend chart; basically have 4 boxes, each with a color background and the percentage; print this on some photo paper, and laminate it, then stick it to your handlebar, next to the LED.
7. Push the button periodically to check your level.

Seems like it would work, you know?

Now, you
 

·
Registered
Joined
·
301 Posts
Thanks for the response MtbMacgyver (and also the encouragement from super-fast). Not implemented my idea yet, but it's not actually that much effort as I have a spare PWM on the AVR I'm using (the first goes via an RC filter to provide a voltage to set output current of the switch mode controller) - the only real difficulty is that I've got to slow down the uC clock speed in order to get the PWM slow enough, but that just means changing my delays, as 1ms response isn't noticeably different from 100us response in a UI.

That implementation of yours looks really nice, and I have to admit I'm really tempted to go for much the same thing - the only issue being that it needs another uC pin for the second colour, and I'm pretty much out of those already! It does at least validate my PWM frequency though, so I guess I'll just go with my original plan for now rather than redesign my PCB yet again.

Can't say I'm keen on the multicolour LED idea. Suffers from two problems; firstly that it's not going to be that easy to tell from the colour where you are in the discharge cycle as colour perception may change depending on other factors; secondly that I suspect the range of voltage of the battery during discharge is insufficient to get a good range of colour change anyway (at least without additional amplification circuitry).
 

·
Registered
Joined
·
752 Posts
Low_Rider said:
Welcome to MTBR MtbMacgyver!

And maintaining eight complete systems… wow! I'm assuming they're all obviously of your creation too! :D
Yes, I built 8 identical HID systems. Otherwise, I'd go mad trying to deal with a bunch of different designs. I also keep some of my previous systems working as backup and loaner systems. But it also means I have to build at least 8 of the new LED based lights. Can seem a little bit daunting at times.
 

·
Registered
Joined
·
752 Posts
michaelalanjones said:
I saw somewhere, that you can buy infinite-color LED's, that show different colors based on voltage. You could get one of those on there, and just know that purple means 25%, red means 50% and green means 75% (or something like that). Basically, I would do this:
1. Charge the battery pack fully
2. Leave the light on, while you watch TV or something, noting the time you turned it on
3. When it goes off, you know how long it will last on a full charge. So if it lasts 4 hours, say, then you know that it discharges at a rate of 25% an hour.
4. Charge it up again, and turn the light on this time, attach the multi-color LED on there after 1 hour, 2 hours, 3 hours, and 3.5 hours. Note the color that appears at each time period
5. Mount the LED on your bike, and give it a pushbutton to check the status.
6. Print the colors in a legend chart; basically have 4 boxes, each with a color background and the percentage; print this on some photo paper, and laminate it, then stick it to your handlebar, next to the LED.
7. Push the button periodically to check your level.

Seems like it would work, you know?

Now, you
I did play around with varying the color of the dual color LED. You can PWM the green and red to get a continuum from green, through different shades of orange, to red. But it's nearly impossible to distinguish where you are in that range.

Unfortunately, you can't really rely on voltage alone to determine the state of the battery very accurately. Especially for something like a bike light that's used in wide range of temperatures. Battery voltage changes too much with temperature and load.
 

·
Registered
Joined
·
752 Posts
chrism said:
Not implemented my idea yet, but it's not actually that much effort as I have a spare PWM on the AVR I'm using (the first goes via an RC filter to provide a voltage to set output current of the switch mode controller) - the only real difficulty is that I've got to slow down the uC clock speed in order to get the PWM slow enough, but that just means changing my delays, as 1ms response isn't noticeably different from 100us response in a UI.
I have the LED attached to normal port pins and handle it in a timer ISR instead of using the PWM controller. I use the same light controller for HID and overvolted Halogen systems and it also handles battery charging. So all my PWM outputs were tied up with other functions.
 
1 - 16 of 16 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top