I have a motion sensor (used for camera trapping) that sends a signal to the camera to trigger the shutter. I am trying to use Arduino to turn on lights for 10 seconds by getting the signal from the motion sensor. I know there are ways to use motion sensor that can be used with Arduino. However, I need to know how I can detect a signal coming from the sensor to feed it to Arduino. I have tried connecting the cable from the sensor to A0, wrote a simple code to print the value of A0 but the serial monitor of Arduino shows nothing.
Almost all camera shutter cables are simple switches. They are an open circuit until you want to press the shutter, and then the switch closes. There is no voltage out of the shutter release, and so nothing for an analog pin to detect.
Many cameras have a shutter half-press switch that activates the light meter/auto-focus, and then a second switch that closes the shutter.
For a simple RCA plug shutter release or mono 3.5 mm plug shutter release, it's probably just a simple single pole switch. Wire one wire from the shutter release to a digital pin, and the other wire to ground. Set the pin to INPUT_PULLUP, and wait for it to go LOW. When it goes LOW the shutter is being pressed.
Be aware that a modulated IR shutter trap will be a little slow. It probably won't catch subjects like birds flying at high speed until the bird has moved past the point where the trap is pointed. For that you would want a laser beam and a fast phototransistor. Those can be fast enough and accurate enough to measure the speed of a bullet. (Although you need to read port registers directly in order to get fast enough response for that.
DigitalRead() is too slow.)
Sorry I am typing this here coz I don't have enough rep to comment. Anywho, most of the motion sensors involve PIR tech, so the best way is to connect your PIR Signal pin from your sensor to any analog pin of your arduino and test the kind of signal you're getting when the environment is idle and when movement is detected, Keep in mind of the region that the sensor covers too (ROI). That will tell you some things,
- If the sensor works or not.
- If the sensor value is analog or digital
- If the sensor is active high or low
- Trial and error on the actual ROI
After all that you can write your code around it.