Go Down

Topic: Arduino output pin to supply 3vdc (Read 4254 times) previous topic - next topic

E3po

Hi! I am contemplating trying to power a cheapo 2 AAA laser pointer via an output pin on my arduino mega.  Is that possible?  And if so what hardware or code do I need to consider?

Could I just set a pin high or use 3.3v or 5v pin on the 'duino?

If I need some transistor, resistor combo or something could anybody direct me to a picture or schematic?

Thanks
-e

E3po

For giggles, I connected 3.3v to + and gnd to gnd and the laser lights up, but if arduino is bus powered, the computer says usb device failed.  I never lose power and I did not fry the 'duino.  The exact same thing happens when connected to a 5v and gnd.
Any ideas?

Thanks!
-e

E3po

I am trying to understand your reply.  Are you saying that 2 AAA batteries supply more than 3v. Or that a laser powered by one time use AAAs or rechargeables, needs more than 3vdc? 
I think you are saying my problem is the current draw.

I want to supply 3vdc, hell I'll take 5vdc but need the current to equal the output of 2 AAAs (one time use or rechargeables).

I am told AAA cells can put out 1000-1200 mAh each, while my rechargables claim 850mAh each.  How do mAh's relate to miliamps?  Is it one to one?  What do you propose the laser pointer needs?

I am aware that arduino pins only supply 40-50 mA.  And while only a "junior member" of this forum, it is not that I do not understand ANYTHING nor do I understand everything.  I am trying to learn by asking questions as well as experimenting.

Would the preferred order of operations include no experimentation and only taking advice of forum members?  What does the number of posts on the ARDUINO FORUM tell the layperson about anyone's actual knowledge or credibility?

I am not looking for a fight or anything like that, and I do search the forums before going all willy-nilly and also before posting to avoid duplicate topics.  I am looking for guidance.  I will take advice, but without trial and error, how is anyone expected to learn?

Can the schematic provided give 3.3v or 5v but adequate current?

Could you also guide me as far as selecting proper resistors for Rb and Rl (I presume b for base and l for load) along with a 2n222 transistor to provide the laser 3vdc with an appropriate current as to prevent damaging the laser driver circuit or the arduino pin?

Of course I don't WANT to fry my arduinos.  I am only looking for a logical way to POWER a laser pointer without batteries.

Thanks for the schematic!
-e

E3po

KE7GKP, I am sorry if this got a little heated!!

I don't want to burn bridges or offend ANYONE trying to help.

This pointer is a 5mw cheapo laser that according to any source I have found (including thus forum) only draws around 18.5mA.  That seems well within a safe level for the 5v, 3.3v or any digital pin set to high.  Would it be possible to simply employ a cap to buffer if in fact the pointer draws under 20mA?

The laser has a driver circuit which allows for a range of voltages so long as the current is adequate.

As far as my power source, it is not currently set in stone so can vary from a wall wort type 9v, USB bus power, 6 AAs...
...I am open to suggestions. 

I am not convinced AAAs are the greenest but are in many ways the most convenient.  I am exploring alternatives.  That was the initial scope of my post. 

So KE7GKP, thanks again and sorry if you got upset with my post, but the "without understanding anything, then giggles are all you will end up with" comment was not well received.  I wish to maintain a positive image here as I plan to stay for a while.  So water under the bridge.  White surrender flag flying...

Peace
-e

retrolefty

Quote
This pointer is a 5mw cheapo laser that according to any source I have found (including thus forum) only draws around 18.5mA.  That seems well within a safe level for the 5v, 3.3v or any digital pin set to high.  Would it be possible to simply employ a cap to buffer if in fact the pointer draws under 20mA?


If your pointer does indeed draw only 18.5ma at 3vdc ( 2 AA cells) then you can indeed drive it directly from a arduino 5vdc digital output pin using a series current limiting resistor to 'drop off' 2vdc. R = 2v / .0185 = 108 ohms, 100 ohm resistor would be close enough. Wire resistor to output pin, other resistor end to laser positive, laser negative to arduino ground pin.

Watch your eyes.

Lefty

E3po

KE7GKP and Lefty,
Thanks for replies! 

While I am only a hobbyist, I am not without care or frivolous. This is not exactly a cheap hobby, especially the way I tend to obsess and compulsively collect.  I have no desire to waste my money or your time, and that is why I am thankful for this learning experience.  The open source hardware and software concept is exciting as well as the online community of "like minded individuals". 

I am not sure about you folks, but my wife does not share my passion about this stuff.  She supports and encourages my hobbies but that is where that ends.


Thanks
-e

E3po

I measured a voltage drop with slightly depleted AAAs, 2.8v at an off state and 2.6vdc while it is on (and it slowly decreases from there)

Does that seem to indicate I might luck out?  

-e

Grumpy_Mike

#7
Jun 22, 2011, 02:37 pm Last Edit: Jun 22, 2011, 02:44 pm by Grumpy_Mike Reason: 1
Even a low power laser needs a bit more attention than a simple LED. See this link especially the thing about powering:-
http://www.repairfaq.org/sam/laserdps.htm
Here:-
http://www.repairfaq.org/sam/laserdps.htm#dpsvbps

E3po

Thanks Mike!

As far as my first post in this topic : "Hi! I am contemplating trying to power a cheapo 2 AAA laser pointer via an output pin on my arduino mega.  Is that possible? "

The answer would be a conditional yes.

That link says "So, if you really want to run a pointer from an external source, the best thing to do would be to measure the voltage across a fresh set of batteries powering the pointer and build a highly filtered, well regulated power supply to match it. The power supply must have absolutely no overshoot or undershoot when power cycling. "  There is a ton of information in that link and it will surely be a great resource.

This particular pointer is not exactly a throw away device, but it was only $3.  I am burning through batteries testing a 3-DC motor mirror laser show (kinda like a spirograph) I am building for a friend. 

So far, Arduino + Motorshield + laser pointer + salvaged motors and mirrors is still far less than any commercially available laser show with similar functionality, but the cost of batteries will possibly negate savings as commercial devices will run off AC.

Thank you guys!
Onto the drawing board!
-e

AndrewStone

#9
Jun 23, 2011, 05:21 am Last Edit: Jun 23, 2011, 05:30 am by AndrewStone Reason: 1
Here's something that might amuse you:



Michael's craft mirrors, pink hard foam insulation, hot glue & duct tape!  

The laser comes in on the upper left corner, bounces off a mirror on the bottom motor (mirror missing), up to the mirror on the top, down to the 3rd and then exits out the upper right.  It looked pretty awesome when running!

The motors were 16k rpm and man it was loud at that speed & after an hour or so of randomly varying the speeds of the 3 motors it chucked a mirror god knows where (honestly I never found it) so be VERY CAREFUL!  I'm going to try moving to 2 speakers to drive the mirror; the big issue there is generation of variable frequency sine waves but at least it is quiet.

Cheers!
Andrew

E3po

Thanks for the reply! While I used no foam, duct tape, or hot glue, my contraption is still pretty rugged.  How did you mount or the laser?  Did you use batteries?
Motors I used were robbed from microcassette recorders and at 5v are no where near as fast as yours.
Nails, screws, and contact cement, and a touch of electrical tape to attach motors to small planks of wood.
-e

AndrewStone

Probably a lot more rugged then mine from the sound of it!  I hacked this up in a few hours with my son.  I got my motors from www.mpja.com; they have a pretty good and cheap selection of that kind of stuff because it is all surplus.  I hot-glued the laser. :-)  Its just a cheap red laser that can be driven from any constant-current circuit (and my board supplies a lot of those -- see my signature).  Batteries or wall-wart, does not really matter to the laser.  But the motors draw 10x the current of the laser so I used a 12v wall-wart.

Cheers!
Andrew

E3po

So I ordered another laser from AIXIZ that has a current limiting circuit and draws 20mA at 5vdc.  Is that safe to run off a digital pin??  I just don't to ruin anything and would like to not have batteries in this project.

Thanks!!
-e

dshay

#13
Jun 30, 2011, 06:13 am Last Edit: Jun 30, 2011, 06:15 am by dshay Reason: 1

So I ordered another laser from AIXIZ that has a current limiting circuit and draws 20mA at 5vdc.  Is that safe to run off a digital pin??  I just don't to ruin anything and would like to not have batteries in this project.

Thanks!!
-e


If it has a built in resistor and the draw is 20mA you should be good to go.


Go Up