Pages: [1]   Go Down
Author Topic: Very little current on output pin  (Read 776 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have a Arduino BT, and I am trying to run a Lilypad Vibe board from one of its digital pins (pin 13).

When I set this pin high, the voltage is about 5V. However, it does not power the motor. I checked the current and it is about 4 mA. So, no wonder the motor is not running whereas an LED is.

However, these pins are supposed to output 40mA, enough for my motor.
http://arduino.cc/en/Tutorial/DigitalPins

Can anyone tell me why I am getting this problem? Is there anyway to bump up the current short of an external power supply for the motor?

-A
Logged

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

Did you set pin 13 to output mode first?

pinMode(13, OUTPUT);      // sets the digital pin as output
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I set the pin mode as OUTPUT.

-A
Logged

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The datasheet for the motor:

http://www.sparkfun.com/datasheets/Robotics/310-101_datasheet.pdf

says it needs 85mA to start,  and 75mA to run.

Ran
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply, but I am using the lilypad vibe motor and not the precision microdrive one (unless arduino uses these motors internally).

These motors are supposed to be run from a lilypad. Both lilypad and BT have the ATMega168 chip. So, I should be able to run this one directly off the pin.

Anyway, as I said, the current is barely 4mA, and not 40 mA as it should be. Also, I just checked: when I power this motor directly from the battery, it draws about 50 mA (not the 75 mA) that datasheet for the precisionmicrodirve says.

-A
Logged

Califonia, US
Offline Offline
Newbie
*
Karma: 0
Posts: 44
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you connect a resistor between Pin 13 and ground which @ 5V should give you 40mA (~125 ohms).  Hook up the amp meter inline and see if you can measure the right current.

If it can supply 40mA to this there must be something else in your setup preventing the current from getting through.
Logged

Cheers!

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin 13 has an internal 1KOhm resistor on the Arduino. Maybe the Lilypad also has such? Try pin 12?

Well... The schematics at the site (sorry, I'm not allowed to post links yet smiley-sad) show, that the pin is connected before the resistor and the diode, however the resistor is 330Ohms, which means that around 15mA current is cut from the pin's total.

P.S. I'm new to this stuff, don't laugh if I'm talking stupid.

Edit: Ahhh... I somehow got mixed up thinking, that you are using a Lilypad, and you are using an ArduinoBT.
http://arduino.cc/en/Main/ArduinoBoardBluetooth has the schematic, that shows a 1KOhm resistor connected to pin J3/6, that is pin 13. That means you can not exceed 5mA on that pin (on short-circuit).
I got bitten by that also. After I soldered the kit I saw the led at pin 13 glow dimmer, so I thought I soldered he board bad.
« Last Edit: May 24, 2009, 04:48:01 am by Lachezar » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Here is a little experiment I did. Connected 500, 1K and 2K ohm resistors to pin 13 and measure the current.

500 ohm: 3.6 mA
1k ohm : 2.6 mA
2k ohm: 1.8 mA

The output voltage in each case was 5.1 V.
I guess this looks like normal behaviour, except for the right amount of current.

Any  ideas why this pin provides so little power?

-A
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Another update:

The current on Pin 12 is 40 mA. I can drive the motor on that pin.

Are the Arduino boards supposed to provide different currents on diffrent pins? Is my board defective? The voltage values are the same on both the pins.

-A
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6373
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As Lachezar said, the older Arduino designs (including Arduino BT) included a 1k resistor in series with the digital 13 output.  This permitted people to plug in an LED directly, etc.  With the Diecimila and later versions of Arduino, an LED and resistor were included on the board, but NOT in series with the D13 output.  So to drive a motor from the Arduino BT, use any pin other than 13.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. That seems to be the case.

-A
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ugh... How did you measure those 5.1V. Pin-to-ground, or on IC-Leg-to-ground?

Because a quick calculation shows, that:
a) a 2KOhm resistor at 5.1V should draw 2.5mA current, rather than 1.8
b) a 1KOhm resistor at 5.1V should draw 5.1mA current, rather than 2.6
c) a 500Ohm resistor at 5.1V should draw 10mA current, rather than 3.6

A small look at the fact, that at 1KOhm the current is half of what is expected points out an 'internal' 1KOhm resistance.

BTW. Time and again I found out, that pin 13 is called LED PIN, probably for a reason smiley

Ohhh... I just took a look at the motor's data sheet. It may be too-much for ANY Arduino pin, and yet ANY Arduino pin may be too much for this motor.
The voltage for the motor is expected in the 2.5-3.8V (i.e. around 3.3V) with 70-80mA, but Arduino pins put up 5V (PWM pins too) up to 40mA. Why not use an H-Bridge, or at least a transistor switch with two diodes (to drop 1.4V) scheme to power the motor with 3.6V with higher amperage?
« Last Edit: May 26, 2009, 05:08:15 am by Lachezar » Logged

Pages: [1]   Go Up
Jump to: