Author Topic: DC Power Failure Alarm  (Read 537 times)

0 Members and 1 Guest are viewing this topic.

Offline ParistonTopic starter

  • Contributor
  • Posts: 33
  • Country: ca
DC Power Failure Alarm
« on: April 19, 2021, 11:13:16 am »
Hi,
I've been looking for some DC power failure alarm system for my circuit. Input power is 36 volt and I'd like my mcu to react to sudden drop in voltage. What are the most reliable/long lasting ways of power loss recognition in a dc circuit?
 

Offline mhuber1

  • Newbie
  • Posts: 9
  • Country: at
Re: DC Power Failure Alarm
« Reply #1 on: April 20, 2021, 07:47:39 am »
I'd use a schmitt-Trigger with a voltage divider hooked up to an interrupt pin of the mcu
 

Offline mvs

  • Frequent Contributor
  • **
  • Posts: 370
  • Country: de
Re: DC Power Failure Alarm
« Reply #2 on: April 20, 2021, 12:39:42 pm »
GPIO inputs of most MCUs do have some hystheresis and more or less constant threshold levels, so you can connect voltage divider directly to the interrupt pin.
You may need a debounce procedure in software for proper operation (i.e. to avoid interrupt storm).

If you wish to have exact threshold, you can use voltage comparator.  Some MCUs do have built in comparators.

Third option is ADC. It is usually slower and less reliable, but you will get a voltage value to play with.
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2150
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: DC Power Failure Alarm
« Reply #3 on: April 20, 2021, 12:47:56 pm »
I would advise also to immediately shut off peripheral ICs to preserve some juice for the MCU.
Everybody likes gadgets. Until they try to make them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf