Arduino, RS485, mixed powers and multiple devices

As mentioned previously  you need to be very careful when using multiple sources of power that are coupled by a common rail – nasty things can happen which will ruin your day (as well let all the critical magic smoke out).

Luckily for me my power supplies are able to work well together and not fry themselves. So I took my work with RS485 and Arduino’s to next level and have 3 devices on the same RS485 bus.

What I did is shown below.

20160501_115154[1]

On the board are the three RS485 driver boards. The one in the middle is different, as I have removed its bus termination Resistor (R7) as its in the middle of the 3 device bus, so shouldn’t have it.

In order to test all power supply combinations, going from left to right:

  • Arduino USB powered, bus side (the long yellow wire) powered by the Arduino.
  • Arduino Bench powered, bus side powered via the RHS Arduino.
  • Arduino USB powered, bus side (behind the red LED) powered by the Arduino.

As expected – this worked, no dropout on the once per second measurement yet and its been running for 10 minutes without problems. So I think its safe to say, we can mix power sources that float as the ‘bus’ consists of:

  • An A line (Red above).
  • A B line (Orange above)
  • A 0V line (in effect the connection set between the 1st and 2nd driver boards).

Also to stop the 3rd Arduino answering to queries when it shouldn’t it’s ‘address’ has been set to 2, rather than 1. So the Ardunio is correctly ignoring traffic for it and allowing others to communicate on the bus without ill effect.

BTW RS485 is also used by the DMX lighting control standard – see this video for a tear down of the DMX repeater. The protocol I’m using (according to what Clive says in the video) is somewhat a step up on DMX as it has check sum support built in as a standard.. Nice!

Next Steps..

The next step I think is working out how to network power this and define my own ‘bus’ wiring standard. Now given the RS485 standard is ‘immune’ to common mode noise (i.e. noise on both the A & B lines at the same time). I think I can get away with 12v carried in the same cable and double up – so the total number of cores used is 6, i.e.:

  • 1 for A line
  • 1 for B line
  • 2 for +12v
  • 2 for 0v

This also means I could use a screened cable if I want to be extra sure the signals get through fine…