Pages: [1]   Go Down
Author Topic: What RS485 options are available for linking lots of sensors and Arduino's?  (Read 1055 times)
0 Members and 1 Guest are viewing this topic.
Wellington, New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone...

I am working on a bunch of projects using Arduino's to collect environmental data and controlling it.

My biggest problem is connectivity at this stage. The distances between sensors and output devices
range from between 1 meter(3 feet) to +50 meters (+160 feet.). Number of devices also range from
5-20 per project.(Cost and electrically noisy environments(Factory Machines) are also factors)

My questions are:
  • Am I in the right direction looking at RS485 for connectivity?
  • What affordable and easy to implement options are available?
  • Should I consider designing an easy/affordable solution? Would this be useful to other people or am I reinventing the wheel?

I have looked a the following options:
https://www.sparkfun.com/products/10124? - Good option but it does not offer termination options. (Can only link 2 nodes.)
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=323 - Very cheap,little documentation and not sure about number of nodes.
http://www.emartee.com/product/42231/RS485%20Module%20%20Make%20Your%20Arduino%20Talk%20With%20Each%20Other - Best option I could find. Has termination options,code. Using RJ45 connectors like the Sparkfun option would have been better,because finding twisted-pare network cables are easier to find.

I have looked at wireless options but as the sensors all need continuous power they will all need some kind of wire to power. Interference is also going to be an issue and because these projects will end-up as production systems it will need to be very robust.

Any help/input will be appreciated.
« Last Edit: December 30, 2012, 03:22:31 pm by Protoneer » Logged


Oviedo
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My questions are:
  • Am I in the right direction looking at RS485 for connectivity?
  • What affordable and easy to implement options are available?
  • Should I consider designing an easy/affordable solution? Would this be useful to other people or am I reinventing the wheel?

The first option is the one I use. Do not forget that the 485 is a description of physical, electrical, NOT transmission protocol.

I use it with 15 devices, and it works fine .. however, the problems, it will always have the communication protocol ...
The only consideration to keep in mind is whether the transmission is half or full duplex .. 2 or 4 wire. You have described are all Half

I have looked a the following options:
https://www.sparkfun.com/products/10124? - Good option but it does not offer termination options. (Can only link 2 nodes.)
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=323 - Very cheap,little documentation and not sure about number of nodes.

All models described, support multiple nodes. This in particular has built resistors alls, worst of not having them, you can put them.

Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8490
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Am I in the right direction looking at RS485 for connectivity?
Yes.

Quote
Should I consider designing an easy/affordable solution?
Yes.

Quote
Would this be useful to other people or am I reinventing the wheel?
I hope it would be useful because I'm spending a lot of time (re)inventing this particular wheel smiley

If you are not in a huge hurry (and I assume not as you are considering designing your own system) you may be interested in this

http://www.ardweenet.com/

It's still early days, prototype PCBs have been made but not loaded and a heck of a lot of code has to be written yet but this should give you up to 254 nodes each up to 1200 metres apart with each node being a Mega1294-based Arduino.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Wellington, New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The first option is the one I use. Do not forget that the 485 is a description of physical, electrical, NOT transmission protocol.

Yes.... It sit on the physical layer of the stack. I have ordered a few RS485 chips and will start playing around with them shortly.
I think I will end up going with a custom design in the end. All of my sensors will have an ATTiny84 to process sensor data and
transmit it on request. The ATTiny84's are cheap,has plenty of pins and can do Software-Serial.

Half-Duplex is fine as it will keep the costs down and the Master can be a bit more powerful MCU. The Master will upload data
to an internet hosted database and will receive commands from a web-api.

Logged


Wellington, New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I hope it would be useful because I'm spending a lot of time (re)inventing this particular wheel smiley

If you are not in a huge hurry (and I assume not as you are considering designing your own system) you may be interested in this

http://www.ardweenet.com/

Hi Rob,

Very interesting+complicated project you are working on. Interesting how total strangers can come up with
very similar thoughts. My thought was also to send the power over the the connection like power over Ethernet.

Makes it so much cleaner if you can send data and power over one physical cable.

Not sure if you have seen this post before:
http://www.gammon.com.au/forum/?id=11428

Very clean and informative description of making it work. Will definitally be using it as an example with
my testing I will be doing shortly.
Logged


nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8490
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep seen that, Nick has a lot of good tutes on his site.

I originally had a multi-drop bus with a master, but changed it to the current redundant-ring-multi-master topology, I think it is potentially much more robust because even with 2 or 3 faults you still have a mostly (or even entirely) working network. Multi-drop-master only needs one small fault and the whole lot collapses in a heap. That said I guess it's been good enough for all manner of networks over the years.

In fact I had Attiny84s as well, but wanted to go faster than they could handle. At present I can get 500kbps which is getting close to what I'd like, admittedly that's not continuous throughput yet but it should work at that speed or better.

It sounds like your idea is very similar or even the same as my original design, with a very fine node granularity, ie one node one function. As you've seen I've moved away from that a bit because no matter now many things a node does it still needs the same network overhead. So I decided to amortise that overhead over multiple functions.

That said the APE chips will be capable of working stand alone, in which case we're back to a tiny 3-chip node for just a few $.

Quote
My thought was also to send the power over the the connection like power over Ethernet.
As I to have done, it's not always appropriate due to voltage drops, wire ampacity etc but when it is it saves a lot of mucking around.

______
Rob
« Last Edit: December 31, 2012, 12:24:00 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: