Arduino Forum

Using Arduino => Motors, Mechanics, and Power => Topic started by: TECH GEEK on Feb 08, 2011, 08:31 pm

Title: how can i measure mA if it is running on PWM?
Post by: TECH GEEK on Feb 08, 2011, 08:31 pm
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
Title: Re: how can i measure mA if it is running on PWM?
Post by: CrossRoads on Feb 08, 2011, 08:48 pm
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.
Title: Re: how can i measure mA if it is running on PWM?
Post by: TECH GEEK on Feb 08, 2011, 08:51 pm
i don't think i can calculate it because i know i can bearlyunderstand what u said...
Title: Re: how can i measure mA if it is running on PWM?
Post by: retrolefty on Feb 08, 2011, 08:53 pm
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
Title: Re: how can i measure mA if it is running on PWM?
Post by: TECH GEEK on Feb 08, 2011, 09:01 pm
how can i know for sure if my meter has RMS?
this is my meter: (link (http://p-mastech.com/products/04_dm/ms8268.html))
Title: Re: how can i measure mA if it is running on PWM?
Post by: retrolefty on Feb 08, 2011, 09:07 pm

how can i know for sure if my meter has RMS?
this is my meter: (link (http://p-mastech.com/products/04_dm/ms8268.html))


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
Title: Re: how can i measure mA if it is running on PWM?
Post by: TECH GEEK on Feb 08, 2011, 09:23 pm
ok thanks
also how do i wire up my meter to measure Hz?

Thanks
Title: Re: how can i measure mA if it is running on PWM?
Post by: retrolefty on Feb 08, 2011, 09:28 pm

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

Thanks


As if you were measuring an AC voltage
Title: Re: how can i measure mA if it is running on PWM?
Post by: CrossRoads on Feb 08, 2011, 09:29 pm
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.
Title: Re: how can i measure mA if it is running on PWM?
Post by: CrossRoads on Feb 08, 2011, 09:31 pm
Does your meter have a Frequency, or Hz, setting?
Title: Re: how can i measure mA if it is running on PWM?
Post by: TECH GEEK on Feb 08, 2011, 09:44 pm
yes
Title: Re: how can i measure mA if it is running on PWM?
Post by: GaryP on Feb 09, 2011, 12:15 am
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