Welcome Anonymous
Fledgling
Fledgling
It is currently Fri Sep 22, 2017 2:41 pm

All times are



Post new topic Reply to topic  [ Array ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat May 21, 2011 5:49 am 
Offline
Emperor
Emperor
User avatar

Joined: Mon Feb 01, 2010 7:02 pm
Posts: 817
Getting ready to do a 125 with a 12v SLA running the entire build (except for the camera). Just waiting for Bowgod to work out the kinks so I can get it done. Wish he'd spend less time turkey hunting and more time getting these kinks worked for me. :)


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2011 7:17 am 
Offline
Gentoo
Gentoo

Joined: Sat Jan 15, 2011 3:35 pm
Posts: 264
egbertdavis wrote:
Getting ready to do a 125 with a 12v SLA running the entire build (except for the camera). Just waiting for Bowgod to work out the kinks so I can get it done. Wish he'd spend less time turkey hunting and more time getting these kinks worked for me. :)

you sure he is turkey hunting or out catching some shut eye :rofll :rofll :rofll


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2011 7:24 am 
Offline
Moderator
Moderator

Joined: Sun Jan 31, 2010 9:07 pm
Posts: 3334
Location: Central PA near PSU
He does sleep a heck of a lot in the afternoon. I'm glad a couple guys are taking the brunt of the abuse about the code and the bombardment of questions. I honestly thing the latter is the cause for folks not sharing their code. They don't want to deal with the hassle of playing tech support with it.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2011 10:13 am 
Offline
Royal
Royal

Joined: Fri Mar 12, 2010 10:23 pm
Posts: 342
tbass wrote:
He does sleep a heck of a lot in the afternoon. I'm glad a couple guys are taking the brunt of the abuse about the code and the bombardment of questions. I honestly thing the latter is the cause for folks not sharing their code. They don't want to deal with the hassle of playing tech support with it.



I am sure not wanting the hassle of tech support is a large part of it. Not sure why anyone would want to attack anyones code. The sharing of pretty much everything on here is what makes this one of the best homebrew sites out there.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2011 10:24 am 
Offline
King
King
User avatar

Joined: Tue Feb 16, 2010 3:20 pm
Posts: 482
I was out for turkey this morning and your right tbass....its about nap time!!! Tired as all heck. These darn turkeys are so call shy right now that you almost have to hunt them like deer now. Close but no cigar this morning.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2011 10:26 am 
Offline
Royal
Royal

Joined: Fri Mar 12, 2010 10:23 pm
Posts: 342
Could one of you that understand the AIO code put the code in the picaxe reader and make note of what lines need to be changed to change the camera refresh, shutter delay, and what ever else may need to be changed to make a 3 wire sony camera hack work (p32, p41, s600...) I will post below what I mean.

This was code that was posted in the past 08M picaxe for the SS. Check out the first few lines, if something like this can be done for the AIO more like myself may be able to venture into using it. Once done in this manner anyone should be able to go in adjust this program for any 3 wire camera. I set it up this way just to make it faster for myself to know what lines to adjust without going through the whole program. Now I just load the program adjust the listed lines and hit the program button in less then a minute.

'SS camera controller code for 08M Picaxe chip...revised 5-4-09

'Refresh settings...lines 322 384 454 650

'Shutter time settings lines 436

'Feeder delay between pictures line 564


'This program will control several cameras, including the Sony P41, P32

'and most other Sony cameras that are typically used for trail cameras.

'Notice that all lines that begin with ' are green. These lines are what

'are called comments. They have no affect on the program at all, but are

'a very useful way to keep notes in your picaxe code to easily remind you

'what a particular area of code is for. So, by each line of code, you will

'see comments to explain what they are for.



'I will put some explanation of what these most used commands mean, and you

'can find good examples in the Picaxe manuals also. The manuals should be

'included when you download your free copy of the Picaxe Program Editor.

'At the top, click help, and you can see your choices....







'disablebod...Disable brownout detection. see manual 2 for more details.

'.............This lets the chip run using less power for better battery life.



'high.........When you see this, it tells the editor we want the pin number

'.............that follows, to be an output pin, and we want it to be "on"





'low 0........This command tells the editor that we want this pin...pin 0

'.............to become an output, and we want it "off"



'pause........The lines below use the "pause" command. This is a command

'............ that you will use a lot. It simply tells the program to pause

'.............for a set amount of time. It is measured in thousands of a second.

'.............so, the "pause 1000 command below tells the program to pause for

'.............one second. If you want it to pause for say 1/10th of a second,

'.............then you would use "pause 100",

'.............1/2 second would be "pause 500",

'.............1 minute would be "pause 60000" etc.

'.............You can use a number up to 65535 with the pause command;

'.............which would amount to 65.535 seconds.



'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'These next few lines are just initially setting the pins how we want them.





low 0 'set the pin that controls the camera shutter to low



low 1 'set the pin that controls the camera power to low



input 2 'let the picaxe chip know that pin2 (for the switch) will need'

'to be an input so we'll be able to see if the switch is set to'

'trail or feeder.



input 3 'Pin 3 is kind of special and can only be used as an input,

'The picaxe chip knows that, so we don't really need to set it up,

'but we will anyway, just to help new guys know what is going on.



low 4 'set the LED pin to low to make sure the LED is OFF.



disablebod 'remember, this lets the chip run using less power (see above)



pause 3000 'wait for 3 seconds





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'Here we want time for the motion sensor to warm up, and we will turn the

'camera on too, so the flash can be pre-charged or "refreshed"



'We will use the opto on the SS board to "push" the buttons on the camera.

'When we do this, we need to think of how we would do this manually...

'We will push the button for a time, then release it, to turn the camera on

'then do it again, to turn the camera back off.





warmup:





high 4 'turn on LED to indicate warm-up mode

pause 1000



high 1 'turn on camera power opto pin to "push" camera power button

pause 300 'holding power button

low 1 'release power button



pause 10000 'pause 10 seconds for camera to charge the flash



high 1 'again, turn on camera power opto pin to "push" camera power button

pause 300

low 1 'turn the camera power opto back off

pause 1000



low 4 'turn LED off indicating warm-up has timed out





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'This part of the code is for the walk test part of the board operation.

'You see w0 = 300 here, this is what is called a variable. A variable is

'just that...variable, meaning you can change the number to suit the need.

'We are using this variable as a timer for the walk test mode, and you can

'adjust the time to suit your needs, or make w0 = 0, and the walk test will

'not happen at all. This walk test resets the timer every time motion is

'seen, so don't forget to make changes to "re-start timer from beginning if

'motion detected" as well as the first w0 = ___





walk_test:



w0 = 300 '30 seconds..' How many 100ms - 300 x 100 = 30,000ms = 30s

Do While w0 > 0 'walk test lasts till timer is timed out

If pin3 = 0 Then 'pin3 goes to the PIR, when PIR detects motion...then...

high 4 'light walk test LED to show detection

pause 1000 'keep LED on for a 1 second pause

low 4 'turn walk test LED off

pause 100

w0 = 300 'restart timer from beginning if motion detected

pause 3000 'wait for PIR to settle



Else 'if no motion is seen this time, still count down the timer anyway

low 4

End If 'when you use an "if" you also need to tell the chip where it ends

Pause 100

w0 = w0 - 1 'deducting from walk test time

Loop 'this just says to keep the walk test running till timed out

pause 100

high 4 'turn on walk test LED to show walk test over

pause 3000 'LED on time

low 4 'turn LED off

pause 1000 'wait





'Walk test finished, now go to regular camera mode



'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'This is the part of the program where the SS is armed and ready to

'take a picture when motion is seen. You see another variable here

'This variable..w1...is going to be the refresh interval timer

'We are using a "do loop" (see manual 2) with a low power command

'called a "nap" The SS will check for a motion detection...take a short

'"nap to save power, then deduct 1 from the variable. This loop

'will keep looping till the timer runs out, then the SS will "goto"

'the refresh, which keeps the cameras flash charged.



'You can change how often the camera is refreshed by changing "w1"

'Be sure to also change the "w1" in the refresh part of the code below

'as the refresh interval timer is re-set after the camera refreshes.





standby:



W1 = 10000 'refresh interval...10,000 is 50 minutes

Do While W1 > 0

if pin3 = 0 then goto take_picture 'pin3 is motion detector triggered

Nap 4

W1 = W1 - 1

Loop

goto refresh





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'This is where the camera will turn on for a few seconds to refresh the flash

'so the camera will be ready to take a picture quickly. Most cameras should be

'able to top the flash charge off within a few seconds. When changing things in

'this section, be sure to make similar changes where they relate to other parts.

'In other words...if you change w1, which is the refresh interval, be sure to

'change it in standby too.





refresh:



high 1 'push power button

pause 300 'hold power button

low 1 'release power button

pause 3000 'camera on for 3 seconds...remember 1000 is one second

high 1 'push power button to turn off camera

pause 300 'hold power button

low 1 'release power button



W1 = 10000 'refresh interval...10,000 is 50 minutes



pause 1000

goto standby





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'Here we are, this is where the sensor has seen motion and we want to

'take a picture of what set it off. This code is written to include

'activity mode, which is where the camera will stay powered on after

'picture, so additional detection will result in an almost instant shutter.

'There is a switch on the board that lets you choose between activity

'mode and feeder mode. Feeder mode will take one picture, then the camera

'will save the picture, charge the flash, then shut off.





take_picture:



high 1 'push power button

pause 300 'hold power button

low 1 'release power button





pause 1500 'This is your shutter delay time. Different cameras need different

'amounts of time between when you hit the power button to when you

'hit the shutter button. A few cameras will let you hit the shutter

'right away, as long as you hold it till the picture is taken.



high 0 'Now that we have had the pause, we will push the shutter button

pause 3000 'holding the shutter button down

low 0 'releasing the shutter button



W1 = 10000 'resetting the refresh timer



'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'This is important for you to understand. Remember from the beginning

'we said high is on and low is off...well now we need to expand on that.



'The switch on the board will connect pin2, which is an input here, to either

'positive or negative. We say 1 (one) if the pin is positive, meaning it is

'connecting to the positive voltage, and we call it 0 (zero) if it is grounded.

'We are telling the Picaxe that if this pin2 has positive going to it that

'means we want the camera to be in activity mode.



'What is assumed here, is if pin2 is 0, we don't want activity mode, so

'the picaxe will skip the activity mode and keep going down the page. You

'can use the switch for other things instead of activity mode if you want

'to...for example, you could have two different delays instead.





if pin2 = 1 then activity_mode





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'If pin2 = 0 meaning you have it set to feeder mode, then this part of the

'code will run instead of it jumping past to activity mode.



'The picture has been taken, and now we need a pause for the camera to save

'the picture and charge the flash up, if it was used. I chose pause 15000

'which is 15 seconds, because in the worst case, with the batteries getting

'low, and the flash used to the fullest, it can take this long to recharge.

'If you turn the camera off before the flash is fully charged, it will

'have to finish charging before it can take another picture. This delay

'will likely cause a missed picture...and we don't want that to happen.







pause 15000 '1000 is one second, so this is 15 seconds

high 1 'push the power button to turn camera off

pause 300 'holding power button down

low 1 'release power button



'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'This next line is your picture to picture delay when not using activity

'Sleep is a low power mode, and each sleep 1 is equal to about 2.3 seconds.

'I timed this with a stopwatch, and sleep 43 turned out to be right about

'2 minutes, because you also have the time where the camera stays on after

'the picture taken. It's up to you to make this delay what you want it to

'be. You can go from 0 to 65535.By my calculations sleep 65535 is too long.





sleep 43 'This should be about 2 minutes





goto standby 'from here the code will goto and wait for another detection





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'Here is the activity mode instructions. You see it is almost the same as

'the walk test. We can even re-use the variable w0 to set the time it keeps

'the camera on and waiting for another detection.





activity_mode:



w0 = 300 '30 seconds..' How many 100ms - 300 x 100 = 30,000ms = 30s

Do While w0 > 0 'activity mode lasts till timer is timed out

If pin3 = 0 Then 'pin3 goes to the PIR, when PIR detects motion...then...

high 0 'press the shutter button

pause 300 'hold shutter button down

low 0 'release shutter button

w0 = 300 're-start timer from beginning because motion was detected

pause 3000 'wait for PIR to settle

End If



Pause 100

w0 = w0 - 1 'deducting from camera on time

Loop 'this just says to keep running till timed out





'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





'Now that there has been no more motion seen for the time you choose

'which is about 30 seconds in this example, it is time to turn the camera

'off and go back to watching for another event.





high 1 'remember from the start that 1 is the power button...push it

pause 300 'holding the power button down

low 1 'release the power button and the camera should be off now

w1 = 10000 'we are resetting the refresh timer



'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



'You have a decision to make here.



'THIS IS ONLY CHANGING THE DELAY IN ACTIVITY MODE, It is separate

'from the delay in feeder mode. This time will be for after the activity mode

'has timed out, and maybe you want to have a delay before it can start

'popping off pictures again. If you are going to use a delay longer than

'a second or so, I would use sleep, to save board battery power.





pause 1000

goto standby


Top
 Profile  
Reply with quote  
PostPosted: Sat May 21, 2011 12:34 pm 
Offline
Gentoo
Gentoo

Joined: Fri Mar 26, 2010 6:38 am
Posts: 218
Location: Pa Bradford co wmu 3c
I have 90% of my part's, the rest are on back order until mid June. Somebody cleaned out the supplier's ...


Top
 Profile  
Reply with quote  
PostPosted: Mon May 23, 2011 2:08 am 
Offline
Emperor
Emperor

Joined: Tue Feb 16, 2010 6:19 am
Posts: 758
On the code I posted you will see camera setup Most of the stuff you may need to change is in the camera setup.

*
'=====================================================
'Camera Setup
'=====================================================

'Time to hold in the shutter button on camera in ms
Symbol Shutter_Time = 250

'Time Required to charge up slave in ms
'Set equal to 1 if a Slave Flash isn't used
Slave_Charge_Time = 10000

'time to hold in power button on camera in ms.
'Set equal to 1 if camera uses a switch instead of a momentary push button
Power_On_Delay = 250

'Delay after power on
symbol Shutter_pause = 1800

'Amount of time that can pass before the camera needs refreshed
'value=(10*timeinseconds/147)-1
'example if a 73.5s refresh is needed you would set it equal to 4
'4=(10*73.5/147)-1
Symbol CamRefreshLimit = 244

'Timervalue1 and Timervalue2 are in multiples of 5 sec
'Timer value to be used if B.0 is Low
Symbol Timervalue1 = 3

'Timer value to be used if B.0 is High
Symbol Timervalue2 = 6


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 17, 2011 9:06 pm 
Offline
Galapagos
Galapagos
User avatar

Joined: Wed Jul 07, 2010 9:49 pm
Posts: 111
I have one in the works for an A503. Following the assembly sequence instructions. Last step completed was Install Potentiometer. Been sending bowgod a lot of questions.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ Array ]  Go to page Previous  1, 2

All times are


Who is online

Array


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group