• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

on delay circuit

Thread starter #1
I need a simple solution to introduce a delay for a sensor that monitors a dry contact switch. The delay will prevent false sensor activation on transient switch closures.

The sensor uses a 3v CR123A battery. When the monitored switch closes the two contacts on the sensor are connected and the sensor transmits a signal.

Can I connect the sensor to resistor in series with a capacitor, then to the monitored switch, then back to the sensor? If so, what R & C values should I target for a 5-10 sec delay?

Thanks
 

dknguyen

Well-Known Member
Most Helpful Member
#2
Basically you need a debouncer. An RC could work but it depends on what the input is looking for. An RC circuit that slow would have a very slow rise and could cause issues for the input as it passes through the indeterminate zone between a logic HI and LO. If it's a schmidt trigger or comparator input it should be fine. But if it's not then it could behave very eratically.

You want the resistor in series, but you want the capacitor between the output and ground, on the side of the resistor closest to the signal's destination.

Time = 3 * RC

For example, 1uF would require 2.3 megaohms. Using such a high value resistor might cause issues. You can use a larger cap and smaller resistor to compensate but 1uF is pretty big already for something like this.
 
#3
There are various circuits using a Schmitt trigger or comparitor as mentioned, but my view these days is that, as an Arduino Nano is so cheap, it is probably just as easy to sort in software. That way changes can be easily made wiithout recourse to a soldering iron. The ideal is a schmitt before the controller to sharpen up the risetime, but a switch should not be too bad in the first place.

Tracy

Tracy
 

AnalogKid

Well-Known Member
#4
So, the monitored switch has contacts that are the input to a sensor that has different switch contacts as its output? yes/no?

Either way, please post a schematic or block diagram so we can discuss the ins and outs with a common reference point. Also, what is the signal the sensor transmits?

ak
 

crutschow

Well-Known Member
Most Helpful Member
#5
What is the "sensor"?
 
Thread starter #6
The monitored switch is a normally open set of contacts on a residential heating boiler. The contacts close if the boiler has a fault condition. However, for unknown reasons, it momentarily closes the contacts at the end of each run cycle which causes false alerts.

Hi, I don't know what type of trigger the sensor uses. It's an Aeotec (Z-Wave) dry contact sensor. Their tech support could only say that "we don't think a resistor/capacitor would affect the sensor as long as it does not add voltage."

I found a simple and cheap on-delay relay that allows for a user determined delay on the input side prior to closing contacts on the output (which now connect to the Aeotec sensor). The only downside was the need to supply 12v DC for the relay, but it only uses power when the boiler fault contacts are closed.

Thanks to all for your help.
 

MikeMl

Well-Known Member
Most Helpful Member
#7
Can you do the following tests?

Disconnect the dry contact switch from the sensor, and connect a multimeter across the two wires from the sensor.

First, read the open-circuit voltage that the sensor puts between the wires with the multimeter in the DC Volts mode. I'm guessing it will close to the 3V battery battery voltage.

Second, put the multimeter into the DC milliamps mode, and read the short-circuit current that the sensor puts through the multimeter. I'm guessing it will be a few tens to hundreds of uA.

Report back with the numbers, and I will devise a circuit that does not require external power...
 
Thread starter #8
Thanks for taking the time to do that. The open-circuit voltage is 2.69v, the current is 3.2uA. The Aeotec support responded again and said that the voltage at the terminals should be 3-3.3v. But the battery is nearly new with the readings I got.
 

MikeMl

Well-Known Member
Most Helpful Member
#9
Thanks for taking the time to do that. The open-circuit voltage is 2.69v, the current is 3.2uA. The Aeotec support responded again and said that the voltage at the terminals should be 3-3.3v. But the battery is nearly new with the readings I got.
So that raises the question as to what is the input impedance of the Vdc meter you were using for the open-circuit measurement? A modern solid-state Fluke DVM will have an input impedance of >10MegOhms, while an old Simpson260 analog meter has an sensitivity of maybe 20,000 Ohms/Volt, so would "load" your sensor during the open-circuit test?
 

MikeMl

Well-Known Member
Most Helpful Member
#10
Here is a hack at a passive circuit:

Presumably, there is some sort of circuit inside the sensor which is watching V(sensor). It makes some decision about if the "switch" is closed or open based on V(sensor). I model that as a behavioral voltage source which is low if V(sensor) is > 1.5V, else 3V. You could refine that estimate of the internal trip point by actually controlling V(sensor) with an external pot, and seeing at what external resistance from V(sensor) to ground causes the sensor to report that the switch is closed.

In the meantime, here is what would happen if R4=220K, C2 = 10uF, and my guess of the internal trip point is ~1.5V. Notice the value of R3... That might be revised when you answer the question in the previous post.

sen.png
 
Thread starter #11
I cannot locate the user manual for my multimeter in order to answer your question. It is a modern solid-state model, but not a well known brand.

I will attempt to get a circuit diagram for the sensor.
 

MikeMl

Well-Known Member
Most Helpful Member
#12
I cannot locate the user manual for my multimeter in order to answer your question. It is a modern solid-state model, but not a well known brand.

I will attempt to get a circuit diagram for the sensor.
Lets assume that your meter is sufficiently HiZ input.

In lieu of getting the specs for the sensor, you can do this experiment: Substitute a 1megOhm pot for the "switch". Starting from max resistance, slowly reduce the pot resistance until the sensor acts the same as if the pot was a closed switch. Disconnect the pot and measure its resistance with your Ohmmeter.

Now turn the pot to zero resistance, reconnect the pot and turn it the other way until the sensor acts the same as if the "switch" is open. Measure that resistance, too, and report back with the measured values.
 
Last edited:

MikeMl

Well-Known Member
Most Helpful Member
#14

MikeMl

Well-Known Member
Most Helpful Member
#16
Switch bounce occurs within a few mS of when the switch is operated. The OP is asking for a timer that delays an alarm by 5 to 10seconds, and wants it to be purely passive (no batteries), and obviously without modifying the innards of his store-bought "alarm" box.
 

dknguyen

Well-Known Member
Most Helpful Member
#17
Switch bounce occurs within a few mS of when the switch is operated. The OP is asking for a timer that delays an alarm by 5 to 10seconds, and wants it to be purely passive (no batteries), and obviously without modifying the innards of his store-bought "alarm" box.
Sounds like a debouncer to me (albeit a very specific kind of debouncer). One that works using a blanking period after the initial edge with a blanking period of 5-10s rather than a few ms. OP did say it was to prevent false sensor activation on subsequent switchings after all. This is how I initially interpreted it.

Or he could have been asking for a circuit that delays the action of a switch until it has been closed for 5-10s (which seems to be how you interpreted it).

I personally consider both to be two different forms of debouncing: "instant activation and then blank" vs "wait until stable and then activate".
 
Last edited:

MikeMl

Well-Known Member
Most Helpful Member
#18
My interpretation is that he is willing to wait for 5 to 10sec after a switch closure (be it one edge, or a few "bounces" on the way to becoming a closed switch) to generate an "alarm". The decision about what constitutes an "alarm" is buried inside some store-bought box which is internally powered by a 3.3V battery.

The alarm box is likely looking for a voltage level somewhere near half of the battery voltage to make a no-alarm/alarm decision. I am waiting for the OP to make a measurement that will confirm my guess about the trip point, and if there is any hysteresis.

Again, this has nothing to do with switch debouncing in the context of using a switch to advance a counter, for example.
 

EE World Online Articles

Loading

 
Top