logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

Notes index links

Links to all my notes (includes mini-projects and source code etc)

(+) 0001 How do I change the Pi System partition size ?

(+) 0100 Device tree settings

(+) 0201 Power over Ethernet - (PoE)

(+) 0202 Solar Power - (with WiFi)

(+) 0203 Power Bank pass through

(+) 0400 Accessing the SDHC card system image

(+) 0401 Accessing PC shares from the Pi

(+) 0402 Installing samba - (the Pi as a Network Share on your PC)

(+) 0900 Can this approach be scaled up to a PC UPS ?

(+) 1001 Pandora Spotify on the Pi

(+) 1002 Playing movies on the Pi

(+) 1003 Getting VGA from the HDMI socket

(+) 1004 Using the RCA socket

(+) 1005 Using the Pi RS232 serial links

(+) 1006 Using the GPIO pins

(+) 1007 Controlling the Pi Zero ACT LED

(+) 1200 List of standard camera modes

(+) 1300 Auto file names

(+) 6500 How to make the System partition read only ?

(+) 6501 Minimising SDHC corruption on power down

(+) 9000 diode switch

(+) 9001 Auto shut down

(+) 9001 MOSFET switch

(+) C201 High speed photos

(+) Dec 1969 (no desc)

(+) a000 Display setup - (for PhotoFrame)

(+) a001 go photoframe - (how it works)

(+) a002 set photo - (select for display)

(+) a003 go button script - (photoframe pause control)

(+) a005 get photos - (fetch resize)

(+) a00x Other display utilities

(+) c000 CCTV UPS requirements

(+) c001 countering low speed motion detect

(+) c002 Pi Overclocking

(+) c203 Pi ram disk - (tmpfs)



(-) c901 iR illumination


Using iR lamps with the Pi camera

For CCTV users, I would say 'don't bother with iR' = you will get far better results (for half the cost) with a couple of PIR's and some flood lamps (which will also act as a 'deterrent' to any intruders as well)

However if you really need iR illumination - for example to record the activities of nesting birds or some other wild life where you want to avoid bright lights at night, read on.

iR and motion blur

The NoIR Pi camera has a rather low 'near iR' sensitivity, which means using high power iR lamps = for example, a couple of Univivi U06R WideAngle Long Range 130 Feet 6pcs LED Array Lights IR Illuminator or similar (note: with the Pi, you can expect 13ft per unit, not 130ft :-) )

eBay and Amazon sellers of 'CCTV lamps' tend to make wild claims about their products.

Some claim 940nm is 'infrared' (it's not = you need 850nm or lower).
Most claim their products produce an 'invisible' light - well, perhaps 'on the ground', but most iR LED's will give off a quite visible red glow - 805nm less so than the common 850nm - but it means the lamp itself is quire visible if it's within the intruders field of view)
All make nonsense claims about the 'illumination distance' - as a 'rule of thumb', when it comes to iR lamps, just divide any 'distance' claims by 10 .. and then double the number of units you need.

The problem is that at low light levels the Pi will 'integrate' the image over some seconds, leading to motion blur.

The 'solution' is to use your iR lamps as 'strobes'. This means opening them up and separating the LED's from the rest of the circuitry (which can be done with the ones mentioned above). You can then drive a '12v' rated lamp for 1.5mS at 36v every 40mS (25 Hz), assuming the Pi camera is running at 24fps or so.

In dark conditions the Pi camera video operates in a 'rolling shutter' readout process. Running the strobe at 25 Hz against a camera running at 24fps 'guarantees' that every camera frame will be 'exposed' by the flash - however as the strobe is not synchronized to the camera shutter, some part of the frame will be 'double exposed'.

What you will get is a 'band' of double exposure that 'wanders' up the video frame.

The rest of the frame looks perfectly normal, and much more detailed and crisp on moving objects than with normal illumination, due to an effective shutter speed provided by the 1.5 msec strobe, instead of the actual 42 msec shutter time.

Avoiding double exposure

Synchronising the strobe to the camera 'frame-start' can be done using a software phase-locked-loop based on the PTS (presentation timestamp) issued with the image data from the GPU.

For actual working code, see the Pi forums.

This note last modified: 17th Nov 2017 17:30.

[top]

(+) c902 Viewing a video stream

(+) c905 Image anotation

(+) Dec 1969 (no desc)

(+) raspicamdocs.txt (no desc)

(+) s010 Elevation sensing

Next subject :- index

[top]