method to keep pin high in daylight?

Status
Not open for further replies.

MrDEB

Well-Known Member
been designing this CRITTER RIDDER for awhile now and didn't dawn on me that the PIR will not work in daylight.
By adding a photo transistor to take pin 9 HIGH (18F1320 PIC) durring daylight so the PIR is disabled.
my concern is battery life and is there a better solution?
Going to program the PIC w/ a timer to trigger the unit every 20 minutes but any suggestions on taking pin 9 LOW brifly durring the day.
thought about a diode after the photo transistor? to act as a gate??
 

Attachments

  • Capture6-9-2009-3.30.24 PM.gif
    56.3 KB · Views: 190
Why not use the sleep mode? And the use the phototransistor to trigger an interrupt and turn it on kind of thing, keep the circuitry simple
 
I have the PIR to trigger from sleep

but it will only work at night.
the photo transistor disables the PIR during daylight.I found it dosn't work during daylight so I need a way to disable the PIR.
there has to be a better way?
 
yes BUT pin 9mis tied HIGH

and the PIR pulls it LOW
so I need to basically disable pin 9 in daylight and able it at night.
A thought I had was to switch pin 9 to tristate as in the JPUG about charlieplexing LEDs.
As I look at the sample
bsf TRISAB.1
I know its not swordfish basic but maybe I cn figure it out to make pin 9 (B!) open or tristate and have another pin connected to photo transistor thus triggering the PIC
still trying to figure out how to configure a MODULE.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…