Trailcam – 4. I.R. Lamp

Other sections

  1. Introduction
  2. Basic setup & Power
  3. PIR sensor
  4. IR lamp
  5. IR filter
  6. Buttons
  7. Completed pics, improvements and parts list
  8. Updates

 

Description

The IR lamp is a kit from Maplin. I’d priced up getting the LED’s individually and putting them on to a bit of veroboard and the kit worked out much cheaper.

inside front of camera
from top to bottom: I.R. lamp, camera and I.R. filter and P.I.R. lamp, as seen from the inside of the front section of the trailcam.

It is designed to be 12v but it works satisfactorily with a 9v source. I have bought another of the kits when they were on special offer so I may end up swapping out the resistors to make it truly 9v.

light
12v I.R. lamp kit from Maplin (My spare one)

Powering the lamp

I wanted the lamp to be powered separately from the PI, initially because it is much easier to do but also because it’ll let me be a bit more flexible if I choose to change the lamp or power source (It also helps to reduce the load on the battery).  I settled for a relay kit from Ciseco – as with the lamp it proved cheaper than buying the bits.

relay
Ciesco 3v3 relay kit

I’ve soldered this board so many times the tack has come off, so I’ve had to find alternative places to put the wires! This has become a major weak point of the build.

For debug purposes I’ve produced 2 python programs – one to turn it on and the other to turn it off.

On
#!/usr/bin/python

import RPi.GPIO as GPIO
import time
import subprocess

# Use BCM GPIO references
# instead of physical pin numbers
GPIO.setmode(GPIO.BCM)

# Define GPIO for light
GPIO_LIGHT_ON = 17

# Set light on GPIO as output
GPIO.setup(GPIO_LIGHT_ON,GPIO.OUT)
GPIO.output (GPIO_LIGHT_ON,1)
print " Light on"
GPIO.cleanup()


Off
#!/usr/bin/python

import RPi.GPIO as GPIO
import time
import subprocess

# Use BCM GPIO references
# instead of physical pin numbers
GPIO.setmode(GPIO.BCM)

# Define GPIO for light
GPIO_LIGHT_ON = 17

# Set light on GPIO as output
GPIO.setup(GPIO_LIGHT_ON,GPIO.OUT)
GPIO.output (GPIO_LIGHT_ON,0)
print " Light off"
GPIO.cleanup()

	

4 thoughts on “Trailcam – 4. I.R. Lamp”

Leave a Reply

Your email address will not be published. Required fields are marked *