I am working on a project in which I am driving 6 ultrasonic sensor 4 of them are NPN (NC) and 2 of them are NPN (NO) ,for safety of the MCU I am using optocoupler EL817 for isolation between sensors and MCU but I am going through very unreliable behaviour of the circuit ,my all sensors work initially but after some time 2 of them does not give proper output voltage I am using pull-up circuitry as mentioned in the
, technically when there is input from sensor the output pin of optocoupler give voltage reading LOW and when there is no input from sensor output voltage at the optocoupler output pin will be 3.3V (Vcc) but optocoupler circuit for 2 sensors initially show correct voltage but after some time even there is input from sensor output voltage at optocoupler output pin show (2.9) V but it should show (0.70V) and if I put sensors in LOW voltage from 2.9V change to 3.3V So I think this voltage swing is due to improper calculations of resistors in the optocoupler circuitry Suggest me if is there any other factor . Please suggest me how I can calculate Ic , If , RL and RD for the optocoupler circuit
- NPN (NO) sensor operating voltage 10-30 V I am operating at 24V
- NPN (NC) sensor operating voltage 10-30 V I am operating at 24V 3.Output current of both sensor <200mA 4.MCU GPIO pin current 8mA
- VCC is 3.3 V
- In my case input from sensor is 24V and Rd=2.6K and RL=4.7K