sp00n_
Posts: 1
Joined: Wed May 09, 2018 8:26 pm

IR-CUT GPIO day/night

Wed May 09, 2018 8:57 pm

hello good people !

Purchased one of these IR-CUT camera https://www.ebay.co.uk/itm/Raspberry-Pi ... 2749.l2649

sudo nano /boot/config.txt
and append:

disable_camera_led=1 / disable_camera_led=0

If i do the above with a reboot I can switch between day / night, hear the little mechanical click.

There is a pin for a GPIO im wondering if anyone could link me to a script where I can toggle day/night without a reboot if possible im using :-
raspberry pi zero w
IR-CUT night camera with only 1 LED attached for now ( concerned about the power draw as it will be outside on batteries eventually and 1 seems to work well)
rpi-cam-web-interface << really nice interface ;)
rpi stretch

needs to be fairly simple ssh in perhaps run a script to enable night or day, allow it to carry on recording.. :roll:


I have spent a few hours googling and looking over the forum I have come across 1 or 2 posts which seem to fit the bill however i think asking when in doubt might be better before i fry my rpi :D

pcmanbob
Posts: 9465
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: IR-CUT GPIO day/night

Fri May 11, 2018 6:35 pm

Hi.

I doubt there is a ready made program to do this for you as if there was it would be supplied by the camera supplier.

but form the linked page.
During the day you can toggle the mode to Normal Mode by setting a chosen GPIO pin High, this disables the IR filter removing colour distortion from the filter. During the night, simply toggle the GPIO pin Low and the IR filter is enabled
you could do it with the 2 simple programs below.

DAY

Code: Select all

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(8, GPIO.OUT)
GPIO.output(8, GPIO.HIGH)
print " Day mode"

NIGHT

Code: Select all

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(8, GPIO.OUT)
GPIO.output(8, GPIO.LOW)
print " Night mode"

you could even automate this using a simple LDR/ resistor circuit that has a set point for switching or even by timed execution using cron.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Camera board”