Pages: [1]   Go Down
Author Topic: Newb Question - Multimeter with Arduino  (Read 1148 times)
0 Members and 1 Guest are viewing this topic.
Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Robot overlord.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Fellow Arduinites,
I`m just getting comfy with my first board, so advance apologies for the newb question.

One of my key learning tools has been moving things around and using the multimeter to test my circuits for Voltage, Current and Resistance in various locations.  This has worked fairly well with the following exception:

• I can`t seem to directly test voltage/current off an Arduino output pin with the multimeter - or at least not accurately - (arduino Uno, pin 7 set to DIGITAL HIGH, extremely simple circuit with one 10.7 Ohm resistor and going back to Arduino ground, and nothing else happening on the board gives me a reading of 0.08 Amps of current and 0.84 volts).  I`ve read there is some issue with using a multimeter to test voltage/current from an output pin, but I don`t fully understand it, or maybe this is incorrect.  I also tried adding a single LED to the above simple circuit and the voltage actually increased to 3.1v, but still a stretch from what I assumed was high-power.  I`d like to get a better understanding of how the voltage out works on these pins.  I thought it would be a pretty solid 4.5 - 5v.  I should note that when using the 5v out pin on the power side of the board, I was able to read a full 5v on the multimeter.  Any clarification would be appreciated.  smiley-fat

Tyler


* photo.JPG (144.43 KB, 640x480 - viewed 76 times.)
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8602
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A 10R resistor is way too low for the CPU pin, it can't drive it and could well damage the chip.

Try something in the 250 range, that will give to 20mA which is a safe current for an Arduino pin.

But if you know the resistance and know the voltage there's no need to measure the current.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To measure current your meter has to be in series with the circuit being tested.  To measure voltage the meter has to be between the measurement point and ground.
Quote
To measure current:
Arduino Ground  ----  Resistor -----  Meter- ---- Meter ---- Meter+ ---- Arduino Pin

To measure voltage:
Arduino Ground  -+-----------------  Resistor -------------+--- Arduino Pin
                        |                                                  |
                        +---  Meter- ---- Meter ---- Meter+ ---+

The voltage should read 0V (LOW) or about +5V (HIGH).

The current will depend on the resistor.  In theory a 10.7 Ohm resistor across 5V should draw 467 mA.  Since the absolute maximum safe current draw for an Arduino output is 40 mA you are unlikely to get anywhere near 467.  You may even damage your Arduino.  Try a load of 200 Ohms or higher.

Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Leeds, UK
Online Online
Edison Member
*
Karma: 80
Posts: 1729
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

10.7 Ohms is WAAAAY too small for an LED.

Take an LED with a forward voltage of 2.8V (about right for a Green LED). That means your resistor needs to drop 2.2V ish.

I = V/R = 2.2/10.7 = 0.206 [A] = 206 [mA].

That would be valid if it were straight from a +5v rail.

 BUT....

The atmega pin drivers can only source ~80mA when connected straight to ground (tested). These drivers are transistors which will have some internal resistance. That resistance will be around

R = V/I = 5/80mA = 63Ohm ish.

So you have

---[63 Ohm]----[10.7 Ohm]---|>|---

If the LED drops 2.8V, then there is 2.2V across those two resistors. That is split proportionally so you get:

V(internal) = 63 /(63+10.7) * 2.2 = 1.88V dropped inside the chip

That leaves you

V(external) = 5V - 1.88V ~= 3.12V outside the chip.




You need to use a bigger resistor, as you are running the chip beyond its rated limits which will cause damage.

(Note: the numbers for internal resistance are to prove a point, the calculations aren't that straight forward)
« Last Edit: June 16, 2013, 09:22:18 am by Tom Carpenter » Logged

~Tom~

Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Robot overlord.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, very nice.  I tried the higher rated resistors (200 Ohm) with the LED, and the Arduino digital HIGH pin started pumping out some more substantial voltage.

My big mistake (other than the uber-small resistor) was thinking that the arduino voltage output should be fixed near 5v regardless of the resistance setup.  I didn` t know there was a max rated current output of the Arduino, and that it would affect voltage output.

I guess the Arduino pin in question is "supposed to" put out near 5v in general, provided the potential current flow doesn`t get too crazy.

Also, while running more tests based on your replies, I learned that loads such as LED and motors have variable levels of resistance.  That complicates my circuit planning, but very good to know.   smiley-red

Thanks Tom, John and Grey!
Logged

Leeds, UK
Online Online
Edison Member
*
Karma: 80
Posts: 1729
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Motors should NEVER be run directly from a arduino pin. Always use a transistor as a switch to control the motor.
Logged

~Tom~

Japan
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Robot overlord.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lol, yes, I did see something about that (after I tried it).  Anyhow my Arduino seems to be ok so far, so onwards with the testing!   smiley-roll-sweat

I actually had been looking into transistors, as mentioned. This was connected to the reason for my first post, as I was trying to understand what kind of transistor I needed that would work with the digital HIGH output (and a 5v battery pack -> small DC motor) on the other end. 

And then I got lost in not being able to figure out my Arduino output voltage issue... (now solved).
Logged

Pages: [1]   Go Up
Jump to: