I've finally found a solution that fits my need. But I guess it should do the trick for OP's question.
7fh3498f wrote: ↑
Thu Oct 18, 2018 7:06 pm
Any clues guys how to turn off those side, infrared LEDs?
I'm a newbie in electronics so experts can correct me if I'm wrong.
This is the circuit I've created. Nothing new. Almost all the searches I've made point to a similar circuit. But I didn't want to plug wires without understanding what I was doing.
Be sure to obstruct the light sensor of the IR LED. We want to have a closed circuit all the time to control the IR Led.
I think we can get rid of the regulator if the IR Led is plugged directly to a camera that can drive it (such as what OP bought). I think NoIR official cam can't.
I've used :
- A regulator (LD1117V33). To give 3.3 V to IRLEd (from 5V pin)
- A transistor (2N2222) - EBC. It can support up to 800 mA which is fine. IR LED should draw up to 350 mA max.
- A resistor 1K Ohm (between Transistor Base and GPIO pin). To avoid the RPi pin to receive too much current.
According to IR LED specs:
Operation voltage: 3.3V
Power consumption: 320 mA
The light is off when the raspberry starts. I can turn it on for 30 seconds with this script.
Code: Select all
# Exports pin to userspace
echo "18" > /sys/class/gpio/export
# Sets pin 18 as an output
echo "out" > /sys/class/gpio/gpio18/direction
# Sets pin 18 to high (Light the LED up)
echo "1" > /sys/class/gpio/gpio18/value
# Sets pin 18 to low (Turn the LED off)
echo "0" > /sys/class/gpio/gpio18/value
# Clean up
echo "4" > /sys/class/gpio/unexport
I've measured current of GPIO and LED when the circuit was closed.
GPIO: 2.3 mA
LED: 210 mA
Hope that helps.