Laser show for poor man
Laser show for poor man
Let me introduce PIC microcontroller based three axis laser spirograph.
step 1Gathering stuff
At first prototype I used blank DVD as reflective material but later I discovered more practical way. Technology of making FS mirror is described in my article
DIY Front Surface Mirror
Originally I'm very lazy man so I've chosen programmed microcontroller PIC18F1220 (can be replaced with PIC18F1320) to handle routine job.
PIC implements 3 channels PWM generator.
Actually it's the same engine as one I used in my IKEA light project just code is adopted for PIC18.
PWM signal toggles MOSFET transistor 2N7000 (Id 200mA). Mirror actuator is connected as load to MOSFET.
As mirror actuator I used 5V 200mA CPU cooling fan. It's easy to mount mirror on its flat side.
Device accepts 5V and 12V fan with maximum current 200mA . Voltage is selected by jumper.
Green laser pointer is rated at 3V so I've made LM317-based voltage regulator with adjustable output.
Cheap 5mW green laser module:
http://www.dealextreme.com/details.dx/sku.10094~r.32746761
What else will you need?
Dozen of resistors and capacitors, potentiometers, toggle switch, power jack, prototyping board, box of proper size and power supply unit.
step 2Brain
There are two work modes, selected by toggle switch: manual and automatic.
In manual mode operator controls each motor individually by twisting corresponding potentiometer connected to analog input of microcontroller. PIC constantly reads analog inputs and modifies PWM signal so duty value is proportional to voltage on analog input.
In automatic mode microcontroller employs pseudo-random algorithm to calculate duty value for every motor.
Current duty value is stored in internal EEPROM and used as initial data for next calculation
so microcontroller will generates sequence of nonrepetitive unique patterns for long time.
Most pointers are rated from 3V to 4.5V, so make sure you adjust output voltage before connecting laser.
Board is small, so you don't need any brackets to secure it. Pots will hold it perfectly.
UPDATE NOTE !!!
Since my supplier run out of PIC18F1220, I had to use PIC18F1320 in new design.
It's pin-compatible chip with increased memory capacity, but it will NOT work with old HEX file,
so pay attention.
I keep PIC18F1220 version as separated file.
Here are some notes from the bench:
- schematic;
- BOM;
- HEX (PIC18F1320 version);
- PCB;
- PCB in AutoCAD format
- source code for CCS compiler.
...
Archive contains HEX file for PIC18F1320!!!
http://www.instructables.com/files/orig/FXL/UFUS/FF22CIF4/FXLUFUSFF22CIF4.zip
...
To program chip, I use USB ICD2 programmer (bought it from eBay) and MPLAB IDE (free soft from Microchip.com).
PCB contains standard Microchip ICSP port (5-pins header) for programming purpose, also chip can be programmed by any socket programmer with proper software which supports PIC18.
Controller board assembling (high res guide):
http://www.flickr.com/photos/22144851@N03/sets/72157604945292921/
...
For beginners and busy people, programmed chip, PCB, whole kit, or assembled board available upon request.
...
Some hobbyists may prefer simplified analog version of device.
The speed of a motor can be varied by changing voltage applied to motor,
so LM317 based voltage regulator can be used as simple motor controller
step 3Attaching mirror to the motor
Piece 1/2 x 1/2 is working good.
You can use thick paper as a wedge to tilt mirror. Insert it between mirror and motor.
In my setup tilt is 2-3 degrees. It results 6' wide pattern at a distance 18'.
It's impossible to center mirror properly regarding motor shaft and even slight offset will cause
vibration and noise at high speed, so I've developed some tricks for mirror balancing.
Make sure your safety glasses still on.
WARNING!!! This method will work only for acrylic/plastic mirrors!!!
At first I've tried to shape spinning mirror with file but fan is low torque device, so even light pressure with tool forced motor to full stop.
Since idea with turning part and fixed tool has failed, I've tried opposite approach -
Dremel with 1/2" sanding drum against motionless mirror, and that's really worked.
Some advices for people who wants to follow.
Motor with mirror must be off.
Select sanding band with coarse grit.
Set Dremel to minimal speed.
Hold Dremel that axes of tool and motor shaft are parallel.
Slowly bring sanding drum to the edge of mirror and press against it. Don't put much pressure. Spinning tool will rotate mirror and file it at the same time.
Take your time, go easy and, if you have enough patience, you'll get perfect round mirror which will run smooth and quiet.
step 4Parallel optical setup
Motors are placed on parallel lines.
I've developed one trick. I use double sided sticky tape to attach motor to base, and after all adjustments I secure motor on place with hot glue.
Adjustment is simple.
Start motors and aim beam that it stays within mirror area at maximum deflection.
As support for pointer I use piece of wood and some hot glue. Cheap and fast.

step 5Square optical setup
Motors form square without one side.
Using this design we can make more compact device.
Everything else is the same as previous step.
step 6Let's build tiny house
I had Hammond 7x4x2 box lying around, so I put it in business.
Since we determined optic configuration and beam path we can mark and cut out window.
Then get square piece of transparent acrylic and glue it to its place.
Next drill one more hole for power jack, glue it, connect to board and we are done.

PIC Based Laser Spirograph - video powered by Metacafe





























