Camera Control Box
Project purpose: To create a 9v battery device to plug into my Canon Rebel digital camera's remote port that will allow me to take
pictures in a variety of ways 1) with a wireless remote control 2) Time Lapse 3) triggered by motion sensor 4) triggered by photo cell/laser
The device will have two buttons. One button to move through the four modes and the other button to select the mode.
I explain the project out in this video I had already put up: http://www.youtube.com/watch?v=90qQb9NTVjc
This new video mainly involves the mechanics of getting the buttons added.
[video=youtube_share;jXJJFb6-YR0]
pictures in a variety of ways 1) with a wireless remote control 2) Time Lapse 3) triggered by motion sensor 4) triggered by photo cell/laser
The device will have two buttons. One button to move through the four modes and the other button to select the mode.
I explain the project out in this video I had already put up: http://www.youtube.com/watch?v=90qQb9NTVjc
This new video mainly involves the mechanics of getting the buttons added.
[video=youtube_share;jXJJFb6-YR0]

Comments
[video=youtube_share;nt1xeagTRLI]
[video=youtube_share;5nHTcrCmQfY]
[video=youtube_share;eELvj2Cuc2Y]
{{ ***************************************** Uses one COG to check the D button on remote control and take a picture if the state of that D pin has changed or if it has been commanded to by command := 1 ***************************************** }} CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 'Pin Assignments remote = 15 'RF keyfob remote. Pin changes state each time remote button D is pressed. focus = 16 'camera control high triggers opto which connects focus wire to ground wire shutter = 17 'camera control high triggers opto which connects shutter wire to ground wire yellowbutton = 0 'menu navigator redbutton = 14 'selector LEDmotion = 8 'indicator LEDs to show menu items LEDTrip = 9 LEDTime = 10 LEDremote = 11 LEDMinute = 12 LEDmins = 13 LEDhour = 18 LEDday = 19 photocell = 27 'higher RC value darker. motion = 7 'Epir motion sensor. Pin goes low when motion detected. VAR byte d,dlast 'remote button old and new state long Stack[16] 'to run TakePicture in another cog byte command 'used to tell TakePicture to ... take picture byte menu,submenu 'to hold the current positions in mode selections long tripValue 'to hold the RC Time value for the photo cell. long x,n 'counter for time delay OBJ RC : "RCTIME" 'used to determine if laser is hitting photocell for tripwire 'debug : "FullDuplexSerialExtended" Pub Start tripValue := 0 RC.start(photocell,1,@tripvalue ) command:=0 cognew(TakePicture,@Stack) 'allows for remote taking of photos even when other modes selected. 'debug.start(31, 30, 0, 19200) 'input pins '--------------- dira[redbutton]~ dira[yellowbutton]~ dira[motion]~ 'output pins '---------------- dira[LEDremote]~~ dira[LEDtime]~~ dira[LEDtrip]~~ dira[LEDmotion]~~ dira[LEDminute]~~ dira[LEDmins]~~ dira[LEDhour]~~ dira[LEDday]~~ menu := 1 submenu := 1 outa[LEDremote]:=1 repeat 'debug.dec(tripvalue) 'debug.str(string(13)) if ina[yellowbutton] == 1 'move to next menu item outa[LEDremote]:= 0 outa[LEDtime]:= 0 outa[LEDtrip]:= 0 outa[LEDmotion]:= 0 outa[LEDminute]:= 0 outa[LEDmins]:= 0 outa[LEDhour]:= 0 outa[LEDday] := 0 menu++ if menu == 5 menu := 1 case menu 1: outa[LEDremote] := 1 2: outa[LEDtime] := 1 3: outa[LEDtrip] := 1 4: outa[LEDmotion] := 1 if ina[redbutton] == 1 'then enter into that menu item, else just repeat looking case menu 'each one needs to listen to yellow button to return back to selecting mode 1: 'do nothing already set for remote control 2: TimeDelay'have sub-menu selection of time delay: 1 minute, 15 minutes, 1 hour, 1 day 3: 'listen to tripwire repeat while ina[yellowbutton] == 0 'break out to choose other menu item if tripvalue > 70 command := 1 'take picture 4: 'listen to motion sensor. repeat while ina[yellowbutton] == 0 'break out to choose other menu item if ina[motion] == 0 command := 1 'take picture waitcnt(clkfreq/7+cnt) 'to give button enough time to go back to zero PUB TimeDelay outa[LEDminute]:=1 outa[LEDmins]:= 0 outa[LEDhour]:= 0 outa[LEDday] := 0 waitcnt(clkfreq/7+cnt) 'to give button enough time to go back to zero repeat while ina[redbutton] == 0 if ina[yellowbutton] == 1 'move through sub menu outa[LEDminute]:= 0 outa[LEDmins]:= 0 outa[LEDhour]:= 0 outa[LEDday] := 0 submenu++ if submenu == 5 submenu := 1 case submenu 1: outa[LEDminute] := 1 n:= 60 2: outa[LEDmins] := 1 n:=900 3: outa[LEDhour] := 1 n:=3600 4: outa[LEDday] := 1 n:=86400 waitcnt(clkfreq/7+cnt) 'to give button enough time to go back to zero repeat while ina[yellowbutton] == 0 'time loops with a yellow button break out x:=1 command := 1 'take picture repeat while (x < n) and (ina[yellowbutton] == 0) x++ waitcnt(clkfreq+cnt) outa[LEDminute]:= 0 outa[LEDmins]:= 0 outa[LEDhour]:= 0 outa[LEDday] := 0 waitcnt(clkfreq/7+cnt) 'to give button enough time to go back to zero PUB TakePicture dira[remote]~ 'sets d pin from remote to input d := dlast := 0 'button d not pressed repeat dira[focus]~~ 'outputs to opto dira[shutter]~~ 'outputs to opto if RemoteDtest == 1 or command == 1 outa[focus]~~ 'set pin high causing opto to connect focus to ground outa[shutter]~~ 'set pin high causing opto to connect shutter to ground waitcnt(clkfreq/2+cnt) outa[focus]~ outa[shutter]~ command := 0 Pub RemoteDtest 'used because the remote does not operate as a momentary button d := ina[remote] 'instead it changes state each press and stays in that state if d == dlast 'so instead of looking for high or low you have to look for a result := 0 'change of state else result := 1 dlast := d DAT {{ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TERMS OF USE: MIT License │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation │ │files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, │ │modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software│ │is furnished to do so, subject to the following conditions: │ │ │ │The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.│ │ │ │THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE │ │WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR │ │COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ }}This is a great project! A box like this has been on my list for a while. Hopefully, your success can lead to some motivation for me to get moving on it!
Thank you for taking the time to document the process and provide code (and soon to be coming partial schematics?)
Well done!
Just used the basic set-up for the propeller and power supply minus a reset button.
The motion sensor is an EPIR. There were some pins on it I did not use as explained in it's attached picture
The RF remote I got off ebay. RF controller
Nice time delay sequence! Long enough to get the exposure but not long enough to start seeing trails.
How did you piece the single frames together into a movie?
I was hoping to get the Milky Way, but my lack of astronomy background had me pointing to the wrong part of the sky (north). If I had thought about it, the solar system
rotates on about the same plane as the galaxy so I should have been pointing east or west. Still don't know if I can get pictures of the milky way with my camera
here in Florida with light pollution, but going to try again.
That's still a great picture. Man, I've got to build one of these.
Regardless of the outcome, this is a great project. Thank you for sharing!