# Resistance measurement

Hello,

I am looking for some advice on a circuit i have designed to control a car light bulb while measuring its resistance, i am more interested in the measuring of the resistance on a 12 volt led using the arduino and have come to the idea of using a voltage divider to drop the voltage to 5 volts then using the arduino to calculate the resistance of the bulb, The 12 volt supply comes from a regulated supply so it is a constant 12 volts i have put my circuit below.

I have used 140Ω as R1 and 100Ω as R2 and R2 also serves as a known resistor for reading the resistance of the bulb, i intend to then use the code on circuitbasics.com to read the resistance.

Can anybody say whether my design will work?
Is this the best solution?
Can you name other solutions?

I have just realised for this to work R2 would need to be greater than 100Ω for it to work and considering my led bulb has a resistance of around 6Ω i would need 110Ω for R2?

How do you know that the 12V supply is really 12 V? You will need to monitor that separately.

The 12v supply comes from a regulated circuit i don’t really want to go into detail on the supply just take my word imagine it is coming from a workbench power supply.

Great, I was thinking "car 12 V"

Just work it out on paper.

What voltage do you get for a resistance of 5 ohms? 6 ohms? 7 ohms? How does that compare to the steps you get with the 10 bit arduino of about 5 mV per step.

What is the smallest change you want to measure? how many 5mV steps is that?

It is 12 volts from a car but i have another circuit for regulation that is why i originally put regulated supply sorry hope this clarifies.

Normally if you want to measure the resistance of a light bulb when it's on, you'd use a multimeter to measure current and then you can calculate the resistance ([u]Ohm's Law[/u]).

If you want to measure the resistance when it's off, you just measure resistance with your multimeter.

I have just realised for this to work R2 would need to be greater than 100Ω for it to work and considering my led bulb has a resistance of around 6Ω i would need 110Ω for R2?

Two issues - You only need one resistor because the bulb is one of the resistors in your voltage divider. With your set-up you'll be measuring the sum of the sum of R5 and the lamp.

And, if your series resistor is much greater than the bulb's resistance the bulb will be very dim (maybe too dim to see) so that's the same as the off-resistance. Plus, if one of the resistances in the voltage divider is greatly different than the other it can be difficult to get an accurate measurement.

i am more interested in the measuring of the resistance on a 12 volt led ...

LEDs are extremely non-linear so any resistance measurement/calculation is only valid under the particular voltage & current conditions during the measurement. So, measuring the resistance with a multimeter rarely gives you a useful result.

And a "12V" LED is not simply an LED because LEDs don't operate at 12V (or 120V or 240V)... It could be an LED and series resistor, or it could have an active driver circuit built-in.

Your information is somewhat confusing - you mention a bulb (and show a diagram of one with a filament) but then talk about a "12v LED" - they are two very different critters. The filament type bulb has a variable resistance (depends on the temperature of the filament - the "inrush" (turn on) current is much higher than the operating current and to figure the effective resistance of a filament bulb, you need to measure the current through it at the operating voltage if you want a meaningful answer. For a LED, as pointed out in another post, there is no such thing as a 12v led - a led operates at essentially a constant voltage of around 2v depending on the color and LED and requires some sort of current limiting. If you have a "12 v LED bulb", it will either have a current limit resistor in it or some sort of switching regulator in the base of the bulb - if it is some sort of switching regulator, you could see it with a scope if you looked at a series resistor of say 10 ohms with the scope across it - expect a high frequency square wave for a switching regulator of some sort. Either way though, not operating whatever the "illumination device" you have at the specified voltage will give incorrect readings since both cases are non-linear (they do NOT behave like a simple resistor)

Actually a filament bulb is a linear, but time-varying, resistance. The LED is not linear at all.

MarkT:
Actually a filament bulb is a linear, but time-varying, resistance. The LED is not linear at all.

Maybe temperature-varying resistance is more appropriate?

Ciao, Ale.

Filament lamps are definitely non-linear.

Their resistance is a function of temperature which itself is a function of the current flowing through the element.

Consider a 12 volt, 20 watt lamp
Empirical testing gives the following figures :

Apply 6 volts I = 1.03A W = 6.18 watts "R" = 5.83 ohms
Apply 9 volts I = 1.33A W = 11.97 watts "R" = 6.77 ohms
Apply 12 volts I = 1.58A W = 18.96 watts "R" = 7.59 ohms

As you will observe, the "resistance" varies with the applied voltage and resultant current. If the resistance was linear, the 9 volt value would be 150% of the 6 volt value but is in fact only 116% and the 12 volt value would be 200% of the 6 volt value but is in fact only 130%

Ohms law, which is a linear law states that the current flowing through a fixed resistor is directly proportional to the voltage applied ( I = V/R) From that simple but very important equation one can derive that the value of a resistance is directly proportional to the voltage applied divided by the current flowing (R = V/I)

But the empirical tests shown above clearly indicates that R is not a linear relationship since the increases in resistance are not directly proportional to either the voltage applied or the current flowing.

Sorry I am moderately new to the forum and a student myself, the project is for a bulb (standard car bulb) we have been told that we have a steady 12v regulated supply from a battery with no other loads on it (two 6v batteries in series).

Our task is to recreate the technology found in cars for detecting bulb failure (canbus) we are to both power the bulb and get our results from it at the same time.

And think of the differences in the circuit (if any) for an led.

We are using an indicator lamp and have been told to do this just as an educational exercise with recommendations to read online and use forums.

I have recently tried a voltage divider on the circuit only to realise the resistors get hot I mean real hot.

I think this is a not everything is as simple as it seems, I'm at a total roadblock now.

jackrae:
Filament lamps are definitely non-linear.

Metallic conductors show a very linear relationship between voltage and current, at constant temperature... If you allow enough time to pass that the filament changes temperature
the resistance will change, but the relationship between voltage and current is linear on microsecond
timescales when the temperature cannot change appreciably.

For a diode the relationship is non-linear however fast or slow you vary the current, that's the difference.

Shandy:
Our task is to recreate the technology found in cars for detecting bulb failure (canbus) we are to both power the bulb and get our results from it at the same time.

Total failure or progressive deterioration? The latter does require that the current be measured and
monitored over time. As the filament gradually degrades the current will change (probably decrease).

You will need to know the relationship between current and voltage to compensate for battery voltage
changes, and this won't be linear. IE you need to be smarter than measuring resistance, you'll need
to measure current and voltage and compute a function of the two that is constant as the battery voltage
varies between 11 and 14V

I would use a high-side current/voltage sensor for this.

I think the chip even computes power used.
Leo..

Okay so I should be attempting to measure the current flowing into the bulb and voltage of the battery then us this to determine resistance?

I think it’s total bulb failure I want to detect but I do think however that there are occasions where bulbs fail yet still have continuity?

What’s the best direction to go down, a hall effect current sensor, current shunt or should I use something else.

Sorry I feel I’m no longer able to contribute much to my own post but I really want some experienced guidance on this before using my easily exhaustable source of components.

An easy way is to detect if a bulb is blown is to measure the voltage across a current sense resistor.
Arduino can detect a few milliamps if 1.1volt Aref is enabled in setup.
A 0.01ohm resistor (or a piece of hookup wire) could already have enough volt-drop if the bulb is big enough.
The 10k resistor is added for pin protection.
Leo..

Another option is a reed switch - you can put a few turns of wire around it (you will have to experiment) and when there is a current flowing in the wire, the switch will close. You can use that to make a decision as to the status of the lamp. Used to be lots of the surplus places carried the reed switches just by themselves. You will have to search for them. Something like MAGNETIC REED SWITCH | All Electronics Corp. this was what I have worked with in the past.

Lots of reed switches are available
http://www.digikey.com/product-search/en/switches/magnetic-reed-switches/1114199?k=reed%20switch