Servos and LaserAttach 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 PiHook 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 SetupFinally 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.
This guide was first published on Sep 13, 2013. It was last updated on Sep 13, 2013.
This page (Hardware Setup) was last updated on Apr 13, 2021.
Text editor powered by tinymce.