Tuesday, 22 November 2011

laser graffiti machine!

Hi! Welcome to my first post, a wee look at my 'laser graffiti machine' - a computer controlled uv laser turret that can draw on glow-in-the-dark surfaces - and how to make one yourself.

First up for those who just want to see it and don't care about the details here's a couple of shots of it in action and a video.



There you go! cool eh?

So onto the details of how to make one for yourself, here's the parts list:
  • 1x Arduino or compatible microcontroller board (I'm using a duemilanove here)
  • 2x medium size servos
  • 1x pan and tilt mount - make sure that it fits the servos
  • 1x 1mW UV laser pen. you get these cheapest on ebay in the form of a pen, cut away everything but the module. make sure it's only 1mW - it's more than enough to light up the 2 types of glow in the dark surface that i've tried and there's far less chance of accidental eye damage, this strength should cause no damage because your blink reflex is faster than the laser can damage your eyes, this is NOT the case for higher powered lasers, be careful and don't look directly at the beam anyway, you have been warned! Anyway, make sure it's 1mW and that it's ultraviolet- usually 405nm wavelength. a red laser does nothing! other blues may work as well but i've not got any others to try with. if you're lucky then the laser module unscrews from the front of the pen, if not then it's pressure fitted and a pain in the butt to get out, i ended up using two sets of pliers to twist off all the excess metal leaving a sharp edged mess... you can leave the whole thing intact but the weight causes issues with speed and wobble so it's best to strip it down. There are guides available on the net with various solutions people have to getting the modules out of pens. (now why can't you find just the modules anywhere?!)
  • 1x double AA or double AAA battery holder
  • 1x NPN transistor
  • a breadboard
  • 1x USB cable for hooking up the Arduino to your computer
  • a glow in the dark surface. This one is perhaps the hardest part to get, you can obtain glow in the dark spraypaint which would work great on a wall or something solid. i tried it on a bedsheet so it was portable but it flakes off a lot and almost certainly would completely disappear after one wash! it is possible, if a little expensive, to obtain glow in the dark washable fabric and this is what i used for the screen shown above. it came with a width of 0.5m so i used 2 strips to make a big screen by just pinning it to the wall. the glow is almost too long lasting with this material, i inserted a resistor before the laser to tone it down a bit so there's less of a lasting image, ideally you want about 5 secs to half the glow 'glow half life' if you like. it should be almost completely gone after a minute or two. I possibly have some spare for sale on ebay if it's not run out, have a look here: Glow in the dark cloth

the glow in the dark fabric
  • some wire for hooking it all up
  • something heavy or solid to mount the turret onto

Assemble the pan and tilt mount with the servos in it, fix it down to your base and then fix on the laser module from the pen and attach it all to the arduino. Here's the circuit diagram for making it on the breadboard, it's all pretty basic and should pose no problems for beginners.
Fritzing plan for the electronics.


the reason for the seperate battery for the laser pen was simply to avoid giving it too much power by accident, my reasoning being that it runs on 2xAAAs anyway so let's just leave it with that! It also meant not needing any voltage regs or additional circuitry. The transistor is used to switch the laser on and off from the Arduino. Fritzing doesn't have a laser object yet so i've used a blue led as the closest thing to represent it.
Stick the button down on the laser or just solder it so it's always on, i used a bit of wire round it so i can remove it and use it by hand if i want. To avoid fiddly soldering and breaking the laser then i used part of the casing to solder on the positive connection, the negative goes on the springy side.
the uv laser module mounted up and soldered


Hopefully if your servos are like mine then the usb cable from the computer can supply enough current to move them both without issues, you may find you need to power them seperately in some cases though - especially if you're running a lot of power draining usb devices at the same time or in some cases laptops or cheap hubs can't provide enough current.
 So there you have the hardware sorted out,  here's what my messy job looks like, i now have all the things to mount it properly but i've grown to like it with the intel heatsink that i grabbed as the nearest heavy thing i could use! i put a wee board with the transistor and connectors on with tape round it to avoid shorts, this would normally be taped at the base of the mount with enough slack for movement left in the wires leading to the servos and laser, i moved it off and exposed it here so you can see. I've also left on a motor shield on the arduino, you don't need one at all but i found it handy for the servo headers and it was in use on another project using steppers and servos.
the completed turret
Next step is the software, i wrote it in 'Processing' and made a simple program which can operate in one of several modes - spirograph, freehand, drawing what you draw on the screen, a couple of random walk ones and a 'sound seismograph' that moves back and forth left to right constantly and wiggles up and down based on the intensity of the sound. Sadly servos are a tiny bit too slow to react fully in time so I made an option so the laser only goes on when there's a loud noise (usually the bass drums/bass in music) as that works fast enough to look a lot better.
I intend to put up the basic code to get it moving around with the mouse but it might take some asking in the comments to remind/motivate me!

So there you have it! your very own laser graffiti machine.

I will hopefully post plans for another device to make use of glow in the dark material soon...

No comments:

Post a Comment