💬 Building a wired RS485 sensor network
-
for wiring , is this true ?
rs485...............arduino
vcc......................5v
gnd....................gnd
DI.........................9
DE........................2
RE.......................10
R0........................8 -
for wiring , is this true ?
rs485...............arduino
vcc......................5v
gnd....................gnd
DI.........................9
DE........................2
RE.......................10
R0........................8 -
DI and DO depends on your board type.
Look at AltSoftSerial_Boards.h
DE and RE should be connected together and connected to pin,
which is defined in your program:
#define MY_RS485_DE_PIN 2 -
@Reza No. You need to have your gateway inbetween. Your controller can't "talk" directly with you MySensors network. Wee the picture from kimot.
-
@Reza No. You need to have your gateway inbetween. Your controller can't "talk" directly with you MySensors network. Wee the picture from kimot.
@wimd we can build a gateway with raspberrypi without arduino . @gohan saying true . but i have to use gpio for serial gateway because when i use a usb serial port after turn on/off or reboot raspberry can not detect my gateway... but with gpio i test and this is true, so i have to use gpio for gateway
-
@wimd we can build a gateway with raspberrypi without arduino . @gohan saying true . but i have to use gpio for serial gateway because when i use a usb serial port after turn on/off or reboot raspberry can not detect my gateway... but with gpio i test and this is true, so i have to use gpio for gateway
-
@Reza
Maybe your problem and its solution with "serial-through USB" connection on Raspberry is described here:https://g0kao.wordpress.com/2013/08/08/usb-port-assignment-on-a-raspberry-pi/
-
@wimd we can build a gateway with raspberrypi without arduino . @gohan saying true . but i have to use gpio for serial gateway because when i use a usb serial port after turn on/off or reboot raspberry can not detect my gateway... but with gpio i test and this is true, so i have to use gpio for gateway
-
@kimot @gohan do you use a wired network with rs485 ? i have problem with rf24 and i want change my wireless network to a wiring network , but i want know with a rs485 all command are send? without error and NACK ? now for wireless network i have for example every 5 true commands 1 fail command(NACK)
-
@kimot @gohan do you use a wired network with rs485 ? i have problem with rf24 and i want change my wireless network to a wiring network , but i want know with a rs485 all command are send? without error and NACK ? now for wireless network i have for example every 5 true commands 1 fail command(NACK)
-
@Reza
not yet, but I am getting the parts to make a wired rs485 network of 4 nodes + gateway. About the NACK error it should be handled by the library and retransmit the lost packet. -
i am tired for test and trying to configure wiring network with RS485. this is strange :angry:
i build a gateway and a relay with rs485 . for test i now use 2raspberry pi and 1orangepi and a laptop ! every time disconnect gateway from one and connect to other one ( with out other change for example sketch and wiring and etc. just change controller) some time this is very good work on laptop. some time good work on orange and some time good on raspbrrey pis !! some time same first command has sent(LED on gateway and on node just one blink. some time LEDs 2 blink and turn on later)
i am using 15cm wire between 2nodes! when change to some meter so dont work never...
so there is not any one that understand what is reason this issue !!!i am ready and i have devices and madules. so any body that think can solve this , told me so i test on my devices and feedback.
-
-
@Reza have you tried to use terminating resistors?
And perhaps it could be good to try 1k pull-up and pull-downs at the gateway end. The left diagram:

With these two tricks I got my setup stable.
And a little tweak to transport class could help also..
