Instructables

GoPro Ultrasonic Motion Sensor HC-SR04 controled by arduino

Picture of GoPro Ultrasonic Motion Sensor HC-SR04 controled by arduino
Gopro activated by movement, the ultrasonic sensor move the servo when something appears close to the sensor, it can be programed to take pictures or video, and also it can be programed to stop taking pictures when there is no movement in the sensor.
Advantages over normal infrared motion sensors a.k.a. PIR, is that it can sense reptiles and insects, it can also log the distance of the object, and it haves a range of 4 meters.
 
Remove these adsRemove these ads by Signing Up

Step 1: Get the Parts

Materials:

1 Arduino
1 Gopro or any other camera
1 Ultrasonic Motion Sensor HC-SR04
1 Servo
1 100uF/25V capacitor
1 breadboard
lots of rubberbands



Step 2: Build the Circuit

Picture of Build the Circuit
1 .- Attach the HC-SR04 to Arduino:
Arduino 5v Pin to Vcc Pin on HC-SR04
Arduino Pin 2 to Pin Echo on HC-SR04
Arduino Pin 3 to Pin Trig on HC-SR04
Arduino GND to Pin GND on HC-SR04

2.- Attach the Servo to Arduino:
Arduino 5v Pin to Servo Red Wire
Arduino GND to Servo Black Wire
Arduino Pin 9 to Servo Yellow(data) Wire
100uF/25V capacitor is optional, Attach one between the power and ground of your project to ensure smooth power delivery, remember that the colored line must be in the negative wire

3.- Attach the Servo to the GoPro
You can use as many rubberbands as necessary, the tip of the servo arm must touch the center of the GoPro Button, you can also construct your own attachment with wood, sintra, acrylic or metal once you tested everything.



seaf208 months ago

question... how do I go about changing some parameters like... instead of meassuring in cm i'd like the sensor to read in ft

animes25 (author)  seaf208 months ago

ft = cm * 0.032808

I guess you have to change the serial print lines to:

Serial.print(distance*0.32808);
Serial.println(" ft");

please tell me if it works :D