how to measure current in PIC (PIC as an ammeter)?

Status
Not open for further replies.

GraveYard_Killer

New Member
Before, I used the A/D capability of PIC16f877 to function as a 5V voltmeter and display it in a 16X2 LCD Display.

this time, I want to measure current,

how do i measure current in PIC? i just want to create a prototype and what ICs do I have to use? thanks.
 

It's the same as measuring the current with anything else, you measure the voltage drop across a resistor. In order to keep the voltage drop across the resistor low you need to amplify the voltage, an opamp in differential mode is usually used to do this.

The biggest problems are providing power for the PIC and opamp, if you have a seperate supply for them it's no problem, otherwise you need to get a little inventive!.
 
Just use a shunt like this https://www.mouser.com/index.cfm?ha...uctid=542721&e_categoryid=201&e_pcodeid=66211

That particular one will drop .01 V/amp drawn across it.

If you are talking about smaller currents, use a larger value shunt.

You can use an op-amp to multiply the voltage and measure that, or you can get a precision voltage referance and hook that to the PIC as the upper voltage referance. That way you can have 10-bit resolution between gnd and the reference voltage (switch between different referances and you get different ranges)
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…