Thread Tools
Mar 21, 2004, 09:56 AM
Senior Member
zagisrule!'s Avatar
Thread OP

Superb DIY Lithium Charger


Hey Guys!

Here is the lithium charger I designed. I figured I should share it with the rest of you because it is a very accurate device that did very well in testing.

It uses 3 LED's to interface with the user, measures battery voltage with PIC's onboard A/D conversion, and current through the battery pack with a shunt resistor and OP-AMP. The charger is 2-3 cell compatible, current to around 2A depending on choice of limiting resistors.

Hope this helps some of you guys! A version with auto-cell-count and an LCD display is in the works.





-Matt Aurand


Here is the PCB and Schematic files:
Sign up now
to remove ads between posts
Mar 21, 2004, 10:02 AM
Senior Member
zagisrule!'s Avatar
Thread OP
The source code files, for the PIC 16F819.

Programmer settings: MCLR Enabled, Int OSC







-Matt
Mar 21, 2004, 10:04 AM
Senior Member
zagisrule!'s Avatar
Thread OP
BTW: PCB and .SCH files are in ExpressPCB format. It is a free download from www.expresspcb.com
Mar 21, 2004, 12:40 PM
Registered User
Matt,

I'm anxiously awaiting any information about the LCD version. Thanks for software tip, another toy to play with .

Steve
Mar 22, 2004, 12:13 PM
Just an average RC'er
Jim McPherson's Avatar
Very nice Matt! I'm working on something similar right now with the PIC16F819 (I got the ICSP working yesterday). I hope to incorperate higher cell counts and am working on the voltage boost circuit right now. I love these PIC's you can make them do nearly anything!

-Jim
Mar 22, 2004, 10:30 PM
Senior Member
zagisrule!'s Avatar
Thread OP
I know Jim, PIC's are so versitile! Glad to hear you got your ICSP working, I am going to do that too. I break too many pins now Have you had a look at either of my codes? Any advice for me?

I just noticed the schematic file shows a 16F628 being used, but that should read 16F819. I messed up

The LCD version is not too far off, I can drive an LCD with the PIC's now easily, it is in the hardware for the voltage booster I am having trouble with. What are you doing for that Jim?



-Matt
Mar 22, 2004, 11:14 PM
Just an average RC'er
Jim McPherson's Avatar
Hi Matt,
I just got a chance to take a look at some of the code. It looks great, but is very different than my way of coding so it's taking a bit for me to go through it. I'm certainly learning from it. I still haven't gotten a good solution to voltage boosting, as soon as I get something I like I'll post it up.

-Jim
Mar 23, 2004, 11:38 AM
Too lazy to repair!
jperch's Avatar
Hey guys, I just found this thread. I am interested in what you have accomplished. I would like to do something similar but with a different MCU. Have any of you heard about an MCU made by a company called Cygnal? The company was recently purchased by another company called Silicon Laboratories. Anyhow, these MCU's are pretty nice. They have quite a few mixed signal peripherals integrated onto an 8051 core.

They also have a version that has built in USB support. You could build a charger that uploads charging info to a PC to get charging or discharging curves. Could be interesting.

Joe
Mar 23, 2004, 02:49 PM
Senior Member
zagisrule!'s Avatar
Thread OP
I will be experimenting with the same thing, but the same processor (or at least same family) and a USB-interface chip. I am really only interested in charge curves for the lithium familys, because discharging them is pointless (no memory effect at all). I will get some samples and report what I find.

I have heard of the Cygnal MCU's, yes. I have never used them because I have been aquiring PIC equipment for a while now and am just now getting the hang of programming. I would like to have a better grasp of what I am doing now before I move on and get *even more* confused. I am interested in your project though, seems pretty neat. We could always use a MAX232 to interface them to a PC too, that is neat and simple to do.


I am going to think on this. The hardest part it seems right now is building the voltage booster so we can charge from our car batteries and not be tied to our home power-supplies.

Does anyone know anything about making efficient voltage boosters? Even 12V stepped up to 20V would be useful, but the trick is the current we need at that level. Say a 2A output is close to 4A that needs to come in.





-Matt Aurand
Mar 23, 2004, 02:58 PM
Too lazy to repair!
jperch's Avatar
Matt,

You are probably right about getting things solidified in your head before you muck it up with something new. I just happen to work for Silicon Labs so I can get the processors cheap. I am also involved in developing some applications support projects that use these MCU's. So, I already have everything I need to play and it is free.

I don't expect things to move too quickly for me. I have more planes in my hangar than I can possible fly and more to build than I have time to build and more are on the way.

The only help I could be on the voltage booster front would be to research the existing off the shelf devices out there. I know Linear Tech. makes a line of voltage convertors and such. National Semiconductor makes a line of switching regulators called "Simple Switchers" (at least that is what they used to call them). They have software that you can download for free that help you design stuff like this with their products.

Given the types of current we need, I don't think that charge pump type circuits are going to be very useful, but then again that is just a guess.

I can take a look and post what I find.

Thanks,
Joe
Mar 23, 2004, 08:26 PM
Registered User
Matt, you may want to check out Soren's web page. Don't have the link, but it is in this forum. He uses an LM2587-ADJ from National to run a fly-back booster. couple diodes, caps, resists, a pot and a radial inductor(>4A).

Also, National seems pretty friendly about samples.

HTH,
Steve
Mar 23, 2004, 09:09 PM
Dimension Engineering
Zagisrule, if you're not doing anything computationally intensive, and have a compiler that can generate software serial ports (such as CCS) you don't even need the max232. A pair of resistors will drop the current to pic-safe levels from the +-10 of rs-232 and computer serial ports read 0 and 5 as high and low just as well as -10 and +10. The only hitch is you need to invert your serial stream in software, as rs232 is -10 = 1 for who knows what reason.

The resistor values are 1k transmit to PC and 30k recieve from PC IIRC. The problem (if it can be called that) is you can't use the hardware serial port, so it burns quite a few cycles, and also you don't get a recieved data buffer/interrupt, so if you want bidirectional data transfer it burns a LOT of clock sycles. for a charger, though, I can't see either mattering at all.
Mar 23, 2004, 09:54 PM
Senior Member
zagisrule!'s Avatar
Thread OP
Hey Everybody,

I know what you are talking about by getting free dev tools. If I had to buy everything I have now I would not be into this. Thanks go to my "mentor", Ken Anderson. He has helped me out so much to enable me to do stuff like this, giving me parts and programmers, and best of all, his real-world advice and insight on how things work. It is the best thing that could happen to a teenager like me, having a person who can explain things and get me out of my problems. He made it all possible for me.

This is sounding good. I will look at National for some ideas or parts to do the job. I have tried getting samples from them before, they won't give me free ones because of my e-mail addresses (@worldnet.att.net or @hotmail.com). I'll see if calling them will get me "hooked-up"

I am going to try to find Soren's page, I have seen people talking about it before.

Ok, here is the big question I have about communicating with the PC. What software on the PC actually reads what the PIC is saying? Is that what you are trying to explain for me Comatose (your compiler)? What is CCS? I am not too knowlegable on this topic....I am sure you can tell by now I see that your idea would use clock cycles though, but the charger is so simple it won't matter like you said.

How can we log data? Say logging charge voltage and current over time? To send to PC later. A seperate EEPROM chip? And write to that from the PIC?






-Matt
Mar 23, 2004, 10:54 PM
Just an average RC'er
Jim McPherson's Avatar
I built a battery cycler that logs data through a MAX232 to hyperterminal on my PC. Use HSER_OUT in PBP. It just shoots out the info to the serial port and that data can be copied/pasted from hyperterminal into something like excel for analysis.

-Jim
Mar 23, 2004, 11:15 PM
Senior Member
zagisrule!'s Avatar
Thread OP
Ahhh...

Hyper Terminal, can't believe I didn't remember that!


Thanks Jim!




-Matt


Quick Reply
Message:

Thread Tools