Laser Pointers



Welcome to Laser Pointer Forums!

Top 50 Laser Pointer Companies - Green Lasers Top 50 Laser Pointer Companies - Blue Lasers Top 50 Laser Pointer Companies - Red Lasers
Top 50 Laser Pointer Companies - Yellow Lasers Top 50 Laser Pointer Companies - Purple Lasers Top 50 Laser Pointer Companies - Orange Lasers
Top Laser Pointers by Power - 1 Watt+ Top Laser Pointers by Power - 500mW+ Top Laser Pointers by Power - 250mW+
Laser Pointer Database High Power Laser Pointers Laser Pointer Diodes



Go Back   Laser Pointer Forums - Discuss Laser Pointers > Lasers > Drivers, Test-load, Power Supply, & Batteries

Sci-Fi-Lasers
Reply
 
LinkBack Thread Tools Display Modes
Old 08-03-2011, 09:39 PM   #1
Junior Member
 
Join Date: Aug 2011
Location: Ireland
Posts: 7
Rep Power: 0
alan is on a distinguished road
Question Circuit to control laser diode by an Arduino

Hey all,

I've been lurking for a few weeks but this is my first post so go easy on me

I'd like to use an Arduino (uno) and an optocoupler to TTL/PWM switch a ir LD (808 nm, 280 mA) which gets a constant current from an LM317. From my lurking here (thanks folks for all the excellent info) and in an effort to learn a little bit of eagle I've drawn up the following two circuits (which I hope upload ok!).

In both circuits the arduino drives the opto via transistor 1. In the first circuit (LD on the right) the opto then switches the supply to the LM317 via transistor 2. In the second circuit (LD in the middle) the opto switches the current through the LD via transistor 2.

I'm not an electronics engineer so I'm wondering which (if any) of these approaches makes (most) sense? Or am I going to kill the LM317 or LD...?

All the best,

Alan.
Attached Thumbnails
Circuit to control laser diode by an Arduino-laser-ddl1.jpg   Circuit to control laser diode by an Arduino-laser-ddl2.jpg  
alan is offline   Reply With Quote


lpp

Green Laser Companies

Blue Laser Companies

Red Laser Companies


Old 08-03-2011, 10:15 PM   #2
Class 2 Laser
 
Kmor2004's Avatar
 
Join Date: Jun 2011
Location: ohio
Posts: 292
Rep Power: 9
Kmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really nice
Default Re: Circuit to control laser diode by an Arduino

Thats a LOT of work to control a laser when you could just use a RC DAC + a npn transistor, to control current.
__________________
Pointy=MY 532nm $12 amazon LP overspec 10mw
Lazerer Cyber Black 50mW
Black magic the 445nm 1.242W roaster in for repairs Pill died
LPF monster 445nm 1.132W peak June give away
Hotlights 405nm 100mW
Laser lighter 660nm 360mW

Icon Solo 2x10440 ----deciding on Diode and driver

Thanks JakeGT for LPM'ing my Reference lasers
Kmor2004 is offline   Reply With Quote
Old 08-04-2011, 03:40 AM   #3
Class 1M Laser
 
Join Date: Apr 2011
Location: A random place in north dakota.
Posts: 213
Rep Power: 17
random person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud ofrandom person has much to be proud of
Default Re: Circuit to control laser diode by an Arduino

PWM and LM317 would not go well together, use a discrete current sink.
__________________


random person is offline   Reply With Quote
Old 08-04-2011, 04:48 AM   #4
Class 4 Laser
 
Bionic-Badger's Avatar
 
Join Date: Oct 2007
Location: Oregon, USA
Posts: 5,140
Rep Power: 463
Bionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond repute
Default Re: Circuit to control laser diode by an Arduino

Just forego the LM317 and control a transistor directly. You can rig something like this up, only with a laser instead of LED.
Bionic-Badger is online now   Reply With Quote
Old 08-04-2011, 02:51 PM   #5
Junior Member
 
Join Date: Aug 2011
Location: Ireland
Posts: 7
Rep Power: 0
alan is on a distinguished road
Default Re: Circuit to control laser diode by an Arduino

Thanks for all the replies.

Bionic-Badger, I've been looking at that instructables circuit you linked to and I have a real newbie question for anyone with patience/time....
If I have 5V VCC, a 2.2V LD operating voltage and a 0.28A operating current.... is the following correct?
R3 = (5V-2.2V)/0.28A = 2.8V/0.28A = 10 Ohms
with a power dissipation of 0.28A*2.8V = 0.784 W
Or am I omitting something? There isn't a 0.7V drop across the Q2 NFET by any chance?

Cheers,

Alan.

Last edited by alan; 08-04-2011 at 02:51 PM.
alan is offline   Reply With Quote
Old 08-04-2011, 03:17 PM   #6
Class 4 Laser
 
HIMNL9's Avatar
 
Join Date: May 2009
Location: Lost somewhere in the EU mess ;)
Posts: 5,426
Rep Power: 236
HIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond repute
Default Re: Circuit to control laser diode by an Arduino

@alan: in your first schematic, the transistor drived from the opto iust short-circuit your power supply on the LM317 side ..... in the second circuit, is like disconnect and reconnect theLD to the driver, and this means LD turned to LED in 50% of the cases.

Also, optocouplers uses IR leds inside, you don't need an extra transistor for drive them from the arduino board, just connect the opto to the output pin through an adequate resistor.



EDIT: and your Q2 transistor is at risk of "fluctuation" and random activation, if connected as in the first schematic, cause when the opto is not drived, the base is like left opened ..... for avoid this, the base of the drived transistor must be always tied low (to GND) with a resistor, also a 100Kohm one is ok.
__________________
High Impulse Multipath Neutron Laser (mark 9 ) (LOL)
Dare mo mita koto no nai, kaze, kumo, suna, umi ..... Kokoro no hate no doko ka eien ga kagayaku.

Last edited by HIMNL9; 08-04-2011 at 03:21 PM.
HIMNL9 is offline   Reply With Quote
Old 08-04-2011, 03:41 PM   #7
Junior Member
 
Join Date: Aug 2011
Location: Ireland
Posts: 7
Rep Power: 0
alan is on a distinguished road
Default Re: Circuit to control laser diode by an Arduino

Hi HIMNL9,

Ok, I think I see what you are saying, its left sortof floating. So actually if I ignore the two circuits that I posted and connect the arduino directly to the circuit that Bionic-Badger posted I should be probably ok (assuming my calculations are ok above!)? Q1 is tied to ground thru R3 and Q2 is thru R1 (on the #5 circuit image) which I guess is to ground when Arduino is low.

Thanks,

Alan.
alan is offline   Reply With Quote
Old 08-04-2011, 03:46 PM   #8
Class 3B Laser
 
bobhaha's Avatar
 
Join Date: May 2009
Location: Sydney, Australia
Posts: 3,240
Rep Power: 268
bobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond repute
Default Re: Circuit to control laser diode by an Arduino

If you wanna go full DIY, that's fine... but I just wanted to let you know... since it hasn't been mentioned in this thread yet... that you can connect the arduino directly into the TTL input of a TTL modulated driver. It only needs 2.5V to activate, so easily within the working range of the arduino.

They are pretty cheap.... Just thought I would mention it
__________________
Lasers!
10.6um - >40W CO2 Laser - 25W RF excited CO2 Laser*
685nm - Being built!
660nm - 250mW LOC PowerLight B50 Host - 100mW WL pulsar
635nm - 430mW C6 Host*
632.8nm - Red He-Ne laser ~1mW
593.5nm - Regal 5
542.8nm - Green He-Ne laser ~2.5mW
532nm - 620mW+ lasersman Firedragon III* - 100mW PGL-III-M from JETLASERS* - 70mW Rayfoss Host*
~~~ - 175mW Rayfoss Host - <5mW WL Core - 55mW DinoDirect review laser*

488nm - On the hoist
473nm - 2x CNI lab lasers ~40mW
445nm - 3W Big Boyz Laser - >1.1W Cree C6 Host - 650mW WL Arctic
405nm - 65mW GLP-405 Aquarius host - 160mW 6x Blu-ray MXDL Host
Total: 71,868.5 mW

Goggles!
Laser glow LSG-532-Sport protective eye goggles OD 7+ 190-532nm HIGHLY RECOMMENDED!!
Jetlasers wrap around 190-540nm OD4+ goggles*
Eagle Pair Red OD4+ goggles
Scopeguy20 Blublockers for 405nm lasers!

* indicates a review has been done, on this item.

Check out my How to Build a Selectable Dummy Load Thread!

Last edited by bobhaha; 08-04-2011 at 03:47 PM.
bobhaha is online now   Reply With Quote
Old 08-04-2011, 04:25 PM   #9
Class 4 Laser
 
HIMNL9's Avatar
 
Join Date: May 2009
Location: Lost somewhere in the EU mess ;)
Posts: 5,426
Rep Power: 236
HIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond repute
Default Re: Circuit to control laser diode by an Arduino

The circuit BB posted, is a common current regulator ..... if you want to "turn-off" it (like, modulate it with a PWM signal), you can hook the transistor of the optocoupler in place where there is drawed the box with "pwm or microcontroller" words (emitter to GND and collector to the wire marked "out"), and the input of the optocoupler to the arduino board (common ground configuration if you want that the LD turn off when he arduino pin is at 1 condition, or common positive if you want the opposite)

NOT without an optocoupler, especially if you use two different power sources for the arduino and for the LD.
__________________
High Impulse Multipath Neutron Laser (mark 9 ) (LOL)
Dare mo mita koto no nai, kaze, kumo, suna, umi ..... Kokoro no hate no doko ka eien ga kagayaku.
HIMNL9 is offline   Reply With Quote
Old 08-04-2011, 05:29 PM   #10
Junior Member
 
Join Date: Aug 2011
Location: Ireland
Posts: 7
Rep Power: 0
alan is on a distinguished road
Default Re: Circuit to control laser diode by an Arduino

Ok, thanks for that HIMNL9, I'll give that a go.

Common positive: I need to connect arduino PWM to optocoupler anode (thru a resistor) and arduino ground to optocoupler cathode (no need to connect arduino 5V anywhere). Is this correct?

Thanks,

Alan.
alan is offline   Reply With Quote
Old 08-04-2011, 06:20 PM   #11
Class 4 Laser
 
HIMNL9's Avatar
 
Join Date: May 2009
Location: Lost somewhere in the EU mess ;)
Posts: 5,426
Rep Power: 236
HIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond reputeHIMNL9 has a reputation beyond repute
Default Re: Circuit to control laser diode by an Arduino

This is common negative (but the concept is the same), and in this case, your optocouple is turned on when the arduino output is 1, turning off the LD.

For the opposite, connect the anode of the optocoupler to the +V of the arduino, and the cathode to the output pin through a resistor, so the optocoupler is turned off when the output pin is at 1, and the LD is on (this is cause that driver schematic will turn off when you close the "out" wire to GND.
__________________
High Impulse Multipath Neutron Laser (mark 9 ) (LOL)
Dare mo mita koto no nai, kaze, kumo, suna, umi ..... Kokoro no hate no doko ka eien ga kagayaku.
HIMNL9 is offline   Reply With Quote
Old 08-04-2011, 11:39 PM   #12
Junior Member
 
Join Date: Aug 2011
Location: Ireland
Posts: 7
Rep Power: 0
alan is on a distinguished road
Default Re: Circuit to control laser diode by an Arduino

Bobhaha, thanks for that. I guessed there might be but I'll try the diy route for a wee while first

HIMNL9, thanks for your suggestions. The common positive sounds good but I was thinking that if the arduino is not plugged in (and the LD is) then the LD would be on. So I've been messing with eagle again and I've added in an opto in common gnd config (I think!) to act as an on/off enable switch (image attached). What do you think... would this work?

All the best,

Alan.
Attached Thumbnails
Circuit to control laser diode by an Arduino-laserdriver.jpg  
alan is offline   Reply With Quote
Old 08-10-2011, 08:24 PM   #13
Junior Member
 
Join Date: Aug 2011
Location: Ireland
Posts: 7
Rep Power: 0
alan is on a distinguished road
Default Re: Circuit to control laser diode by an Arduino

Hey all,

I've been messing about with the 2-opto circuit from my last post but it doesn't work very well. When The arduino is off and optos 'open'... the laser is on... which I was trying to avoid with the second opto! I think maybe its because the fet gate is floating in this setup.

So I've modifed the design a little bit by adding a 10k resistor and removing an opto (see attachment). In this setup when the '1' input to the opto goes high then the laser is on as the FET gate sees up to ~90% of 5V VCC (...actually I've only tested with an LED so far ). When the '1' opto input is low, or not connected, the FET gate is grounded thru the 100k resistor and the laser/led is off.

I've hooked it up to pins 9 (to opto '1') and GND (to opto '2') of the Arduino Uno and the 'fade' PWM example sketch runs nicely. I'll hook it to an LD if I get a chance in the coming days and post back.

Thanks again to all who responded.

Alan.
Attached Thumbnails
Circuit to control laser diode by an Arduino-laserpwm.jpg  
alan is offline   Reply With Quote
Old 08-11-2011, 05:11 PM   #14
Class 2 Laser
 
Kmor2004's Avatar
 
Join Date: Jun 2011
Location: ohio
Posts: 292
Rep Power: 9
Kmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really nice
Default Re: Circuit to control laser diode by an Arduino

As I said in the last post you could just drive a npn transistor like so


its the way I have my test driver set up with a npn that can handle 2A and so far I can get 2mW-1300mW on the test load with 3.3V (red diode).
__________________
Pointy=MY 532nm $12 amazon LP overspec 10mw
Lazerer Cyber Black 50mW
Black magic the 445nm 1.242W roaster in for repairs Pill died
LPF monster 445nm 1.132W peak June give away
Hotlights 405nm 100mW
Laser lighter 660nm 360mW

Icon Solo 2x10440 ----deciding on Diode and driver

Thanks JakeGT for LPM'ing my Reference lasers

Last edited by Kmor2004; 08-11-2011 at 05:12 PM.
Kmor2004 is offline   Reply With Quote
Old 08-31-2011, 10:33 PM   #15
Class 1 Laser
 
Join Date: Aug 2011
Location: Norway
Posts: 80
Rep Power: 4
KreAture is on a distinguished road
Default Re: Circuit to control laser diode by an Arduino

The problem is that will operate any diode in pulsed mode.
Adding a inductor and diode in there will make it a proper buck converter and they can be nice and smooth. It would help to use a P-FET for highside and a N-FET to pull it's voltage down. That will allow you to run higher v inputs without much drop so that you can use a larger feedback resistor and get better current resolution.

Anyway, main point is, without a inductor it will most likely run the diode in pure pulsed mode with excessive spikes.
KreAture is offline   Reply With Quote
Old 08-31-2011, 11:14 PM   #16
Class 2 Laser
 
Kmor2004's Avatar
 
Join Date: Jun 2011
Location: ohio
Posts: 292
Rep Power: 9
Kmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really niceKmor2004 is just really nice
Default Re: Circuit to control laser diode by an Arduino

Are you sure about that I scoped it and its a smooth line minus the 10mV ripple.
__________________
Pointy=MY 532nm $12 amazon LP overspec 10mw
Lazerer Cyber Black 50mW
Black magic the 445nm 1.242W roaster in for repairs Pill died
LPF monster 445nm 1.132W peak June give away
Hotlights 405nm 100mW
Laser lighter 660nm 360mW

Icon Solo 2x10440 ----deciding on Diode and driver

Thanks JakeGT for LPM'ing my Reference lasers
Kmor2004 is offline   Reply With Quote
Reply


Database of Laser Pointer Companies




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On









Loading


laser pointer forums top

Sky






Top 50 Laser Pointer Companies - Green Lasers Top 50 Laser Pointer Companies - Blue Lasers Top 50 Laser Pointer Companies - Red Lasers
Top 50 Laser Pointer Companies - Yellow Lasers Top 50 Laser Pointer Companies - Purple Lasers Top 50 Laser Pointer Companies - Orange Lasers
Top Laser Pointers by Power - 1 Watt+ Top Laser Pointers by Power - 500mW+ Top Laser Pointers by Power - 250mW+
Laser Pointer Database High Power Laser Pointers Laser Pointer Diodes









































All times are GMT. The time now is 06:36 AM.


Powered by: vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
Privacy Policy | Advertising Disclaimer | Terms of Use
Copyright (C) 2014 Laser Pointer Forums, LLC