PCB Heaven
General Category => Digital discussion => Topic started by: jerano on August 16, 2008, 17:13:13 PM

Hello forum
Please i need your help. I want to make a check engine for the lamps of my motorcycle. This will be a PIC micro, that will open instantly all the lamps of the motorcycle (one after the other of course) and will check in each lamp what if there is a current flowing. if not, this means that the lamp is broken and must be replaced.
Now my problem. I use a PIC that has an ADC. This will convert 5 volts to a 12bit digital. But i do not want to measure voltage. I want to measure current. The lamps are of range from 5 to 35Watts at 12 volts.
Please can you help me?
I wil apreciate any help. Thank you

I have seen some transformers used in electric installations that makes a reduction for example 1/100.
They have a coil and the wire passes through this coil. You do not need to cut the wire, just to cross it from the center of the transformer.
The outputs are the amperes of the wire divided.
Can i use one of this? Are there any with less division? Like 1/10 or even less?

In electric industry you won't find one that suits you, to big and with big reductions cause there ment to measure hundreds of amperes, in electronics i don't know if something like that exists in the sizes you want.
Maybe check in automotive parts, older cars had ampmeters but you have to put them in series.

I have seen some transformers used in electric installations that makes a reduction for example 1/100.
They have a coil and the wire passes through this coil. You do not need to cut the wire, just to cross it from the center of the transformer.
The outputs are the amperes of the wire divided.
Can i use one of this? Are there any with less division? Like 1/10 or even less?
No you cannot. Minimum may you find 1/50, and refers to AC. You need DC, and i suppose just a couple of amperes, maybe 3Amps. You will put a resistor, 1ohm or maybe less, 0.5ohms is good, 5 watts. Across the resistor you will measure the voltage drop. Use the ohms law calculator (http://pcbheaven.com/handbook/calculus/index.php?calc=ohm) to calculate the current from the voltage drop...

I have seen some transformers used in electric installations that makes a reduction for example 1/100.
They have a coil and the wire passes through this coil. You do not need to cut the wire, just to cross it from the center of the transformer.
The outputs are the amperes of the wire divided.
Can i use one of this? Are there any with less division? Like 1/10 or even less?
No you cannot. Minimum may you find 1/50, and refers to AC. You need DC, and i suppose just a couple of amperes, maybe 3Amps. You will put a resistor, 1ohm or maybe less, 0.5ohms is good, 5 watts. Across the resistor you will measure the voltage drop. Use the ohms law calculator (http://pcbheaven.com/handbook/calculus/index.php?calc=ohm) to calculate the current from the voltage drop...
Won't this resistor reduce also the current through the lamp?

I have seen some transformers used in electric installations that makes a reduction for example 1/100.
They have a coil and the wire passes through this coil. You do not need to cut the wire, just to cross it from the center of the transformer.
The outputs are the amperes of the wire divided.
Can i use one of this? Are there any with less division? Like 1/10 or even less?
No you cannot. Minimum may you find 1/50, and refers to AC. You need DC, and i suppose just a couple of amperes, maybe 3Amps. You will put a resistor, 1ohm or maybe less, 0.5ohms is good, 5 watts. Across the resistor you will measure the voltage drop. Use the ohms law calculator (http://pcbheaven.com/handbook/calculus/index.php?calc=ohm) to calculate the current from the voltage drop...
Please one schematic tounderstand

Here you are. The schematic you want is attached.

kammenos the schematic is ok.
Mercury, a 0.1 ohm resistor may reduce a 12volt battery down to......120 amperes... That will be no problem i suppose ;D

kammenos the schematic is ok.
Mercury, a 0.1 ohm resistor may reduce a 12volt battery down to......120 amperes... That will be no problem i suppose ;D
;D of course ;D

Kammenos, the output to PIC will measure voltage? And what is the analogy? Because this is a complicated schematic.

Kammenos, the output to PIC will measure voltage? And what is the analogy? Because this is a complicated schematic.
you are measurig the voltage drop on the resistor. Using the ohms law:
R = U / I => I = U / R
You know the resistanse (R) that is 0.1 ohm, you also know the voltage drop (that you measure with the PIC A/D U). So you can calculate the current if you divide those two. And it happens that the current in a series circuit (like the attached i gave you) is the same for all the circuit.

And how about the R2 and D1? What the use of them? And do i need to add them into calculation?

And how about the R2 and D1? What the use of them? And do i need to add them into calculation?

R2 is to limit the current in case of short circuit the load to keep PIC and zener safe.
D1 is to limit the voltage to 5volts as PIC will be in great danger if more voltage is applied to it.
You do not really need to calculate R2 and D1 as what you realy measure with pic is the voltage drop across R1.
The max current to flow within the circuit will be P=U x I => I=P/U => I = 50/12 => I = 4.1Amps through the 50W load. I do not add the 0.1 ohms resistor to calculation because ... you know why...
This current will also flow within R2 causing a voltage drop of U_{R2} = I * R_{R2} => U_{R2} = 4.1 x 0.1 => U_{R2} = 0.4 volts. This is what you will measure to your PIC. So choose an appropriate comparator voltage.

Kam there will be a small voltage drop due to grounding the PIC.
This is very small voltage drop. It will slightly change your readings. If you use it only to check if the load is working (current flows) then you have no problem. If you use it for measuring the current, you should make some checks with a good amp meter first as there will be a very slight change between calculated value and measured value. Also, the 5% or 10% of the value of the resistor will change this value.
In any case, make tests first

Yes of course there will be things like you mentioned but when first designing a project i usually suppose that we live in a happy perfect world... :D
Then i adjust my components according to the readings just to discover that this world is not happy and not at all perfect :P