Hardware Setup

Author Gravatar Image TONY DICOLA

Servos and Laser

Attach one servo to the other at a 90 degree angle, and the laser diode to the arm of the top servo. This setup will allow the bottom servo to control laser rotation left and right, and the top servo to control laser rotation up and down. See the photo on the left for what you want to create. Perfect alignment of the servos and laser are not critical as the software will calibrate the aim of the laser.

To attach the servos and laser I found hot glue was the simplest method. You can later remove the hot glue using rubbing alcohol when you're done with the project.

Mount the servo & laser assembly onto something which allows you to angle the setup up and down, such as a small vise. You will want to angle the laser assembly down towards the floor at roughly the same angle as the camera--this will improve the accuracy of target clicks to actual laser position.

Servo Controller and Raspberry Pi

Hook up the Raspberry Pi to the servo controller, and the servos to the servo controller. Follow this servo controller tutorial if you are unsure of the exact steps.

You will want to hook up the top servo (up/down movement) to channel 0, and the bottom servo (left/right movement) to channel 1 of the servo controller.

Hardware Setup

Finally place the laser assembly and camera near each other and aimed down at the floor. You will want the camera and laser to both be at about the same angle to the floor.

When the servos are in their center position (a value of 400 pulses high with the 12bit PWM/servo controller) the complete setup should look like the image on the left.
Last updated on 2015-03-06 at 11.02.17 AM Published on 2013-09-13 at 04.59.09 PM