NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » New to C and Microprocessors - Resistance help

October 15, 2011
by sonicgadgets
sonicgadgets's Avatar

I'm new to C and Microprocessors in general. I see plenty of examples using a 5 volt ref. to a sensor. But. Some sensors may be measured based on resistance. Is it possible and also maybe some code to measure such a request.

October 17, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi sonicgadgets,

I'm a little confused about what you mean here. Do you mean that your sensor will change resistance based on something external, and you wish to measure that?

If that is the case then a simple approach would be to construct a resistive voltage dividier using a different known resistor and your sensor, and hook up the middle node to your ADC. As the resistance of your sensor changes the voltage will change and you can measure that on the ADC. You have to be a litte careful to choose your resistor values correctly so you can see the voltage change on the ADC, and you have to make sure you are not using too much current through the dividor.

This is of course assuming your resistance is changing a whole lot (enought to cause a Votlage change readable by your ADC), if it is not then you have to do a little more engineering to make it work, and what you do really depends on the sensor. Take a look at our weigh scale project where we are essentially measuring a tiny changing resistance.

Humberto

November 29, 2011
by huzbum
huzbum's Avatar

Voltage drops over resistance in a circuit. It drops over each resistance in the circuit proportionally to it's resistance in the entire circuit.

If you measure the voltage dropped over the resistance of the sensor in series with a known resistance value, you can determine it's resistance.

I suggest you start from the beginning here: http://www.allaboutcircuits.com/vol_1/index.html

Post a Reply

Please log in to post a reply.

Did you know that you can make a capacitive proximity sensor with some aluminum foil and paperclips? Learn more...