Author Topic: Low Voltage Detector Circuit Calculations  (Read 2649 times)

0 Members and 1 Guest are viewing this topic.

Offline MSDTopic starter

  • Newbie
  • Posts: 4
Low Voltage Detector Circuit Calculations
« on: December 15, 2018, 06:24:23 am »
Hi,

I'm designing a circuit where a micro-controller requires the detection of a low voltage situation so that it may store any unsaved data to its internal eeprom before the power goes out. The micro controller has a capacitor that it controls going into its vcc to keep it powered for a few milliseconds after a low voltage situation is detected.

I've found a scamatic and description of a circuit that can detect the low voltage situation at:
https://it.emcelettronica.com/tecniche-hardware-per-la-gestione-del-brown-out-reset-sui-microcontrollori-di-fascia-medio-bassa

I'm using the first variation of the circuit

The reset is going into a pin with an interrupt not directly to the microcontroller reset pin.

According to the website the equation used to calculate the threshold is given by:
Vt = (R1 + R2) (0.4 / R2)

I require a threshold at 4.7v. which gives me 12.9M ohm for R2 when R1 is 10M ohm. I've built the circuit but its dropping out at 5.15v
I've used 1% resistors everywhere the transistors are 2n3904 and 2n3906. I suspect that the issue has to do with the 0.3v hysteresis or the constant of 0.4 in the calculation may be different for the transistors used.

How do I change the hysteresis range and what should the constant be for 2n304/2n3906 transistors?

Thanks




 

Offline Kasper

  • Frequent Contributor
  • **
  • Posts: 742
  • Country: ca
Re: Low Voltage Detector Circuit Calculations
« Reply #1 on: December 15, 2018, 06:33:39 am »
Have you tried using smaller resistors? 1.29M and 1M. or 129K and 100K?

When you use 10M, other high impedance things can become significant for example connecting your meter can affect the circuit.
 

Offline MSDTopic starter

  • Newbie
  • Posts: 4
Re: Low Voltage Detector Circuit Calculations
« Reply #2 on: December 15, 2018, 07:33:07 am »
The website suggested using 10M ohm (high values) for R1 so no I havent tried that. however with regards to the meter disrupting the readings, i doubt thats it. I'm reading the voltage directly of the power supply with with 50mV increments while using an led connected throught a transister and current limiting resistor of 100K ohm to detect on an off thresholds. I will try lower values and check back. does the constant in the equation change for 2n3904/2n3906 transistors? also what would the equation be for calculating hysteresis?

Sent from my SM-G610F using Tapatalk

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Low Voltage Detector Circuit Calculations
« Reply #3 on: December 15, 2018, 08:08:43 am »
What is your overall power architecture like?

A typical scenario is: higher voltage input (say 12V), 3.3V logic supply.  You can use a series diode to prevent the 12V supply from discharging through the source when it gets turned off.  That leaves your device on its own as voltage drops.

Say you need 5ms hold-up time to write EEPROM or whatever and verify shutdown.  If your load draws say 10mA, and the regulator drops out at 4V, then you have 12 - 4 = 8V of working room.  If it's a linear regulator, then the 10mA is drawn from the input capacitor, and I = C * dV/dt holds.  Solving for C, we need 6uF minimum.  If it's a switching regulator, more energy from the capacitor is used, and the value can be smaller (in practice, it may be enough just from the input noise filter alone).

Calculator:
https://www.seventransistorlabs.com/Calc/PSHoldUp.html

If you need more current, or more time, you need proportionally more capacitance.  It can get intensive, quite quickly!

As for detecting shutdown -- why not simply wire a voltage divider from +12V to an ADC input?  Or a comparator, if you have a logic rather than analog input handy.  That way, you detect power failing, long before VCC itself is affected.

If you don't have a high voltage input, your options are much more limited.  It may be worth using a wide-input switching regulator (SEPIC, say) to give you that much needed breathing room.  If you're doing it by VCC voltage alone, then you have perhaps a fraction of a volt (say 3.6V nominal, 2.7V shutdown: only 0.9V operating range!) in which to detect the panic condition, and do something about it.  Yes, you can brute-force it with ever larger capacitors, but it's usually the case that you can find other excuses to "do it right". :-+

Tim
« Last Edit: December 15, 2018, 08:13:34 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: MSD

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16604
  • Country: us
  • DavidH
Re: Low Voltage Detector Circuit Calculations
« Reply #4 on: December 15, 2018, 01:19:11 pm »
The circuit relies on the switching Vbe threshold of T1 which is never going to be very accurate between devices or with temperature.  T1 should either be replaced by a differential pair or driven by a differential pair.  As shown T1 is prone to RF oscillation.

T2 and T3 form an SCR with access to its internal nodes.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Low Voltage Detector Circuit Calculations
« Reply #5 on: December 15, 2018, 04:09:50 pm »
Does the microcontroller have a built-in comparator or ADC? Can't you use that, with a suitable voltage reference?
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
Re: Low Voltage Detector Circuit Calculations
« Reply #6 on: December 15, 2018, 06:48:50 pm »
It may be interesting on a design point of view, but quite frankly, I would suggest using one of those voltage supervisor ICs. Just one part, and you'll get lower current draw and much better accuracy.
An example would be this: http://www.ti.com/product/tps3808
(it has a version with a threshold of 4.65V so that would fit your requirements without any additional component IMO)
 

Offline MSDTopic starter

  • Newbie
  • Posts: 4
Re: Low Voltage Detector Circuit Calculations
« Reply #7 on: December 18, 2018, 06:45:46 am »
Thank you all for your input, I've dropped the idea to use an external brown out to detect a low voltage panic condition as the circuit using discrete components wouldn't be accurate enough due to variations in temperature and between devices as @David Hess has pointed out. I've considered using a voltage supervisor IC before, however I'm trying to keep costs down and all that I found suitable averaged around $1 each.

I've gone with @T3sl4co1l 's solution to use a 12v supply which was already available and the built in ADC of the micro controller. It works perfectly thus far, However I've got a few concerns. The micro-controller draws 50mA on average, the Linear voltage regulator is heating up quite a bit. I prefer not to use a switcher as I'm trying to keep things within my BOM. An idea I had was to use a TO220 and use the PCB as a "heat sink" by soldering it to a large copper plane on the PCB. Any advice on doing this? What size should I make the plane?

Also the micro-controller is an Atmega328P running at 20Mhz, the datasheet mentions the following about the ADC:
"If any ADC [3..0] port pins are used as digital outputs, it is essential that these do not switch while a conversion is in progress. However, using the 2-wire Interface (ADC4 and ADC5) will only affect the conversion on ADC4 and ADC5 and not the other ADC channels." Page 257, Section 21.6.2.d.

My concern is that I'm using other pins on port c to receive interrupts from some peripherals as well as sending out digital signals to some peripherals. I've used ADC5 for the ADC channel and left ADC4 disconnected. The ADC is setup in free-running, auto-triggering interrupt mode. So pins will be switching while conversions are taking place but not on ADC4. Will this affect the ADC readings?
« Last Edit: December 18, 2018, 06:54:07 am by MSD »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf