Sensor voltage = 24V. Optocoupler LED forward voltage (V_F) = 1.2V. Desired I_F = 15mA. R1 = (Vsupply - V_F) / I_F R1 = (24V - 1.2V) / 0.015A = 1520Ω → Use (standard value). Power = I²R = (0.015)² × 1500 = 0.337W → Use 0.5W resistor.
Features a maximum propagation delay of approximately 8 ns to 35 ns depending on the specific test conditions (e.g., 10 kHz). 1458 optocoupler datasheet
Use a multimeter:
Never exceed the maximum forward current (I_F, usually 50mA). For long life, operate at 5-10mA. Do not exceed reverse voltage (typically 5-6V). Sensor voltage = 24V
When the 24V signal is HIGH, the LED turns on, the phototransistor conducts, pulling the microcontroller pin LOW (active low). When the signal is LOW, the phototransistor is off, and the pull-up resistor makes the microcontroller pin HIGH. R1 = (Vsupply - V_F) / I_F R1 = (24V - 1