Close

Notes for IR illuminators & enclosures & shutdown

A project log for Elephant AI

a system to prevent human-elephant conflict by detecting elephants using machine vision, and warning humans and/or repelling elephants

neil-k-sheridanNeil K. Sheridan 09/28/2017 at 18:380 Comments

So I'm trialling these two pre-built IR illuminators:

- JCHENG SECURITY 4pcs High Power LED IR Array Illuminator IR Lamp Wide Angle for Night Vision CCTV and IP Camera £10.60

- ICAMI IR Illuminators 96 LED High Power Infrared LED Lights for Security Camera (White) £19.90


These are both 12v. So we will use the an optically isolated switching circuit to switch them on from the raspberry pi GPIO pins.

We'll use 

- Fairchild TIP122 NPN Darlington Pair, 5 A 100 V HFE:1000, 3-Pin TO-220 (£0.40)

- Isocom 4N25 DC Input Transistor Output Optocoupler, Through Hole, 6-Pin PDIP (£0.32)

- Resistors: 220 & 1K

ENCLOSURES

I've added tupperware type plastic containers to my list of example enclosures. Others seemed to have great success with using these outdoors! I've tried cutting holes in them which is fine using a dremel. Then I'm going to add glass lenses with seals in order for the camera to be able to get a good image. The glass lenses can go over the PIR too. And holes for cable in/out can be sealed using cable grommets. We can glue balsa wood to the bottom of these plastic contrainers, and screw standoffs into this wood for mounting the Raspberry Pi + other components.

The second addition I've made is halogen floodlight enclosures. In some cases these will be large enough to re-purpose (i.e. remove the lamp) to fit the raspberry pi's and other components inside. They already have a glass front, and PIR mount below. I'm not really sure if they will be large enough, but I'll have a try.  You can get these already mounted on tripods too for quite low-cost. That would be quite handy.

The third addition is using CCTV security camera housing. Some of these are quite large, so may fit all of the elephant deter device components. If not, they could house the camera and PIR with the other components in a box. They also have a glass front which is helpful.

SAFE SHUTDOWN

So if users are coming to collect the detect and deter devices, they need to shut them down with 

sudo shutdown -h now

to prevent any risk of corrupting the SD card. So we need a button to do this. Since they are not going to be coming along with HDMI cables, monitor, keyboard!  So all we do with this circuit is connect the 3.3V out pin to a switch, put a 10kohm resistor between this and GND.  Then we connect one of the GPIO pins as input, so if it gets HIGH we trigger the shutdown command. E.g.

import os
os.system("sudo shutdown -h now")

* update: the safe shutdown build instructions are here: https://hackaday.io/project/20448-elephant-ai/log/68015-buildinstructions-for-hardware-safe-shutdown-switch

Discussions