How to implement timer to read sensor signal periodically without MCU

Thread Starter

eepty

Joined Sep 11, 2012
12
I would like to read the signal from a sensor periodically, for example 0.5Hz, but my circuit does not have a microcontroller. The signal from the sensor is a continuous digital signal of only high or low logic (5V or 0V).

Firstly, I think that if I can implement a timer, like a 555timer, with some logic gates to read the signal from the sensor. However, when the timer is not enabling to read the sensor signal, the output of the circuit should be latch. I do not know how to implement this.

The truth table:



Or is there other simpler method?

Thank you very much.
 

Attachments

Last edited:

jpanhalt

Joined Jan 18, 2008
8,109
As I understand your post, the sensor sends a digital signal (0's and 1's = 0.0V and 5V, respectively). You want to read that periodically with discrete logic chips and display the answer.

Can it be done? Yes. Why do you want to do it that way?
 

Thread Starter

eepty

Joined Sep 11, 2012
12
As I understand your post, the sensor sends a digital signal (0's and 1's = 0.0V and 5V, respectively). You want to read that periodically with discrete logic chips and display the answer.

Can it be done? Yes. Why do you want to do it that way?
The sensor is a logic level thermostat. Yes, I want to sample the signal periodically by discrete components. But I do not need to display the answer.

The resulting signal is going to control another circuit. I do not want the signal changing too fast so I want to sample the original sensor signal in a lower frequency. I have tried to add a low pass filter at the output of the sensor, but the rising and falling time of the output signal will become slow and it is not good for that another circuit.
 

atferrari

Joined Jan 6, 2004
3,489
The sensor is a logic level thermostat. Yes, I want to sample the signal periodically by discrete components. But I do not need to display the answer.

The resulting signal is going to control another circuit. I do not want the signal changing too fast so I want to sample the original sensor signal in a lower frequency. I have tried to add a low pass filter at the output of the sensor, but the rising and falling time of the output signal will become slow and it is not good for that another circuit.
What is that filter actually for?
 

MrChips

Joined Oct 2, 2009
19,416
The AND gate inputs will debounce rising transitions.
The dual NAND is to debounce both rising and falling transitions and to preserve the logic level (if required).
 

MrChips

Joined Oct 2, 2009
19,416
Here is a variation on the same idea.
In this case, the rising transition is filtered. The capacitor rapidly discharges on the next low level input.

Debounce with Schottky diode.png.png
 

PhilTilson

Joined Nov 29, 2009
75
Personally, I would still use a μP for this, as it would probably be just as cheap and a lot more flexible! However...

This uses just a couple of quad NAND gates (74HC00?) and should give the desired result. The component values may have to be tweaked to get the sample frequency and window that you want, but it's about as simple as you can get, I think!

upload_2019-7-6_19-21-27.png
 

Attachments

AnalogKid

Joined Aug 1, 2013
8,152
What you want is called a transparent latch. When the control signal is in one state, the output follows the input. When the control signal is in the other state, the output is frozen with the input condition when the control signal changed. If you want 8 of them all banging together, that is the 74xx373 or 74xx573. Here is a basic single stage. D is the sensor input, C is the control input. Low = latched, high = transparent.



https://commons.wikimedia.org/wiki/File:D-type_transparent_latch.png

A CMOS 555 or a 5th Schmitt trigger NAND gate such as a CD4093 can be used for the clock. How wide of an aperture window (positive pulse width of the clock signal) do you want?

ak
 
Last edited:
Top