Maker Pro
Maker Pro

I need help with a circuit

Jgberg

Oct 27, 2023
2
Joined
Oct 27, 2023
Messages
2
Would this IR circuit work for an Arduino? Are any more parts recommended or is it fine how it is? I've seen capacitors added to similar circuits, but not sure where those would be placed.

Screenshot (254).png
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,632
Joined
Nov 17, 2011
Messages
13,632
Would this IR circuit work for an Arduino?
In principle yes - depending on what it is supposed to do.

I've seen capacitors added to similar circuits,
Add a 1 µF or bigger capacitor between 5 V and GND. This will help to supply curent peaks when the LEDs are turned on.

You can improve the efficiency of the circuit considerably: Instead of using two IR-LEDs in parallel, put them in series. The voltage drop will increase from ~ 1.6 V to ~3.2 V, therefore reduce the series resistance accordingly. Like so:
1698392671060.png
You will then need only 4 transistors and the base current (drive current from the Arduino output) will be reduced accordingly. With 4 transistors you can increase the number of LEDs to 16 instead of the 14 you have now. Or use 14 LEDs, the last transistor will then drive only 2 LEDs, not 4.
 

Jgberg

Oct 27, 2023
2
Joined
Oct 27, 2023
Messages
2
In principle yes - depending on what it is supposed to do.


Add a 1 µF or bigger capacitor between 5 V and GND. This will help to supply curent peaks when the LEDs are turned on.

You can improve the efficiency of the circuit considerably: Instead of using two IR-LEDs in parallel, put them in series. The voltage drop will increase from ~ 1.6 V to ~3.2 V, therefore reduce the series resistance accordingly. Like so:
View attachment 61236
You will then need only 4 transistors and the base current (drive current from the Arduino output) will be reduced accordingly. With 4 transistors you can increase the number of LEDs to 16 instead of the 14 you have now. Or use 14 LEDs, the last transistor will then drive only 2 LEDs, not 4.
Awesome, Thank you for the info! Would you by chance know if I would have to increase the ohm value and for a 16 LED circuit, would you by chance know the current draw? Would this circuit work on a 300mA supply?
 

Martaine2005

May 12, 2015
4,888
Joined
May 12, 2015
Messages
4,888
Use Ohms law to calculate the total current.
Or make the circuit and measure the total current.
But you have to specify what brightness you require therefore altering the mA to each LED.
You may find that 5mA is bright enough or 15mA etc.
Have a good read HERE to get a good understanding.
We use V for voltage so V=IxR whereas the formula from Fluke use E for voltage so E=IxR (same thing).

Martin
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,632
Joined
Nov 17, 2011
Messages
13,632
Would you by chance know if I would have to increase the ohm value and for a 16 LED circuit,
We have a resource on driving LEDs. Read all the info you need there.
When you add 2 LEDs in series, as I proposed, the voltage drop across the resistor is less than with a single LED. Therefore the resistance needs to be lower for the same current.
would you by chance know the current draw?
That's up to you. You define the current through the LEDs, then calculate the resistors accordingly, see the resource I linked.
In your circuit you have ILED = (5 V -1.6 V)/ 220 Ω = 15 mA (1.6 V being the typical voltage drop across an IR-LED).
With 2 LEDs in series the calculation goes: R = VR / ILED = (5 V - 2 × 1.6 V) / 15 mA = 120 Ω
 

bertus

Moderator
Nov 8, 2019
3,259
Joined
Nov 8, 2019
Messages
3,259
Hello,

IR leds may have different specs than standard leds.
There are IR leds that allow peak currents of 100 mA.
Read the datasheet of your IR led for a decent current.

Have a look at the attached VISHAY datasheets.

Bertus
 

Attachments

  • VISHAY_TSUS5200_TSUS5201_TSUS5202.pdf
    111.6 KB · Views: 0
  • VISHAY_tsal7200.pdf
    99.8 KB · Views: 0

loadhead

Nov 27, 2023
28
Joined
Nov 27, 2023
Messages
28
It looks like possibly you want a fair bit of power here?

So you would external power it, not use the arduino power, and just run the transistors with the arduino out, then itll work for sure.
 

roughshawd

Jul 13, 2020
458
Joined
Jul 13, 2020
Messages
458
When you decide on the reason behind having all these LEDs, maybe you should add a dimmer and a terminator to the line so it doesn't do ump every thing to ground when you turn it on. They say diodes are a good choice, and functional circuits are important to stay in the loop.
 

mineymoe

Nov 14, 2023
10
Joined
Nov 14, 2023
Messages
10
Lots of great advice here from others! Definitely check the LED specs and do your calculations. With some tweaks to drive them properly it sounds like this could work for your project.
 

Alec_t

Jul 7, 2015
3,580
Joined
Jul 7, 2015
Messages
3,580
The post #1 set-up will draw about 30mA from the Arduino Data pin. Is that ok?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,632
Joined
Nov 17, 2011
Messages
13,632
Is that ok?
It is not.

An Arduino can supply 20 mA continuously, 40 mA peak.
Here's where my scheme from post #2 comes in handy by reducing the current requirements from the Arduino's output pin by a factor of 2.
 

Kiwi

Jan 28, 2013
468
Joined
Jan 28, 2013
Messages
468
I may be missing something here, but it looks like all the transistors are in parallel from a single Arduino output pin?
Could you just use a single MOSFET to drive all the diodes?
 
Top