Re: microcontroller circuit help



mookiewookie@xxxxxxxxxxx wrote:
Ed, thats exactly what i was looking for. The 12V load draws about 0.1
amp. I'll look into comparators as you have suggested. A design, if you
have any, will be really helpful. Thanks for the input.


See below.


From your description, you want to do the following:
1) Charge the battery
2) Provide power to a 12 volt DC load from the AC mains
3) Switch to battery power for the load when AC is unavailable
4) Switch back to powering the load from the AC mains
when AC power is once again available
5) Protect the battery from being discharged too far

Two questions:
Does that cover everything?
How much current does the 12V load draw?

If I have understood what you want properly, you
need a comparator, not a microcontroller.
The comparator will sense the battery voltage, and
when it drops below a specific point, will provide
a signal to switch a relay or a power mosfet or
bipolar transistor. That will open the circuit
between the battery and the load so that the
battery won't discharge any further. A relay
can be connected to the power supply such that the
load will receive +12 V DC from the supply (which
is AC powered) when AC is available, and from the battery
when it is not available. We need to know what the
load draws to provide a design.

Ed




Ok, here you go. It is not the best possible design,
but I believe it may be the simplest. It is totally
automatic. The charging circuit is intended for a
lead-acid battery.
View in fixed font.

------
+-In|LM7812|Out-+-----[10R]------------+
| ------ | |
| Gnd a| a|
| | [D5] Ry1-1 [D8]
------ |a | | <| |
|Power | [D1] | a | | |
|Supply| | +--->|---+ +-----+----+-------+
| 15V | [D2] | D6 | | | |
------ | | | [D7] [Ry1] |
| [D3] | | a| | [LOAD]
| | +| | +----+ |
| [D4] --- / | |
| | - 50K \ --- |
| | --- /<--[1K]--/ \TL431 |
| | - \ --- |
| | -| | | |
| | | | | |
+------+--------+-----------+----------+-------+

How it works:
The TL431 is a "programmable precision reference".
Inside it is an op amp configured as a comparator
with one input tied to a fixed internal reference
voltage. The other input is connected to the external
reference voltage, which you set via the 50K pot. When
the voltage is above the set point, the TL431 conducts,
energizing the relay. With the relay energized, there
is a path from the battery to the load. If AC is
available, the charger will be pushing current into the
battery and supplying current to the load so no current
will flow from the battery to the load.

When you connect things up, nothing happens until you turn
the AC power supply on. That energizes the relay via the 10
ohm resistor and D8, and closes the normally open relay contact
Ry1-1. If AC power is interrupted, the relay stays energized,
because the normally open relay contact Ry1-1 is transferred,
so a path exists to the battery through that contact. But as
the battery voltage lowers below the set point, the TL431
stops conducting, the relay de-energizes, and the relay contact
opens. Nothing more can happen until AC power is restored, when
the power supply once again provides power and the relay
transfers.

Diode functions:
Diodes D1-D4 raise the output from the 7812 voltage regulator
to ~ 14.4 volts. D5,6 and 8 prevent the battery from forcing
current into the regulator or from being charged through the
10 ohm resistor. D5 also drops the charge voltage to ~ 13.8
The 10 ohm resistor in conjunction with D8 drops the 14.4
volts to about 12.8. D7 conducts the inductive spike produced
when the relay drops out. It (D7) is the only diode connected
"backwards" with the cathode (banded end) to the + side. The
anode end of the diodes is marked on the drawing.

To Adjust:
With no battery connected, connect a variable voltage supply
in place of the power supply. Raise the voltage to >12 volts
and adjust the 50K pot so that the relay energizes. Lower the
voltage and adjust the pot so that the relay drops out at the
set point. For a typical lead acid battery, 11.5 volts is a
good choice. In no case should you go below 10.5 volts with
a lead acid battery, and the closer you get to 10.5, the more
possibility of damaging the battery. Once set, you should not
move the pot again. After adjusting, connect the battery and
the 15 volt supply.

Parts:
The diodes are 1N4001, and the relay is a 12 volt low current
device like cat# RLY-622 from Allelectronics, which draws
< 20 mA. The power supply is a "wall wart" rated at 15 to 24
volts, like cat# DCTX-161 from Allelectronics.
http://www.allelectronics.com/

Ed
.



Relevant Pages

  • Re: 4017 Counter skips under load
    ... But when I try to operate the circuit under load ... skips the loaded relay and moves right to the next output. ... Think "star grounding" and power decoupling. ... with the slightest change in ground (even connecting a single lead ...
    (sci.electronics.design)
  • Re: Debian Compatable UPS?
    ... It sustains the current load I placed on it for> 1h, ... If your UPS does NOT do automatic battery tests using a considerable load ... and to only power the load up again when it has ... is above a certain level (high watermark). ...
    (Debian-User)
  • Re: UPS batteries
    ... recharging the battery from the AC line. ... less -- is properly called a Standby Power Supply. ... "THE INVERTERS IN some UPS's actually power the load continuously ... a switch disconnects the load from the AC mains ...
    (sci.electronics.repair)
  • Re: 4017 Counter skips under load
    ... But when I try to operate the circuit under load ... skips the loaded relay and moves right to the next output. ... Think "star grounding" and power decoupling. ...
    (sci.electronics.design)
  • Latching Relay
    ... I am putting together a project which is designed around low power DC ... (battery driven), and that ultimately results in a high ... the relay is in operation and the mains powered device is on. ... enough to be confident within my design, could someone help me with my ...
    (sci.electronics.design)

Quantcast