EmbeddedRelated.com
Forums

RS485 - MODBUS or PROFIBUS or ....

Started by eeboarder July 21, 2009
Paul Keinanen wrote:
> On Wed, 22 Jul 2009 18:59:09 -0700, Rumpelstiltskin <rumpy@abc.biz> > wrote: > >>> The signal polarity >>> (mark-high versus mark-low) is also flipped and there are a number of >>> other constraints that follow the designation. >> Use a 74HCT09 instead of 74HCT07, polarity solved. > > I guess that you would have to run with Vcc at +3.5 V and Gnd at -3.5 > V and there would still be questions, if even the required +/-3 V > receiver voltage swing could be obtained. But clearly it is not within > the required _transmitter_ voltage swing. > > Also running 74HCT chips at 7 V is at the absolute maximum limit. > > Paul
Required +/- 3V receiver voltage? Its TTL transmit and TTL receive, so required receive voltage is Vcc to Gnd. Alot of microprocessors will run +3.3v or 5V (Microchip, Atmel ...) Go with 5V to reduce noise issues over the 4 foot cable.
David Brown wrote:
> Rumpelstiltskin wrote: >> Rich Webb wrote: >>> On Wed, 22 Jul 2009 07:28:08 -0700, Rumpelstiltskin <rumpy@abc.biz> >>> wrote: >>> >>>> Grant Edwards wrote: >>>>> On 2009-07-22, Rumpelstiltskin <rumpy@abc.biz> wrote: >>>>> >>>>>> Since distance is only 4 feet, simplest way is to make a TTL >>>>>> level RS232 wire-or'd bus. >>>>> Since "TTL level" and "RS232" are mutually exlusive, can you >>>>> explain what you mean by "TTL level RS232"? >>>>> >>>> The output of a UART is TTL. UART output is generally referred >>>> to as RS232, >>> >>> You misspelled "generally" as "incorrectly." >> >> Incorrect, but commonly used. >> > > I've also heard people say "RS232" when they mean a UART output, but > it's generally from people with little technical experience.
Generally I hear this statement from annal retentive types who like to brow beat others from a remote location over inconsequential references.
> There are many different ways to pass UART signals around (RS232, RS485 > and RS422 are common, but you get transparent radio modems, line > drivers, power line modems, fibre, simple transistor drivers, direct > connection, etc.). > > I think the only sensible way to refer to UART signalling is "UART". > That's pretty clear to most people in most context. "async" or just > "serial communication" are often used, and are fine if the context makes > it clear what you are talking about.
Then the argument comes up as to whether the term UART or USART is correct.

Paul Keinanen wrote:

> When interconnecting any PCBs with cables at least a few centimeters > long, you are going to have ground potential problems, due to the > resistance (and most importantly the inductance) of the ground > connection. > > When transferring data from one PCB to an other, I really would > suggest using some kind of differential signaling
Oh, come on. Differential signaling certainly has it place, however there is no need to overcomplicate the problem. Just to remind you about GPIB, Centronix, IDE/SCSI, SMB. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Thu, 23 Jul 2009 06:34:42 -0700, Rumpelstiltskin <rumpy@abc.biz>
wrote:

>Paul Keinanen wrote: >> On Wed, 22 Jul 2009 18:59:09 -0700, Rumpelstiltskin <rumpy@abc.biz> >> wrote: >> >>>> The signal polarity >>>> (mark-high versus mark-low) is also flipped and there are a number of >>>> other constraints that follow the designation. >>> Use a 74HCT09 instead of 74HCT07, polarity solved. >> >> I guess that you would have to run with Vcc at +3.5 V and Gnd at -3.5 >> V and there would still be questions, if even the required +/-3 V >> receiver voltage swing could be obtained. But clearly it is not within >> the required _transmitter_ voltage swing. >> >> Also running 74HCT chips at 7 V is at the absolute maximum limit. >> >> Paul > >Required +/- 3V receiver voltage? >Its TTL transmit and TTL receive, >so required receive voltage is Vcc to Gnd. > >Alot of microprocessors will run +3.3v or 5V (Microchip, Atmel ...) >Go with 5V to reduce noise issues over the 4 foot cable.
In a previous post you wrote
>>> The output of a UART is TTL. UART output is generally referred >>> to as RS232, >> >> You misspelled "generally" as "incorrectly." > >Incorrect, but commonly used. > > > The signal polarity >> (mark-high versus mark-low) is also flipped and there are a number of >> other constraints that follow the designation. > >Use a 74HCT09 instead of 74HCT07, polarity solved.
You seem to imply that the output from 74HCT07 is some kind of "RS232". Anyway, I do not understand what sense it would make to swap 7407 (hex open collector non-inverting buffer) with the 7409 (a quad open collector AND gate). At least use the 7406, which is an open collector inverter. Even if you run the output pull-up resistor to a higher positive voltage, it still does not make the output RS-232 level compliant. Paul
Vladimir Vassilevsky wrote:
> eeboarder wrote: >> I am going to work on a project involving multiple devices on the >> same network(3 or more). One device will have user input and >> display(master). The other devices(slaves) will just collect sensory >> data and possibly process PID control loops. Data speeds are not a >> priority(< 1Mbps is okay).
Most likely it is going to be RS-232,
> SPI or I2C. So, you can do the ring topology over RS-232, or star > topology over I2C or SPI. >
Don't try this with SPI, the distance is too great. I think it is unlikely to work over I2C for the same reason, but I have less direct experience with that. Your original thought to use RS-485 with MODBUS or PROFIBUS is good. Although like some others I would say CAN is also a reasonable choice. -- Scott Validated Software Lafayette, CO
In article <h49pdt$cei$1@aioe.org>, rumpy@abc.biz says...
> David Brown wrote: > > Rumpelstiltskin wrote: > >> Rich Webb wrote: > >>> On Wed, 22 Jul 2009 07:28:08 -0700, Rumpelstiltskin <rumpy@abc.biz> > >>> wrote: > >>> > >>>> Grant Edwards wrote: > >>>>> On 2009-07-22, Rumpelstiltskin <rumpy@abc.biz> wrote: > >>>>> > >>>>>> Since distance is only 4 feet, simplest way is to make a TTL > >>>>>> level RS232 wire-or'd bus. > >>>>> Since "TTL level" and "RS232" are mutually exlusive, can you > >>>>> explain what you mean by "TTL level RS232"? > >>>>> > >>>> The output of a UART is TTL. UART output is generally referred > >>>> to as RS232, > >>> > >>> You misspelled "generally" as "incorrectly." > >> > >> Incorrect, but commonly used. > >> > > > > I've also heard people say "RS232" when they mean a UART output, but > > it's generally from people with little technical experience. > > Generally I hear this statement from annal retentive > types who like to brow beat others from a remote location > over inconsequential references.
Until someone later wants to monitor what is happening and connects a TRUE RS232 device and blows your circuits. Perhaps you like to also refer to resisitance as inverse amps as the difference is 'inconsequential".
> > There are many different ways to pass UART signals around (RS232, RS485 > > and RS422 are common, but you get transparent radio modems, line > > drivers, power line modems, fibre, simple transistor drivers, direct > > connection, etc.). > > > > I think the only sensible way to refer to UART signalling is "UART". > > That's pretty clear to most people in most context. "async" or just > > "serial communication" are often used, and are fine if the context makes > > it clear what you are talking about. > > Then the argument comes up as to whether the term > UART or USART is correct.
They are two DIFFERENT devices one is Asynchronous only the other is synchronous OR asynchronous, depending on hardware and software configuration. You have obviously never seen/used a synchronous link (which may use various signalling levels or methods on the interlink). You give a poor impression of your abilities. The sort I normally end up sorting out the mess later from to get things working reliably. -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate

Paul Carpenter wrote:


> Until someone later wants to monitor what is happening and connects > a TRUE RS232 device and blows your circuits.
Paul, I agree that the TTL level signaling is not correct RS-232. However it works just fine with the true RS-232 transceivers. It is handy to use a pair of logic gates to interface an MCU to a COM port for debug or setup purpose. All RS-232 transceivers that I know of have the input threshold at about +1.4V, so they accept the TTL level. On the TTL side, you need to clamp the input, so it will take +/- 12V. However, some of the RS-232 transceivers interpret the line input voltage in the range of +/- 1.5V as "cable disconnected". So they fall into sleep mode and this causes problems with communication. I encountered this problem couple of times with the 3rd party embedded devices; never seen that with PC. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
In article <ZM-dnZZ6coutAvXXnZ2dnUVZ_tWdnZ2d@giganews.com>, 
nospam@nowhere.com says...
> > > Paul Carpenter wrote: > > > > Until someone later wants to monitor what is happening and connects > > a TRUE RS232 device and blows your circuits. > > Paul, > > I agree that the TTL level signaling is not correct RS-232. However it > works just fine with the true RS-232 transceivers. It is handy to use a > pair of logic gates to interface an MCU to a COM port for debug or setup > purpose.
Some employ a -ve threshold and get screwed by some PCs that only 0-some positive voltage often laptops.
> All RS-232 transceivers that I know of have the input threshold at about > +1.4V, so they accept the TTL level. On the TTL side, you need to clamp > the input, so it will take +/- 12V.
Fine but the OP did not mention what his TTL receiver was capable of withstanding, so my point still stands.
> However, some of the RS-232 transceivers interpret the line input > voltage in the range of +/- 1.5V as "cable disconnected". So they fall > into sleep mode and this causes problems with communication. I > encountered this problem couple of times with the 3rd party embedded > devices; never seen that with PC.
Recognising break condition is not unheard of. However MS serial drivers have always had problems, when used in anger, or large data sets of large volumes of data. Analysis of quite a few PPP problems over the years has been down to software drivers for serial ports.
> Vladimir Vassilevsky > DSP and Mixed Signal Design Consultant > http://www.abvolt.com >
-- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
On Thu, 23 Jul 2009 19:06:32 +0100, Paul Carpenter
<paul@pcserviceselectronics.co.uk> wrote:

>In article <ZM-dnZZ6coutAvXXnZ2dnUVZ_tWdnZ2d@giganews.com>, >nospam@nowhere.com says... >> >> >> Paul Carpenter wrote: >> >> >> > Until someone later wants to monitor what is happening and connects >> > a TRUE RS232 device and blows your circuits. >> >> Paul, >> >> I agree that the TTL level signaling is not correct RS-232. However it >> works just fine with the true RS-232 transceivers. It is handy to use a >> pair of logic gates to interface an MCU to a COM port for debug or setup >> purpose. > >Some employ a -ve threshold and get screwed by some PCs that only 0-some >positive voltage often laptops.
Sounds like the receiver is using a large hysteresis, with the negative going transition well below 0 V.
>> All RS-232 transceivers that I know of have the input threshold at about >> +1.4V, so they accept the TTL level. On the TTL side, you need to clamp >> the input, so it will take +/- 12V.
The practical reason for a threshold well above 0 V is the problems with powered down transmitters. An only or positive going transition threshold at or below 0 V would cause a constant Break (Space) state whenever the external transmitter is powered down. To avoid this, the threshold is usually set above 0 V, giving a Idle (Mark) state, when the transmitter is powered down or disconnected. Paul
"Not Really Me" <scott@validatedQWERTYsoftware.XYZZY.com> wrote in message 
news:7cral9F28uaiiU1@mid.individual.net...
> Vladimir Vassilevsky wrote: >> eeboarder wrote: >>> I am going to work on a project involving multiple devices on the >>> same network(3 or more). One device will have user input and >>> display(master). The other devices(slaves) will just collect sensory >>> data and possibly process PID control loops. Data speeds are not a >>> priority(< 1Mbps is okay). > Most likely it is going to be RS-232, >> SPI or I2C. So, you can do the ring topology over RS-232, or star >> topology over I2C or SPI. >> > > Don't try this with SPI, the distance is too great. I think it is > unlikely to work over I2C for the same reason, but I have less direct > experience with that. > > Your original thought to use RS-485 with MODBUS or PROFIBUS is good. > Although like some others I would say CAN is also a reasonable choice. > > > -- > Scott > Validated Software > Lafayette, CO >
Hi, if he does implement CAN bus, what chips do you recommend he use?.