Normally closed switch to discharge capacitor - Page 1
Forum section: electronics / projects

author: Moriambar
author_rank: Unknown
timestamp: January 23, 2019, 02:37:32 pm
content: Hi.I'd like to have some kind of switch (normally closed) that drains a capacitor; when I apply a voltage to it the switch stays open and then the capacitor is allowed to charge. Removing the voltage, the switch closes and the capcitor is discharged.I have 0-3.3V signals; the capacitor is also charged with 3.3V.Can you help me choosing the right component for the job?I hope what I said made sense

author: madires
author_rank: Super Contributor
timestamp: January 23, 2019, 03:06:28 pm
content: A relay?

author: Moriambar
author_rank: Unknown
timestamp: January 23, 2019, 03:07:39 pm
content: Quote from: madires on January 23, 2019, 03:06:28 pmisn't it overkill? I mean, I was optimistic in a one-component solution, something like a transistor...

author: aheid
author_rank: Regular Contributor
timestamp: January 23, 2019, 03:42:42 pm
content: Is it a large capacitor? Do you just want to discharge it, or do you want to discharge it through a specific circuit?If you got a microcontroller, and if it's small and you just want to discharge it without special constraints, you could just put a suitable resistor between it and a GPIO pin, then toggle the GPIO between "output low" for discharging and "input high-z" (ie without pull-ups or pull-downs) for charging.

author: Moriambar
author_rank: Unknown
timestamp: January 23, 2019, 03:52:29 pm
content: Quote from: aheid on January 23, 2019, 03:42:42 pmNo basically I have no microcontroller and just a resistor to discharge it, connected to GND. All I want to do is basically have the + of the cap (between 100uF and 1mF) pulled down constantly unless I put a logic signal (3.3V or 0V) at the gate.Thanks

author: madires
author_rank: Super Contributor
timestamp: January 23, 2019, 04:06:22 pm
content: Could you please explain the purpose of your circuit in more detail? Should the cap only be discharged when the control signal is low or also if there's no supply voltage?

author: aheid
author_rank: Regular Contributor
timestamp: January 23, 2019, 04:19:12 pm
content: P-MOSFET between resistor and GND, gate pulled down to GND via resistor, apply 3.3V to gate to shut it off?

author: madires
author_rank: Super Contributor
timestamp: January 23, 2019, 04:31:03 pm
content: For a low-side switch you would use an n-channel MOSFET.

author: duak
author_rank: Super Contributor
timestamp: January 23, 2019, 05:18:11 pm
content: Depletion mode FETs are normally on and require a negative voltage to shut off. eg., Microchip LND01 or Infineon BSS169. One of these can easily discharge the timing capacitor.If only a positive supply voltage is available, generating a negative voltage is a little more complicated but possible with a photovoltaic output optocoupler such as TLP3914, VOM1271T or VO1263. Alternately, as the FET's gate current is a few microamps, a charge pump using an output pin toggled by software or from a gated clock would also work.If the timing capacitor's charge and discharge currents are low, a diode connected in series with a discharge resistor to common could hold the capacitor voltage low. Applying a voltage to the resistor will reverse bias the diode and allow the capacitor to charge.Cheers,

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 23, 2019, 06:14:57 pm
content: Quote from: aheid on January 23, 2019, 04:19:12 pmThe issue with this simple approach is that it will never be able to discharge the capacitor completely. Once the voltage across the capacitor gets below the pmos threshold, the transistor will stop conducting... Or did I miss anything?

author: aheid
author_rank: Regular Contributor
timestamp: January 23, 2019, 06:32:32 pm
content: Quote from: SiliconWizard on January 23, 2019, 06:14:57 pmNope, just a brainfartN-MOSFET with gate pulled up, driving it to ground should work tho.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 23, 2019, 07:03:54 pm
content: Quote from: aheid on January 23, 2019, 06:32:32 pmWell, it was still an interesting idea. If the OP is OK with the capacitor having a residual charge, they can select an appropriate PMOS so that the end voltage would be around 1V or lower, and would then discharge further due to leakage currents. Guess that's what we call a compromise.I'm not sure I see the thing with an NMOS though? It would need a sufficient voltage to conduct, but I was under the impression that the OP wanted the circuit to shunt the capacitor while there was no additional supply available at all. If there is, then it's no problem indeed. Or maybe you have something in mind I didn't get, if so, you can elaborate.A depletion-mode NMOS would work (there are not many available as discrete transistors, but you can find some). A probably adequate one would be that:https://www.digikey.com/product-detail/en/microchip-technology/LND01K1-G/LND01K1-GCT-ND/4918738It would require a negative voltage to block it though (as mentioned above). Not that hard to do, but it's definitely not a single-component solution.

author: Moriambar
author_rank: Unknown
timestamp: January 23, 2019, 07:15:40 pm
content: Wow, as usual I oversimplified the problem. Thank you, I think that I'll try the N-FET (either depletion or enhancement) in the weekend. It's true that I do not have a negative rail, but I can engineer one.Also yes: I have to completely discharge the cap.Cheers!

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 23, 2019, 10:21:26 pm
content: Below is an illustration. The part on the left is just to simulate the charging phase of the capacitor. The transistor chosen there is just because I could easily get ahold of its Spice model (it's a power transistor, not needed for your application unless you need to discharge the capacitor at a very high current). On the right there's a basic negative voltage generator that should work fine here. The input signal should be an oscillator. If it oscillates, a negative voltage is generated (enough to block the transistor, around -2V); when it stops oscillating, the voltage quickly rises back to zero. If you're using an MCU, it will just be a matter of generating a clock on the controlling IO. Otherwise you can add a small oscillator, for instance with an inverter (schmitt trigger input), a resistor and a capacitor. No need for anything accurate here.All this requires a few components but with the benefit of drawing little current. You could have used a normally-closed relay instead, but even a small reed relay will draw a lot more current than this and most will require a 5V supply, a transistor and a freewheeling diode, so...