On Wed, Jan 23, 2002 at 02:51:48PM +0200, Vasile Surducan wrote: > On Tue, 22 Jan 2002, Edson Brusque wrote: > > > > > 1) use the battery power when not using an external power suply. > that's quite easy: use the same connector like all radios have ( with a > small switch ) I really don't find that's necessary when the battery is rechageable. It's a lot simpler to have the battery always power the equipment and have the external power always charge the battery. The one problem I find with the switch is that you can get a momentary power glitch. Personally I always preferred steering diodes. Since the external power is going to charge the battery, it will have a higher voltage than the battery. So by tying steering diodes (Schottky to minimize losses) to the battery and to the external power jack, when external power comes online it'll completely block the battery with no power dropping glitch. > > > 2) charge the battery when an external power suply is available and > > power is off. > > that's a simple logic between power button and connector switch button > > > 3) charge the battery even when power is on. > > charging circuit is on all the time This is the answer to 2 and 3. > > > 4) if the battery is at full charge, stop sending charging current > > to it. > > a comparator monitorize the battery level. Better with a nominal load > connected to battery (never in cheap devices ) Isn't it a bit more difficult with NiMH? Fairly trivial for NiCads and lead acid. > > > All things above can be done without any microcontroller. Agreed. With my last battery backed project I simply ran the battery to the power supply and the external power to the battery charger. It transistions smoothly when external power is removed. Actually a little too smoothly! If I forget to reapply external power, the project powers down after a couple of days. BAJ -- 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