Arduino Laser Show With Full XY Control

349K451211

Intro: Arduino Laser Show With Full XY Control

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:
https://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
https://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)

STEP 1: A Bit About Laser Shows

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!

STEP 2: Stuff You'll Need - Electronics

Arduino Board
This project has been tested on an Arduino Duemilanove (Atmega 328).  Other 16MHZ Arduino boards with an Atmega 328 (such as the Uno) should work fine.

An Arduino with an Atmega 168 should work - but be aware the project barely fits into its memory - so you may hit issues adding your own functionality.

It's assumed you have a programming cable, a computer with the Arduino environment installed, etc.

Red Pocket Laser Pointer
Look for one powered by three 1.5v coin cell batteries.
If you're having trouble finding one at your favorite super store - check the pet toys section.

12v 3 Amp Power Supply
Voltage can be a bit higher or lower but needs to provide at least 3 amps of current.
You might find an old laptop power adapter at a thrift store with these specs.
Alternately - you can modify a PC ATX power supply.
Radio Shack Catalog # 22-507 would work fine - but is too expensive for what it is.
If you can't find a usable power supply locally - you can get one on eBay for about $15.

2 x 8-Ohm, 20-watt Non-Inductive Resistors
Available at Radio Shack - Catalog # 271-120
(alternatively - 2 x 6A, 50V Rectifier Diodes Radio Shack #276-1661 - see step 17 for details)

2 x 100-Ohm Resistors
Doesn't need to be exact value / wattage doesn't matter.
Available at Radio Shack - Catalog # 271-1311

2 x TIP120 Darlington Transistors
Available at Radio Shack - Catalog #: 276-2068

2 x TO-220 Heat Sinks (for Transistors)
These are required!  Without them the transistors will quickly overheat!
Available at Radio Shack - Catalog #: 276-1363

2 x 470uF 35V Radial-lead Electrolytic Capacitor
Available at Radio Shack - Catalog #: 272-1030

2 x Alligator Clips
These make connecting to the laser pointer's battery leads easier.
Variety of options available at Radio Shack.

22 Gauge Solid Core Hookup Wire
This wire easily fits into Arduino headers. Not needed if you have a better solution.
Available at Radio Shack - Catalog # 278-1221

20 Gauge or Thicker Hookup Wire
For power connections - "speaker wire" should work fine.

Green Laser Parts (Optional)
If you plan on using a green laser - check out step 32 - there are few extra parts you'll need.

STEP 3: Stuff You'll Need - Speakers

Two 4 to 6 inch "woofer" speakers

Speaker quality does make a difference in performance.

I've found speakers with large magnets and power ratings of 80 watts or more tend to work best.

Look for something that might be capable of producing some bass.  You should be able to easily push the speaker cone in by about a 1/4" if you press on it.

Using a speaker larger than 6" will not necessarily help (and might hurt) performance.

The speakers do not have to match.

I extracted the pictured speakers from a set of 120 watt bookshelf-sized speakers I bought for $8 at a local thrift store.

They measure approximately 5 1/2" across and are rated at 6ohm.


Advanced Technical Stuff Below (Optional Reading)

There are at least two technical variables that effect how well a speaker driver will work for the laser show.

Resonant Frequency: The frequency the speaker will vibrate at most easily on its own.

Qts or Q: This number describes how the speaker's frequency response varies around the resonant frequency.

The pictured speakers had a resonant frequency of 63hz and a Qts of .55.  They worked quite well.

I also had good luck with speakers having a resonant frequency of 81hz and a Qts of .96.

I have also tested a set of speakers with a resonant frequency of 120hz and Qts of 1.4 - which resulted in poor results.

My suggestion would be to look for a driver with a Qts between .5 and 1 with a resonant frequency between 50hz and 85hz.

Other speaker parameters (like Vas) may or may not effect project performance.

If purchasing speakers from a website like http://www.parts-express.com/ - you'll be able to select from a wide variety of speakers that provide these specifications.  

Look for close-outs / deals.  As of last check, these drivers: http://www.parts-express.com/pe/showdetl.cfm?Partnumber=299-065 looked quite promising for only $5 each.

If you want to try testing your own speakers - take a look at this site: http://www.bcae1.com/spboxad3.htm

STEP 4: Stuff You'll Need - Mounting Hardware

This project requires positioning the laser and both "galvos" (speakers) so the laser bounces off the first galvo, onto the second galvo, then onto the wall.

While this isn't a high-precision operation - it can be a little tricky.

The right tools for the job will depend on the exact size and shape of your speakers.

If you don't already have the items below - look in your toolbox and junk drawer and improvise!  

A Variety of C-clamps
4 clamps sized 2 1/2 to 4 inches should work for most speakers.

Spring Clamp
Used to point the laser.  

Optional: 18" x 24" Plywood Project Board
This project has a fair number of pieces to it.  Keeping everything on a project board can help keep it from getting out of control.
After you get everything working - you may want to replace the C-clamps with some kind of mounting solution that can be more permanently attached to the board (like brackets).

STEP 5: Stuff You'll Need - Tools and Misc.

Coleman Acrylic Camping Mirror
About $2.50 at your local sporting goods store.

2 x #6 Bolts and Nuts
For mounting heat sinks to transistors / length doesn't matter.

2 x Wood Skewers
Like for cooking Shish Kabobs.

Scotch Tape
Or any kind of tape.

4 x 2x4 Lego Blocks
These are just used as spacers. You can substitute anything of similar shape / size.

Soldering Iron
And solder - gauge doesn't matter.

Hot Glue Gun
And hot glue - attempt other adhesive techniques at your own risk.

Bandsaw or Hacksaw
Used to cut the acrylic mirror. A rotary tool with a cutoff wheel should also work.

STEP 6: Cutting the Mirrors

Mark two 1.5 inch squares on the back of the acrylic camping mirror.

Cut out the mirror squares using a band saw, hacksaw or rotary tool.

If using a band saw - cut face-down with a paper towel between the saw table and mirror to prevent scratching.

Be careful not to peel off the mirror's shiny backing.

STEP 7: Install the Pivot Mounts

Use the hot glue gun to mount Lego blocks on opposite sides of one of the speakers as pictured.

The top of the Legos should be about 1/4" above the foam surround of the speakers.  If they are not - hot glue another object of appropriate thickness on top to achieve the needed height.

STEP 8: Install the Mirror Pivot

Hot glue a wood skewer on top of the Legos - across the middle of the speaker.

The skewer will act as a pivot for the mirror.

After the glue cools, trim off the protruding end of the skewer with your cutting instrument of choice.

STEP 9: Hot Glue the Mirror

Set one of the mirror squares on the speaker so it's supported by the pivot on the left edge, and the speaker surface on its right edge.

Attach the mirror to the pivot and speaker using a small drop of hot glue at each of its corners.

STEP 10: Make the Y Galvo and Label

Congratulations - you've finished the X galvo!

Now it's time to make the Y galvo.

The Y galvo is exactly identical to the X galvo.

Repeat steps 7 through 9 to make it.

Label one galvo X and the other galvo Y using the method of your choice.

STEP 11: Schematic

This schematic shows the electrical connections we'll be making over the next several steps.

No need to memorize this - we'll be going over every connection in detail!

(step 17 describes a minor variation on these plans - replacing the resistors with diodes for slightly improved efficiency)

STEP 12: Tape Laser Pointer Into on Position

Wrap Scotch tape around the laser pointer's button to force it into the on position.

Wrap it around tightly several times to assure it stays in place.

STEP 13: Remove Laser Pointer End Cap

Remove the laser pointer's end cap and batteries.

Examine inside - most laser pointers will have a spring that is the negative battery terminal.


STEP 14: Connect Power Leads to Laser

Connect one alligator clip to the spring terminal (negative).

Connect the other alligator clip to the threading at the end of the case (positive).

Assure the clips don't short each other.

Note: Some laser pointers may be constructed slightly differently - so adjust / improvise as needed.


STEP 15: Connect Laser Power Leads to Arduino

The laser only draws about 25 milliamps at 5v - so it can be attached directly to the Arduino (good for 50ma)!

Connect the positive laser power lead to Pin 12 on your Arduino.

Cut a short piece of 22 gauge solid core wire and strip both ends.

Insert one end into Pin 12 on your Arduino board.  Clip the alligator clip from the positive lead to the other.

Connect the negative laser power lead to a Ground Pin on your Arduino using the same method.




STEP 16: Mount Heatsinks to Transistors and Label

Use the #6 bolts and nuts to attach the heat sinks to the transistors.

Attach them tightly - it should be difficult to move the transistors.

The heat sinks must be installed .  The transistors will quickly overheat otherwise.

Label one transistor X and the other transistor Y.

The transistors will act as switches - turning the small electrical signal the Arduino produces into a large electrical signal that can move the galvos.

Note: This part will get hot in normal use.  Do not touch it when powered.

STEP 17: Connect Resistors to Galvos

Connect the 8 ohm resistors across the positive and negative speaker leads of the X galvo using 20 gauge hookup wire and your soldering iron.

Use several inches of wire for these connections - so they won't limit your ability to position the galvos later.

Repeat this step for the Y galvo.

Note: This part will get hot in normal use. Do not touch it when powered.

Note on Purpose of Resistors (optional reading)

As several users have noted - the purpose of the resistors seems to be to (inefficiently) eliminate back EMF generated by the speakers.

The resistors can alternately be replaced by diodes (such as http://www.radioshack.com/product/index.jsp?productId=2062591).  This will result in somewhat decreased power consumption

The diodes should be connected so that the cathode (the side with the bar) is on the side of the speaker connecting to +12v.

This alteration may require tweaking the Arduino code to get good results (try increasing the x_min_value and y_min_value variables to about 20).

STEP 18: Connect Galvos to Positive Power

Note: At this point your 12v power supply should be off / unplugged.

Connect the negative speaker terminal (indicated with a "-") of the X galvo to the positive lead on your 12v power supply using 20 gauge hookup wire and your soldering iron.

Yes - to confirm -- we're connecting +12v to the negative speaker terminal .

Use ample wire for this connection (12 inches or more) - to assure you can position the galvos as needed later.

Repeat this step for the Y galvo.

Run a separate lead from each galvo back to the 12v power supply. Do not "chain" the connection between the two galvos.

STEP 19: Connect Galvos to Transistor Collectors

Connect the positive speaker terminal (indicated with a "+") of the X galvo to the "collector" lead of the X transistor using 20 gauge hookup wire and your soldering iron.

The collector is the middle lead on the transistor.

Again - use a fairly long length of wire.

Tip: Applying a thin coat of solder to the tips of the connecting wires can help prevent them from unraveling and causing shorts.

Repeat this step for the Y transistor and Y galvo.

STEP 20: Connect Transistor Emitters to Ground

Connect the "emitter" lead of the X transistor to the ground terminal of your 12v power supply using 20 gauge hookup wire and your soldering iron.

The emitter is the right most lead on the transistor as pictured.

Again - use a fairly long length of wire to accommodate moving things around later.

Repeat this step for the Y transistor.

Run a separate lead from each transistor back to ground. Do not "chain" the connection between the two transistors.


STEP 21: Connect Power Filtering Caps

The capacitors help filter out power fluctuations - improving the laser show's image quality.

Connect the negative lead of a 470uF 35V electrolytic capacitor to the  "emitter" lead of the X transistor as pictured.

The negative lead of the capacitor is on the side with the black stripe and  "-" symbols.

Don't get this connection backwards - or you'll see smoke!

Connect the other end of the capacitor to the positive terminal of your 12v power supply using 20 gauge wire.

Repeat this step using the second capacitor and the Y transistor.


STEP 22: Create Arduino to Transistor Leads

Cut two pieces of 22 gauge wire about 14 inches long and strip them on both ends.

Solder a 100 ohm resistor to the end of each wire.

These resistors help keep the amount of current that flows between the transistors and Arduino to a safe level.

STEP 23: Solder Leads to Transistor Bases

Solder the resistor end of one of the Arduino to transistor leads to the base lead of transistor X.

The base lead is the one furthest to the left.

Repeat this step for the Y transistor.

STEP 24: Connect Leads to Arduino

Insert the bare end of the X transistor lead into Arduino Pin 5.

Insert the bare end of the Y transistor lead into Arduino Pin 6.

STEP 25: Connect Arduino to Ground

Connect one of the ground pins on the Arduino back to ground (negative) on your 12v power supply using a piece of 22 gauge solid core wire.

STEP 26: Download Code and Upload It to Arduino

Note: The 12v power supply should still be off / unplugged.

Plug the programming cable into the Arduino.

Download lasershow.zip (attached to this step) - and upload it to your Arduino.


Once the program is loaded - you should see the laser pulsing!

If you don't see the laser pulsing - skip ahead to the step titled "Troubleshooting".

Note: This code was updated on 4/10/11 to address a problem where it might not fit on an Arduino using an Atmega 168.

STEP 27: Aim Laser and Galvos

Use your various clamps to aim the laser and galvos as shown in the picture.

This is one of those cases where a picture really is worth a thousand words - especially when taken using a fog machine.

The rundown:

The Y galvo should be positioned with its mirror pivot running horizontally, and the mirror oriented down.

The X galvo should be positioned with its mirror pivot running vertically, and the mirror oriented towards your left.

The laser should be pointed at the mirror of the Y galvo.

The Y galvo should be angled so the laser bounces of its mirror onto the X galvo's mirror.

The X galvo's mirror should be pointed toward where you want the laser show to project.

STEP 28: Fire It Up!

Finally - it's time to turn on your 12v power supply and see if this thing works!

Leave your USB programming cable connected - as it's needed to power the Arduino (more on this later).

You should be presented with a cacophonous symphony of sound from the speakers - along with an actual working laser show.

You may find you need to slightly re-aim the laser once the speakers move a little.

If things aren't working right - unplug your power supply and proceed to the next step.

STEP 29: Troubleshooting / Tweaks

Image isn't stable / text is hard to read

The transistors getting too warm are a common cause of image quality issues.  Even if things are generally working - you may be able to further improve quality with better cooling.

Make sure the transistor heat sinks are well installed.  Using larger heat sinks, thermal paste, or even adding fan(s) may help.

Check all your wiring.  An intermittent connection may be the culprit.

Towards the top of the code  - look for the line:

     float exp_move = (some number)

The larger this value is - the slower the laser will draw (improving accuracy).  Try increasing it to 4.5 or higher.

There are also other variables you can adjust to help quality - see the code comments for details.  Experiment!

Speaker quality seems to be the biggest factor in determining how well the laser show works. If you're getting results that look a lot worse than the demo video - you may want to try using another pair of speakers.

Laser isn't on
Check the alligator clip connections going to the laser power lead and case.
Make sure the tape is really holding the laser's power button down.

Laser is dim
I have encountered a few laser pointers that are just dim or don't focus.  Try buying another one.

One or both galvos aren't moving / making noise
Disconnect power and check your wiring.

Image is rotated 90 degrees
Try swapping the connections to Pin 5 and Pin 6 on your Arduino.

Image is mirrored horizontally or vertically
This can be fixed either of  two ways:
   Swap the wires going to the positive and negative connections of the galvo with the inverted axis.
   Physically rotate the galvo of the inverted axis by 180 degrees (this may not be practical for the Y galvo).

Image is skewed at an angle
Try rotating either galvo slightly to correct this.
This can also be caused by aiming the laser at a surface that it's not perpendicular to.

Image size
The farther away you aim the laser - the larger the image will be. Typical projection area is about 2 feet by 2 feet at a distance of 25 feet.

The higher voltage power supply you use - the larger the image will be (until of course, something burns up - then you get no image at all...). This project has been tested extensively at 12v - but can probably go a bit higher.

Problems using an Arduino with an Atmega 168
This project -barely- fits in an Atmega 168's ROM and RAM.  If you see odd results - it may be that code you've added has "pushed things over the edge."  There might be cases where this does not generate a compiler error - making it hard to troubleshoot.  Removing the "demo()" function may help free up resources.

STEP 30: Change the Code!

You didn't do all that work to just display the demo - it's time to make your own laser show!

Note: If you made it to this step without downloading the source code - it's in a zip file attached to Step 26.

Here's a few of the included routines:

laser_on()
Turns laser on.

laser_off()
Turns laser off.

sendto (X,Y)
Sends laser to X and Y coordinates.  The coordinate system is 256 x 256 - but the real resolution is lower (maybe half) that.

draw_string("STRING", X, Y, COUNT)
Draws a text string at X,Y for COUNT times.  Uppercase characters, numbers and some punctuation is supported (see code).

move_scale = X
Sets scaling (font size) used by draw_string.  Setting it to 2.8 provides enough room for 5 characters.

marquee("HELLO WORLD", CHARACTERS)
Draws a scrolling marquee CHARACTERS long - text is autoscaled to fit (4 to 7 characters long works best).

Now for a little tutorial - look for this code at around line 90:

//put your laser control code here!

void loop()
{

    //run the default laser show demo
    demo();

}


The Arduino runs any code in this section over and over again.  Try changing it to:

void loop() 
{

     move_scale = 2.8;        //sets text size

    draw_string("LASER", 1, 1, 10);
    draw_string("TEST", 1, 1, 10);

    marquee("LET'S DRAW A STAR!!!", 5) ;

   //draw a star 15 times
    for (int loop = 0; loop < 15; loop ++)
    {
       laser_off();
       sendto (85,10);
       laser_on();
       sendto (150,130);
       sendto (0,40);
       sendto (170,40);
       sendto (20,130);
       sendto (85,10);
    }

}

There are a bunch of variables you can tweak and a few more routines documented in the code.

Dig in and have fun!  If you mess things up - you can always re-download the code and start over.


STEP 31: Some Technical Notes

Running 12v to the Arduino
You might wonder why I didn't include a step to connect the 12v power supply directly to the Arduino board - so the laser show can be used without USB power from the computer.

Most Arduino boards have a maximum recommended input voltage of 12v.

Some "12v" power supplies actually put out 13.8v - and perhaps even higher when not under load.  You may want to test your power supply with a multimeter to make sure it's not significantly over 12v before connecting it to the Arduino.

To power your Arduino using your 12v power supply - connect its positive voltage terminal to the Arduino's Vin Pin.

An alternative is to use an external voltage regulator or separate power supply for the Arduino of appropriate voltage.

About the TIP120 Transistors
This project uses TIP120 "Darlington" transistors.  These transistors are actually two transistors chained together into one.  This gives them much higher "gain" - meaning they can use a very small current  to switch a much larger current.  They are a cheap and easy way to interface microcontrollers to things like speakers and motors.

PWM not Analog
This project generates a digital PWM (pulse width modulation) signal to control the speakers.  You might expect the quickly switching 1's and 0's to get converted to analog before going to the speakers - but they don't!

The signal is switched so fast - that the speakers respond as if they are getting an analog signal.

The picture shows an oscilloscope reading taken right off the speaker leads - still digital!

By default the Arduino does PWM at about 500hz - way to slow for this project.  If you look through the code you'll find some tweaks that boost that up to 64,000hz.

STEP 32: Green Laser Upgrade!

Green lasers appear much brighter than red ones of the same power - and are still "safe" at 5mw.

Green lasers with power ratings over 5mw can blind you instantly!  Don't mess with them.

A 5mw green laser takes a lot more current to drive (a few hundred milliamps) than a red laser (maybe 20ma) - so we'll need to add some electronics to support it.

Note:
This setup worked for the 5mw green laser I had kicking around (unfortunately I don't have an exact model number).
Some green lasers may have more complicated driving electronics that may make them difficult to turn on / off quickly enough.  If one model doesn't work - you may need to try another.

Additional Stuff You'll Need

A 5mw green laser pointer
Look for one that runs off 2 x AAA batteries.
http://www.amazon.com/American-Science-Surplus-Green-Pointer/dp/B0040YL87Q
(This model will likely work - but has not specifically been tested)

220 ohm resistor
Any wattage

100 ohm resistor
Any wattage

LM317T Adjustable Voltage Regulator
Available at Radio Shack - Catalog #: 276-1778

1 x TIP120 Darlington Transistor
Available at Radio Shack - Catalog #: 276-2068

1 x TO-220 Heat Sink (for voltage regulator)
Available at Radio Shack - Catalog #: 276-1363

#6 Bolt and Nut

Instructions

1. Build the the laser show as described in the previous steps.
2. Attach heat sink to the voltage regulator using the bolt and nut.
3. Wire in additional parts as shown in the schematic above.
4. That's it!

How it Works

The resistors "configure" the voltage regulator to provide about 3.75v (a bit more than 2xAAA batteries).
The heatsink is required since the regulator is dissipating a large amount of voltage with moderate current consumption.

While the red laser could be driven directly from the Arduino - the green laser consumes way too much power for that.

The TIP120 Darlington transistor uses the small signal from the Arduino to switch on and off the current going to the laser.  It's not perfectly efficient - so the 3.75v from the voltage regulator ends up closer to 3v (the same as 2 x AAA batteries).  Unlike the TIP120's powering the speakers - the load on this one is low enough so that it doesn't need a heatsink.

All other details of the project are the same.  If anything isn't obvious - consult the previous steps.

STEP 33: Hack This Project!

Since this project is built on an Arduino - adding your own code / sensors / etc. is easy - here's some ideas:

Make a 2-player laser pong game using potentiometers as controllers.

Make some kind of interactive art installation.

Make a laser clock / countdown timer.

Connect it to the internet - and have it display your favorite RSS feed.

Drive your cat crazy.

Do something no one has even thought of yet!

191 Comments

Hey, I basically copied your instructable but put it in a portable container to make a strategic gerilla propaganda 'box'

https://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....



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).

Nice project, but have you any ideas to make this respond to music- Like left channel for x and right channel for y- Ect? (Ref:(Arduino sound reactive VU meter WS2812B LEDs) on youtube)?He is driving Leds but audio interface looks hackable to produce lazer tracks responding to audio in real time. Just a thought!
Are there any alternatives to 6A,50V diodes since I cannot find these diodes in my location? Also is it okay to use TIP121 transistors instead of TIP120?
Can you plz post codes of other different shapes like that of a human running , Earth rotating,spiral circular lines arround a text ,aeroplane ,car, fire crackers exploding etc . I am a high school student and is new to arduino programming so i will be grateful if you kindly help me .
Thank You

Nice project! However, I'm having a problem.

I used the same exact parts: Tip120 transistors, 470uF 35V capacitors, 100ohm resistors. But I chaged one sight thing. I used BLDC motors and only connected two wires of each one to the setup. Before watching this instructable, I already saw people doing laser projectors using stepper motors, BLDC motors, an normal commercial galvos. I didn't planned to buy a stepper motor, or obviously a commercial galvo. The motors were saved from an old DJI Phantom Vision+ gimbal that fell from the drone during flight and broke the ribbon cable. I changed that cable many times and it always broke. So I bought a new gimbal and used the intact brushless motors. I also am using a 1W violet Laser, (Because I love strong laser beams!) with another tip120 transistor and another 100ohm resistor connected to pin 12. I also used a separate power supply to power the laser (It's way much powerful!) I used a powerful amplifier and connected each motor to a channel (X to Right, Y to left). I played music in it (with a lot of bass) and it worked really well like a normal galvo should work. But I wanted to do animations and write text at a decent quality.

Ok, the problem:

I run the same code that you provided (Thanks, so easy to use!) and the projector only shows weird circles, lines and shapes. IDK what to do, maybe the brushless motors were not ment to do that.

sorry for slow response...

interesting idea - but I don't think the BLDC motors have any kind of "centering" mechanism. I can imagine they might vibrate as opposed to just spin - but I wouldn't expect them to provide a consistent position based on voltage like the speakers do.

good luck!

-Rich

Thanks for answering!

I was already thinking about the centering problem. Another thing wrong that I discovered is that your project needs an DAC (Digital to Analog Converter). I altered the code a lot and put elastic bands (very soft and stretchable) to center the motors. It worked well, but the drawings had interference due to the PWM signals.

What i'll try do do:

-Apply a DAC to each control wire going to the transistors.

-Use two nRF24L01+ with another arduino (UNO) and a matrix keyboard to trigger the effects from a distance, making a decent party machine.

*I'm not using speakers for two reasons, because since they are moving at high speeds, they vibrate, because they have paper cones, they make a lot of noise and the second reason is that simply using speakers will increase he space required and I want for it to look more professional (just my charms...).

Another thing I improoved is that I used two lm317T regulators:

One setted permanently to 8V to power the motors and the other with a potenciometer to adjust the brightness again with a resistor to limit it to a maximum of 7.4V (laser's comfortable voltage) for the laser. Both regulators are connected in parallel to the 12V rail.

The 12V rail can be connected to a 12V power supply, or, in my case, a 3S lipo that I protected it with cell monitoring features using voltage dividers and some code of the arduino. This makes it PORTABLE!

The Projector now has a LCD with a temperature sensor and a cooling fan, wich is turned on and off by a relay according to the internal temperature.

I'll post a instructable about it soon =).

Amazing! Great job...I'll make some free time to try this :D Thanks for sharing.

Thanks you for that project it s relly cool, but i'm stuck on how to put the 12V

why there is not a step for that.

I dont know how to wire the 12V with rest of the circuit

Thank you

13.8v main PS --->|--->|--->|--- 11.7v to Arduino

Using 3 1N400x diodes.

An easy way to drop the supply voltage to the Ard from any power source would be to add an appropriate number of 1N4001 diodes (or any 1N400x series diode) in series with the V+ line from your main power supply. For every 1N4001 you add, it will reduce the voltage to the Ard by .7 volts.

If you needed to make sure that "13.8v" was more Ard friendly, add 3 or 4 diodes, and run the entire project off one power supply.

13.8 - 2.1 = 11.7v (3 diodes)

13.8 - 2.8 = 11v (4 diodes)

Even if it's really a 12v supply, adding 4 diodes will result in 9v to the Ard. Plenty.

Easier than heatsinking an LM7805 running off the main V+, which is the other option.

Hi Rich, simply bloody awesome project :)

Am currently in the process of building this to run on the Raspberry Pi. Am going to code in Python as that is what I know. Looked at the arduino code to get my head around it but got one major question.. Are you forming the images by scanning row by row, top to bottom and then only turning laser on at correct moments or are you drawing the outlines of the shapes and then turning on / off between each shape?

Hope that makes at least some sense!

Thx again - brilliant project.
Hi Dave -

Shapes are formed via vector-style drawing - shapes are actively outlined by the galvos (speakers) as opposed to being drawn raster-style.

Good luck with the project (feel free to contact me via rich@nothinglabs.com)

-Rich

First, this is really cool and it's the first time I've seen one of these that can be built easily and for minimal cash. Nice.

However, one thing has me really perplexed. The way the mirrors are mounted, they are going to be moved parallel to the Z axis of the speaker. (ie up and down with the cone). But they are also mounted to the "pivot" which is also hard mounted the the speaker frame. In theory this setup shouldn't work (well) since the mirror should be fighting against the pivot stick as it tries to move up and down in a rigid plane and is resisted by the pivot stick which is hard mounted to the frame and which it is hard mounted to. This should resist pivoting and distort the image. My only guess is that the bamboo skewer and the paper of the speaker cone both deform enough to overcome this and allow the mirror to move in a motion that approximates pivoting, but doesn't actually pivot perfectly.

I think if I were to try this, I'd be inclined to mount the mirror on an actual pivot (ie glue a small straw to the back and run the skewer through the straw. Then mount that pivot skewer offset from the centre line of the speaker so that the edge of the mirror aligns with the centre of the cone. Then glue another section of straw to the edge of the mirror, parallel to the pivot straw. split the straw in the middle and run a piece of skewer through it and glue another piece of skewer from that skewer to the top, centre of the speaker cone. Essentially forming a T shape that can pivot at the T end. Now you have a mirror that truly pivots freely on it's centre line.

Putting the pivot point (straw) at other points that the centre of the mirror can changed the mirror deflection for larger or smaller intended display sizes / distances.

Just a thought. Comments anyone?

The angle of deflection of the mirror is relatively small - enough so that the hot glue allows for some pivoting (if it didn't things would break apart immediately).

I think I tried some experiments with a hinge a few years ago - but don't think it resulted in an improvement (worth trying though).

Have fun!

-Rich
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

Hi elias, I am currently experimenting with using audio.. have you had any luck? I believe the setup described in the tutorial enables the system to reproduce around 60k points per second (?). Using uncompressed audio at a rate of 44100 hz I think you could sample 44100 points per second (not sure if that is correct tho...).

Don't have any specific advise on controlling from PC.

Sounds like a great project / please post details here as you make progress.
More Comments