Hi everybody, I'm trying to build a IR reflective proximity sensor.
Here you can find the circuit layout and the code: https://123d.circuits.io/circuits/1998125-ir-led-sensor/
To pulse the led at 38khz (the IR receiver has a Band-pass filter) I'm using a TIP120. It's a bit overkill for this application, but that's what I had at home :)
The IR LED I'm using has a Continuous Forward Current of 100mA. (https://cdn-shop.adafruit.com/datasheets/IR333_A_datasheet.pdf)
The Forward Voltage is around 1.6V so: R = (5 - 1.6) / 0.1 = 34 I used a 39 ohm resistor
The sensor doesn't seem to sense the light even if I can tell the LED is on (my phone's camera detect a bit of IR light). BUT, if I use a 220 ohm resistor it works, although the sensor is not very sensitive.
I measured the current in the LED: With the 220 ohm resistor it's around 7mA (I was expecting 15, but I guess as I'm pulsing the led with a 50% DC, 7 is correct) With the 29 ohm resistor it's around 33mA
I don't know why the sensor is not working with the 39 ohm resistor, I guess there could be some transient somewhere (the TIP120 maybe?) and the LED doesn't blink at 38khz..
Thanks you in advance :)