XOR Schmitt Pulse generator from reed: minimize the power consumption  - Page 1
Forum section: electronics / projects

author: virtapp
author_rank: Contributor
timestamp: January 05, 2022, 10:33:37 pm
content: Hi guys, i currently have a push button switch and i need to replace it with a toggle switch but not provide a constant circuit. It needs to open the circuit briefly (like 1s) upon closing, and again on opening.This is the circuit i've designed and simulated on CircuitJS (https://tinyurl.com/y4lsh8ea)But i have very high current consumption during the "closed" state, as you can see, i get 330uA...too way high: the target is below 0.5/1uA (as the circuit is battery powered and i already have 4uA of baseline consumption for the entire circuit).You guys have some suggestions or new solutions to propose?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 05, 2022, 10:40:31 pm
content: Is an SPDT relay an option?Tim

author: virtapp
author_rank: Contributor
timestamp: January 05, 2022, 10:47:14 pm
content: Unfortunately not an option, in my application i have tons of NC reed already installed and they can't be touched

author: Benta
author_rank: Super Contributor
timestamp: January 05, 2022, 10:52:19 pm
content: Quote from: T3sl4co1l on January 05, 2022, 10:40:31 pmAt 200 nA?

author: virtapp
author_rank: Contributor
timestamp: January 05, 2022, 10:55:42 pm
content: Sorry, i've edited the post: there was a typo on the maximum current consumption

author: Kim Christensen
author_rank: Super Contributor
timestamp: January 05, 2022, 11:03:48 pm
content: QuoteWell, the majority of your current consumption comes from the 10K pulldown resistor. I assume these gates are CMOS, so change the 10K resistor to 6.8M and buffer that signal with another gate.

author: Benta
author_rank: Super Contributor
timestamp: January 05, 2022, 11:13:13 pm
content: I still haven't understood what the circuit is supposed to do.

author: virtapp
author_rank: Contributor
timestamp: January 05, 2022, 11:21:07 pm
content: When the reed is opened/closed (...any state change), the circuit have to briefly (like 1s) pulse from 3V to 0V the output in order to allow me to trigger an interrupt on the MCU.here it's the part of schema that will be wired as interrupt to the MCU

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 06, 2022, 12:40:10 am
content: What MCU? Does it not have configurable pin-change interrupts?BTW, note that schmitt triggers draw more current than regular, while the input stage is in an indeterminate state (say, voltage between 0.3-0.7 x VDD). I mean, this is true of regular gates as well -- but you mostly use schmitt triggers when you need the inputs between thresholds for a while, and they provide some assurance of stability (whereas regular types may oscillate given indeterminate levels!).So, besides the pullup, avoiding indeterminate voltages is also a priority. SPDT contacts are probably an unusual request for reed relays, but they do exist at least, and it's a very real consideration at such low currents!Other than that, a nanopower comparator might even be attractive?The fundamental problem with a unipolar (on/off) contact is, you MUST either drop voltage (open), or sink current (closed), period. You can make the pullup arbitrarily large, but so too goes the noise sensitivity, time constant, etc. (Time constant actually being a positive to some extent, because of wanting to filter contact bounce.) This is why CMOS is a thing -- if the transistors are always and only, either sinking or sourcing, and the load is nil, then the DC consumption is nil, while the output logic levels are always perfectly well defined -- whereas with just NMOS alone (or whatever), you can have valid logic 0s, but sooner or later you need to provide pullups to provide valid (rather than indeterminate) logic 1s, and that's where you will burn power.Tim

author: fourfathom
author_rank: Super Contributor
timestamp: January 06, 2022, 01:25:44 am
content: This doesn't help with the current drain, but why the complicated logic? A single XNOR should do the job:

author: virtapp
author_rank: Contributor
timestamp: January 06, 2022, 07:41:05 pm
content: The main mcu is an ATMEGA328p, but the pulse need to be injected to the external timer: TLP5110The state change of the reed (and the relative negative pulse) need to be tied to the external timer interrupt TLP5110, exactly at the EN/ONE_SHOT pin, as you can see here