Hi friends
Help me please with realization scheme linux --rs485_bus--> 2xArduino slave
i want use rs485 without modbus protocol and i create scatch for work this rs485
my connection scheme in the attachement
i use Linux system(mint distributive) and i send from linux command echo "1" > /dev/ttyUSB0 then the light turns on Arduino#1(ledPin 2) and if i send "2" then the light turns on Arduino#2(ledPin 2) and it work!
but does not work feedback. When Arduin 1 includes a lamp she say to the serial port "on_1", but when Arduino 2 includes a lamp, it is silent
at the stage of physical connection Arduino 2 begins to shine in TX if the control pin is connected to the DE / RE, and this takes nothing (as if the line is busy)
hi guys, i check your source and it problem is not solved
if i turn off DE then i can send 1 or 2 via rs485 serial but i not received "On_1" or "On_2"
if DE and RE are connected to the Arduino then RX always lit and ardiono#2 can't receive command
Dude,
It's a STANDARD.( CANBUS , DeviceNet, MODBUS etc)
All differential bus networks use one 120 ohm termination resistor across A & B and another 120 ohm resistor across A & B at the other end of the main trunk of thr bus. The "drops" that branch left and right of the main trunk don't have termination resistors. With one at each end and both in parallel, the resistance across A & B is 60 ohms.
raschemmel, you're saying that the resistors are needed at both ends of the converters on the Arduino? or on the master side?
in the attachment my scheme
wherein Rt is 120ohm resistor and Rt too 120ohm resistor, right?
There is only ONE A line and ONE B line. That IS the bus.
Every tranceuver on the bus is connected to those two lines because EVERY tranceiver has an A pin and a B pin. ALL the A pins and ALL the B pins connect go the A line and B line . The main trunk can be up to 300 meters long. REGARDLEES of how long it is , there is ONE 120 ohm resistor at on the bus at one end and another one on the bus at the other end .
Why would you need a schematic to understand that ?
Could it possibly be any SIMPLER than that ?
LOOK AT THE DATASHEET for the TRANCEIVERS (they are NOT called "converters"
. They are called TRANCEIVERS) This is technical data: (came from manufacturer) MAX485
LOOK AT THE PINOUT .Do you see the pin labeled "A" and the one labeled " B" ? Those two pins ( of ALL the devices on the bus) are the differential drive pins
That IS "the bus" !
It doesn't matter where the master is or if there is an arduino. The "bus" is the A-B wire pair running from one end to the other with one resistor at each end
Obviously the resistor can't be on the arduino side because the arduino is TTL . The resustors go on the A/B lines.(at each end)
Without the bias the state of the RX pin from the transceiver is undefined. The fact you have a
termination resistor is a given, the bias network is not always needed (for instance in a simplex
link)
but does not work feedback. When Arduin 1 includes a lamp she say to the serial port "on_1", but when Arduino 2 includes a lamp, it is silent
at the stage of physical connection Arduino 2 begins to shine in TX if the control pin is connected to the DE / RE, and this takes nothing (as if the line is busy)
please, guys, show where my mistake
AFTER
my problem is solved,
So WHAT was the problem ? (software (transmit enable), OR hardware (termination resistors)
Hy friends,
I even read this post very interested because I have a similar case. My question now is, is it right, that I need R120 resistors at the "beginning" and at "the end" of my RS485 although I use the ready TTL to RS485 adapter like megahertzmetal does? I thought, that the needed resistors are alreadyd onboard?! That makes me confused.