I'm trying to get the IR sender to work with an ESP32. I got the receiver working (I pointed a couple of remotes at it and pushed some buttons) but the sender won't work. I ordered all of the parts as specified in the video except for the 33 ohm resistor so i'm using three 100 ohm resistors in parallel.
I'm getting all of the expected serial output and the on-board LED is flashing but the receiver does not acknowledge any input. I have an inexpensive DVM with a scope on it (Fnirsi 2C23T). I captured the picture below across the emitter diode. This is with the 2N2222 transistor but I also tried with the TN0702 MOSFET with similar results.
It looks to me like something's not fast enough. Does anyone have any ideas on what I might be able to change to get this to work?
Never mind. Looks like I had the diode in backwards. I thought I had tried turning it before.
Hey! hopefully your issue is ressolved but I want to reply for the reader if they have the same issue..
Getting IR senders to behave can be a bit of a headache at first. Before you dive too deep into the code, here are a couple of 'quick checks' that usually save me:
First, try looking at your IR LED through your phone’s camera while the code is running. Most phone sensors can pick up IR light as a faint purple flicker—if you don't see anything, it’s likely a wiring issue or a dead LED. Also, double-check the orientation; it’s surprisingly easy to swap the anode and cathode on those little diodes!
Another big one is the modulation frequency... Most receivers are tuned to 38kHz, so if the code isn't pulse-width modulating correctly, the receiver will just ignore the signal. If you're using Arduino, I highly recommend checking out this IRremote library guide, it’s the gold standard for getting the tining and protocols (like NEC or Sony) right without pulling your hair out. 😊
A Electrical engineer who loves the robots and drones
I just took a closer look at these diodes. The anode should have a longer lead. The cathode should be on the flat side of the diode. These have the flat on the same side as the longer leg. Turns out that's the cathode. I had inserted the diode assuming the longer leg was the anode.
Thanks for the information about the phone camera. That should be useful.
