USART/RS485 problem with Arduino Nano

208 views
Skip to first unread message

Zoltan Orosz

unread,
Sep 11, 2016, 11:28:40 AM9/11/16
to souliss
I'm trying to set up a network of Arduinos using RS485. I have a Seeeduino Uno with an Ethernet shield as the gateway and want to connect multiple Nano clones via RS485. This is the code for the gateway: https://codebender.cc/sketch:371984 and this is the code for the temperature/humidity monitor: https://codebender.cc/sketch:376550 and this is the code for one of the remote switches: https://codebender.cc/sketch:372715

The above code works perfectly between the Seeeduino Uno and 1 specific Arduino Nano, but fails to work on 3 other Nano-s. I have already replaced the RS485 units, they are OK. When I connect the USART directly between the Uno & any Nano without the RS485, it works, but with the RS485, it only works with that single Nano and I have no idea why. I tried the following:

hardcoding the baud rates (you'll see in the sketches)
flipping rx/tx and a/b
checking the dht22 sensor readings via the serial monitor on a non-working Nano (it worked)

Do you have any ideas how to continue troubleshooting? Are there any additional configuration elements for the USART driver I'm missing? Any suggestion is appreciated.

Thank you!

Di Maio, Dario

unread,
Sep 11, 2016, 11:54:01 AM9/11/16
to sou...@googlegroups.com
Hi Zoltan,

it doesn't work if you have all Nanos connected at same time, or it doesn't work on two Nanos over three, doesn't matter which is connected and which is not?

Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/f722eb2c-7798-4c08-9447-70896705f49f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted
Message has been deleted

Di Maio, Dario

unread,
Oct 8, 2016, 6:06:14 AM10/8/16
to sou...@googlegroups.com

Hi Zoltan,

sorry for the late reply. Looks that you have an hardware problem, we have running busses with 10 or more devices, so if you get a proper hardware it should be fine.

Dario.

From Mobile.

On 16 Sep 2016 08:38, "Zoltan Orosz" <zoltan...@gmail.com> wrote:
Hi Dario,

I did some further troubleshooting, it seems like on the faulty Nano-s the RX led is always lit when connected, it never turns off. By trial and error I also found that TX works (so if I keep sending a command with Send() to another devices on the RS485 link it actually works), but the Android client doesn't show the faulty Nano (health is 0 and the typicals cannot be read). Any idea what could cause this?

Thanks, kind regards,

Zoltan


On Sunday, September 11, 2016 at 5:54:01 PM UTC+2, Dario Di Maio wrote:
Hi Zoltan,

it doesn't work if you have all Nanos connected at same time, or it doesn't work on two Nanos over three, doesn't matter which is connected and which is not?

Dario.
On Sun, Sep 11, 2016 at 5:28 PM, Zoltan Orosz <zoltan...@gmail.com> wrote:
I'm trying to set up a network of Arduinos using RS485. I have a Seeeduino Uno with an Ethernet shield as the gateway and want to connect multiple Nano clones via RS485. This is the code for the gateway: https://codebender.cc/sketch:371984 and this is the code for the temperature/humidity monitor: https://codebender.cc/sketch:376550 and this is the code for one of the remote switches: https://codebender.cc/sketch:372715

The above code works perfectly between the Seeeduino Uno and 1 specific Arduino Nano, but fails to work on 3 other Nano-s. I have already replaced the RS485 units, they are OK. When I connect the USART directly between the Uno & any Nano without the RS485, it works, but with the RS485, it only works with that single Nano and I have no idea why. I tried the following:

hardcoding the baud rates (you'll see in the sketches)
flipping rx/tx and a/b
checking the dht22 sensor readings via the serial monitor on a non-working Nano (it worked)

Do you have any ideas how to continue troubleshooting? Are there any additional configuration elements for the USART driver I'm missing? Any suggestion is appreciated.

Thank you!

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/f722eb2c-7798-4c08-9447-70896705f49f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Oct 8, 2016, 3:12:03 PM10/8/16
to sou...@googlegroups.com
Hi Dario,

No worries, I figured out the same in the meantime. One more question though, do you happen to have an example with multiple USART interfaces combined with Ethernet? I couldn't build a single bus for the floor, so most likely I'll have multiple RS485 buses which I want to concentrate using Arduino Mega-s with Ethernet shields. I found the ESP8266 to RS485 example and could theoretically convert that bridge node, but was wondering if there's a more suitable example.

Thanks and keep up the good work :)

Zoltan

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/M2fm9ebYurc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Oct 8, 2016, 4:42:23 PM10/8/16
to sou...@googlegroups.com
Hi Zoltan,

actually Souliss support only a single RS485 bus for each node, so you cannot use multiple USART on the same device as Souliss communication media.

Regards,
Dario.

Zoltan

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/a2028003-0bdb-4c3a-9b3a-222143ad9840%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/M2fm9ebYurc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Oct 8, 2016, 5:40:53 PM10/8/16
to sou...@googlegroups.com

Hi Dario,

Thanks, that's unfortunate to hear. Did you ever try RS485 with star topology instead of bus? Can that work with short cables (10m max)? That's my last resort before falling back to WiFi.

Thanks, kind regards,

Zoltan


Zoltan

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/M2fm9ebYurc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/M2fm9ebYurc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Oct 8, 2016, 5:51:08 PM10/8/16
to sou...@googlegroups.com
Generally the answer is no, is mostly a matter of terminators and reflection. With short distances it may work, but I've never tryied something like that.

Dario.

Zoltan

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/a2028003-0bdb-4c3a-9b3a-222143ad9840%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/M2fm9ebYurc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/M2fm9ebYurc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Juan Luis

unread,
Oct 13, 2016, 9:55:49 AM10/13/16
to souliss
I have a project working perfectly for 2 years with souliss (maybe still running version 5) and rs485 star topology. I did the maths 2 years ago, but as a rule at 9600bps you can use star topology and 200 mts distances.
Regards juan

Zoltan Orosz

unread,
Oct 13, 2016, 11:33:10 AM10/13/16
to souliss
Hi Juan,

Thanks, this is promising news. Are you using termination resistors (if yes, how many and how many ohms)? How many devices do you have on the RS485 altogether?

Thanks, kind regards,

Zoltan

Juan Luis

unread,
Oct 13, 2016, 1:22:45 PM10/13/16
to souliss
Hi Zoltan,
No resistors are needed.
There sould be  6 or 7 nodes but I tested it with 12 or more.

Take a look to my blog, sorry for don't  update it anymore :(  I'm too bussy
 
Specially this one:

Regards 
Juan




Reply all
Reply to author
Forward
0 new messages