Universal InfraRed IoT Learning Remote

Basic Electronics

Calculating the series-resistor for a LED

For every LED, in order to use it properly, we need to know its Forward Voltage. The Forward Voltage (Vf) is the voltage used by the LED when it’s “on”. 

As you can see from the image Vf depends on the color of the LED. 

The Forward Current (If) is the current at which the LED is at its brightest. 

According to Kirchhoff’s Voltage Law (KVL) the voltage used by a circuit, in this case the LED in series with the resistor (R), must be equal to the voltage applied (in the image 5.0 volt). If the (green) LED’s Vf is 2.2 volt, the voltage over the resistor must be 5.0 – 2.2 = 2.8 volt. If the max. current is 20mA the value of the resistor must be 2.8 / 0.02 = 140 Ω.

That is, 140 Ω for the LED at its brightest but even with much less current, say 10mA, the LED will be bright enough. At 10mA the Vf is 2 volt which results in a resistor of 3 / 0.01 = 300 Ω.

As a rule of thumb a 220 Ω resistor is suitable for all red and green  LED’s in the range of 3v3 to 5 volt. 

Calculating the series-resistor for the 4N35

According to the data-sheet of the 4N35 the Vf of the input diode is ~1 volt and If is 10mA. As we drive the 4N35 from one of the GPIO-pins of the ESP8266 the applied voltage is 3v3. The voltage over the resistor is 3v3 – 1 = 2.3 volt. This gives a value for the series resistor of 2.3 / 0.01 = 230 Ω.

The VS1838

This component is called a IR-detector diode but it is far more than only a diode. It has all the circuitry to detect a modulated IR signal and convert the IR signal into a logic output.

Block diagram VS1838
This entry was posted in Arduino, Computer, ESP8266, Hardware, KiCAD, WiFi. Bookmark the permalink.

1 Response to Universal InfraRed IoT Learning Remote

  1. Roland says:

    Hoi Willem!

    Leuk project, ik zocht nog zo iets! Ik wil mijn airco automatiseren op basis van sensoren van de omgeving (daarnaast ook de aansturing van een luchtbevochtiger en de automatische radiatorknoppen) om zo het klimaat op mijn kantoor optimaal te houden. Ik ga er zeker naar kijken!

    Gr, Roland

Leave a Reply

Your email address will not be published. Required fields are marked *