Welcome Anonymous
Fledgling
Fledgling
It is currently Thu Jun 22, 2017 2:27 pm

All times are



Post new topic Reply to topic  [ Array ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu May 19, 2011 3:02 am 
Offline
Emperor
Emperor

Joined: Tue Feb 16, 2010 6:19 am
Posts: 758
has anyone done anything with their boards. I am not seeing much.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 3:31 am 
Offline
Moderator
Moderator
User avatar

Joined: Mon Feb 01, 2010 5:45 pm
Posts: 4344
Location: Sussex County NJ
Working on one, it's all soldered up and working. Just a lot going on right now, two kids playing soccer and stuff like that. Doing an IR E50 with a 3 volt promaster/quantaray slave.

_________________
Image trailcamkits.com


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 5:42 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Jan 29, 2010 1:04 pm
Posts: 7450
Location: Northern Minnesota
Still some parts on backorder until August now, but as JD... busy with 1 in soccer, one in Tae Kwon Do and one in Daycare.

_________________
Homebrew Reference Site
My Calendar Store
My Land


"Wilderness to the people of America is a spiritual necessity, an antidote to the high pressure of modern life, a means of regaining serenity and equilibrium."
- Sigurd Olson


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 6:24 am 
Offline
Moderator
Moderator
User avatar

Joined: Sun Jan 31, 2010 4:39 pm
Posts: 1419
Just have the one done so far.

_________________
JCTA- Joe's Custom Trailcam Accessories


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 7:41 am 
Offline
Gentoo
Gentoo

Joined: Sat Jan 15, 2011 3:35 pm
Posts: 264
Im in the same boat and I knew mine were going to be winter projects when I ordered them , Im coaching soccer and baseball this yr , I have parts for a couple builds but not for all my boards and with most of the stuff being on back order it really doesnt break my heart right now I have too many irons in the fire to be able to sit down and solder them all up . My goal this winter is to sit down and do them all at once so there ready to go when Im ready to build


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 7:53 am 
Offline
King
King
User avatar

Joined: Tue Feb 16, 2010 3:20 pm
Posts: 482
I would let a few bare Scott. Never know when you want the board to run something else that requires a little different setup on the board.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 8:01 am 
Offline
Gentoo
Gentoo

Joined: Sat Jan 15, 2011 3:35 pm
Posts: 264
bowgod02 wrote:
I would let a few bare Scott. Never know when you want the board to run something else that requires a little different setup on the board.

True , didnt think about that, most of them will be set up for nothing more than a normal board so I wont be building the whole thing anyway


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 3:02 pm 
Offline
Moderator
Moderator

Joined: Sun Jan 31, 2010 9:07 pm
Posts: 3316
Location: Central PA near PSU
I've got about 7 complete boards and enough parts to do at least 10 more. I'm so swamped with stuff, I put them on the back burner. I have been trying to spend time with family while I can with this new job. I might take stuff and assemble some in the hotel during the week. Right now I spend 14 hours a day on work and travel. Not much time for anything else.

_________________
Image


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2011 5:56 pm 
Offline
Royal
Royal

Joined: Fri Mar 12, 2010 10:23 pm
Posts: 342
I have not done anything with mine. The programming for them seems way over my head. I read the programs that are posted on here and can not make heads or tales of them. May build one as a slave controller only. They are not taking any hurt in the box and I am not really out anything yet as I have not ordered any parts for them.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2011 11:08 pm 
Offline
Emperor
Emperor

Joined: Tue Feb 16, 2010 6:19 am
Posts: 758
Not very many poeple are posting their code for fear of getting bashed for it. I am under attack now fror this. Sure takes the fun out of homebrewing when these attacks happen. Really you don`t need to program. You just need to know some values. I have been changing the code to make this process easier to do. Here is a sample.

*
'CODE
' PICAxe 20x2 Code for Sony that has a trail mode.
`With a jumper between b.7 and V you have feeder mode

`Edited by Charles Garrett and Floyd Newberry.
'=========
'11/25/10
'=========

'=========================
'Sony W290 3 wire
'=========================




#picaxe20x2
'#terminal 9600
#no_data
#no_table
disablebod

'=====================================================
' Map Ports
'=====================================================
'Symbol PT_IN = B.0 ' Photo Transistor input
'Symbol Spare_Out = C.1 ' Spare Mosfet
Symbol PT_Out = C.2 ' Photo Transistor output
Symbol Flash_Charge = C.3 ' Flash Charge Mosfet
Symbol Flash_Out = C.4 ' slave flash opto
Symbol CDS_Out = C.5 ' Output to LDR voltage Divider
'Symbol Battery_Monitor = B.6 ' ADC Input for battery monitor
'Symbol LDR_IN = B.5 ' LDR ADC Input
Symbol Shutter_Out = B.4 ' Shutter Mosfet
Symbol Power_Out = B.3 ' Power Mosfet
Symbol LED_Out = B.2 ' LED
'Symbol PIR_In = B.1 ' Input from PIR Circuit
Symbol Byte_Var = B1
Symbol ValidPIR = B2
Symbol PIR_Event = B3
Symbol WlkTestFlag = B4 ' Walk test status flag
Symbol WlkTestTime = B5 ' Number of 15 sec periods for walk test
Symbol CamPwrState = B6
Symbol CamPwrDownTimer = B7
Symbol Flash_Flag = B8' Flag to count the # of flashes seen
Symbol CDS_Value = B9
Symbol Night_Flag = B10
Symbol Day = B11
Symbol Night = B12
Symbol SlaveRefresh = B13
Symbol TimerLimit = B14
Symbol IsFlashCharged = B15
Symbol Power_On_Delay = W8
Symbol Slave_Charge_Time = W9
Symbol CamRefresh = W10
'Symbol To_Counter = W11
'Symbol PRELOAD = 63890 ' approx 15 sec at 31khz

'=====================================================
' Set Port Directions
'=====================================================
'Input PT_IN
'Output Spare_Out
Output PT_Out
Output Flash_Charge
Output Flash_Out
Output CDS_Out
'Output Battery_Monitor
'Input LDR_IN
Output Shutter_Out
Output Power_Out
Output LED_Out
'Input PIR_In
Input C.7
Input C.6
Input B.7
Input C.0

'=====================================================
'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

'=====================================================
'Pullups
'=====================================================
'Disable all PUs
pullup %00000000

'=====================================================
' Configure ADC
'=====================================================
adcsetup = %010000000000 'make adc 10 an input
'============================================================================

' STARTUP
'============================================================================

; Allow board to stabilize for 20 sec
High LED_Out
pause 5000
GoSub CamPWR
pause 5000
GoSub CamPWR
pause 20000
Low LED_Out




Powerup:
WlkTestTime = 2 ' set walk test timer to 15sec intervals of timer
WlkTestFlag = 1 ' Turn on walk test mode
CamRefresh = 0
Night = 155; lux level 7 = 100k(R16) 2v @ 4v 2 X 256 / 4 = 128
Day = 144
Night_Flag = 0
SlaveRefresh = 0
CamPwrState = 0
IsFlashCharged = 0
' Do initial board setup for light & battery levels
GoSub CdsChk
IF Night_Flag = 1 And Slave_Charge_Time <> 1 Then GoSub Slave_Charge
'=====================================================
'Configure Interrupts
hintsetup %01100110 'set HINT2(PIR) & HINT1(FLASH) to trigger Interrupt at rising edge
Setintflags %00000100,%00000100 'enable interrupt flags


'=====================================================
Main: ' Main loop that checks for a PIR event, charges slave, turns off the cam if in trail mode and increments counters & timers, then sleeps for 15 secs and does it all over again:
'=====================================================
if Pinb.7 = 0 then 'Set TimerLimit to Number x 5 in seconds
TimerLimit = Timervalue1
else
TimerLimit = Timervalue2
endif

CamPwrDownTimer =0 'resets CamPWRDownTimer so timer can inc properly

If CamPwrState = 1 and pinC.7 = 1 then 'power cam down and wait 1 min (12x5s) if C.7 is jumpered
gosub CamPwr 'timer can be changed to use the timer limit settings for
do while CamPwrDownTimer <= 12 and pinC.7 = 1 'the other mode by changing the do while loop condition
'to TimerLimit instead of a number
pause 5000
inc CamPwrDownTimer
loop
endif

If CamPwrState = 1 then 'if cam is on starts the cam power down timer and checks for PIR event
Do While CamPwrDownTimer <= TimerLimit 'pauses for 5 sec x TimerLimit checking for a PIR event each time
If PIR_Event = 1 Then 'checks Pir for activity. Starts PirIntService and exits timing loop if found
Gosub PIR_IntService
exit
Endif
Pause 5000
Inc CamPwrDownTimer
Loop
Inc TimerLimit
If CamPwrDownTimer = TimerLimit then GoSub CamPwr 'turns cam off if timer finished counting
Else
If PIR_Event = 1 Then GoSub PIR_INTService
Endif

' Charge slave every 10 minutes if night_flag = 1 (40 15 second periods)
If SlaveRefresh = 40 And Night_Flag = 1 And Slave_Charge_Time <> 1 Then GoSub Slave_Charge

'reset slave refresh timer and mark slave flash as being uncharged
If SlaveRefresh = 40 And Night_Flag = 0 Then
SlaveRefresh = 0
IsFlashCharged = 0
EndIf

' Turn off walk test if time is up
If WlkTestFlag = 1 And WlkTestTime = 0 Then
WlkTestFlag = 0 'turn off walk test If Time is up
Byte_Var = 0 ' Flash LED to indicate walk test over
For Byte_Var = 0 To 7
pause 400
Toggle LED_Out
Next
Pause 3000 ' pause so CdsCHK does not see led and think it's day time
EndIf



' Increment counters & timers
If WlkTestFlag = 1 And WlkTestTime <> 0 Then Dec WlkTestTime : EndIf
If WLKTestFlag = 0 Then Inc CamRefresh : EndIf 'Camrefresh timer is passive using the time the processor is in its sleep cycle.
Inc SlaveRefresh


GoSub CdsChk
Sleep 7 'increases the time the processor sleeps by 2.1s:1 on x1 and x2 pics.
'Ex a value of 2 = 4.2s
'It is important to note that changing the sleep time will affect all passive timers
'used in the program. Use caution

If CamRefresh = CamRefreshLimit Then
CamRefresh = 0
GoSub CamPwr
Pause 5000
GoSub CamPwr
EndIf
GoTo Main


Interrupt:
'sertxd ("Interrupt ",13,10)
If hint2flag = 1 Then 'Check to see if INT2 has been triggered
PIR_Event = 1 'Set the PIR event flag
hint2flag = 0 'reset hint2flag to 0
EndIf

If hint1flag = 1 Then ' Flash has been detected
'sertxd ("Flash Flags ", #Flash_Flag,13,10)
Inc Flash_Flag
hint1flag = 0
Setintflags %00000010,%00000010 'enable interrupt flags FOR FLASH ONLY!
EndIf


hintflag = 0

Return


PIR_INTService:

PIR_Event = 0
; +++++++ Now See how long the port is high ++++++++++++++
Byte_Var = 0 'clear the counter
Do While Pinb.1= 1 'While the PIR is high (motion detected)
Inc Byte_Var 'Inc our counter
'Pause 1 'un-comment for a longer period
If Byte_Var >= 2 Then
ValidPIR = 1 'flag the motion detected as valid
Exit
EndIf
Loop



If ValidPIR = 1 Then 'If valid motion then
ValidPIR = 0

' WalkTest
If WlkTestFlag = 1 Then 'if walktest then turn on led to indicate PIR event
WlkTestTime = 2 'reset walktest timer back to original count again
Byte_Var = 0
For Byte_Var = 0 To 19
Toggle LED_Out
Pause 20
Next
Pause 4000; wait a few secs to settle PIR
GoTo PIR_INTService_Exit
EndIf


If Night_Flag = 1 And Slave_Charge_Time <> 1 Then
High PT_Out ' Turn on PT to detect flash
Setintflags %00000010,%00000010 'enable interrupt flags FOR FLASH ONLY!
If IsFlashCharged = 0 Then GoSub Slave_Charge 'if flash isn't charged recharge it
EndIf

Flash_Flag = 0


If WlkTestFlag = 0 Then
If CamPWRState = 0 then GoSub CamPWR ' Turn the camera on for the first time
Pause Shutter_pause
If night_flag =1 And Slave_Charge_Time <> 1 then
GoSub Fire_Flash
Else
Gosub Shutter
EndIf


EndIf

Endif

PIR_INTService_Exit:
'sertxd ("PIR Exit ",13,10)
Setintflags %00000100,%00000100
ValidPIR = 0
Return

LED_Blink:
'Byte_Var = 0
For Byte_Var = 0 To 19
Toggle LED_Out
Pause 20

Next
Return

Flash_Led:
For Byte_Var = 1 To 50
Toggle LED_Out
pause 20
Next
Return

CamPWR:
CamPwrState = CamPwrState ^ 1 'Toggles CamPwrState Var
if campwrstate = 1 then 'stuff to do when cam is turned on

If Power_On_Delay = 1 then High Power_Out : Endif

Endif
If Power_On_Delay <> 1 Then
High Power_Out
pause Power_On_Delay
Low Power_Out
EndIf
if CamPwrState = 0 then 'stuff to do when cam is turned off

If Power_On_Delay = 1 then Low Power_Out : Endif
Endif
Return

Shutter:
High Shutter_Out
pause Shutter_Time
Low Shutter_Out
Return

Fire_Flash:
'setfreq m32
'pause 8
Flash_Flag = 0 'only here for instances where a bright light may have messed up the counter. IE Lightning or a flashlight
'sertxd ("Flash Start ",13,10)
timer = 0
settimer 65505 'aprox 1ms at 8mhz
'settimer 65411 'aprox 1ms at 32mhz
High Shutter_Out

Do While flash_flag != 2
If timer = Shutter_Time Then
'Inc TO_Counter
'If TO_Counter =1000 Then
Flash_Flag = 0 ' Reset flags
'TO_Counter = 0
GoSub Flash_Led ' Flash Led to indicate time out.
GoTo Flash_Exit
EndIf
Loop
'pause 10 'used to help sync camera and flash
' FireFlash
High Flash_Out
pause Shutter_Time
Low Flash_Out
Flash_Exit:
Low Shutter_Out
Flash_Flag = 0 ' Reset flags
'TO_Counter = 0
Low PT_Out
settimer off
'setfreq m8
'pause 2
gosub Slave_Charge

Return

CdsChk:
High CDS_Out 'Turn on pin to supply voltage to cds voltage divider
readadc 10 , CDS_Value ' Read light value
'sertxd ("CDS Value ",#CDS_Value,13,10)
'IF Night_Flag IS SET THEN WE CHECK TO SEE IF THE LIGHT LEVEL IS > = 144 IF ADC GREATER OR = THEN STILL DARK AND EXIT
'IF ITS BELOW 144 THEN WE CLEAR NIGHT_FLG AND RETURN
'IF Night_Flag = 0 THEN CHECK TO SEE IF ADC ABOVE 155 THEN WE SET NIGHT_FLG AND RETURN
Low CDS_Out 'Turn off voltage divider
If Night_Flag = 1 And CDS_Value >= Day Then
GoTo CdsChk_Exit 'already set and Still dark so we exit
Else
Night_Flag = 0 ' already set and Daylight so clear flag
EndIf
If Night_Flag = 0 And CDS_Value >= Night Then
Night_Flag = 1 ' Its dark so set flag
If IsFlashCharged = 0 And Slave_Charge_Time <> 1 Then GoSub Slave_Charge ' Charge the slave up also if it needs it.
Else
Night_Flag = 0 ' Daylight so clear flag
EndIf
CdsChk_Exit:

Return

Slave_Charge:
High Flash_Charge
Pause Slave_Charge_Time ' pause to allow cap to charge up
Low Flash_Charge
SlaveRefresh = 0 ' restart our slave refresh timer.
IsFlashCharged = 1
Return


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

All times are


Who is online


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:  
Powered by phpBB® Forum Software © phpBB Group