Arduino Laser Show with Full XY Control

 by nothinglabs
FeaturedContest Winner
realtitle.JPG
Update! See Step 32 to find out how to use this project with a green laser!

Also - checkout the LaserTweet Instructable to make this project display data from Twitter:
http://www.instructables.com/id/LaserTweet-Twitter-Projecting-Laser-Show/

This project uses an Arduino and some cheap audio speakers to create a real laser show with full X and Y axis control.

The included source code lets you easily draw text and even simple pictures!

View the demo video to get an idea of what this project can do.


You should be able to get most components locally (besides the Arduino).

Assuming you already have an Arduino - expect to spend roughly $35 on this project.

If you can upload a program to an Arduino and solder - you can probably build this project in an afternoon.

Users who have built this project:
mattbeowulf - http://www.youtube.com/watch?v=AnIoWZpEWk8
minhenes (using "real" galvos) - http://www.youtube.com/watch?v=BmYg3O4hlMg
hydronics - http://www.youtube.com/watch?v=5Q3nJLA2t18
                   http://www.instructables.com/id/Guerilla-Laser/
benhgd - http://www.youtube.com/watch?v=K23-ThlCZEc
(Post a comment with your link - and I'll add yours to this list)
 
Remove these adsRemove these ads by Signing Up

Step 1: A Bit About Laser Shows

IMG_2716.JPG
Most laser shows use galvonometers (the little boxes in the picture) or "galvos"  to aim their mirrors.

Galvonometers are electromechanical devices that rotate to different angles based on how much voltage they are provided.

A minimum of two galvos are used - one for "X" (horizontal) control and one for "Y" (vertical control).

The laser show's controlling electronics quickly adjusts galvo voltages, and turns the laser on and off - moving it around so quickly that it appears to create a persistent image.

Commercially available galvos can move to up to 50,000 different points each second.

Galvos tend to be expensive - so we'll be making our own out of audio speakers!

1-40 of 160Next »
hydronics says: Feb 21, 2012. 9:59 AM
Hey, I basically copied your instructable but put it in a portable container to make a strategic gerilla propaganda 'box'

http://www.instructables.com/id/Guerilla-Laser/

Going forward I would recommend using a stronger laser... This would allow you to hit a building or billboard at a mysterious distance... I tried to buy a stronger, $14 green laser from China but the china laser circuit did not allow cycling ON/OFF at quick rate like the cheap laser is used...(this is called blanking in the laser light show industry) You could rewrite the code to be more cursive in nature and less ON/OFF dependent... It would be fun to play with the programming in such a way and easy for a beginner... its all cartesian coordinates... that means easy!

thanks again for all the hours of dinking around....



nothinglabs (author) in reply to hydronicsFeb 21, 2012. 10:22 PM
that's awesome!!!

had similar problems trying to use a green laser too.

suspect it's possible to get it a green laser working with some tweaking - the driver circuits are a bit more involved than is intuitive... (think they tend to involve temperature feedback and such).

DanNixon says: May 18, 2013. 6:14 AM
Just noticed a little error in the setPwmFrequency method, you have "case 1024: mode = 0x7; break;" where is should be "case 1024: mode = 0x07; break;".
nothinglabs (author) in reply to DanNixonMay 19, 2013. 11:47 AM
yup - that's an error!

if you google it - you can see it's propagated via some commonly copy / pasted code.

good news is that particular line isn't ever called - so has no effect on the project (so I'm gonna leave it be).

-Rich
SteveNosko says: Apr 21, 2013. 9:49 PM
OOPS. That is TC = L/R... Time Constant = L/R.
SteveNosko says: Apr 21, 2013. 9:35 PM
Signed up just to comment. First, I think you have done a stellar job with this. Many guys think of speakers, try something and give up for poor performance. I got interested because of high frequency Piezo tweeters... but moved to less expensive, slower galvos (no longer available)
Many good comments and speculations. I don't know if you or others are still playing with this, but FWIW. Actually, you don't want to damp the back EMF of the speaker. Seems counter intuitive, but I explain. I use real galvos in my laser graphics and the way is to use a current drive (high impedance) instead of voltage drive (very low output impedance, like Sound amps). If you recall, the series LR circuit time constant is L divided by R = L/R. This says that a small R makes the time constant large. The current is slower to build, magnetic field slower to build and cone slower to move. Your transistors are current sources, but as said by another poster, a source/sink drive is better - in essence a "Power OpAmp". Unfortunately, driving 8 ohm speakers requires lots of current. A current drive (Google OpAmp current source) is accomplished by pitting a small resistor in series, to ground, with the coil and feeding the voltage at the top of it back into the OpAmp - yielding a voltage to current converter.
Then you sample the back EMF and use it as feedback, through a pot, so U can adjust it to get the best response. This, however, means that your power supplies (yes you'd need a + and a - supply) have to be high enough voltage to allow this back EMF to go as high as it wants to, so-to speak. The high supply voltage isn't needed to get the high current to flow, just to allow the back EMF to have the room it needs to simply exist. This is called compliance in current source Jargon. The analogy is when a voltage power supply can supply higher current spikes due to requirements of the load. For driving inductance like this (like TV Tube deflection), it turns out that the power supply voltages you choose now becomes one of the limiting factor on the speed you can get out of the 'galvos". Speed being the holy grail of laser graphics. If the back EMF is allowed to hit the power supply rails (thus clipping it), this is equivalent to 'damping' and the response actually starts to slow down and distort the image.

I also would have (I do this for another application) cut away a considerable portion of the speaker cone to allow as fast a movement as possible and reduce damping due to air movement. Don't know if this helps anyone, but FWIW. I am starting the process of putting info on my laser graphics on my web site and will be uploading a schematic for such a drive.

In addition, you should low pass filter (RC low pass) the PWM out before the audio amp.
Yes, an amp down to DC is required (which, internally, many audio amps are already), so it would be possible to turn an audio amp into a DC power OpAmp current source to do this.
Too many plates spinning to go into detail here. Motivated folks can try contacting me on my web site for more...
Cheers, Steve
DBender says: Mar 25, 2013. 6:03 PM
hello friend, sorry my bad english, I'm from Brazil, I have a problem in my setup, the speakers are Galvos with 12v and some are moving sluggish, what could be? thank you
nothinglabs (author) in reply to DBenderMar 26, 2013. 10:16 PM
are you using he code as provided?

If so - thing should be moving pretty quick. I would try reverting to the code as provided if you've changed anything.

Besides that- easiest way to increase speed is to change "float exp_move =" to a smaller number.

Look at step 29 for more tweaks.
alejocorrear says: Mar 7, 2013. 9:00 AM
Hi guys from Nothing labs.
This is a really great project... im exited to get it going.

I am new with all this laser stuff and getting more involved every day.

I just did a spirograph and works nice but now i want to have some kind of scanner controled with an arduino.

Your project seems very easy to do and looks realy nice, but my question is if this setup would work with hard disk drives as galvos instead of speakers?

I would really apreciate your response.
Best regards,

Alejandro C. from Colombia
nothinglabs (author) in reply to alejocorrearMar 18, 2013. 8:00 PM
Hard drive galvos depend on having a feedback mechanism - that this project doesn't really have a method to deal with. Might be possible to make work - but would take a bunch of re-working...

Have fun!

-Rich

JensonBut says: Jan 25, 2013. 11:39 PM
Probably a lot easier thatn all the other ones....
elias.alberto says: Jan 17, 2013. 12:51 AM
I want to make a laser show, too. I'm mostly interested in beam shows, not graphics shows. My considerations:
I was planning to use very small speakers, such as some 50mm 3W speakers available for as low as $3. Even though their excursion is tiny, my idea is to glue a lever to the speaker and then glue it VERY close to the mirror rotation axis, so the mirror would tilt a lot. This would also allow to have really small mirrors (reduced inertia of moving parts = great) and have the added benefit of allowing better operation on higher frequencies (small speakers respond better to higher frequencies), and I guess its performance wouldn't be bad on low frequencies since SPL is irrelevant, we only need excursion to tilt the mirror.
Also, I don't want to use an Arduino, I want to use full-fledged computer software to control the output. Eventually, I would record the audio output from the PC and play directly from a tiny mp3 player. It all would make for a very portable solution, maybe even pocketable.
Any tips on great laser animation software which works nicely with an audio DAC (I mean, with the computer's sound output)? Preferably free software with lots of beamshows available! :P
nothinglabs (author) in reply to elias.albertoJan 20, 2013. 5:58 PM
Don't have any specific advise on controlling from PC.

Sounds like a great project / please post details here as you make progress.
stringstretcher says: Sep 15, 2012. 1:20 AM
Couldn't I just use a set of PC speakers, with their amplifiers? Isn't that what you have built here? I have made one before the days of Arduino magic... worked then. Gotta try this :)
elias.alberto in reply to stringstretcherJan 17, 2013. 12:58 AM
Commercial amplifiers have DC blocking inputs, which is bad for this purpose.
goldbar2975 says: Dec 2, 2012. 6:17 AM
someone should do the same instructables but use a laptop instead of arduino
hthnc-student says: Nov 5, 2012. 9:10 AM
What kind of laser did you use. Or how did you make it so visible?
nothinglabs (author) in reply to hthnc-studentNov 5, 2012. 10:08 AM
standard red laser pointer.

if you want brighter - look at the notes for using the green laser pointer.
stringstretcher says: Sep 26, 2012. 3:13 AM
Mine works!! What a hoot! I will tweak and try to get the quality to match your vid. It works great as it is, just not quite as clear. Thanks for the instructions, a fun project.
stringstretcher in reply to stringstretcherSep 26, 2012. 3:47 AM
BTW, I have not found the revisions about using diodes instead of the resistors across the speakers, have you posted this? I am interested to see if it uses less power and heats up less. I am using 10 Ohm resistors, the machine works, maybe I shouldn't mess with success? ;) How do you guys figure all this stuff out?
nothinglabs (author) in reply to stringstretcherSep 26, 2012. 12:56 PM
congrats on getting stuff working!

see step 17 for info on the diodes (I just added a few other references to it in the project). It will improve performance a little - in that it uses maybe 25% less power - reducing the load on the transistors (which can help drawing accuracy).

figured this out through a little theory - and lots of trial / error...

-Rich

stringstretcher in reply to nothinglabsOct 3, 2012. 8:59 AM
Will do.. Thanks!
Jim
stringstretcher says: Aug 31, 2012. 3:02 PM
The only commercial laser show I looked inside of had spherical mirrors, like a rather large ball bearing mounted on a rod and driven by a galvo. the curved surface gave a larger throw to the motion of the galvo, allowing for faster motion due to the shorter travel. Might this work; highly polished ball bearings on the speakers instead of rear surface mirrors? BTW, there is an instructable on converting acrylic mirrors into front surface mirrors, and believe me, that makes a huge difference in resolution.
nothinglabs (author) in reply to stringstretcherSep 5, 2012. 12:48 AM
cool - I think this is the instructable your talking about with the front-faced mirror:

http://www.instructables.com/id/DIY-Front-Surface-Mirror./

yes - definitely loose some definition in the beam to the back-sided mirrors
jeff-o says: Apr 4, 2011. 6:34 PM
Any idea whether a mosfet could be used here? I assume so - and perhaps without dumping out so much heat.
nothinglabs (author) in reply to jeff-oApr 4, 2011. 9:08 PM
I tried using a mosfet - but didn't have very good luck.

I should point out the I didn't spend a lot of time with it - I kind of suspect it would work with the right tweaks. Definitely worth trying!

-Rich
jeff-o in reply to nothinglabsApr 5, 2011. 4:17 AM
Try using an enhancement-mode mosfet with logic-level input. These can be driven directly from the arduino's output, switching high voltage and current without heating up. This due to the extremely low Rds (resistance from drain to source).

Great instructable, very cleverly done. I especially liked the idea of using a green laser to write messages in the sky!
abend in reply to jeff-oAug 21, 2012. 10:58 AM
I tried MOSFETs, but didn't get it working yet. I do want the very low on resistance, so I can have smaller heat sinks and waste less power.

My guess as to why the MOSFETs didn't work is that the voltage they are switching is a lot more than the gate drive, and so they end up running in ohmic mode and getting really hot. Add the fast PWM, and the gate capacitance may never fully charge and get it kicked over into saturation.

I'm planning to make a darlington of a 2n2222 or similar with the MOSFET, so I can drive the gate with the full 12V. I'm posting about my attempt on www.gizmosmith.com, so I'll have details there when I'm done.
nothinglabs (author) in reply to abendAug 21, 2012. 11:44 AM
I did some testing with mosfets and didn't have good luck - but my efforts were far from exhaustive.

good luck!
ookid says: Mar 16, 2011. 5:52 PM
One question, couldn't one theoretically make this with much smaller speakers as long as the unit was father out from the display surface? I just think that it might be easier to implement this without the monster sub woofer speakers. Anyway, It is a wonderful and well written instructable.
nothinglabs (author) in reply to ookidMar 16, 2011. 6:31 PM
Thanks!

Yes - I have tested with smaller speakers. I got one set of 3" 'satellite' speakers working fairly well - but the image was -really- small (maybe 5"x5" at 20 feet).

I was leaving the speakers in their enclosures - which resulted in fairly good control. When I took the speakers out of their enclosures - the image was larger - but really sloppy.

that said - my speaker selection has been influenced by whats in stock at the thrift store - so maybe I just never tested with smaller speakers of good enough quality.

if you end up experimenting with this - let me know how it goes!
abend in reply to nothinglabsAug 21, 2012. 10:50 AM
Excellent.

I want the device to project criticism on projected artwork, so I need it to be mobile, and have stupidly long throw (e.g. across a city street and up three floors). Once I get mine basically working, I'm going to swap in some smaller speakers.

nothinglabs (author) in reply to abendAug 21, 2012. 11:41 AM
cool! you could use the twitter modification (see the lasertweet instructable) to post anything someone tweets with a given hashtag

good luck with your build!
ookid in reply to nothinglabsJun 18, 2011. 3:15 PM
I finally got around to making this with some apple speakers. I haven't attached my arduino up to this yet to test it out but I did play some music and the patterns seem to be repeatable. I also played some square, sin, and triangle waves through them with a tone generator and it out puts some pretty awesome effects. You are right about the size though, at 50ft the max radius is only around 2ft max.
nothinglabs (author) in reply to ookidJun 23, 2011. 10:37 AM
cool - ya, there's definitely a trade-off between having decent control of the laser and image size.

haven't played around just doing "patterns" generated by the arduino - that might be a fun area to explore.

let me know if you get things hooked up to the arduino and shoot some video. I'm adding links to other people's version of this project to the main description page.

-Rich
DBender says: Jun 23, 2012. 12:04 PM
what is the purpose of 8ohm resistors? thank you
nothinglabs (author) in reply to DBenderJun 23, 2012. 3:26 PM
it's not 100% clear what the 8 ohm resistors do - but I think they do two things:

Provide a more stable load for the transistors to drive
Reduce back-EMF

The effect is definitely to increase how much the speakers are driven and the quality of the rendering.

I came up with this configuration more by experimenting than anything else.

If you aren't getting good results - I would be sure the resistors you are using are rated to handle the power.
DonQuijote in reply to nothinglabsAug 1, 2012. 9:18 AM
if that would be true (it was my first assumption as i read through your setup)

since you basically only drive your speakers with either positive, or zero voltage, you could replace the resistors with a diode. the diode should point its arrow the other way than the normal flow of current through your circuit. that would drain away the back-emf, but not also the driving voltage. i assume you would find that you will have increased the gain of your diy galvos, and possibly need to adjust for that....

i don't have the time or resources to try this out anytime in the near future, but i would sure love if you'd try out my suggestion and tell me about the results.
nothinglabs (author) in reply to DonQuijoteAug 2, 2012. 10:49 AM
yup - the resistors seem to be eating the back-emf.

I actually have things setup using a diodes now - works great - and uses a little less power.

Had to make a few tweaks to some variables to get good results - but this is probably a better setup.

I'm going to add some notes to the project (and parts numbers for diodes / etc.)
abend in reply to nothinglabsAug 1, 2012. 8:38 AM
If the resistors are handling back-EMF from the speaker coils, you might have better luck with a diode, particularly a schottkey diode wired as a snubber/flyback diode. Wire-wound resistors strike me as not-so-great snubbers because their construction makes them slightly inductive.

http://en.wikipedia.org/wiki/Flyback_diode
1-40 of 160Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!