# Circuit that looks for certain resistor

Discussion in 'General Electronics Chat' started by durden, May 17, 2018.

1. ### durden Thread Starter New Member

May 17, 2018
3
0
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):
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):
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!

2. ### MrSoftware Senior Member

Oct 29, 2013
1,189
348
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.

Tonyr1084 likes this.
3. ### durden Thread Starter New Member

May 17, 2018
3
0
I also looked into window comparators, but not sure exactly how to use those.

4. ### Picbuster Well-Known Member

Dec 2, 2013
827
101
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

5. ### Dodgydave AAC Fanatic!

Jun 22, 2012
7,652
1,271
Wheatstone bridge divider circuit .