[![RS485 wiring][1]][1]RS485 wiring
[![RS485 demo][2]][2]RS485 demo
[![RS485 moving master schematic][3]][3]RS485 moving master schematic
[![RS485 - one device][4]][4]RS485 - one device
[![RS485 - two devices][5]][5]RS485 - two devices
[![RS485 - three devices][6]][6]RS485 - three devices
This was with the boards still programmed to run at 19200 baud. [1]: https://i.sstatic.net/unAvv.png [2]: https://i.sstatic.net/7Kttu.jpg [3]: https://i.sstatic.net/IbHz8.png [4]: https://i.sstatic.net/3vqnR.png [5]: https://i.sstatic.net/4KZCZ.png [6]: https://i.sstatic.net/gPYau.png
[![RS485 wiring][1]][1]
[![RS485 demo][2]][2]
[![RS485 moving master schematic][3]][3]
[![RS485 - one device][4]][4]
[![RS485 - two devices][5]][5]
[![RS485 - three devices][6]][6]
This was with the boards still programmed to run at 19200 baud. [1]: https://i.sstatic.net/unAvv.png [2]: https://i.sstatic.net/7Kttu.jpg [3]: https://i.sstatic.net/IbHz8.png [4]: https://i.sstatic.net/3vqnR.png [5]: https://i.sstatic.net/4KZCZ.png [6]: https://i.sstatic.net/gPYau.png
This was with the boards still programmed to run at 19200 baud.
RS485 wiring [![RS485 wiring][1]][1]
RS485 demo [![RS485 demo][2]][2]
RS485 moving master schematic [![RS485 moving master schematic][3]][3]
RS485 - one device [![RS485 - one device][4]][4]
RS485 - two devices [![RS485 - two devices][5]][5]
RS485 - three devices [![RS485 - three devices][6]][6]
Cable run test
For a proper hardware test, I connected the devices up to my in-house UTP cabling. I have cat-5 cable running from various rooms to a central plug-board. Going from one end of the house to another (a reasonable length run) it still works fine. There is 5 m cable between the Arduino and the wall socket, for a start. Plus another 5 m cable at the other end. Then there are about 2 x 15 m runs from the rooms to the switch room, and inside that there is a short bridging cable to connect them together.
This was with the boards still programmed to run at 19200 baud. [1]: https://i.sstatic.net/unAvv.png [2]: https://i.sstatic.net/7Kttu.jpg [3]: https://i.sstatic.net/IbHz8.png [4]: https://i.sstatic.net/3vqnR.png [5]: https://i.sstatic.net/4KZCZ.png [6]: https://i.sstatic.net/gPYau.png
[![RS485 wiring][1]][1]
[![RS485 demo][2]][2]
[![RS485 moving master schematic][3]][3]
[![RS485 - one device][4]][4]
[![RS485 - two devices][5]][5]
[![RS485 - three devices][6]][6]
Cable run test
For a proper hardware test, I connected the devices up to my in-house UTP cabling. I have cat-5 cable running from various rooms to a central plug-board. Going from one end of the house to another (a reasonable length run) it still works fine. There is 5 m cable between the Arduino and the wall socket, for a start. Plus another 5 m cable at the other end. Then there are about 2 x 15 m runs from the rooms to the switch room, and inside that there is a short bridging cable to connect them together.
This was with the boards still programmed to run at 19200 baud. [1]: https://i.sstatic.net/unAvv.png [2]: https://i.sstatic.net/7Kttu.jpg [3]: https://i.sstatic.net/IbHz8.png [4]: https://i.sstatic.net/3vqnR.png [5]: https://i.sstatic.net/4KZCZ.png [6]: https://i.sstatic.net/gPYau.png
Screen-shots of the code in action
These images show the code working. First, with only one device connected:
You can see from the pulses there that the device is broadcasting its data at randomly-varying intervals, to avoid continuing to clash with another device that powered up at the same moment.
Now we see blocks of data from two devices, with roughly the same size gaps in the middle. I configured it for four devices, but only two are present, so we see two blocks of data, and two gaps.
Now with three devices online, we see three blocks of data, and one gap, as the missing device is bypassed.
If you are checking the figures, these were taken with the baud rate doubled, as a test, to 19200 baud.
Screen-shots of the code in action
These images show the code working. First, with only one device connected:
You can see from the pulses there that the device is broadcasting its data at randomly-varying intervals, to avoid continuing to clash with another device that powered up at the same moment.
Now we see blocks of data from two devices, with roughly the same size gaps in the middle. I configured it for four devices, but only two are present, so we see two blocks of data, and two gaps.
Now with three devices online, we see three blocks of data, and one gap, as the missing device is bypassed.
If you are checking the figures, these were taken with the baud rate doubled, as a test, to 19200 baud.
- 38.9k
- 13
- 69
- 125
- 38.9k
- 13
- 69
- 125
- 38.9k
- 13
- 69
- 125