PDA

View Full Version : Using a pic to measure current



rwskinner
- 5th September 2006, 14:13
I have a 100 amp shunt which out puts 1 mv per amp. I will be using this shunt to measure current in a 24 volt dc circuit. My question is, even though the max voltage across the two leads on the shunt is limited to 100mv, I actually still have 23 to 24 volts on each side of the shunt which would damage the PIC's ADC.

How is the best method for measuring the voltage drop of the shunt with a Pic's ADC?

RYTECH
- 6th September 2006, 02:40
I think what you would need is possibly voltage divider that drops the voltage to 0-5v ?

rwskinner
- 7th September 2006, 19:06
My shunt is a 100 Amp Shunt @ 1 mv/Amp
Could I use a Differential Op Amp with the gain set to 10 to give 10mv/amp or 1 volt @ 100 amps?

then my output from the op amp would be 0 to 1 volt for 1-100 amps?

Does something like sound like it would work?

dhouston
- 7th September 2006, 19:18
Have you see these?

http://www.allegromicro.com/hall/currentsensor.asp

Ron Marcus
- 7th September 2006, 21:03
I have a 100 amp shunt which out puts 1 mv per amp. I will be using this shunt to measure current in a 24 volt dc circuit. My question is, even though the max voltage across the two leads on the shunt is limited to 100mv, I actually still have 23 to 24 volts on each side of the shunt which would damage the PIC's ADC.

How is the best method for measuring the voltage drop of the shunt with a Pic's ADC?

You will need an op amp to "condition" the voltage.A 10 bit A/D will not register any current until you are at over 4 amps of current draw! If you can float the PIC supply, you can attach the ground side of the circuit to the lower voltage side of the shunt.Your voltage input pin then attaches to the higher potential side.If you use the 24 volt system to power your circuit, you can put the shunt on the negative battery lead to the circuit under measurement. Connect the PIC/op amp to the battery negative ahead of the shunt, and your current measurement input on the other side of the shunt.
Iffff...your maximum current drain is not that much, get a more sensitive shunt,say 10mV per amp, you may not need as much amplification, and will have less noise issues.