EmbeddedRelated.com
Forums
Memfault Beyond the Launch

RS485 bus and auto-addressing

Started by pozz April 27, 2013
On 10/14/2013 5:39 PM, WangoTango wrote:
> In article <87vc11iq2l.fsf@devereux.me.uk>, john@devereux.me.uk says... >> "David K. Bryant" <dbryant_94585@earthlink.net> writes: >> >>> On 04/27/2013 08:14 PM, Michael Karas wrote: >>>> The way I've implemented auto addressing in the past is to arrange the >>>> serial bus connection to pass through the slave units on a gated pass >>>> through. Initially all slaves wake up with the pass through gated open. >>>> This causes just one slave to "see" the master. He gets the first >>>> address and then after a confirmation step with the master closes his >>>> pass through. The process repeats till the master realizes that no >>>> further devices respond on the serial chain. This works like a champ and >>>> is reliable. >>> >>> We have a winner! >>> >>> This is the best solution *AND* it remains within >>> the original design specs.... unlike other ideas >>> which ignore the original problem and start chasing >>> collision detection, etc. And it can be built so >>> that the Master does a periodic poll to see if >>> any new Slave nodes have joined the network. >> >> Depends on the application doesn't it? And how the gating is done I >> suppose. For example it looks like a node that is switched off or faulty >> will bring down the whole network (or a big part of it). May be OK for >> systems where everything has to be working at once anyway. But for >> something like machine monitoring you need more flexibility. >> > I agree. > I've seen too many HI'Z network transceivers get stuck when something > "bad" happens. I'm kind of fond of the "Screw Auto detect" and go with > fixed addresses for special stuff and a couple BCD knobs for everything > else. Sure stops a lot of head aches, and if someone is too stupid to > know how to twist a knob, maybe they shouldn't be installing the thing > in the first place. >
I am looking at an RS485 network/buss. Does anyone have a good link for collision detect and timeouts. Google finds lots, but not very definative. thanks hamilton
On Mon, 14 Oct 2013 19:39:42 -0400, WangoTango
<Asgard24@mindspring.com> wrote:

>In article <87vc11iq2l.fsf@devereux.me.uk>, john@devereux.me.uk says... >> "David K. Bryant" <dbryant_94585@earthlink.net> writes: >> >> > On 04/27/2013 08:14 PM, Michael Karas wrote: >> >> The way I've implemented auto addressing in the past is to arrange the >> >> serial bus connection to pass through the slave units on a gated pass >> >> through. Initially all slaves wake up with the pass through gated open. >> >> This causes just one slave to "see" the master. He gets the first >> >> address and then after a confirmation step with the master closes his >> >> pass through. The process repeats till the master realizes that no >> >> further devices respond on the serial chain. This works like a champ and >> >> is reliable. >> > >> > We have a winner! >> > >> > This is the best solution *AND* it remains within >> > the original design specs.... unlike other ideas >> > which ignore the original problem and start chasing >> > collision detection, etc. And it can be built so >> > that the Master does a periodic poll to see if >> > any new Slave nodes have joined the network. >> >> Depends on the application doesn't it? And how the gating is done I >> suppose. For example it looks like a node that is switched off or faulty >> will bring down the whole network (or a big part of it). May be OK for >> systems where everything has to be working at once anyway. But for >> something like machine monitoring you need more flexibility. >> >I agree. >I've seen too many HI'Z network transceivers get stuck when something >"bad" happens. I'm kind of fond of the "Screw Auto detect" and go with >fixed addresses for special stuff and a couple BCD knobs for everything >else. Sure stops a lot of head aches, and if someone is too stupid to >know how to twist a knob, maybe they shouldn't be installing the thing >in the first place.
While mechanical switches are OK in "friendly" environment (IP20), but still there are problems with unreliable DIP switches for address selection. However, in some harsh environment such as IP65, using an external mechanical switch for address setting is problematic. Opening the device in the field for address selection might (let the inert gas out and) let moisture in, not to mention the risk of damaging the seals by enclosure opening. So there are legitimate reasons for avoiding mechanical address selection switches.
On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote:

> I've seen too many HI'Z network transceivers get stuck when something > "bad" happens. I'm kind of fond of the "Screw Auto detect" and go > with fixed addresses for special stuff and a couple BCD knobs for > everything else. Sure stops a lot of head aches, and if someone is > too stupid to know how to twist a knob, maybe they shouldn't be > installing the thing in the first place.
That's fine, except that "a couple BCD knobs" can be _very_ expensive in many environments (e.g. explosion-proof or water-proof requirements). -- Grant Edwards grant.b.edwards Yow! I'm into SOFTWARE! at gmail.com
On 15/10/2013 15:31, Grant Edwards wrote:
> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: > >> I've seen too many HI'Z network transceivers get stuck when something >> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >> with fixed addresses for special stuff and a couple BCD knobs for >> everything else. Sure stops a lot of head aches, and if someone is >> too stupid to know how to twist a knob, maybe they shouldn't be >> installing the thing in the first place. > > That's fine, except that "a couple BCD knobs" can be _very_ expensive > in many environments (e.g. explosion-proof or water-proof > requirements).
Except the address could be programmed using RS485 in a standalone setup. -- Mike Perkins Video Solutions Ltd www.videosolutions.ltd.uk
On 10/15/2013 08:24 PM, Mike Perkins wrote:
> On 15/10/2013 15:31, Grant Edwards wrote: >> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: >> >>> I've seen too many HI'Z network transceivers get stuck when something >>> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >>> with fixed addresses for special stuff and a couple BCD knobs for >>> everything else. Sure stops a lot of head aches, and if someone is >>> too stupid to know how to twist a knob, maybe they shouldn't be >>> installing the thing in the first place. >> >> That's fine, except that "a couple BCD knobs" can be _very_ expensive >> in many environments (e.g. explosion-proof or water-proof >> requirements). > > Except the address could be programmed using RS485 in a standalone setup. >
It's also possible to come up with a design for auto detect that doesn't demand any additional reliability compared to normal communication.
On 2013-10-15, Mike Perkins <spam@spam.com> wrote:
> On 15/10/2013 15:31, Grant Edwards wrote: >> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: >> >>> I've seen too many HI'Z network transceivers get stuck when something >>> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >>> with fixed addresses for special stuff and a couple BCD knobs for >>> everything else. Sure stops a lot of head aches, and if someone is >>> too stupid to know how to twist a knob, maybe they shouldn't be >>> installing the thing in the first place. >> >> That's fine, except that "a couple BCD knobs" can be _very_ expensive >> in many environments (e.g. explosion-proof or water-proof >> requirements). > > Except the address could be programmed using RS485 in a standalone setup.
True, but now you've added a device commissioning step that has to be done on a bench somewhere. -- Grant Edwards grant.b.edwards Yow! Did I do an INCORRECT at THING?? gmail.com
On 15/10/2013 19:35, Arlet Ottens wrote:
> On 10/15/2013 08:24 PM, Mike Perkins wrote: >> On 15/10/2013 15:31, Grant Edwards wrote: >>> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: >>> >>>> I've seen too many HI'Z network transceivers get stuck when something >>>> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >>>> with fixed addresses for special stuff and a couple BCD knobs for >>>> everything else. Sure stops a lot of head aches, and if someone is >>>> too stupid to know how to twist a knob, maybe they shouldn't be >>>> installing the thing in the first place. >>> >>> That's fine, except that "a couple BCD knobs" can be _very_ expensive >>> in many environments (e.g. explosion-proof or water-proof >>> requirements). >> >> Except the address could be programmed using RS485 in a standalone setup. > > It's also possible to come up with a design for auto detect that doesn't > demand any additional reliability compared to normal communication.
I was merely thinking of a way to eliminate switches and knobs. Any reliability will be down environmental noise and judicious use of CRCs. The CRC for setting the address could even be different to one used in normal communications.
On 15/10/2013 20:03, Grant Edwards wrote:
> On 2013-10-15, Mike Perkins <spam@spam.com> wrote: >> On 15/10/2013 15:31, Grant Edwards wrote: >>> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: >>> >>>> I've seen too many HI'Z network transceivers get stuck when something >>>> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >>>> with fixed addresses for special stuff and a couple BCD knobs for >>>> everything else. Sure stops a lot of head aches, and if someone is >>>> too stupid to know how to twist a knob, maybe they shouldn't be >>>> installing the thing in the first place. >>> >>> That's fine, except that "a couple BCD knobs" can be _very_ expensive >>> in many environments (e.g. explosion-proof or water-proof >>> requirements). >> >> Except the address could be programmed using RS485 in a standalone setup. > > True, but now you've added a device commissioning step that has to be > done on a bench somewhere.
It would be relatively easy to incorporate all the RS485 and programming utility in a small enclosure with a few AA batteries for field programming. It all depends on whether you want DIP switches or other means of setting the address?
On 15/10/2013 19:35, Arlet Ottens wrote:
> On 10/15/2013 08:24 PM, Mike Perkins wrote: >> On 15/10/2013 15:31, Grant Edwards wrote: >>> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: >>> >>>> I've seen too many HI'Z network transceivers get stuck when something >>>> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >>>> with fixed addresses for special stuff and a couple BCD knobs for >>>> everything else. Sure stops a lot of head aches, and if someone is >>>> too stupid to know how to twist a knob, maybe they shouldn't be >>>> installing the thing in the first place. >>> >>> That's fine, except that "a couple BCD knobs" can be _very_ expensive >>> in many environments (e.g. explosion-proof or water-proof >>> requirements). >> >> Except the address could be programmed using RS485 in a standalone setup. > > It's also possible to come up with a design for auto detect that doesn't > demand any additional reliability compared to normal communication.
I was thinking of simplicity where peripherals are dumb units, where all each unit needs to do is match an address and accept the data, and possibly transmit a reply. The alternative is to program each peripheral with details of its functionality, to tell the master what it is, and have the provision for reducing effects of clashes and cope with power-downs / brown-outs (forgetting address) etc. I've always liked the simple approach for overall system reliability. -- Mike Perkins Video Solutions Ltd www.videosolutions.ltd.uk
Grant Edwards wrote:
> On 2013-10-15, Mike Perkins <spam@spam.com> wrote: >> On 15/10/2013 15:31, Grant Edwards wrote: >>> On 2013-10-14, WangoTango <Asgard24@mindspring.com> wrote: >>> >>>> I've seen too many HI'Z network transceivers get stuck when something >>>> "bad" happens. I'm kind of fond of the "Screw Auto detect" and go >>>> with fixed addresses for special stuff and a couple BCD knobs for >>>> everything else. Sure stops a lot of head aches, and if someone is >>>> too stupid to know how to twist a knob, maybe they shouldn't be >>>> installing the thing in the first place. >>> >>> That's fine, except that "a couple BCD knobs" can be _very_ expensive >>> in many environments (e.g. explosion-proof or water-proof >>> requirements). >> >> Except the address could be programmed using RS485 in a standalone setup. > > True, but now you've added a device commissioning step that has to be > done on a bench somewhere. >
We do it after the devices are installed. It is a pain, but it's only done once for the life of the device. I put an "autodetect" design on paper, but it got deprioritized, and would be almost as much trouble as programming the devices one by one anyway. You have to connect them one at a time, walk to the master controller, do stuff off a sheet, repeat lather rinse. And if you make a mistake, it's no fun to debug. -- Les Cargill

Memfault Beyond the Launch