Vernier Software and Technology
Vernier Software & Technology
Arduino and Vernier Sensors

Laser Pointer Controlled by a Motion Detector

This is an interesting project that is a lot of fun and can help teach math. Thanks to Fred Thomas of Math Machines for the original idea.

In this project, we mount a laser pointer on top of a servo motor. The servo motor can “aim” the laser and we will try to hit an object with the beam. A Motion Detector is used to locate the object. The setup is as shown below:

The distance from the servo motor/laser pointer to the Motion Detector is referred to as the Range in this project. The Distance is measured with the Motion Detector and since we have a right triangle here, the angle to aim the laser can be determined by an arctangent calculation. The Arduino math library allows for this calculation. We also use the Arduino servo library to control the motor.

Once you have things set up properly, the laser beam should be able to hit the object, even if it is moving at a modest speed.

On GitHub, we also have a slightly more complex version of the program called VernierLaserTrackerAutoOn. This program assumes that the power to the laser pointer is supplied by the D6 pin of the Arduino (pin DIO0) on BTD connector 2. This makes for an even better demonstration. The laser pointer only goes on when a “target” is in the area.



Vernier Engineering Contest

Vernier recognizes instructors for creative uses of Vernier sensors to introduce engineering concepts and/or practices. Vernier Engineering Award »

Go to top