I have attached my rs485 communication circuit . It uses opto coupler switching circuit.The below circuit work fine with 9600 and lower baudrate. Now i am planning to use 57600 baudrate.can someone suggest me what will be resistance value to operate 57600 baudrate
Then my code with higher baudrate getting garbage value. below 9600 baudrate it working fine. i read that due to cyclic time i m getting garbage value. If we change cyclic time it wont affect.
With selecting proper resistor we can get proper response.
DVDdoug:
The resistance values shouldn't change when you change the baud rate.
I spent time experimenting with using opto-couplers (mainly cheap el817) to isolate the grounds on Arduino serial communication. The biggest problem I found was that (probably due to the stored base charge in the opto-transistor) the rise and fall times can be quite large. At higher speed these rise and fall times distort the waveforms too much for reliable communication. One can play with resistor values to speed things up but I found the practical limit for the el817 was 19.2 K baud though by selecting from a batch of el817 I did manage to work at 38.4 K baud. I have now settled on 19.2 K baud.
I don't know how much difference there is between a pc817 and an el817 but I suspect the OP will not be able to use those pc817 to run at 57600. Someone is bound to provide a circuit to prove me wrong.
I know there are much faster opto-couplers than the cheap el817 but one will pay extra for them.
One can play with resistor values to speed things up but I found the practical limit for the el817 was 19.2 K baud though by selecting from a batch of el817 I did manage to work at 38.4 K baud. I have now settled on 19.2 K baud.
i also got same reply in one of forum. But i could not able to know how to select proper resistor and can you tell what value of resistance you use to make it work. In above circuit what resisatance value need to be chnage
AMPS-N:
i also got same reply in one of forum. But i could not able to know how to select proper resistor and can you tell what value of resistance you use to make it work. In above circuit what resisatance value need to be chnage
As I implied, I can't make it work at all at 57600 baud. Like you I use 270 ohm for all resistors to get reliable 19200 baud.
in MY SCHEMATIC, which resistance value i need to make it work at least 19200 baud rate
i have used r15=r9=1K resistor and r18=r19=270E resistor.
with these resistor value i can communicate upto 9600 baudrate not more than that.How can make it work on higher baud rate and which value i can try to replace here
As I implied, I can't make it work at all at 57600 baud. Like you I use 270 ohm for all resistors to get reliable 19200 baud.
AMPS-N:
in MY SCHEMATIC, which resistance value i need to make it work at least 19200 baud rate
i have used r15=r9=1K resistor and r18=r19=270E resistor.
Try using 270 for R15 and R9 but you probably won't get that working reliably faster than 19200 baud unless the PC817 are significantly faster devices than the el817 devices.
There are better circuits to get more performance out of your optocouplers. Don't just change the resistance. You need to change the circuit to change the method of working the optocouplers.
The reason is the simple circuit shown drives the transistors into saturation. Normally this is good for a digital circuit because you don't ever want to be somewhere in the middle. But it means it takes a certain amount of time to come out of saturation and change to the other state. You have pushed the switch so far past "on" that it takes time to bring it back to the "off" position.
Sorry I don't have any references to give you right now but if you look at a few different optocoupler datasheets you will find more advanced circuits that will switch faster.