Circuit that looks for certain resistor

Thread Starter

durden

Joined May 17, 2018
3
Hello,

I am wondering what I can use to make my raspberry pi look for a certain resistor connected to a GPIO pin. I spent some time looking, but I can't really find anything. It does not need to look for an exact resistor amount, just close enough.
The reason being I need (imagine you have two contacts):
Open circuit = bad
Shorted circuit = bad (circuit needs to be able to withstand being shorted)
Specific resistor = good

I know if send 12v through the resistor, I can end up with 6v.
Then if I read (same two contacts):
12v it is open (bad)
0v it is shorted (bad)
6v it has resistor (good)
Then I would need to get this down to 3.3-5v for the gpio of the raspberry pi. I just don't know what type of chip(s) I need. I looked at octocouplers and comparators, but I don't think they would work. I would essentially need an octocoupler or relay that only works at 6v. Then again, I may be looking at this all wrong and I don't even have to work with different voltages.

If anyone has a suggestion I would greatly appreciate it!
 

MrSoftware

Joined Oct 29, 2013
2,273
Look up voltage divider. Create a voltage divier and put an analog input from your processor in-between. If you know one resistor, you can measure the volage between them and calculate the other. A wheatstone bridge is another way to skin the cat. You don't need much voltage, and figure out your permanent resistors based on the range you are expecting for the variable resistor. Use a zener diode of the appropriate voltage to ground to cap the voltage on your input pin for safety.

Note: This works for figuring out a resistor. If what you really want is the status of a circuit then we need more info.
 

Picbuster

Joined Dec 2, 2013
1,058
Use an opamp.
use a resistor in series with the resistor under test.
make a one divider with known resistors so that you obtain the voltage you want over the resistor under test.
Use the opamp to substract the values from voltage in divider and resistor under test . when ok output = zero else faulty.
Selection of resistors subject to bandwidth of the voltage measurement.

Picbuster
 
Top