Pages: [1]   Go Down
Author Topic: how can i measure mA if it is running on PWM?  (Read 1410 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i want to mesure how many mA a resister & LED have at differant level's of pwm..
what should i do to do this? AC mA? DC mA? something else?

THANKS
Logged

As always... Thanks for posting!!!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27115
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not just calculate it?   Say you are driving a resistor to the anode, cathode to ground.
You know the output is 5V (the pulse width may vary but the output is 0 or 5V), you know the forwad voltage drop of the LED, you know the resistor value.
Thus (5v- Vled)/R = current.

The current will be the same every time the pulse goes high, the only difference is how long the current is conducted, and that is determined by the pulse width.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i don't think i can calculate it because i know i can bearlyunderstand what u said...
Logged

As always... Thanks for posting!!!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well if your meter is one that measures true RMS values, then reading it as a DC milliamp current will give you the correct answer. However most inexpensive digital multi-meters don't have that feature so you will get a reading but it won't be an accurate measurement. You can easily calculate the average current flow by multiplying the 100% current flow value by the % duty cycle that the pwm signal is outputting. That is (output pwm value / 255) X full on current value.

Lefty
« Last Edit: February 08, 2011, 02:55:24 pm by retrolefty » Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how can i know for sure if my meter has RMS?
this is my meter: (link)
Logged

As always... Thanks for posting!!!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how can i know for sure if my meter has RMS?
this is my meter: (link)

Typically such a high end feature will be in the title description of the meter or at least a bullet point in it's feature list, like here: http://www.myflukestore.com/p1393/fluke_87v.php

The odds of your meter having the feature without mentioning is around 0% chance.

Lefty
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok thanks
also how do i wire up my meter to measure Hz?

Thanks
Logged

As always... Thanks for posting!!!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok thanks
also how do i wire up my meter to measure Hz?

Thanks

As if you were measuring an AC voltage
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27115
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Tech Geek?  Really?
If you had the PWM output set to 255, that would be 100% on.
Use your meter in mA mode. Connect arduino pin to the red lead connect the black lead to one side of a resistor, connect the other side of the resistor to the long leg of the LED, connect the short leg of the LED to ground.

Take a reading with PWM at 255 (or whatever the highest setting allowed is, I have never used it).
For any other value of PWM, the Average current will be (PWM output number)/255 * full current reading.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27115
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does your meter have a Frequency, or Hz, setting?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 297
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes
Logged

As always... Thanks for posting!!!

Espoo, Finland
Offline Offline
God Member
*****
Karma: 7
Posts: 586
"Oops, try again..."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does your meter have a manual? It's time to open it. Also it's time to do some google and look for "ohms law".

Kari
Logged


The only law for me; Ohms Law: U=R*I       P=U*I
Note to self: "Damn! Why don't you just fix it!!!"

Pages: [1]   Go Up
Jump to: