Wednesday, 25 May 2016

Wildlife Pi Cam

Plan

Build a wildlife camera

HW

Raspberry Pi B+
New SD card
Pi Cam V2 8MB
PIR Detector
GPIO Connectors
Container(tupperware box?)
Lenses

Optional:- LED's, Switch,Battery Pack(Mobile Phone Charger?[How Big]),WiFI adapter

Plan:-

Configure SD Card with Raspbian.
Add VNC
Setup WiFi Adapter?

Add Pi Cam - Test via command script
Build PIR Hardware via Breadboad(LED to show state?)
Detect PIR
Activate Camera when PIR signaled
Dropbox Interface?
Add switch(s), state LED's?(On, PIR activate, running? )
Fix LED's and PIR onto circuit board
Build into container and add battery(Test Battery life)

Build Bird feeder so camera and bird feeded stay constant range

Container

Waterproof,
Need to be easy to recharge battet


Dropbox interface;

will the WiFi have the range?
Every period copy images into Dropboc and upload to dropbox account(Delete? )
Alternative login via Wifi and download via FTP

PIR Code

import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.IN,GPIO.PUD_DOWN)         #Read output from PIR motion sensor
GPIO.setup(3, GPIO.OUT)         #LED output pin
i=0
while True:
    i=GPIO.input(11)  
    if i==0:                 #When output from motion sensor is LOW
        print "No intruders",i
        GPIO.output(3, 0)  #Turn OFF LED
        time.sleep(0.1)
    elif i==1:               #When output from motion sensor is HIGH
        print "Intruder detected",i
        GPIO.output(3, 1)  #Turn ON LED
        time.sleep(0.1)

Note  GPIO.PUD_DOWN, this seems to be important. Takes a while to time out too, so it won't be fast. Ultrasound?