Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

low voltage detector & interrupt

Status
Not open for further replies.

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
Currently when suddenly power-off by switch, my MCU has no means to perform some processing before goes off.

Now i need some low voltage detector chip that can, say when Vcc goes low below 4V, send an output high/low to the MCU to interrupt the MCU -> the MCU will try to perform some processing.

Any recommendation for this low-voltage detector chip?
 

VVV

Advanced Member level 5
Joined
Nov 26, 2004
Messages
1,582
Helped
383
Reputation
766
Reaction score
86
Trophy points
1,328
Activity points
19,971
Try MAX703/704 from Maxim, or their equivalent, manufactured by TI, Sipex, etc.
http://pdfserv.maxim-ic.com/en/ds/MAX703-MAX704.pdf

These have a Power Fail Input that takes only a divider to monitor the voltage, so you can monitor the voltage right across the filter cap, before the 5V regulator and see when it drops below a certain value. Use the PFO output to interrupt the micro.
If you set the threshold correctly, you will have enough time to save important data before the actual reset ocurs.

They also monitor the atual 5V supply and reset the micro when it drops below about 4.75V. Plus, they have a manual reset input, which guarantees a long enough reset pulse.

In additon, they also have a battery switchover circuit, which allow you to use them for battery-backed-up SRAM.
 

    banh

    points: 2
    Helpful Answer Positive Rating

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
thanks all,

i'm using MAX704 now.,which will shoot to NMI whenever power-off.

now the problem is inside the NMI handler i want to drive a small motor back to its original position, which consumes quite an amount of current.

should I put a high-value cap at the output of my voltage regulator so that when poweroff this cap can pump out some more voltage?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
A substantial capacitor may work, and this will be the matter of some tests, but you should consider implementing a rechargable (NIMH, for example) battery to support motor driver for the required period of time ..
Capacitors are not very good in supporting mechanical devices such as motors, solenoids etc, and therefore I think the "battery" option will be more reliable ..
Regards,
IanP
 

VVV

Advanced Member level 5
Joined
Nov 26, 2004
Messages
1,582
Helped
383
Reputation
766
Reaction score
86
Trophy points
1,328
Activity points
19,971
It depends on what "small motor" really means and it also depends on the load of the motor.
A capacitor can help, but make sure you calculate the energy required to complete the motion and then size the capacitor accordingly.
 

phoenixdk

Junior Member level 1
Joined
Dec 26, 2005
Messages
16
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,283
Activity points
1,453
Why not use something as simple as the diagram included.

just use any generic rail to rail opamp, D1 will always have 0.65 V across it no matter the dc supply. Then calculate R1 to have 0.65 across it at 4V, when the DC supply drops below 4V the negative input voltage will be lower than the positive input. When that happens the opamp output will go high and trigger the interrupt on the mcu.

it might be a good idea to have a large capacitor across vcc, so the dc dont drop to quickly
 

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
IanP said:
A substantial capacitor may work, and this will be the matter of some tests, but you should consider implementing a rechargable (NIMH, for example) battery to support motor driver for the required period of time ..
Capacitors are not very good in supporting mechanical devices such as motors, solenoids etc, and therefore I think the "battery" option will be more reliable ..
Regards,
IanP
IanP,
If i am to use battery,
what kinda IC should I use in this case?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
You can still use the MAX704 to detect low voltage, and program microcontroller to activate P-channel MOSFET or PNP BJT to connect a battery, perform required task, and shut the system down ..

Regards,
IanP
 

    banh

    points: 2
    Helpful Answer Positive Rating

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
thanks IanP,
so the NMI handler will enable BJT which in turn connects battery to the voltage regulator . after necessary processing, the NMI handler will shutdown the BJT.

i will try this out.
 

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
IanP said:
You can still use the MAX704 to detect low voltage, and program microcontroller to activate P-channel MOSFET or PNP BJT to connect a battery, perform required task, and shut the system down ..

Regards,
IanP
hi IanP,

if I am to use Ni-Mh rechargeable battery (possible the 9V pack), is there any way for me to charge up the battery during normal operation? only when NMI then i use the battery..
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
During normal operation battery can be charged from power supply through a diode to block reverse current, and a resistor to limit the charging current to, say, "trickle" level ..

Regards,
IanP
 

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
- for 9V battery, 12V power supply is too high to charge?
- how can I know the trickle current? specified on the battery and is it different over different types of Ni-Mh battery?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
Take a look at the circuit below ..
It uses constant current source to charge battery while connected to mains/external power, and diodes to direct currents in right directions ..

Regards,
IanP
 

    banh

    points: 2
    Helpful Answer Positive Rating

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
thanks IanP,

in your circuit, it seems the battery is equivalent to regulated voltage.

if my battery is to provide input voltage to the regulator (9V too high for normal 5V circuit operation), so i just move the battery to the left side (12V DC), and my intended circuit will look like (as attached)

not sure how to determine the resistor value for trickle current..

usually how much current is needed for NiMh battery?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
To make this circuit working you will need to add one or two more diodes ..

Firstly, place resistor in the "battery" branch, and connect 1st additional diode between Battery<-->Resistor and Circuit ..

The original diode from your circuit should be connected between 12V power supply and Circuit ..

If you are sure that the 12V power supply will not discharge battery, that is all, if you are not shure you will need to add another diode at the output of the 12V power supply ..

With all this done, the current to the Circuit will not flow through resistor, and, assuming pretty standard value of the "trickle" current for 9V batteries as 10mA, the resistor value can be calculated as follows:
{12V (from power supply) - 1V (2nd added diode) - 9V (battery)} / 10mA ≈ 200Ω

Regards,
IanP
 

    banh

    points: 2
    Helpful Answer Positive Rating

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
Thanks IanP,

i dun get this statement (not sure where the diode should be placed..)
and connect 1st additional diode between Battery<-->Resistor and Circuit ..

i've added an NPN so that i can disconnect the battery during the NMI handler.
please advise again.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
Please find below "slightly" modified circuit that ensures that the battery is charged when the +12V supply is present, regardless of the state of the "MCU output" pin (picture1), and "simplified" circuit with NPN (picture2) ..

Regards,
IanP
 

    banh

    points: 2
    Helpful Answer Positive Rating

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
thanks a lot IanP,
i'm gonna test on this circuit.

diode : i think i use schottky diode for low forward voltage drop?

transistor: 2N6290 (NPN) and 2N6109 (PNP)
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
What I don't like about these transistors is Vce(sat); it seems to be to high for low-voltage applications ( http://www.chipcatalog.com/Datasheet/16603136FD786489463719AB81F1AA00.htm)
Maybe you can find transistors with Vce(sat) < 0.3V ..
For example, NPN 2N2222, ZTX450 ..

As far as diodes are concerned, you can use virtually any silicon (1N400X, ..) or Schottky (>25V) diode ..
Forward voltage drop in this application doesn't matter much ..

Regards,
IanP
 

    banh

    points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top