Author Topic: New project i am working on - RS485 comunication  (Read 1545 times)

0 Members and 1 Guest are viewing this topic.

Offline TiTanerCZETopic starter

  • Contributor
  • Posts: 14
  • Country: cz
New project i am working on - RS485 comunication
« on: May 07, 2018, 01:23:30 pm »
Hi, am working on a little project.

Using  ATTINY816-SFR (cheapest for a wanted number of pins ), usb (V-USB -  I can't find if ATTINY816-SFR is supported), and SN65176BD I want to set-up simple home automation. There is lot of i just don't know. Can someone with experiences tell what is wrong (DC/DC convertor...) /what should I change/add.

ESP-03 will be just on one board, more boards will be connecnet true RS485 interface. (Doesnt want full wireless network)

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: New project i am working on - RS485 comunication
« Reply #1 on: May 07, 2018, 01:50:44 pm »
It looks like your RS485 bus is organized in a 'star' configuration with cables going off to individual devices.  This isn't the way RS485 is implemented.  You need to daisy chain the bus so that it loops from the host to the first device, to the second device, to the third, and so on.  You will probably put end-of-line resistors at the far end of the bus.

You can still have a peer-to-peer network protocol (second unit talking to fifth unit) is you set it up right

http://www.bdmicro.com/code/robin/

See page 5 for topology:

http://www.ti.com/lit/sg/slyt484a/slyt484a.pdf
 

Offline TiTanerCZETopic starter

  • Contributor
  • Posts: 14
  • Country: cz
Re: New project i am working on - RS485 comunication
« Reply #2 on: May 07, 2018, 02:44:02 pm »
Thank you for the link, I will implement ROBIN inside my little project. I have change the circuit, this is RS458 interface now:

Resistor will be put at the end of the lines.

I will propably use RJ9 or RJ11 connectors and flat wiress, is that a good choise?
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: New project i am working on - RS485 comunication
« Reply #3 on: May 07, 2018, 06:19:31 pm »
RS485 can work in a star configuration, it depends on the baud rate and the length of the connections.  In a daisy-chain setup, you terminate each end to eliminate/minimize reflections.  Short cable connections reduces the risk of reflections effecting the data, as does lower baud rates.

paul
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: New project i am working on - RS485 comunication
« Reply #4 on: May 07, 2018, 06:47:21 pm »
Each device on the bus, including the master, has two RS485 jacks.  After the daisy chain is connected there will be two unused jacks, one at each end.  Add the resistor to a couple of plugs and plug them in.  The bus is extended by removing the terminating plug, adding a new device and reinstalling the plug.

I would use twisted pair cable.  Maybe not CAT 6E but at least voice grade.  Flat cable wouldn't be my first choice.  Shielded cable would be better.

Belden makes cable specifically for RS485  See page 4 of this document:

https://www.belden.com/hubfs/resources/technical/cross-references/plc-dcs-cable-cross-reference-guide.pdf

https://catalog.belden.com/techdata/EN/3105A_techdata.pdf

I would ground the shield on one end only and to some form of earth ground.  This might not be important in a residential enviroment where the cable is laying in the attic.  In an industrial environment it might be a lot more important.

The stuff is terribly expensive at $1.20/foot but at least you can get it in cut reels:

https://www.wireandcableyourway.com/belden-3105a-22-awg-1-pair-shield-uv-resistant-300v.html
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: New project i am working on - RS485 comunication
« Reply #5 on: May 08, 2018, 04:45:33 pm »

A star connection of wires is often very nice and is often done.
RS-485 wants a linear bus with no or short taps to device transceiver.

Think of a hub
You have connections that go out to a device.
You can have the RS-485 go out to the device and back to hub.
So the connecting wire makes a loop from hub to device to hub.

The cost is more wire pairs and 2X distance.

The nice thing is that you can disconnect wire from hub and make bus complete.
You would need a shorting plug.

The easer way us to make a hub using rj31x jacks.
This jack is often used to connect alarm panel to telco.

When plug is removed you have a two pair through connection.
When plug is inserted the two pair goto connected device and back.
A RJ45 jack with a shorting bar.

C
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf