Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Need Quality RS485 Shield or Pull up pull down from code


  • Please log in to reply
4 replies to this topic

#1 Cinelli

Cinelli

    Member

  • Members
  • PipPip
  • 17 posts

Posted 05 July 2012 - 08:12 PM

I have been using a common RS485 Shield:
http://www.robotshop...n-33&lang=en-US

I found that while it has the Maxim MAX485 chip it lacks the accompanying resistors to perform to RS485 spec due to the lack of "biasing resistors for failsafe operation" which zero out the RS485 bus to a constant state when the bus is idle. These resistors are either integrated in some transceiver models, or placed on the board. This has neither. The result is the data transferred is corrupted across longer lengths of wire. Using an appropriate 33 ohm terminating resistor adds some stability, but cannot make up for the lack of biasing resistors.

Maxim has a great short description which outlines the RS485 spec.
http://www.maxim-ic....ndex.mvp/id/763

Solutions:
1. Use a better shield. The only other RS485 shield I see is the DFRobot IO/Expansion V5. I have never been able to make the RS485 on that work. Perhaps the .Net MF COM1/COM2 objects are not wired to the pins the transciever is using, haven't dug into that.
http://www.dfrobot.c...&product_id=264

2. Replace the chip on the board with the Maxim MAX13487 which has some biasing resistors built in.

3. Use a code-based solution to pull the pins on the board high and low depending on send/receive status. This might not work though, as they are upstream from the RS485 Transceiver which probably is passing corrupted data toward the processor at that point.

Finding a shield with the resistors is an attractive option.

I tried all combinations of the COM object handshake property with no success.

Suggestions / ideas?

Thanks in advance

#2 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 05 July 2012 - 09:36 PM

Hi Cinelli, I can't comment on option 1. I don't think there is much point in option 3; I think it will be hard to get the I/O pins to do the right thing at the correct timing, and I think you may get spurious edges on the RS485 bus that confuse the other end. I think adding a high value pull up and a pull down resistor as described in the maxim web link you gave is the simplest solution. (I would try 10K "10,000 Ohms"). If you go for option 2, note that the text at the link referenced two devices whose comparators are set so that bias resistors are not needed: "Maxim's MAX13080 and MAX3535 families of transceivers do not require fail-safe bias resistors because a true fail-safe feature is integrated into the devices." Have Fun - Paul

#3 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 05 July 2012 - 09:50 PM

I just took a look at the shield schematic. The tri-state controls on the maxim chip see to be wired up so that the output is driven or tri-stated dependant on the tx data. Seems a bit odd to me. I would have expected a third gpio to set the direction, or maybe a capacitor + diode to hold the tx enable for a short period when the first edge is sent. Maybe its just me...

#4 Cinelli

Cinelli

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 July 2012 - 01:19 AM

Hi Paul - Thanks. I tried sticking some biasing resistors inline on TX and RX, I tried a few different values and they seemed to have the effect of diminishing the number of bytes that are received. Transmit still works. So it's always receive that does not work. Perhaps I will try more biasing resistor values until I arrive at a value which performs. To me, there must a be shield out there properly designed to perform to spec.

#5 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 07 July 2012 - 04:43 PM

Hi Cinelli, Did you really mean "inline"? Each biasing resistor should be connected from one of the lines to either ground or +5V. The reason they are needed is to make the voltages on the bus known when all of the attached devices are tri-state (listening). The Maxim website page (you linked to) indiated which line to pull up and which to pull down. Hope this helps - Paul




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.