Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.
 
GraveYard_Killer said:
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top