Connect the ground conductor on the cable to one of the Arduino's ground pins so both devices share a common reference. Cut the opposite end of the aux cable and strip the individual wires.
This also protects the camera from potentially harmful voltages.īe careful constructing your circuit: make sure both devices are powered off connections and double check the circuit before turning the power back on. These will be the key topics covered in this chapter: The first project will be a spy camera that takes a picture every time motion is detected in front. Instead of using an unnecessary relay to do this, we can connect our camera directly to the Arduino. With the tip shorted to ground, the camera will auto-focus and take a picture, and then we can disconnect the tip terminal from ground. There are also 5 LED 'status' lights positioned inside the base that will light up anytime one of the PIR sensors detects motion. Once motion is detected, a servo motor rotates the camera base to point in that direction. You can use the focus conductor if you'd like to control the focus separately from the shutter, in case you'd like to focus the camera without taking a photo. This Arduino Security Camera uses 5 PIR motion sensors to detect any movement within a 180 radius. For this setup, we can control both the shutter and the focus by shorting the tip terminal to ground so the camera to auto-focus if done long enough.