You also might look at the charge curves shown in the UC3906 lead acid smart charger chip datasheet... The device itself probably won't get you where you want to be with a solar panel, but it might give you ideas for the pic algorithm... http://www-s.ti.com/sc/ds/uc3906.pdf There's also a switchmode schematic on the TI/Unitrode site using this chip that might work in you're app --it looks to be much more complicated than the pic approach Lawrence suggests however. ----- Original Message ----- From: jb +ADw-alphaone+AEA-ROF.NET+AD4- My MOSFET knowledge is pretty limited, not sure how to drive that with a PIC running at 5V. Wouldn't a PNP power transistor do essentially the same thing since the CE drop in saturation is what, maybe .2-.4V? Use a 2n2222 to drive the base on the PNP hard with the PIC output, and use the A/D input as you said to detect hi/low thresholds? Perhaps the MOSFET idea is better, but absent much experience with them, I'm trying to stick with what I know. Also, you could be right on that 14.7V, but the data sheet on this battery claimed that in an application like mine where the battery will be drawn down frequently, it's okay to set the constant voltage charger to 15V. Of course, now that you've challenged that figure, I can't seem to locate that data sheet, but I'm pretty sure that's what it said. JB +AD4- -----Original Message----- +AD4- From: pic microcontroller discussion list +AD4- I built a charge controller for a friend's solar system some time ago. +AD4- +AD4- I've built a linear charge controller out of a 2N3055 and +AD4- some other stuff +AD4- for this very application. After having lived with it, i'd +AD4- stay away from +AD4- any linear regulation of any kind. The LM317 or the 2n3055 +AD4- are power hogs, +AD4- won't work with low dropout voltages, and also have all the +AD4- same probs you +AD4- mentioned. +AD4- +AD4- Ditto for the zener regulators. Dump them with Nixon, 8 tracks, the +AD4- bicentennial and all that other 70's stuff. +AD4- +AD4- Take your PIC and drive a P-channel mosfet as a pass +AD4- transistor, filter the +AD4- output a little and run it into your A/D port. If the +AD4- voltage is too high, +AD4- turn off the mosfet, if it is too low, turn it on. You'll be +AD4- surprised how +AD4- easy this is. +ACQ-5 should build it, and a mosfet can handle a +AD4- lot more than +AD4- 1.5 amps no sweat. +AD4- +AD4- Check your output voltage - I think lead acid batteries are +AD4- fully charged at +AD4- around 14.7 volts but my memory leaks so look it up. I'd regulate the +AD4- output at the fully-charged voltage of the battery, and shut the solar +AD4- charging down when the battery gets full. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.