hi i am controling opto isolater by 89s52 controller port 2 pin number 0.
my problem is when i connect controller input to P2^0 controller p2^0 hav suddne voltage chnge from 5 v to 1v and switching only 1v to 1.5v and if i dont connect opto input to controller pin it switching between 5v to 0v whts the reason for that can any one help me
hi i am controling opto isolater by 89s52 controller port 2 pin number 0.
my problem is when i connect controller input to P2^0 controller p2^0 hav suddne voltage chnge from 5 v to 1v and switching only 1v to 1.5v and if i dont connect opto input to controller pin it switching between 5v to 0v whts the reason for that can any one help me
There is an IR LED at the input of an opto isolator which has a forward volatge about 1V to 1.5V.
When I need to use an optoisolator I connect the input LED anode to Vcc (5V) and I add a resistor between its cathode and the MCU pin. So when the pin is low, the opto output will be activated. The value of the resistor can be calculated if you know the IR LED current (supposed to be rather low):
Approximately R = (5-1.5)/I_led