eburton1
Posts: 22
Joined: Wed Sep 23, 2020 12:18 am

How can I modify this to work with 940 nm IR lights?

Wed Apr 21, 2021 11:21 pm

I am trying to add infrared lights to my wildlife camera to allow me to use it at night. I have a bunch of 940nm IR LEDs (tech specs: https://cdn-shop.adafruit.com/datasheet ... asheet.pdf) and was hoping to basically modify this tutorial using my 940's https://www.sparkfun.com/news/1396. I need to illuminate a 1m^2 plot from 1.5m away. I think I can do this with 8-10 940 nm LEDs, but since the 940's draw more current (100mA vs. 10mA) I know I need bigger resistors and a higher rated transistor, but how big? How do I calculate this? I am really out of my element, so if anyone has references that include pictures that would really help.

Has anyone done something similar to this before? My ultimate goal is to have the PIR sensors that trigger the camera to record to also trigger the lights to flash while the video is recording. I plan on recording 5-10 second long videos. I would like to power the lights via my raspberry pi, as this is more user friendly for me, but if there are alternative suggestions, I am open.

User avatar
rpdom
Posts: 18701
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How can I modify this to work with 940 nm IR lights?

Thu Apr 22, 2021 6:50 am

Three of those LEDs in series, as per the example, would take around 4.2V at 100mA. Powering that from 5V would mean dropping 0.8V at 100mA across a resistor. An 8 Ohm resistor would do that. The closest standard values are 7.5 Ohm and 8.2 Ohm. I think the 7.5 would be sufficient as there will be some voltage loss across the transistor anyway.

I'd use 9 LEDs as that simplifies things to just three equal chains.

As for the transistor, I'd go with one per chain of LEDs and switch to using a MOSFET instead of an ordinary transistor. They are easier to drive and are better at handling the power. Three 2N7000s should handle the load easily. No resistor is needed between the MOSFETs and the GPIO.
Unreadable squiggle

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

Re: How can I modify this to work with 940 nm IR lights?

Thu Apr 22, 2021 9:02 am

I would suggest adding a 10K resistor between the gate pin on the mosfet and ground , so the pin is not left floating while the pi is booting.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
rpdom
Posts: 18701
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How can I modify this to work with 940 nm IR lights?

Thu Apr 22, 2021 9:55 am

pcmanbob wrote:
Thu Apr 22, 2021 9:02 am
I would suggest adding a 10K resistor between the gate pin on the mosfet and ground , so the pin is not left floating while the pi is booting.
Good point, yes.
Unreadable squiggle

eburton1
Posts: 22
Joined: Wed Sep 23, 2020 12:18 am

Re: How can I modify this to work with 940 nm IR lights?

Fri May 07, 2021 3:55 pm

Just received my parts. I've already tried a few times to get it working, but I don't think I know how to set up the circuit properly with 3 transistors. Ideally, I'd like to control all the lights from one GPIO pin, and only use one 5V and 1ground pin. I'm attaching an image (I think...)---am I placing things properly? I tried this set up with only one transistor (left row) and it worked for a little bit, but now it's not working, and I'm not sure how to add the other transistors into the circuit (my instinct is to make 3 new circuits from each chain, but I know that's over complicating it).

Sorry if my shoddy tech skills are offensive! I am super new to this!

Image

drgeoff
Posts: 11938
Joined: Wed Jan 25, 2012 6:39 pm

Re: How can I modify this to work with 940 nm IR lights?

Fri May 07, 2021 4:19 pm

You need at least 3 wires between RPi and breadboard. You only have two. The commoned ends of the 7.5 ohm resistors don't go anywhere. And the white wire doesn't appear to connect to anything on the breadboard. And in each group of 3 LEDs only the middle one does not have their two legs shorted by the breadboard.

Looks like you don't fully understand that the breadboard contacts connect 5 holes in a vertical line. Eg holes 30a, 30b, 30c, 30d and 30e are connected to each other and to nothing else.
Last edited by drgeoff on Fri May 07, 2021 4:27 pm, edited 3 times in total.
Quis custodiet ipsos custodes?

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

Re: How can I modify this to work with 940 nm IR lights?

Fri May 07, 2021 4:24 pm

Your circuit is all wrong.

you need to build this.

Image

then setting gpio 16 high will turn on your LEDs
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

eburton1
Posts: 22
Joined: Wed Sep 23, 2020 12:18 am

Re: How can I modify this to work with 940 nm IR lights?

Fri May 07, 2021 5:23 pm

pcmanbob wrote:
Fri May 07, 2021 4:24 pm
Your circuit is all wrong.

you need to build this.

Image

then setting gpio 16 high will turn on your LEDs
How does this work for 9 LED's though? Do I need to build this circuit 3 times? And do you have any resources you recommend for learning how to move circuit drawings onto a breadboard? Because I want to make sure this works before soldering, but I don't know how to fit it all on my breadboard...

Thank you both so much for helping!

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

Re: How can I modify this to work with 940 nm IR lights?

Fri May 07, 2021 5:35 pm

I would start by building it for 3 LEDs, once that works then you can try adding the other two 3 LED strings one at a time.

You might get all 9 LEDs working on one transistor , as I am not familiar with the 2N7000 I can say for sure.

If you are having problems converting the diagram in to a physical layout on a breadboard I might be able to show you a simulation ( I don't have the exact components required ) on a breadboard for you to follow.

If that would help then let me know.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

drgeoff
Posts: 11938
Joined: Wed Jan 25, 2012 6:39 pm

Re: How can I modify this to work with 940 nm IR lights?

Fri May 07, 2021 5:48 pm

eburton1 wrote:
Fri May 07, 2021 5:23 pm
And do you have any resources you recommend for learning how to move circuit drawings onto a breadboard?
https://learn.sparkfun.com/tutorials/ho ... dboard/all
https://learn.sparkfun.com/tutorials/ho ... -schematic
Quis custodiet ipsos custodes?

eburton1
Posts: 22
Joined: Wed Sep 23, 2020 12:18 am

Re: How can I modify this to work with 940 nm IR lights?

Sat May 08, 2021 5:55 pm

pcmanbob wrote:
Fri May 07, 2021 5:35 pm
I would start by building it for 3 LEDs, once that works then you can try adding the other two 3 LED strings one at a time.

You might get all 9 LEDs working on one transistor , as I am not familiar with the 2N7000 I can say for sure.

If you are having problems converting the diagram in to a physical layout on a breadboard I might be able to show you a simulation ( I don't have the exact components required ) on a breadboard for you to follow.

If that would help then let me know.
That would be extremely helpful, if it is no trouble to you! Even just a rough drawing of where pieces go would be helpful

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

Re: How can I modify this to work with 940 nm IR lights?

Sun May 09, 2021 10:50 am

So I laid this out on a breadboard using similar looking components, just as a visual representation.

Image

Image

Image

shot from 3 angles to try and show were each component is placed in relation to the others, take not of the flat side on the LED's this is important.

Hope this helps.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Beginners”