3

I'm trying to get my raspeberry pi to control a floor fan via IR. I'm stuck on getting the IR codes to be emitted through the IR LED. I'm not able to get the IR LED to turn on at all. I'm checking that it's burning by using an app on my phone. (I've verified the app is working by testing it with the fan's remote, I can see the remote's ir bulb going off when pressing the button)

I've setup my breadboard to turn on a normal LED which works but when I swap the LED with an IR LED I don't get anything. Below is the setup for the normal LED. I've tried 100 - 1kohm resistors, but no luck. I've swapped out the IR LED for others, I've checked and double checked the direction of the IR LED (and tried it both ways to be sure). I've gone through many tutorials with no luck.

It seems like this should be really easy which makes me think I'm missing something pretty simple. This is my first project with a raspberry pi and working with circuits. Any help would be very much appreciated.

enter image description here

Kywillis
  • 141
  • 3

2 Answers2

2

Check the specs for your IR LED.

Mine needs far more than the 20 mA or so available from a Pi GPIO to illuminate.

joan
  • 71,852
  • 5
  • 76
  • 108
2

You could help yourself a huge amount in the future by NOT buying electronic components from Amazon (or anyone else) that does not supply a spec sheet for the parts they sell. There are many vendors that specialize in electronic components, and sell them at reasonable prices. As an added incentive, you'll also find that the more reputable vendors also deal in reputable parts from reputable manufacturers - instead of no-names that sell electronics and shoelaces out of the same dump. I hope I've made my point clear :)

All of that said, the laws of physics suggest that there won't be huge differences between 5mm 940nm (IR) LEDs, regardless of who makes them. And if you consulted a reputable vendor of electronic components, you could find a list similar to this one, and a spec sheet like this one. The spec sheet for this 5mm 940nm IR LED indicates that you will need to source or sink about 100mA of current to drive this part properly.

As @joan has stated, you won't get 100 mA from a GPIO pin on the Raspberry Pi. Instead, you will need to use the GPIO output to drive a switch capable of handling the voltage and current this LED requires. This is a frequently-asked-question here, and here's one answer that's fairly close.

Please review this answer. If you have further questions, I would suggest that you edit your question to add a proper schematic instead of photos of wires and parts; the photos simply don't communicate enough information to allow us to help you much.

Seamus
  • 23,558
  • 5
  • 42
  • 83