Glen Pitt-Pladdy :: BlogRaspberry Pi Camera, IR Lights and more | |||
I've been building up some Raspberry Pi based IP cameras using motionEyeOS which makes it easy to have a much better IP cam than you will get most places without the cost of high-end cams. Most important, it's maintainable which reduces the risks many IOT devices have. When it comes to hardware, having an IR-Cut camera is nice. These have a solenoid activated IR filter that can be used for good colour in bright conditions, but in low light allows the broadest spectrum for maximum visibility as well as IR lights to be used. IR LightsThe basic IR lights (LED based) that seem to be widely sold are a small module with an LDR, pot to adjust sensitivity and an LED with a lens to disperse the light. The lens pulls off revealing the LED below. Also note that there is an IR filter over the LDR which will help stop the light reflecting back from causing it to turn off again, as well as suppressing other IR sources. The schematic (roughly traced) is simple:
But at the same time this has some problems as noted on many sites / videos:
So, to solve this I cobbled together a quick drive circuit of my own:
How it works:
This can be easily put together on a small piece of strip-board or similar and fits easily with the rest of the bits: To build this all the components except the LED were removed from the IR Light boards and then wired onto the driver board. A small piece of aluminium provides heatsinking, though in this (two-LED) configuration it's more safety if anything goes wrong than necessary. Operating IR-CutA small script started at boot (see Tweaks in motionEyeOS for how to launch this) checks the GPIO and provides some timing on activating IR-Cut. In low light (IR on) it removes IR-Cut immediately, but when it gets bright it requires minutes before it puts in IR-Cut. This avoids excessive switching in marginal light conditions. Other approachesIt did occur to me to add hysteresis, however this requires higher gain to work properly and the sharp turn-on/off (fully on or off) might also result in false triggering of motion detection algorithms processing the image unless it is set to come on in much lower light conditions where the IR would be a negligible contribution to the total illumination. Hysteresis would however be an advantage where flickering light sources are strong enough to cause unwanted switching which the filter is not sufficient to combat. |
|||
Disclaimer: This is a load of random thoughts, ideas and other nonsense and is not intended to be taken seriously. I have no idea what I am doing with most of this so if you are stupid and naive enough to believe any of it, it is your own fault and you can live with the consequences. More importantly this blog may contain substances such as humor which have not yet been approved for human (or machine) consumption and could seriously damage your health if taken seriously. If you still feel the need to litigate (or whatever other legal nonsense people have dreamed up now), then please address all complaints and other stupidity to yourself as you clearly "don't get it". This site uses cookies stored for for generating usage statistics and makes use of Google Analytics with it's own policies.
Copyright Glen Pitt-Pladdy 2008-2021
|
Comments: