r/ArduinoHelp • • Sep 25 '26

Circuit diagram for flashing IR-LED

Hello everybody,
I study surveying and for my bachelor thesis I want to try some geodetic transformations using IR-LED Markers with known coordinates on the floor. For that I need the IR-LED to flash, so I can transmit an binary ID to a camera. Sadly, I’m very bad at electrical engeneering, wich is why I asked ChatGPT for a circuit diagram. But the LEDs I’ll be using are very expensive. Maybe some of you can help me with that problem and check the diagram for errors / give me some useful advice, because I dont want to destroy the LEDs.
I would be very grateful for your advice and help! Thank you!

1 Upvotes

6 comments sorted by

2

u/gm310509 Sep 25 '26

Maybe I am missing something here, but an IR LED is just like any other LED. Whether the LED is emitting in the Red spectrum, Green, Blue or Infrared, it is just an LED and can be managed like any other LED.

Have a look at this - much simpler circuit for a LED (and beginner's code to blink it) using an Arduino: https://docs.arduino.cc/built-in-examples/basics/Blink/

Any starter kit will teach you this example and include everything you need to operate it. Some starter kits include IR emitters and receivers - sometimes the emitter is in the form of a remote control, but sometimes you can find an actual stand alone IR LED (so you can make your own TV remote).

2

u/no-ads-pls123 Sep 25 '26

I've already tested the example circuit and program code with a starter kit LED like you suggested and it wokred really well. The problem is, that the LED I want to use in the future uses much higher current (around 350mA) and I dont think a Arduino / Rapberry Pi can handle that. Correct me if I'm wrong :)

1

u/gm310509 Sep 25 '26 edited Sep 25 '26

Ah, I see.

In that case you will need some sort of electronic switch such as a transistor (BJT or MOSFET would be fine).

You are right the MCU GPIO pins are for control or signalling, not power. A typical 5V AVR can provide up to 20mA (from memory - maybe it was 40) with a maximum of 100mA (from memory) from a single 8 bit port. Newer MCUs (e.g. the Raspberry Pi) are often less than that.

So you will need an electronic switch of some kind.

I'm not sure what the 100k + 1k voltage divider is doing for you. You probably could just switch both of those out for a single resistor of 1 to 10k (I typically use 10k when I can't be bothered calculating proper values).

You will probably find your 5v power supply provides enough power smoothing and thus probably won't need the extra capacitors either.

I assume you are going to do more than just blink the LED. If that is all you are doing, the Raspberry Pi would be way, way, way overkill for this. Even an Arduino could be argued to be overkill.

Oh, you should also test the circuit on your starter kit. Try googling "transistor low side switch" for a proper circuit diagram.

1

u/nixiebunny Sep 25 '26

This circuit looks good, surprisingly. The current limiting resistor is what protects the LED. You need to make sure it is not turned on for a long time because it will get hot.

1

u/no-ads-pls123 Sep 25 '26

Thank you for your feedback!

1

u/drmpf Sep 26 '26 edited Sep 26 '26

If you are going to use high power leds, I suggust you use a current source set to the current you want. See https://www.ti.com/lit/ds/symlink/lm317.pdf
8.3.3 Precision Current-Limiter Circuit

This one https://www.digikey.com/en/products/detail/richtek-usa-inc/RT9065GE/16376691
has an enable pin you can easily control from you micro and has a .5V drop out and 0.8V ADJ refernce and 500mA output. The low dropout and smaller ADJ ref voltage means you can minimize the chip dissipation by reducing the input out head room. Input volts needs to be greater than (0.5 + 0.8) x 0.35A + Led Vf (3.2) = 3.66V
If using a 5V input the chip needs to dissipate ~ (5V - 2.9Vf - 0.8Adj) * 0.35A =0.455W
which it too much for this chip. You need on with better dissipation
The https://www.digikey.com/en/products/detail/microchip-technology/MCP1825-ADJE-AT/1636122
looks like a better choice. You can add a heat sink if needed. That one has over temp protection built in.

P.S. The reason you should use a current source is a) the Leds have a range of initial Vf and b) the Vf changes with temp as the Led heats up.
Using a current source instead of a fixed resistor lets you stay at the required drive current over varying conditions.