For the Spy Nerd Project Competition, WRONGCO introduces another revolutionary ludicrous product .........
the BAD KITTY COUNTER SPY.
The Bad Kitty Counter Spy sits unnoticed, silently and innocently pushed back into the shadows on your kitchen counter.
....BUT it is watching.
If that bad kitty, in my case 3 bad kitties, ........or dog, or ferret, or piglet, even your demonic pre school child,
climbs onto the kitchen counter, Bad Kitty Counter Spy will trigger and email the photo of the culprit to you.
Bad Kitty Counter Spy can provide incriminating photos in the day and also in the darkest of night using infared night vision.
Here is some example photos of the Bad Kitty Counter Spy in action:
CAUGHT IN THE ACT !!! actual untouched photos emailed to me from the Bad Kitty Counter Spy
the pink/purple photos are taken in the dark
So you want to know more about this incredible and sensational product's features and construction ? Keep on reading.
The truely unique features of this product:
1) Photo triggering is accomplished with a SR602 PIR motion detector. The SR602 is compatible with the Raspberry Pi 3.3V GPIO.
This PIR has a 100 degree field of vision, which would normally cause alot of undesired triggering.
The PIR is mounted inside a plastic tube lined with tar paper to act as a lens and limit the field of vision to be in front of the countertop.
2) The cardboard box used to build the project enclosure is a recycled CHEWY box. How is that for irony ?
3) I was going to build an IR LED module for night vision, but a 36 IR LED assembly with photoresistor control was purchased from Amazon for $4.
I could not come close to to building one for that price. It came with no instructions so I did have to do some evaluation testing.
The IR LED module only comes on at night, and the software turns on the MOSFET driver only for a 1/2 sec before taking the photo, then turns it off again afterwards.
If you'd like to build this project yourself, this was my starting place:
https://www.bc-robotics.com/tutorials/sending-email-attached-photo-using-python-raspberry-pi/
Once this code was running, then I built the hardware.
One issue was the IRD540 MOSFET for turning on the IR LED module, wouldnt fully gate on using 3.3V GPIO to the gate, so the IR LED assembly wasnt as bright as it should be. Inserting a LEVEL shifter to boost the gate signal to 5V fixed that problem.
Here is the project schematic:
My biggest modification to the python code is the decison to trigger and the IR LED module control:
while True:
if ((GPIO.event_detected(17)) or (GPIO.event_detected(27))):
GPIO.output(4,GPIO.HIGH)
time.sleep(.5)
image = '/home/pi/Desktop/image.jpg'
camera.capture(image)
time.sleep(0.1)
GPIO.output(4,GPIO.LOW)
sendTo = 'xxxxxxxxxxxxxx@gmail.com'
emailSubject = "Bad kitty Detected!"
emailContent = "This is the guilty kitty: " + time.ctime()
sender.sendmail(sendTo, emailSubject, emailContent, image)
print("Email Sent")
Here is a test on the IR LED module to determine load VS volts curve, min volts, and get an idea of light intensity cutoff:
Here are some photos of the project construction: