I don't have access to the external device. I derived the device inner circuit from its manual. So I don't know what's exactly in it but it's an optocoupler circuit. My circuit on the other hand has PC817 as a optocoupler. I drived it directly from microcontroller (3V3) with a series resistor of 220 ohms (I could not go further due to limitations). In A, when I drive the output, pin 5 of the optocoupler shows a ~9V like it did not fully turned on and when I cut off the output I measure ~12V at the same point. On the other hand, in B situation, I measure below 1V at turn on and 24V at turn off at pin 5 which is OK. I thought exactly like you at the beginning but my experiments gave me this result.
- - - Updated - - -
I did not want to connect both gnds since I don't know exactly how the external device uses it.
- - - Updated - - -
PC817 C version
I don't think so.That may explain the 12V collector voltage
There are two optocouplers. Obviously the current of the drive inside optocoupler is too low.is on I think opto-coupler led current is not enough.
1. What’s the point of R5?
2. The absence of the 360 ohm does NOT explain why you’d see 12V.
3. When D0 is pulled low 6 ma will flow through the opto. That should enough to turn it on. You’re not pulling it low enough, i.e., not driving the external opto hard enough.
Hi,
Keep it simple:
* don't connect VU (not clear where it is connected at all)
* don't connect VCOM (not clear where it is connected at all)
* don't use 47R (although it does not make a big difference)
Please, again, measure the drive input current with a DVM.
Measure the microcontroller output voltage.
I don't think so.
There are two optocouplers. Obviously the current of the drive inside optocoupler is too low.
Did I already mention to measure it? Then you don't need to "think" --> then you "know"..
Klaus
Functionally it us not needed.47R is put just in case it is needed.
Hi,
the current is too low.
* you need to get higher optocouper current, or amplify it.
* to get higher optocoupler output current you need higher input current or use optocouplers with higher CTR.
* don´t rely on datasheet CTR for long time applications. I (sadly) had optocouplers (good quality brand) that degraded CTR down to 20% of initial CTR within 10 years. Not all optocouplers behave that bad.
--> I´d omit the extra optocoupler at all and drive the input just with a standard bjt (like BC546) with 3k base resistor. Microcontroller_gnd = base_emitter = SN_of_drive
Klaus
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?