Measure two resistive sensors or multiple switches with a single Schmitt
Many of the sensors capturing information from the world around us are resistive. A few examples are NTC, PTC, LDR, & contact sensors. If we convert the resistance of the sensors into frequency or pulse duration, these parameters can be measured by most MCUs, without needing an ADC.
Figure 1 is showing how a single inverter with Schmitt trigger (74xx14 or 40106) is serving two resistive sensors, Rs1 and Rs2. One of the sensors is controlling the low time TL of the output pulses and the second sensor is controlling the high time TH. Diodes D1 and D2 make the high & low times independent of each other. Resistors R2 and R4 are not obligatory. They are used to offset the resistance of the sensors if needed.
R1 and R3 can be used if we want to alter the sensor response curve, or to provide threshold calibration points.
An example setup of the circuit follows, where R1 & R3 are used to calibrate set-points:
The resistors R5, R6, and P1 around the reference source IC2 depend on the particular implementation and can be easily calculated with the formulas in the data sheet of the TL431A or equivalent IC.
Monitoring multiple contacts with a single inverter
A single inverter can also capture information from one or more contact sensors or switches. Figure 2 shows how a single Schmitt captures the status of four contacts, S1 to S4. The circuit converts the resistance in the feedback of IC1a into frequency. Diodes could also be added as in Figure 1 to increase the number of contacts.
There are 16 possible combinations of open and closed switches. Each combination produces a square wave with predefined frequency. The frequencies can be measured and stored in the memory of the embedded MCU if calibration is necessary. R5 is used to maintain the oscillations when all switches are open. The resistors R1 to R5 can have any appropriate values. The important point is to have a different frequency for each combination of open and closed switches.
IC1b, R6, and D1 are not obligatory. They can make some of the combinations of open and closed switches visually recognizable if needed.
The number of the contact sensors is limited only by the resolution and the accuracy of the implementation. They depend on the IC, the stability of the power supply, the accuracy of the resistors in the feedback, and the capability of the MCU to measure the duration of the pulses and the frequency.
News on theme: