Fun with lasers (and raspberry pi)

Morning project - laser beams !

I had the following on my desk:

  • Raspberry Pi 2
  • 2x cheap micro servos from ebay
  • 3d printed pan tilt bracket:  http://www.thingiverse.com/thing:171431
  • cheap laser http://www.hobbytronics.co.uk/red-laser?keyword=laser

Would a standard pan & tilt arrangement with cheap ebay servos be fast enough to draw patterns with a laser ?

Standard thinking says "no", but only one way to find out is to try !

0SkQH0qm.jpg

So the short answer is YES

(camera doesn't show it well, though its a clear square at low speed, until it speeds up into a wobbly circle - I'll do another video in the dark)

 

Code for a square in bash:

#!/bin/bash
SPEED=0.05
COUNTER=0
while [  $COUNTER -lt 30 ]; do
   echo "0=95" > /dev/servoblaster
   sleep $SPEED
   echo "7=170" > /dev/servoblaster
   sleep $SPEED
   echo "0=110" > /dev/servoblaster
   sleep $SPEED
   echo "7=155" > /dev/servoblaster
   sleep $SPEED
   let COUNTER=COUNTER+1
done

I've also now got it to do wobbly numbers, 3, 2, 1, 0

... more code on github: https://github.com/mikerr/laserPOV

https://www.youtube.com/watch?v=08Y3KFHbBl0

We had one project for a
We had one project for a cheap laser projector at our hackerspace, we even managed to get it to display the scanlines, but somehow nobody was interested enough to finish it and display actual pixels.

The idea was very simple – we had a motor with a 3d-printed disk with small mirrors glued along the edge. Each mirror was at a slightly different angle. When the disk rotated, it would first deflect the laser ray sideways, as it hit different parts of the mirror, and then vertically to the next scanline, as it would get to the next mirror. There was a hall effect sensor for synchronising with the speed of rotation of that disk. All that was left was to pulse the laser diode fast to display the actual pixels.

Now let’s play pong!

Awesome! Now let’s play pong! (Laser-projected on a building I mean :slight_smile: )