# Building a charger

Discussion in 'General Electronics Chat' started by shezza, Jul 30, 2014.

1. ### shezza Thread Starter Member

Mar 19, 2014
45
0
Hi all,

I have a Wahl 9880L trimmer. My charger has gone missing and I cant find one cheaper than \$25. So I bought a USB cord that has the same DC jack as the charger. Only thing is, the battery is a 4.2 Li-ion and the charger is a 1A charger. I understand a computer puts out 5v and 500mAh?

From my limited understanding, the lower current is ok, but the higher voltage is not?

To deal with this, I came across the idea of using an electronic cigarette charger which is a 4.2v 500 mAh charger and I would connect the DC jack on the end instead of the bit that the cigarette would connect to. So my question is - Would this be fine?

Here is the link for the charger and here is the link to the cigarette charger.

Thanks

Jul 27, 2014
189
10
I cannot see why you could not use your USB port with some form of current limiting circuit.

3. ### shezza Thread Starter Member

Mar 19, 2014
45
0
Well for starters, whats the difference between using some form of current limiting and the way I was going to tackle it? Also, I wouldnt know where to start to limit the current... and what I would be limiting it to (would I need to know the mAh of the battery)? Im a bit of a noob if you havent noticed, so feel free to dumb it down a whole lot

4. ### mitko89 Member

Sep 20, 2012
123
19
Microchip has tons of determined battery charger IC... their application notes provide designs and sourcecodes. Building one will be like 15\$ max. About the rated current for the charger, lower charge current = higher charging time, nothing else. Get familiar with the algorithm of charging Li-Ion batteries, in a nutshell:
1) Charge with constant current until you reach the target voltage (4.2 for you);
2) Keep the voltage constant and monitor the current. The current will start to drop due to the internal resistance;
3) Wait till the current drops to 0,1 of the charging current.
4) Done;
http://www.ti.com/lit/an/slaa287/slaa287.pdf
There are plenty of materials available on the issue (we are in the world of mobile devices and chargers are part of any design litteraly).

Last edited: Jul 30, 2014
5. ### shezza Thread Starter Member

Mar 19, 2014
45
0
Thanks for that. I got through the first page and my brain died on me. I have serious problems concentrating since my accident last year, so Id appreciate if I could have your patience.

The e-cigarette charger wouldnt be sufficient if I swap the end? Its only \$5...

I definitely want to read into this further though, it is a basic thing to understand considering how many things I charge...

6. ### mitko89 Member

Sep 20, 2012
123
19
My latest embedded project was a universal battery analyzer... it is not quantum physics, but it is not so simple to create something decent.

7. ### shezza Thread Starter Member

Mar 19, 2014
45
0
Maybe someone could explain why the e-cig charger wouldnt work? In somewhat simplistic terms preferably.

8. ### mitko89 Member

Sep 20, 2012
123
19
If the e-cig charger is designed to charge batteries to the voltage you need, it will work. There are two parameters you set when charging Li-Ion battery - charge current and nominal voltage. If you know the e-cig charger will charge your battery to the voltage you need, your only concern will be if the charge current is too high, but 1A (I think that was the case with the charger) is not too high. When I mentioned designing your own (the topic of the thread is Building a charger), I though you want to make a charger, not to simply get your battery charged. If the charger meets the condition I mentioned, yes, it will do the trick.

9. ### shezza Thread Starter Member

Mar 19, 2014
45
0
Sorry, I wasnt very clear. I guess its more modifying a charger than building one... Out of curiosity, would would happen if I connected the 4.2v up straight to the 5v USB port? Would it damage the battery? I understand Li-Ion batteries can be quite dangerous... I have even had one fire up which was pretty exciting :|

10. ### wayneh Expert

Sep 9, 2010
12,094
3,033
The devil is in the details. There's a big difference between what you might get away with and doing it right. With a Li battery, that difference can cause fire or even explosion, so most folks here lean towards doing it right. Other batteries can tolerate simple charge strategies such as constant voltage (common for lead batteries) or constant current (common for NiCad). Lithium batteries need a more complex strategy.

We can't tell where in your original equipment the "smart" parts reside, the ones that look over the battery charging and tending. If they're in the trimmer or the battery pack itself, then the charger you use is much less important. If the smarts were in the charger wall wart, then you need to be more careful. We can only guess. My bet is that the charge controller is not in the wall wart, but that's just a guess.

Another concern about using the USB; if the original charger was capable of 1A, that current level could damage your USB power source. I wouldn't plug that big a load into an expensive laptop or computer. Those devices should be smart enough to protect themselves, but it would make me nervous to put them at risk.

11. ### shezza Thread Starter Member

Mar 19, 2014
45
0
I would definitely like to act in the safest way possible. Assume the worst, even if it is unlikely. So I guess I will stick with getting the 4.2v charger... Though your last paragraph has got me a tiny bit nervous and confused.

You talk about the original chargers capability coming into play when using a USB port... I understand Im sending charge down one way. I can only guess you are talking about an amp of power going back down the cable into the laptop when the battery starts to get close to full? And could I install a diode to stop this possibility?

12. ### wayneh Expert

Sep 9, 2010
12,094
3,033
Only current limiting can protect the USB power source from an excessive load. A proper USB source probably has this current limitation built-in internally, but I would not want to short out the port to test this theory.

Since your original charger was spec'd to 1A, your battery load may be capable of drawing a big load from a USB source. A big, discharged battery looks almost like a short to the USB source.

13. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
You linked a charger for sale on e-bay for about 10 bucks:

Jul 27, 2014
189
10
Why can't he use an constant current source made up of two BJTs and an comparator to detect when the battery is fully charged and switch it off?

Jul 27, 2014
189
10
10 bucks? I **** 50 bucks up the wall every week. Most people in Australia do.

16. ### shezza Thread Starter Member

Mar 19, 2014
45
0
I guess I will use a USB wall socket rather than a laptop to play it safe then. Sounds like this isnt a topic I can learn about overnight.

Being Im in Australia, its a lot more expensive than to people local to it.

I cant build one because id probably need to learn a bit before I go there and like earlier mentioned, my head is just not up to it. Good subject to study though. Appreciate everyone's replies, been very helpful!