This “voltage divider” just - devides a voltage, in this case 5 Volts.
So when you have a configuration
+5V ---- 28 Ohms resistor ---- * ------ 3 Ohms “victim” ---- ground
You will measure at the spot marked * a voltage of 5V*3/(28+3)
The involved trades come from:
- measuring something that gives you a reasonable resolution , i.e. so you can distinguish 3 from 4 and 2 Ohms in the first place.
- not needing too much current, to avoid heating things up.
The latter is computed by multiplying the current flowing to the square multiplied and the resistance: IIR
The current through 30 Ohms is 5/30 = 160 mA which is high considering standards in the sensor business…
The heat generated is:
0,160,1630 = 0,8 Watts, which sounds not so much but it will make the resistor “feel” hot… It might even already smell a little bit, so the advice to use a resistor rated for 2 Watt. Those things are considerably larger, beeing their own “heat sink” so to speak…
I suggested this approach for its simplicity. With a little more effort it can be improved in two ways.
(1) After your first reading shows something around 3 Ohms, you can change the ADC settings to use a 1,1 Volts reference; the reading then will show a five-fold value, increasing the resolution. But this will only be an improvement when you are very sure of the value of your supply voltage. However you can measure that also with a little trick (see …). This is just a little bit more complexity in the software only.
(2) You can also use a voltage smaller than 5 Volts somehow derived from the supply voltage. There are a lot of considerations involved there, another simple voltage devider can do.
I had not thougt of this previously, but this can be realized by just 3 resistors.
+5V —220 --(a)-- 47 Ohms – ground
(a)-- 47 Ohms – (b) – the 3 Ohms – ground
The voltage at (a) will be around 0.5V = around 220 ADC counts
when something is connected, and 1 V if the circuit is open
The voltage at (b) will be around 60mV = around 30 ADC counts when a 3 Ohms wire is connected
This gives you a resolution of 0.1 Ohms around 3 Ohms.
- Change the ADC setting to a reference of 1.1V
- It suffices to use 1% standard metal resistors 1/4 Watt
- you have to measure at point (a) and at point (b)
The last thing will simplyfy the evaluation considerable, as the formula is
(b) = X/(X+47 Ohms) * (a)
So X = 47*(b) /((a)-(b))
This does not look simple, but it is. Note that there is no need to exactly KNOW any voltage (or have any exact voltage), it all cancels out by itsself.
The current involved in this modification is 20 mA (rather than 160). Worth the trouble?
P.S. Before someone else comes to this: You can put a 220nF capacitor in parallel to the 220 Ohms resistor, but you need not really.