Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

How to drive green laser using an Arduino

ar1999

0
Joined
Jan 20, 2012
Messages
45
Points
0
Hello my friends,

I googled for info about how to drive a green laser using Arduino, but could not find any worth info... All I found was info about how to drive red pen 5mw lasers... BUt it did not work with my green lasers...
Red 5mw pen lasers usually require 10mA and 3volts.
Arduino max out 40mA...
I need to drive :
1) a 300mw green laser that require a 280mA at 3.3 volts or
2) better a 1000mw green laser that require a 200mA at 3.3 volts (I tested and it worked with up to 4.1 volts. The battery included with it was a 3.7 volt). But I measured it working with a 3.3 volt power supply and it shows 200mA current)
Here is the post I am talking about (arduino and red 5mw laser) :
Please review - Turn green laser module on/off with arduino
I tested that with my 5 mw red laser and it did work ok(note: I used a 1k ohm resistance between pin 9 and TIP120 base as noted latter in that post).
Then I changed the laser to my 300mw green laser and it did not work...
I also tried to use a ULN2003 with an external 3.3 volt and it did not work (ULN2003 was supposed to work with up to 500mA...)
So how can I drive my green laser with an arduino? (I am trying to make a laser show and it needs to blink very fast in sync with a stepper motor. The stepper motor is working already with a ULN2003).
Now I just cant figure out a way to blink my green lasers in sync with the stepper using the same arduino.
Can someone help me with this?
I found some schematics using a 2N3904 transistor and an 2.2k resistor between pin 9 (arduino) and 2N3904. I will try to buy that tomorrow and see if it works, but any help would be very much appreciated! Thanks in advance!
 





I was just driving a laser with my Arduino the other day! Briefly here is how I did.

Parts:
Arduino
Laser
Transistor
3.7v battery

-Have a common ground between my battery and Arduino.
-The gate of the transistor attached to an output pin.
-The green laser module was attached to the drain and ground.
-The battery was attached to the source and ground

You really need the extra power supply to drive the laser because the arduino can drive most modules

Hope this helps
 
You could use a FET like Udanis or a simple 2N222A BJT (costs pennies) with the same setup.

Vcc for laser goes to the Emitter, Grounds are common, power supply for the laser goes to the Collector, and the arduino TTL level out goes to the Base (works best with a resistor in series, 1k).
 
Thank you for both replies, but since I am an amateur hobbyist I am not sure I understand what you both said... :(
Is there a chance you have any graphical example?
 
Here is a draw-up in fritzing.
You basically connect the battery + (not 9V! 3.7V) to the 5V of arduino, and the - to GND.
Then you connect 5V of arduino to the collector of the transistor, usually the right pin when the flat side if facing you.
Then you connect your arduino pin (pin 3 in the example) to the base, usually the middle of the transistor.
Then you connect the emitor of the transistor (usually on the right when the flat side is facing towards you) to the + of the laser module (shown as a motor in the example).
Lastly, you connect - of the laser module to arduino GND.
 
Thanks again for your kind help my friends.

Here is what I have done so far:

e1b2b6.jpg


I tested it blinking with a 500ms delay.
Problem is: when laser turns on it is lighting up in a strange manner - like half dimmer and then all the way lighted.

Any ideas on how to fix this?

OBS: My project will make it blink at about 30 times per second...

OBS2: I tried to use a 1k ohm resistor between arduino digital pin 7 and the 2N2222 but it did not work, so I just took it out and it worked like the above description. Also I tried to use a LM317 voltage regulator after the 2N2222 but it did not work like that too, so I took it out too and just used an AC/DC power adaptor with 3 volts 2.5 A max.
 
Last edited:
Well without the specifics on your module, it could be a number of things. Top of my head would be that you forgot about the voltage drop of the NPN transistor - you will need a 4.5V or 5V supply. Isn't the arduino meant to run on 5V anyway? In your picture there is no power source going to your arduino, I'm guessing you're powering it off of USB?

As far as the resistor not working with the arduino - no idea, perhaps the arduino can't source as much current, I've never used arduino. No worries.

If your module has a driver board, you do not need the LM317, it would just drop 3V - which is what you're supplying. Essentially that would let no voltage to the diode!
 
Hello again my friends!
Thanks again for all your kind efforts to support this project.
I am very satisfied to announce it did work!

It seems the "dimming on/off" problem was coming from the internal driver from the 300mw green laser pen.

After a couple of tests with the Multimeter I swapped the 300mw laser for the 1000mw green laser pen and it did work with a 33ms pulse delay. It now turns on and off instantly without any dimming in between. That reaches my desired mark of 30 pulses per second!

OBS1: I forgot to mention I am driving my arduino with another separate 9 volt (1A) power adapter.

OBS2: Reason I dont use Arduino alone to blink the green laser is that as far as I am concerned it can only source about 40mA max per pin, and my laser needs 280 mA.

OBS3: I am still using only 3.3 volts from my other power adapter (2.5A max) for the laser, and all the schematics as is in the pic above.

Just one final question: is this circuit ok as it is to drive the laser at 30 pulses pe.r second for about 15 minutes or so?

I mean is anything else missing in this circuit to ensure a long life for this laser pulsing at this rate? (i.e.: is it still necessary to add an additional voltage regulator, or something else for long life use...?)
 
Last edited:
Nah, if it is working now it should be fine working forever (until the pump diode for the dpss module dies a normal death of old age).

Congrats on getting it working!
 
Holy cow!
After I added all other parts to the Arduino and breadboard (step motor), etc, the laser dimmed...
It still pulses but the light is very weak...
I measured voltage and it seems to be about 0.4 volts!
Good news is I tested it alone with the 3.3 power adapter and it still works good, so the problem is not the laser itself.
Back to square one....
Its very late so I guess I will take a look at it again tomorrow...
 
Last edited:
Yeah, that is to be expected. You can only use the Arduino to control, not power, all the peripherals of your project.
 
I would advise to drive almost everything using transistors - what is in your full project?
 
I would advise to drive almost everything using transistors - what is in your full project?

Its a Laser Harp like Jean Michel Jarre uses play Rendevouz 2 Live in concert.
Here is a YOutube video example:


HTML:
<object style="height: 390px; width: 640px"><param name="movie" value="http://www.youtube.com/v/lOdHCMOe7kc?version=3&feature=player_detailpage"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/lOdHCMOe7kc?version=3&feature=player_detailpage" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="360"></object>


If the video does not show up use this link:

Jean Michel Jarre - Laser Harp - Århus - Denmark - In Doors World Tour - 08-05-2009 - YouTube


I got back to step one and found it works only if I feed it with 4.5 volt.
Here is the schematic I am using now:

akj413.jpg


Problem is I am worried that it will kill my 1W green Laser that should works with 3.3 volts...

WHat do you guys think?
 
Last edited:
Here's a quick lecture on how semiconductors work. HowStuffWorks

Nothing is perfect. Not even semiconductors. To make them work, they consume some voltage. A regular diode "consumes" around 0.7V (e.g. 5V goes in, and 4.3V goes out). Some transistors are similar. Could you try measuring the voltage (when the laser is on) across the outer transisor leads?
 
Here's a quick lecture on how semiconductors work. HowStuffWorks
Very interesting article! Thanks for all your efforts to help!

If there is interest from anyone in this forum in this particular Laser Harp project I can post the complete schematics when it is done and working.

Could you try measuring the voltage (when the laser is on) across the outer transisor leads?

Do you mean like this?

21jw3ud.jpg


I measured it using a 500 millisecond Arduino sketch blink and this is what I got:

1) Measuring voltage: 0 (the laser does not light up)
2) measuring Amps: from 200mA to 280mA (the laser does light up good)

THe multimeter is working fine and I did double check the connections and settings for measurement with the multimeter.

So I still did not find out how much voltage is been feed during these practical tests to the laser using this schematics setup...
 
Last edited:





Back
Top