Camera Trap: a Trap That Takes a Picture of Whatever Blocks the Laser

by Kinoma in Circuits > Lasers

5158 Views, 154 Favorites, 0 Comments

Camera Trap: a Trap That Takes a Picture of Whatever Blocks the Laser

DSC00876.JPG
Screen Shot 2015-07-29 at 12.11.59 PM.png

We built a camera trap which takes pictures of whatever blocks the laser. A laser pointer and a photoresistor were used to detect blocking. A camera was used to take a picture and send the data back to the Kinoma Create through UART serial ports. Then the picture was sent to the laptop and stored into a folder.

Parts List:

A laser pointer and a photoresistor were used to detect blocking. A serial camera was used to take pictures.

Polling the Laser

laser.jpg.jpg
Screen Shot 2015-07-29 at 12.07.55 PM.png

We use a handler to poll the voltage reading of pin 47. Whenever the voltage is higher than the threshold, it calls the “takePicture” method to take a picture. We implemented a loop by the “time1” handler and the “delay1” handler calling each other.

Capture From the Camera and Save to JPEG

camera.jpg.jpg
Screen Shot 2015-07-29 at 12.08.16 PM.png

After a new picture was successfully uploaded from the camera to the Create, a request would be sent from laptop side and fetch the picture back in the format of a Chunk.

Wire the Photo Resistor and Set Up the Project

Screen Shot 2015-07-29 at 1.57.25 PM.png
Screen Shot 2015-07-29 at 1.57.48 PM.png

We first connect the photo resistor to a pull up resistor. The junction where the resistor and photoresistor meet goes to pin 47. Serial camera should be connected to the Create. Then, we adjust the laser pointer to point at the photo resistor.

Finish

After we finish all the above steps, we assemble all parts together and upload the program to the Kinoma Create. Then we run the laptop side program in the simulator. Now, a camera trap is set up.

Congratulations!
You’ve done it! Or if you got stuck along with way, we’re here to help — come visit us at our forum and let us know how we can help.