At 04:25 AM 2/7/02 -0500, Kevin A. Benedict wrote: >Hi Everyone, >I am attempting to build a smart battery charger for >NiMH batteries (8-AA), with a F877. I am going to >use PWM to control a LM317, and sample the voltage >with the ADC to look for the delta V. >I was planning on: (I got these from Panasonic) >trickle charge .05C which would be 5% duty cycle This is rather hot for NIMH batteries. C/300 is what you want. >Soft charge .20C which would be 20% duty cycle This is ok for a timed top-off, but don't plan on detecting peak. >fast charge .75C which would be 75% duty cycle This may cause problems with the peak as well. C is better. >I have a couple questions: >1.) What frequency should the PWM be ? Fast enough for your inductor. >2.) Anybody know a simple circuit to control the >LM317 with the PWM PIC pin ? Why use the 317? Just do a PWM buck regulator. With a nice P channel mosfet, and 2N3904 pre-driver, it will run basically cold. >3.) How often should I use the ADC to look for the >delta V to turn off or switch to trickle charge ? >Any help would be appreciated. This will depend on charge rate, but once a minute is good. You want better than 10mV resolution. You also want to watch absolute, and delta temperature on the pack. Fast charging above or below temperature limits is bad, and a certain delta T / delta time is indicating the beginning of overcharge. I'm doing the same thing with an AVR Tiny-15. Targeting a 30 minute charge. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics