I need some help in understanding the interaction between an opto coupler and PNP transistor.
I am designing a DCC accessory decoder. Currently all is working fine on the breadboard using an Atmega 328P. I now need to implement the ACK signal to the DCC buss. The spec calls for an increase of at least 60mA for 6ms in the DCC buss current.
There are some examples how to do this on the OpenDCC site. The 6ms ACK signal drives an opto-coupler which in turn switches a PNP transistor, to handle the required current, connecting a resister across the DCC buss.
The relevant part of the circuit looks as follows (the top section):
The original Opto is a PC817 and the transistor a BC860. I cannot easily source those locally so am replacing them with a Toshiba TLP291 and a MMBTA56L transistor. Both are very close to the originals.
My concern is the way the opto is coupled to the transistor. I can understand the transistor turning on when the opto turns on but what controls the base-emitter current? Also when the opto turns off the transistor base basically floats - how does that turn the transistor off (no base current? - that sounds a bit shaky to me)? My understanding is that the base needs to be switched to less than 0.7 lower than the emitter to turn it off.
I am reasonable when it comes to digital circuits and programming micros, but useless at analogue designs. Will the above circuit work as is?
Any advice will be appreciated.
Willem.