Powering two lasers from an Ardunio! - Page 1
Forum section: electronics / beginners

author: brownnose
author_rank: Newbie
timestamp: April 21, 2014, 02:11:08 pm
content: Hey EEV blog forumsI'm a total beginner, and need help with a small project for work. I watch Dave's videos from time to time, and this seems like a nice place to come.A bit of background, I work for a book digitalization company, turning old books into PDFs. Recently one of our suppliers came to us with a new bit of kit to increase our productivity, basically two lasers and a switch. (the idea is that you use the two lasers as reference points, to physically align the book too, before capturing a page. You hit the switch the laser goes off and the attached camera takes a photo, a second later the laser switches back on and the operator turns the page in the book and aligns it too the laser points. The idea is this cuts down on the amount of image cropping, rotating, that has to be done.) It's a simple, but surprisingly expensive… so hence I've been tinkering.So far I've managed to make a working prototype (see attachment!), but only using one laser and adding another seems to be a bridge too far for my knowledge. At the moment I'm using an Arduino to power everything and control the switching (we use software to control the camera anyway, so it seems like a nice way to cut down on peripherals). I'm also using a 555 timer for some pwm (the more components in use the cleverer my boss will think I am) and a 2N7000 mosfet connected to a digital pin on the arduino.The lasers that I'm using at the moment are" 532nM wave length, Working voltage is 3Vdc, Less than 300mA current consumption, 0.3-0.85mW power output"Questions!1) am I doing anything terribly wrong?2) is an arduino capable of powering the two lasers for 8 hours (would batteries be better)3) is the 555 timer unnecessary, given the pwm outputs from the arduino4) transistors, how many? what do I need?5) laser diodes go in series not parallel, right?Many many many thanks!

author: Simon
author_rank: Unknown
timestamp: April 21, 2014, 02:19:10 pm
content: WTFyou boss is obviously very stupid to thing more = better and to be honest I fail to even see the need for an arduino. A comparator based RC timer can do this. At the end of the day there are more mechanics to this than electronics.

author: Skimask
author_rank: Super Contributor
timestamp: April 21, 2014, 02:21:57 pm
content: Quote from: brownnose on April 21, 2014, 02:11:08 pm1) Not really. I'd get rid of the 2N3906 and just use the MOSFET to pull a ground from the laser2) Does your Arduino have a battery pack?3) I'd use the PWM rather than a 5554) None. Use the MOSFETs5) series, but if they're 3v laser diodes, you're only going to get 1 along with it's current resistor at the 5v the Arduino runs at....unless there's something you haven't told us?

author: brownnose
author_rank: Newbie
timestamp: April 21, 2014, 02:42:58 pm
content: Quote from: Simon on April 21, 2014, 02:19:10 pmHa, my attempt at humour.Perhaps should of mention that the lasers would be being switched of about a 1000 per day. So while a more a mechanical solution would be simpler, we already use software to control the camera, so just piggybacking a few lines of code is a nice way of doing things.Quote from: Skimask on April 21, 2014, 02:21:57 pm2) Running everything of the usb atm5) If I double up laser on existing schematic they don't work. But they do seem to both be able to run of the 5v from the Arduino with nothing else hooked up.

author: Simon
author_rank: Unknown
timestamp: April 21, 2014, 02:48:12 pm
content: no you totally missed the point, so lets restart.You have a jig that uses lasers to line up with text to be photographed. You need the lasers to be on so that the operator can line the page up, then you hit a button and the lasers go off and the camera fires.If you uses a couple of comparators you can create a slight delay before the camera fires giving the lasers time to go off and then a longer delay that keeps the lasers off and then lets them come back on again. All you need is a dual comparator and some resistors and capacitors. If you have a digital out from your system instead of a button (your diagram is far from clear) you can use a couple of 2N7000 to do what a mechanical switch with. Then all you need is your power transistor to run the two lasers and any output circuitry require to make the camera fire.I don't get the need for PWM

author: brownnose
author_rank: Newbie
timestamp: April 21, 2014, 03:12:29 pm
content: Yeah the 555 timer pwm dimmer is pretty much unnecessary, it was just to address safety concerns (feature creep at the prototype stage!)At the moment, we have the camera directly hooked up to the pc via usb. The operator hits f2 on the keyboard and the shutter fires. For the prototype we just wrote a hotkey script to trigger the Arduino on the same key press, there didn't seem to be any noticeable lag.The other option would be do away with the Arduino, and to hack open a shutter cable (likehttp://www.amazon.co.uk/Foto-gears-shutter-release-Shutter-Release/dp/B00CBXVVA2/ref=sr_1_2?ie=UTF8&qid=1398092501&sr=8-2&keywords=Shutter+Cable) and do as you say.

author: retrolefty
author_rank: Super Contributor
timestamp: April 21, 2014, 03:23:07 pm
content: QuoteA couple of fundamental 'show stoppers' to deal with. You say you are getting all power (voltage sources) from the arduino. The older arduino boards using a FTDI USB chip could only provide 40ma of 3.3v power as the regulator was inside the FTDI chip. The current rev3 UNO and MEGA boards do have a on board 3.3v regulator but only rated at like 100ma max. So you should plan on using an external 3.3vdc voltage source rated at the current you will be using.Second point is that I don't see any current limiting resistor in the led drive circuit. Do your laser modules have internal constant current regulation or not? If not your drive circuit needs to insure that the led(s) don't try and draw more then their maximum safe rated current.

author: brownnose
author_rank: Newbie
timestamp: April 21, 2014, 03:36:07 pm
content: Quote from: retrolefty on April 21, 2014, 03:23:07 pmIt’s a rev3… but even so that puts me past the ratingI don't have a data sheet for the lasers, but I've fiddle with them and they have little a pcb with a couple caps and two transistors, so I assume they do.

author: Rudolfo
author_rank: Contributor
timestamp: April 22, 2014, 06:59:45 am
content: Laser diode are senstitive agains spikes and have also a safety requirement. You might look at an integrated driver like the iC-HB (http://ichaus.biz/product/iC-HB) or the iC-HT(http://ichaus.biz/product/iC-HT) with direct microcontroller control through SPI. In understanding Laser driver applications this is a helpful resource:http://ichaus.biz/appnote_laserandhttp://ichaus.biz/wp4_fastlaserdriver.