What is your tolerance (± xxx mV) around the switching point of 2.5V?
The circuit below will have better defined switching levels that using a transistor switch.
As you know, the LED current of the opto-coupler (at its input) should be specified first. It will be the collector current of the PNP transistor.
The following note may be not important here.
I noticed you use an MCU pin to control the opto-coupler output.
For 'some' MCUs, at boot, the I/O pins are shorted to ground till Vcc reaches the minimum MCU working voltage after which the pins are likely open (or weakly pulled up to Vcc).
In this case, the minimum Vcc could be about 3V (for nominal Vcc of 5V). So I try keeping the added PNP transistor (as a buffer) off for a control voltage less than 3.5 V, for example. This avoids having an output glitch at start up.
one more optocoupler is used to drive a RELAY and it is controlled by MCU
Do you have an idea about the rated DC voltage of the relay and its coil resistance?
I want to drive a Opto-coupler through a Transistor.
when my input is zero(below 2.5V) the transistor should turn on to drive opto-coupler.
if my input is greater than 2.5V means the transistor turn off.
In this case, a 50mA load is at the Ic limit of the second opto-coupler (say U2).
A transistor could be added (after U2) to drive the relay.
I would like knowing first, if the relation between the state of the MCU pin and of the relay is fixed or not.
If it is fixed (that is you cannot change it in software), by which pin state (low or high), the relay should turn on?
the above circuit is not used to drive a Relay. I connect Diode in my Relay driver circuit..also connect a reverse=biased diode across the relay coil
From your circuit on post #11, I see a switch that could be closed (0V and 0 Ohm) or opened (0V and infinite resistance).
Is this your actual circuit?
Or is this switch (J1) drawn as an equivalent element for an output (as an open collector or drain)?
In this case (saturated Q1), the ratio Ic/Ib could be estimated about 20.
G_i = Ic / Ib = 20 , [estimated_4]
typing error I_r1 is 0.389uA (0.7/1.8K)I_r1 = 0.7 / 1.8 = 0.389 mA , [calculated_5]
I_r2 is 0.8maI_r2 = 0.8 + 0.389 = 1.189 mA , [calculated_6]
R2 = ( 5 - 0.7 ) / 1.189 = 3.62 Kohm , [calculated_7]
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?