How a PIC can measure Current with a simple resistor?

Status
Not open for further replies.

djou007

Newbie level 2
Joined
Feb 25, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
sfax
Activity points
1,295
I need your help


Vin R=10 ohm
o---------VVVV-------------o VA0 To the PIN A0
|
|---------------------o VA1 To the PIN A1



the current Value I :

I= (VA1-VA0/R)


Is it correct?
 

Nope. you can only measure the voltage level. If you do this, you will get 5V at both point
 

If the current you are trying to measure is passing through the resistor and you measure the voltage at both ends of the resistor then the current will be (VA1-VA2)/R. You need to ensure that the voltage on the resistor doesn't exceed the PIC voltage range.

Keith.
 
Reactions: dani222

    dani222

    Points: 2
    Helpful Answer Positive Rating
try to use current-sense amplifier.
it amplifies the voltage across V+ and V-. A sense resistor, RSENSE, is connected across V+ and V-. A voltage drop across RSENSE is developed when a load current is passed through it. This voltage is amplified and is proportional to the load current.
 

Attachments

  • 4303.gif
    3 KB · Views: 106
Last edited:

Hi,
This diagram should clear things:


VA0 and VA1 can be directly connected to the PIC input if the voltage is below 5v. In this current configuration, I = (VA0-VA1)/R.
If voltage levels are higher than 5v, then the additional circuitry is required to step down the voltage using the resistor divider and zener for protection, the 1k and 0.1uF for filtering although not entirely necessary, could improve the situation in some cases.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…