Electronics > Beginners
How do you select optoisolator current? Does it affect switching speed?
spec:
This should be a bit of help in arriving at an answer:
https://en.wikipedia.org/wiki/Multi-Drop_Bus_/_Internal_Communication_Protocol
The physical connection is realized as a serial bus with a fixed data rate of 9600 baud. There are just 2 communications signals plus the essential common-ground reference signal. The TX signal goes from the MASTER to every SLAVE device. The RX signal goes from every SLAVE device to the MASTER device. Both signals have pull-ups. The bus is driven at every transmitter by an open collector transistor driver, and isolated at each receiver with an opto-isolator - though cable harnesses carrying the communication signals may also carry 24-volt power and ground signals to devices, meaning the devices may not be isolated from each other as they share the same power bus. Some devices, however, may have alternate power supplies, especially devices with motors and high current needs such as vintage bill acceptors or currency detector devices.
https://www.ccv.eu/wp-content/uploads/2018/05/mdb_interface_specification.pdf (Section 4)
AndyC_772:
--- Quote from: nsrmagazin on January 04, 2019, 09:17:01 am ---Using a photo coupler for RS232 is not even necessary. To begin with RS232 was developed to remove all noise, that is why it had "+-25VDC" swing maximum and "+-15VDC" or "+-12VDC" were used. This is a huge border, all the noise is absorbed.
--- End quote ---
A relatively large voltage swing doesn't eliminate the need for isolation. Even disregarding the differences there may be in ground potential between two pieces of equipment, a direct connection means no safety barrier.
--- Quote ---In modern days we do not use such high voltages, because everything is suppose to be with high efficiency. Therefore we use a swing of "0VDC"(formerly -15VDC) to "5VDC"(formerly +15VDC). This is no longer RS232, its a variation, but we still call it RS232 because its almost the same.
--- End quote ---
No, "we" don't use logic levels and call it "RS232".
A logic-level (0-5V or 0-3.3V) UART interface is a logic-level UART interface. It's not RS232 and should *never* be called as such. These levels are not compatible with RS232-compliant ports.
For any port on modern equipment that's designed to connect to an RS232 port, designers typically use a level shifting device like the MAX232, which contains a voltage doubler and a voltage inverter to give about +/- 9V from a 5V supply. The output from such a device is typically RS232 compatible, even if it's not strictly RS232 compliant because the voltage levels at the transmitter are reduced compared to true RS232 levels.
Note that a logic level interface typically idles at +5V or +3.3V, which corresponds to a negative voltage on a true RS232 port. RS232-compatible level shifters effectively invert the signal as well as amplifying it.
MrAl:
Hi,
Opto couplers are used to electrically isolate the two devices that need to communicate.
Thus if you have a meter with RS232 and opto coupling connected to your computer and you accidentally measure a 1000 volt signal, you blow out the meter but you dont blow out the computer.
Granted these optos have their limitations too, but it's usually 2000v or more (check specs).
nsrmagazin:
A swing at "+-15VDC" elimates 95% of all possible on the planet noises!
There is no noise that is "12VDC" and can activate the circuit!
Yes we DO call it RS232, we shouldn't thats true, but we still DO!
I have never seen an opto-coupler on any RS232 or variations installation! Sometimes they put it on the "5VDC" and "3.3VDC", but like I said in the previous post, what are your distances and noises!?
And please don't try to distort the situation, my description is accurate!
pwlps:
Hi,
--- Quote from: mr_darker on January 02, 2019, 05:58:35 pm ---My original question I think you've answered though. Higher LED current switches it on faster, and also makes it switch off slower? (switching off is the part I couldn't just imagine). So it's almost never going to be even unless setting it up to be that way, and then it'd just be by chance whether or not the voltage/current settings that this occurs with, works in the circuit i'm making :o So in short, just find one with a bigger transfer ratio and shorter switching times.
--- End quote ---
Instead of trying to adapt the CTR, pullup resistors etc. to get the current and voltage specs you need, it would be much easier to use an optoisolator with an integrated logic output. In a similar design I was using a HCPL2200:
https://docs.broadcom.com/docs/AV01-0557EN
which should meet your specs too. Another advantage is that it has a hystersesis in the transfer function (a Schmidt trigger is included) to prevent false transistions caused by spikes or oscillations on the pulse edges (NB. your circuit is not very safe regarding this issue: in principle Schmidt triggers should have been inserted between the optocouplers and the peripheral connections).
The logic "on" output voltage of HCPL2200 follows the supply voltage (up to 20V) so you don't need any pullup resistor on "PERIPHERAL RX" (and with 5V supply the output can sink more than 20mA). The input "on" threshold is only 1.6mA and the forward current should not exceed 5mA so if you need to sink 15mA on "PERIPHERAL TX" you will need to add a shunt resistance between R2 and PERIPHERAL TX.
As there is a high gain amp inside the optocoupler it is recommended to put a 10nF decoupling capacitor across the supply pins (otherwise sometimes the ouput might oscillate, depending on your PCB layout).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version