Pages: [1]   Go Down
 Author Topic: how can i measure mA if it is running on PWM?  (Read 1084 times) 0 Members and 1 Guest are viewing this topic.
Offline
Sr. Member
Karma: 0
Posts: 297
Arduino rocks!
 « on: February 08, 2011, 02:31:09 pm » Bigger Smaller 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
Online
Brattain Member
Karma: 413
Posts: 22690
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
 « Reply #1 on: February 08, 2011, 02:48:09 pm » Bigger Smaller 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
Sr. Member
Karma: 0
Posts: 297
Arduino rocks!
 « Reply #2 on: February 08, 2011, 02:51:24 pm » Bigger Smaller 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
Brattain Member
Karma: 328
Posts: 16303
Measurement changes behavior
 « Reply #3 on: February 08, 2011, 02:53:27 pm » Bigger Smaller 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
Sr. Member
Karma: 0
Posts: 297
Arduino rocks!
 « Reply #4 on: February 08, 2011, 03:01:18 pm » Bigger Smaller Reset

how can i know for sure if my meter has RMS?
 Logged

As always... Thanks for posting!!!

Left Coast, CA (USA)
Offline
Brattain Member
Karma: 328
Posts: 16303
Measurement changes behavior
 « Reply #5 on: February 08, 2011, 03:07:27 pm » Bigger Smaller Reset

how can i know for sure if my meter has RMS?

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
Sr. Member
Karma: 0
Posts: 297
Arduino rocks!
 « Reply #6 on: February 08, 2011, 03:23:01 pm » Bigger Smaller 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
Brattain Member
Karma: 328
Posts: 16303
Measurement changes behavior
 « Reply #7 on: February 08, 2011, 03:28:20 pm » Bigger Smaller 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
Online
Brattain Member
Karma: 413
Posts: 22690
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
 « Reply #8 on: February 08, 2011, 03:29:56 pm » Bigger Smaller 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
Online
Brattain Member
Karma: 413
Posts: 22690
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
 « Reply #9 on: February 08, 2011, 03:31:13 pm » Bigger Smaller 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
Sr. Member
Karma: 0
Posts: 297
Arduino rocks!
 « Reply #10 on: February 08, 2011, 03:44:32 pm » Bigger Smaller Reset

yes
 Logged

As always... Thanks for posting!!!

Espoo, Finland
Offline
God Member
Karma: 6
Posts: 583
"Oops, try again..."
 « Reply #11 on: February 08, 2011, 06:15:06 pm » Bigger Smaller 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