Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

How to discharge capacitor when power is cut (maybe deplation mosfet?)

Status
Not open for further replies.

Prince Charming

Member level 2
Joined
Jul 10, 2022
Messages
45
Helped
0
Reputation
0
Reaction score
2
Trophy points
8
Activity points
569
Hello, I've been developing a motion alarm system as below:

1659232761074.png


There is the C5 capacitor (470uF) which let's the user turn on the system and leave the place without triggering it by their own. It works by not letting current from data line for a period of time after turn on. The problem is, I want to fully discharge that capacitor when power is cut (to restart the timer). I could only think of N channel depletion MOSFET. But the problem is, is there any depletion MOSFETs out there or is it just a myth :D, no matter what I tried, I couldn't find one. So I would be glad if I could get these 3 things:

1 - Common depletion MOSFET models (not only for this project)
2 - Any other way to discharge the cap
3 - (if you really want to take time and look) Any suggestions to circuit as a whole. The upper circuit is the UPS and the bottom is the alarm triggering circuit.

Thanks.
 

Hi,

My first idea was like above ... but I guess they don't work.

But first things first: Please define
* what "data line" means
* what "when power is cut" means. You have several power sources (several batteries, AC, DC...)
* what "fully discharge" means. To "fully" discharge a capacitor ..it takes infinite time. Thus you have to give a voltage level and you have to say in which time. (Please use values with units)

You talk about C5 .., which is 470uF ... but isn't the 6800uF C2 the bigger problem.

3) Honest opinion? It's far from being well designed. There is a 50A rated MOSFET...that switches the (huge for this BJT) base current of 20mA of a BJT ... which switches the collector current of tiny ) 4mA peak...
All in all it's not clear why there are 5 transitors in a row to Enable the circuit.. Usually one uses transistors in a row to amplify a signal..but in your case the currents get lower after each stage..(mostly). Even the voltage gain is not meaningful.
--> a schmitt trigger with well designed threshold levels gives
* clear timing
* clean switching edges (because of hysteresis)
* is less critical on noise pickup

J11, J12, J13 function is not clear at all.
D5 function is not clear.
It's not clear where and how the user can switch something ON...

It seems you are charging batteries... some are Li-Ion ... which are critical and tend to explode when not charged correctly.

Indeed I think we miss a lot of informations to be able to validate this circuit..

Klaus
 
As for the original question, the search machine of a major catalog distributor identifies 165 depletion mode NMOSFET with different voltage, power and package.

They are e.g. useful to design fail safe discharge circuits with complete discharge. For the present problem, I'd prefer timer solutions without huge capacitors.
 
Years ago we used a depletion mode FET to discharge the output caps on a HV boost converter when the main supply was removed. Worked ok, but was annoying that we had to create negative voltages to deplete it. Eventually changed the circuit to use an enhancement FET. The supply for that circuit came from the HV caps, so it would work fine until discharged to <5V.

In your case, the cap would need to be discharged all the way near 0V, so that approach won't work. But even if you had a depletion FET, how would you use it?
 

Connect a bleed resistor to ground at the power supply, and add a small Schottky diode from the power supply (cathode) to the capacitor (anode).
From what you said I understood this:
1659270240593.png

Have I place the diode in a wrong way because it seems unpurposeful?
The problem is this is a very slow discharge, okay I will explain better.

I want the C5 to discharge %99 of its capacity (as Klaus doesn't like fully word :D) in matter of seconds when the SW3 (6 pin 2 position switch) is at downward position. You can see I have a discharge circuit for the batteries which will take them to 3.9 volt when the device isn't in use. I want to discharge the cap too (much faster than battery ofc) And in any other time it will always be full.

what "data line" means
The wire which is connected by Q6 transistor.
what "when power is cut" means.
It's not about batteries. The only time the cap will discharge is when the switch is open
but isn't the 6800uF C2 the bigger problem.
It will only be charged when the alarm goes off and its rare. If that happens there is a secret push button which isn't shown in the schematic that discharges the cap with 68 ohm resistor. At worst case the 250k will discharge it in 2 hours :D
plus: I don't want to use push button for 470uF since it will be charged every time the device is on.
There is a 50A rated MOSFET...that switches the (huge for this BJT) base current of 20mA of a BJT ... which switches the collector current of tiny ) 4mA peak...
Well, Q8 could be replaced with an 2N7000 I accept. BUT, the reason why I put IRFZ44N is because it has 4V gate-source threshold. I am open to advices about higher threshold MOSFETs. Also 20mA is for a led where 4mA is just to turn on a MOSFET which doesn't care about the current anyway.

a schmitt trigger with well designed threshold levels gives
I couldn't put a schmitt trigger because my resistances are variable but I've put a comparator and updated the design as below:
1659278178387.png

D5 function is not clear.
I will remove it and put it in parallel with the alarm because alarm probably have inducutor in it and it would be a nice freewheeling diode?

J11, J12, J13 function is not clear at all.
They are power supply, buck boost converter modules, I don't make them I buy them. Converters are to charge parallel batteries and convert the output to 12V if needed
--- Updated ---

even if you had a depletion FET, how would you use it?
I would connect its gate to 12V and connect the + side of the capacitor to the drain and negative side to negative side of capacitor. When the circuit is powered up, it would stop current from + side of cap for the entire time. When the circuit is powered down the gate would go to 0 V thus let the capacitor's + side connect to - side.
the search machine of a major catalog distributor identifies 165 depletion mode NMOSFET with different voltage, power and package.
And what are those?
I'd prefer timer solutions without huge capacitors
Is there any way to achieve that?
 
Last edited:

Hi,

To discharge a 470uF capacitor down to 1% ... it needs about 4.5 tau.
So if you want this within 2s then 2s = 4.5 tau.
Thus tau = 2s / 4.5 = about 0.45s
Tau = R × C --> R = tau / C = 0.45s / 470uF = about 1000 Ohms

... as as side calculation: 1% of 12V are 120mV. I know no diode that can work down to 120mV, thus a diode solution won't work.

Both calculated informations are very useful to design the circuit to work the way you want it.
You may laugh about it ... you may waste a lot of trial and error time with diode solutions ... or do a simple calculation.
I don't force you to go the same way I design electronics ... just want to show you how I do it.

****
What kind of data is sent across the data line?

****
Discharge circuit for the batteries? I don't understand why one wants to discharge batteries?

***
As far as I can see C2 gets charged as soon as C5 is charged...then both are charged ... but you just want to discharge C2...
I simply don't understand the concept...

****
Solutions without big capacitors (especially for timing.
I fully agree with FvM. The tinies microcontroller will work better, with less part count, more precise, less power supply, way better to adjust function.
But even without microcontroller, I'd rather use a binary counter(and some logic). The counter could be reset in about no time, without high discharge current. More precise, not the prone for errors (drift with time and temperature)

Klaus
 

thus a diode solution won't work.
Okay I can live with discharging it to 0.6V if going zero is not possible, 0.6 will still need much time to charge to 4V. Even this is the case, I don't see any diode solution that will bring the capacitor to 0.6 V in 2 seconds. Can you draw me a little circuit even in paint is okay. I don't see the connections of the diode.
What kind of data is sent across the data line?
The sensor is a PIR sensor: HC-SR501
1659288864959.png

The data line is 0V when no motion is detected. The data line is 3.3V when motion is detected. Thus your statement:
As far as I can see C2 gets charged as soon as C5 is charged
is wrong. Because C2 will only charge if motion is detected. When a motion is detected Alarm goes off (and led blinks). C2 is to keep the alarm on for some more time even no motion is detected anymore (aka data line = 0V). It is very rare that C2 will be charged because burglars don't visit your house every day :D. That's why discharging C2 quickly is not mandatory, I can wait 2 hours for it to discharge. If I am doing a test or if I accidentally trigger it, there is always a discharge button for C2. But for C5, one must be able to turn off the system, do whatever they want to do in 1-2 minutes and turn it back on. One shouldn't be bothered with discharge buttons if they are not making a test. Also I can discharge C2 in the same way with C5 if there is no drawbacks. For now my priority is C5.
The tinies microcontroller will work better, with less part count, more precise, less power supply, way better to adjust function.
I thought a microcontroller is not necessary for a simple trigger circuit. The timing doesn't have to be precise. Also this circuit has the lowest power consumption I think. First of all, no component is active on right side of the power supply. All of them are only active when alarm goes off. The sensor draws microamps level current. with 2 li-ion batteries this can run forever. My ups depends on a relay and that's the only power consumption of this device with only 33mA. Round it up to 50 mA and --> 1200mAh * 2 / 0.05 = 2000 days without power. Ofc the battery will die out itself but still long time.
Discharge circuit for the batteries? I don't understand why one wants to discharge batteries?
As far as I know, li-ion batteries must be stored around %80-%40 level to have a long lifespan. That's why I purposefully discharge them (over discharging is disaster for them, only to 3.9V is good) when the device isn't used.

Wait a second, is my power calculation correct? Because if it is really gonna sustain itself more than a year, I don't need mains voltage. I am planning to remove the relay and completely depend on batteries. I will add a charge mode, armed mode and discharge mode. I may replace li-ion with Alkaline which has lower discharge rate. I may even change power supply voltage to 5V as this this enough for the sensor.
 

555 monostable driving NPN or NMOS inverter which in turn drives Q5. Would even often self-trigger at power-up with no user input, but unpredictably. Adding appropriate (by scaling trigger timing to be much less than output signal duration) miniscule RC to trigger pib would ensure POR behaviour. 555 POR pulse is longer than subsequent pulses as timing capacitor needs to charge from 0V, not subsequent 1/3 Vcc. More parts but 470uF can be reduced to e.g. 10uF x 470k. 555's are 1% to 5% accurate for repeatable timing and in your application, precision of repeatability isn't critical.

How's the buzzer's 555 ground? No issues if goes from off high-z state to e.g. on 100 to 600 mV? :) MOSFET's in gnd path make for a dirty, highly-variable voltage ground plane reference.
--- Updated ---

Unless there's a particular reason for using an NMOS as a path to ground to gate the 555, controlling the reset pin would be the normal way of gating the device. The 358 as a comparator could drive reset pin directly, and it would save on the NMOS gating transistor that will make that ground reference not 0V.
 
Last edited:

the diode goes from the top of C5 to the top of C1, it discharges C5 at power down.
The power supplies have low resistance right?
So that means when there is no power, current can flow into the power supply and exit from the other terminal?
That means if there are multiple power sources each power supply, buck converter, boost converter must have a diode to stop reverse current when they are down. For example J11 in my design must have a diode too right? Because when the power is cut, batteries will discharge through buck converter.
MOSFET's in gnd path make for a dirty, highly-variable voltage ground plane reference.
I'm updating the design to a microcontroller version. Things will change a lot.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top