Cat Laser

Filled under: Electronics, Projects

Date posted: January 5, 2015

cat-laser

Cat laser is a record and playback laser pointer for you know, cats. (but operated by humans)

cat-laser-edge

Operation is simple. Set the Cat Laser on a table’s edge, press record, pick up the Cat Laser and make a pattern on the floor, then press stop.

Now just set the Cat Laser back on the table and press play, the servos will jump alive and recreate the pattern you just motioned out.

This project was inspired mostly just by having the parts handy and wanting to make something with motion that uses an accelerometer as an input.

Here’s a quick demonstration video.

cat-laser-cad

The parts were drawn up in AutoCAD after a spending sometime with my calipers.

cat-laser-cut-parts

Here we go, all nice and cut out on my laser. A few parts missing such as the buttons, but that’s OK for now.

cat-laser-electonics-soldered

The electronics all connected and soldered up. Nothing fancy needed so direct soldering to the Arduino was fine.

cat-laser-inside

The Cat Laser is driven by an Arduino Nano and a MPU-6050 accelerometer/gryo module via SPI.

As usual, the Arduino was a amazingly quick and simple dev platform.

The code is rather simple, it just records the yaw and pitch into an array and plays that back by controlling the angles of the two servos.

Unfortunately the Arduino (specifically the atmega328p MCU) has limited memory so there is only 20 seconds of recording time and the resolution is rather poor.

Here’s the code:

Oh hello again, I am impressed you made it this far.

To wrap up, my lab mate just adopted two kittens and I was able to test it live. You know kittens, they spazzed out for a while, then starting licking themselves.

After a while they grew more interested in the noise and the motion of the servos, interesting.

ad astra