7fh3498f
Posts: 28
Joined: Sat Apr 14, 2018 10:09 am

How to turn off Camera IR LEDs?

Thu Oct 18, 2018 7:06 pm

Hi guys

i just bought camera from Aliexpress. It's this one:

https://www.aliexpress.com/item/New-Ras ... 4c4d9bterb

Hope putting link is OK.

The camera has those IR LEDs on the sides always on, no matter if it is a day or night. The thing is that camera is going to be used few times a year so there is no reason to have those LEDs always turned on.

I have tried adding

Code: Select all

disable_camera_led=1
to the

Code: Select all

/boot/config.txt
file but that does not change anything. Still LEDs are always on.

Any clues guys how to turn off those side, infrared LEDs?

Thank you.

User avatar
rpdom
Posts: 12856
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: How to turn off Camera IR LEDs?

Thu Oct 18, 2018 7:08 pm

Those LEDs have a light sensor connected to each one, so they shouldn't turn on unless it is dark. There is no other way of controlling them without modifying the hardware.

7fh3498f
Posts: 28
Joined: Sat Apr 14, 2018 10:09 am

Re: How to turn off Camera IR LEDs?

Thu Oct 18, 2018 8:03 pm

rpdom wrote:
Thu Oct 18, 2018 7:08 pm
Those LEDs have a light sensor connected to each one, so they shouldn't turn on unless it is dark. There is no other way of controlling them without modifying the hardware.
Are you suggesting that my setup might be broken and i should return the camera?

By the way auto night mode works with no issues...

lbdroidman
Posts: 13
Joined: Wed Oct 17, 2018 7:46 pm

Re: How to turn off Camera IR LEDs?

Fri Oct 19, 2018 8:20 pm

7fh3498f wrote:
Thu Oct 18, 2018 8:03 pm
rpdom wrote:
Thu Oct 18, 2018 7:08 pm
Those LEDs have a light sensor connected to each one, so they shouldn't turn on unless it is dark. There is no other way of controlling them without modifying the hardware.
Are you suggesting that my setup might be broken and i should return the camera?

By the way auto night mode works with no issues...
Probably not broken.
If you look very carefully at the IR modules, you will see a silver component with a cross-shaped cutout in the middle in which you can fit a small-ish phillips head screwdriver. Those are for adjusting the point (ambient brightness) at which the LEDs turn on and off.

And be aware that those are the CRAPPIEST adjustment screws that this world has ever seen. It is unbelievably impossible to adjust them properly.

Further, be aware that if you do adjust them for a sensible on-off brightness level, then the LEDs will NOT be able to achieve maximum brightness. But this is probably not a bad thing, because when those LEDs hit full brightness, they get blazing hot.

User avatar
bensimmo
Posts: 3317
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: How to turn off Camera IR LEDs?

Sat Oct 20, 2018 10:35 am

7fh3498f wrote:
Thu Oct 18, 2018 7:06 pm
Hi guys

i just bought camera from Aliexpress. It's this one:

https://www.aliexpress.com/item/New-Ras ... 4c4d9bterb

Hope putting link is OK.

The camera has those IR LEDs on the sides always on, no matter if it is a day or night. The thing is that camera is going to be used few times a year so there is no reason to have those LEDs always turned on.

I have tried adding

Code: Select all

disable_camera_led=1
to the

Code: Select all

/boot/config.txt
file but that does not change anything. Still LEDs are always on.

Any clues guys how to turn off those side, infrared LEDs?

Thank you.
Using that switches the IR filter on and off (it moves it out the way).
With the IR filter on, you'll not see in the dark, with it off you'll see in the dark but get a pink colour to you image.
This can also be set by wiring up a gpio pin if more control is needed.

The LEDs are always on, but current to them is altered by the light sensor, it is full automatic.
You'll need to take them off the camera and switch them via a gpio and a circuit to turn them on and off.


It is not fault, it is the design.

They are want are known as Waveshare IR-CUT
https://www.waveshare.com/wiki/RPi_IR-CUT_Camera
Or a variation of one.
(In the picture it seems to have an extra light sensor, I'm guessing that automatically moves the IR filter in and out? So your camera_led setting may disable that)

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Sat Oct 20, 2018 11:50 am

bensimmo wrote:
Sat Oct 20, 2018 10:35 am

The LEDs are always on, but current to them is altered by the light sensor, it is full automatic.
You'll need to take them off the camera and switch them via a gpio and a circuit to turn them on and off.
I have the same concern with the same IR Led. I had exactly the same idea as you describe.
I want to block the light sensor (put duck tape or whatever in front of it) and link both screws holes to RPi.
One to GPIO, other one to ground. According to the measure I got, the LED receives 3.3V from the camera, exactly what's the GPIO delivers if I'm not wrong, so far so good.

So does it makes sense? Is it what you've suggested bensimmo?
Do I need to add a resistor between the GPIO and the LED? Is there polarity?

Thank you in advance.

User avatar
rpdom
Posts: 12856
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: How to turn off Camera IR LEDs?

Sat Oct 20, 2018 12:05 pm

zetoune wrote:
Sat Oct 20, 2018 11:50 am
One to GPIO, other one to ground. According to the measure I got, the LED receives 3.3V from the camera, exactly what's the GPIO delivers
The GPIOs can safely deliver up to about 16mA each (50mA total). The LEDs need a lot more than that. You'd need a separate power supply and switching transistor to control them. Even the 3.3V power pins on the GPIO connector aren't rated high enough to drive those LEDs correctly.

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Sat Oct 20, 2018 12:48 pm

So it is possible to connect the LED to camera and use the GPIO as a switch between both?

User avatar
bensimmo
Posts: 3317
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: How to turn off Camera IR LEDs?

Sat Oct 20, 2018 5:02 pm

Technically the LEDs are pulling more power than the camera cable/setup on the Pi was designed for (that came from an RPI engineer).
It's why everything, especially a PiZero get very hot when using them.

I would measure what the LEDs need, they are LEDs so have a positive and a negative.
Unfortunately I cannot test at the moment (yes I have some).
The big lens over the LED just pulls off so you can see what is under it.

I would look at powering them from the 5V/GND pins, it should be able to deliver the power once adjusted down to 3V3, the LED may take 5V, I have no idea but its not worth testing to find out (they will blow if they cannot).
Then use a gpio to switch that circuit on and off.

You will need to find out/work out a safe circuit.

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Sun Oct 21, 2018 1:27 pm

Should I use this circuit (Obviously, I have to figure out what values I need for resistors).

I know the LED receives 3.3 V from the camera. Not sure about the current.
They are rated 3W, it means they should draw ~ 1A.

Is my assumption correct?
According to this post, it could be possible that LED is not 3W.

Edit:
I've measured few things with my DC Clamp Meter.
Not sure if the current measure is reliable though. My meter lowest selection is 40A.
Image

Image
Do you think I make the calculation for the circuit, based on these values?

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Tue Oct 30, 2018 2:29 am

I've searched on Internet for this IR LED real specs and can't find anything except the High Power 850m 3W.

So, should I rely on the metrics I got or the 3W it's rated?


Edit:
Actually, I've just found it on this forum.
viewtopic.php?p=1366913#p1366913
ragnarjensen wrote:
Mon Sep 17, 2018 6:36 pm
... They are 1W, pulling about 350 mA when going full tilt. ...

Janet951
Posts: 1
Joined: Sat Oct 20, 2018 6:46 am

Re: How to turn off Camera IR LEDs?

Wed Oct 31, 2018 5:07 am

I find when enabling/disabling the IR Light checkbox, to get it to take effect right away I have to cycle the camera in & out of day/night mode. Never had to reboot. mybkexperience
Last edited by Janet951 on Fri Nov 02, 2018 4:16 am, edited 1 time in total.

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Wed Oct 31, 2018 12:08 pm

Janet951 wrote: I find when enabling/disabling the IR Light checkbox, to get it to take effect right away I have to cycle the camera in & out of day/night mode. Never had to reboot.
What do you mean by "IR Light checkbox"?

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Fri Nov 02, 2018 9:19 pm

Still searching for a solution.
I've been told that a 3.3V regulator should be enough because it has already transistors on its own PCB. It must already control the current and voltage.
It seems to be logical because it's normally only screwed to the camera which provides 3.3V (sees OP's first post)
After reading the datasheet of the regulator (LD1117V33), I gave it a try.

This is the circuit:

Image

IR LED doesn't light up and Voltmeter reports 2.2V as soon as the IR LED is plugged.
When I remove the LED from the circuit, Voltmeter reports 3.3V.
What do I do wrong?

EDIT:
I found the issue. The problem is that I've trust the + and - symbols on the PCB of the LED. There are actually inversed. Now the LED lights up.
Time to add the transistor and drive it with the GPIO.

zetoune
Posts: 14
Joined: Sun May 27, 2018 9:50 pm

Re: How to turn off Camera IR LEDs?

Mon Nov 05, 2018 4:47 am

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?

Thank you.
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.

Image

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

#! /bin/sh
#   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

sleep 30

# 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.

Return to “Beginners”