Pages: [1]   Go Down
Author Topic: Vcc can power device, but digital out pins can't?  (Read 1977 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am attempting to power a small laser pointer via the Arduino. I have stripped open the laser pointer and soldered on wires to positive and negative leads.

I then connect the ground to the ground of the Arduino. If I connect the positive of the laser pointer to the Vcc of the Arduino, it works fine. If I connect it to a pin and send a HIGH signal to that pin, it doesn't seem to be getting enough juice to light the laser pointer more than a little bit.

The voltages are about the same (around 5.03V). I indeed do have several other devices connected to other digital write pins. Is it possible that the Arduino is not shoving out enough amps to the laser pointer?

Replies are greatly appreciated.
Logged

Offline Offline
Faraday Member
**
Karma: 66
Posts: 2574
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Right, the output pins cannot provide that sort of current.

Look for examples of using a transistor over at Arduino Playground or using 'Search' here.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12467
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The output pins have an "absolute maximum" current rating of 40mA - you'll have exceeded this unfortunately - with luck its still working but you might want to check all the pins still function.  In practice keeping the max current per pin down to 25mA is wise (there are other limits to total current through groups of pins).

Think of the pins carrying information, not power.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes that's correct as stated above. The laser is most likely current limiting the digital output pin. Your better off using a transistor driver to turn on the laser. Use your output to turn the transistor on at the base and use the transistor to drive the laser.  Or you can use the transistor to trigger a relay and use the contacts of the relay to turn on the laser.
Both will work, but depends on your application.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34553
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Powering laser diodes is a bit more tricky, see this:-
http://www.repairfaq.org/sam/laserdps.htm
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With integrated laser driver IC it is straight forward to driver laser diodes. Here you find many applications: http://www.ichaus.biz/appnote_laser or http://www.ichaus.biz/Whitepaper .
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's possible to connect a few output pins in parallel to increase the current capability. You then have to use direct port access to drive then all simultaneously, and be very careful to set them all to the same state. However, your laser pointer almost certainly needs more current than this technique can reasonably provide. So you should use a transistor, or (even better) a mosfet, to switch it.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use an npn transistor as a switcher for the 5v supply of arduino (if you just want to control it).
Logged

Pages: [1]   Go Up
Jump to: