Discussion:
[EE} Collision detection
David C Brown
2017-10-22 17:54:09 UTC
Permalink
I am playing about with some home automation. I am looking towards a
multimaster bus using a balanced transmitter and receiver such as RS485.

Now I well understand how to handle the collision detection in software: I
have done that in the past. But in the past I used open collector TTL on a
single ended bus.

That is not adequate in the present application because I am looking at
distances up to 25 metres.(at a maybe 10KB)

So the question is: what chips can drive the balanced line yet survive
contention without cooking



__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
Derbyshire eMail: ***@gmail.com
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Denny Esterline
2017-10-22 18:16:34 UTC
Permalink
Look into CAN bus.
Even if you just consider mis-using the CAN transceivers and physical
layer, there's some really interesting possibilities.
Post by David C Brown
I am playing about with some home automation. I am looking towards a
multimaster bus using a balanced transmitter and receiver such as RS485.
Now I well understand how to handle the collision detection in software: I
have done that in the past. But in the past I used open collector TTL on a
single ended bus.
That is not adequate in the present application because I am looking at
distances up to 25 metres.(at a maybe 10KB)
So the question is: what chips can drive the balanced line yet survive
contention without cooking
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>
*Sent from my etch-a-sketch*
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
David C Brown
2017-10-22 21:01:34 UTC
Permalink
Thanks, Denny.. The MCP2561 looks suitable at a decent price.
Never worked with CAN so it didn't get past my mentals clerosis.

__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
Derbyshire eMail: ***@gmail.com
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*
Post by Denny Esterline
Look into CAN bus.
Even if you just consider mis-using the CAN transceivers and physical
layer, there's some really interesting possibilities.
Post by David C Brown
I am playing about with some home automation. I am looking towards a
multimaster bus using a balanced transmitter and receiver such as RS485.
I
Post by David C Brown
have done that in the past. But in the past I used open collector TTL
on a
Post by David C Brown
single ended bus.
That is not adequate in the present application because I am looking at
distances up to 25 metres.(at a maybe 10KB)
So the question is: what chips can drive the balanced line yet survive
contention without cooking
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>
*Sent from my etch-a-sketch*
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
a***@stfc.ac.uk
2017-10-22 22:20:04 UTC
Permalink
Doesn't specially need to be CAB bus, but use CAN transceivers as transceivers on an RS485 bus. Simplifies the TX/RX switching (you don't need to) and the receiver is 'always on' then you need to compare the received message with the transmitted message to detect a collision.
-----Original Message-----
Of Denny Esterline
Sent: 22 October 2017 19:17
Subject: Re: [EE} Collision detection
Look into CAN bus.
Even if you just consider mis-using the CAN transceivers and physical layer,
there's some really interesting possibilities.
Post by David C Brown
I am playing about with some home automation. I am looking towards a
multimaster bus using a balanced transmitter and receiver such as RS485.
Now I well understand how to handle the collision detection in
software: I have done that in the past. But in the past I used open
collector TTL on a single ended bus.
That is not adequate in the present application because I am looking
at distances up to 25 metres.(at a maybe 10KB)
So the question is: what chips can drive the balanced line yet
survive contention without cooking
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>
*Sent from my etch-a-sketch*
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Harold Hallikainen
2017-10-23 00:30:33 UTC
Permalink
I think RS485 chips will survive contention without damage. I've done
master/slave systems with multiple slaves. That avoids contention since
the slaves only respond to requests from the master. Another approach is
"mini-slotted" With a mini-slotted network, each device is allocated a
mini-slot time where it is allowed to start transmission. Once a device
comes on line during its minislot, it may continue transmitting
indefinitely. When it's done, the "site counter" continues to advance each
mini-slot time. I've also called this an "absence of data token passing."
A lack of data "passes the token" to the next site in system. Finally,
there's CSMA with collision detection and random backoff.

Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
David C Brown
2017-10-23 06:54:08 UTC
Permalink
Post by Harold Hallikainen
I think RS485 chips will survive contention without damage.
The smoking ruins on my bench would suggest otherwise :-) :-)

I may well use a token system rather than collision detection since it is
in many ways simpler. The main downside is that the slave has to wait to
send its data, rather than sending it immediately. However, with a
relatively low number of slaves and short messages this might not be a real
problem. Also you can give each slave a priority and offer the token to
the higher priority ones more often in the cycle, even allowing dynamic
priority changes.

Any way up it seems wise to use transceivers that can survive contention
and thee CAN chips look ideal. Thanks.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Isaac M. Bavaresco
2017-10-23 12:08:17 UTC
Permalink
Post by David C Brown
I may well use a token system rather than collision detection since it is
in many ways simpler. The main downside is that the slave has to wait to
send its data, rather than sending it immediately.
In a master-slave setup, the slaves can be given a transmission slot
immediately after the master finishes transmitting the command, so the
addressed slave can respond immediately.
If your slave's firmware is well written and there is not much latency,
the response time slot can be short, so if the slave doesn't respond
within a time limit it loses its right to transmit and the master
addresses another slave or reissues the command.

If your slave cannot respond immediately because it takes time to do its
job and get the data, implement a split transaction with two different
commands. The first command tells the slave to start operation and it
responds with just an acknowledge of the command. Later, the master uses
a different command to query the slave progress and/or get the result data.

Cheers,
Isaac


---
Este email foi escaneado pelo Avast antivĂ­rus.
https://www.avast.com/antivirus
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership op
Denny Esterline
2017-10-23 16:53:50 UTC
Permalink
Exactly.
The CAN physical layer is designed such that bus contention does not cause
damage to any parts.

The collision detection is managed (grossly simplified description) by
having every transmitter receive at the same time it is sending. If the bit
transmitted does not match the bit received -> error.


The actual CAN protocol is a pretty large pile of information and then it
gets expanded from there into several specific variants. But simply taking
those two basic concepts and using them as a physical layer for most any
protocol will get you a long way.
Post by a***@stfc.ac.uk
Doesn't specially need to be CAB bus, but use CAN transceivers as
transceivers on an RS485 bus. Simplifies the TX/RX switching (you don't
need to) and the receiver is 'always on' then you need to compare the
received message with the transmitted message to detect a collision.
-----Original Message-----
Of Denny Esterline
Sent: 22 October 2017 19:17
Subject: Re: [EE} Collision detection
Look into CAN bus.
Even if you just consider mis-using the CAN transceivers and physical
layer,
there's some really interesting possibilities.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
David C Brown
2017-10-23 17:01:42 UTC
Permalink
You must all appreciate that as a retired engineer I use PIC programming to
keep my brain; active that is far superior to crosswords or sudukos.
So the choice between using a ready to go protocol or designing a custom
one is a no brainer :-)

__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
Derbyshire eMail: ***@gmail.com
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*
Post by Denny Esterline
Exactly.
The CAN physical layer is designed such that bus contention does not cause
damage to any parts.
The collision detection is managed (grossly simplified description) by
having every transmitter receive at the same time it is sending. If the bit
transmitted does not match the bit received -> error.
The actual CAN protocol is a pretty large pile of information and then it
gets expanded from there into several specific variants. But simply taking
those two basic concepts and using them as a physical layer for most any
protocol will get you a long way.
Post by a***@stfc.ac.uk
Doesn't specially need to be CAB bus, but use CAN transceivers as
transceivers on an RS485 bus. Simplifies the TX/RX switching (you don't
need to) and the receiver is 'always on' then you need to compare the
received message with the transmitted message to detect a collision.
-----Original Message-----
Behalf
Post by a***@stfc.ac.uk
Of Denny Esterline
Sent: 22 October 2017 19:17
Subject: Re: [EE} Collision detection
Look into CAN bus.
Even if you just consider mis-using the CAN transceivers and physical
layer,
there's some really interesting possibilities.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
r***@bredband.net
2017-10-23 21:08:03 UTC
Permalink
Another important aspect of the CAN transceiver is that it has one
dominant and one recessive state. The dominant state will always win in
case of a collision.

/Ruben

On Mon, 23 Oct 2017 09:53:50 -0700, Denny Esterline
Post by Denny Esterline
Exactly.
The CAN physical layer is designed such that bus contention does not cause
damage to any parts.
The collision detection is managed (grossly simplified description) by
having every transmitter receive at the same time it is sending. If the bit
transmitted does not match the bit received -> error.
The actual CAN protocol is a pretty large pile of information and then it
gets expanded from there into several specific variants. But simply taking
those two basic concepts and using them as a physical layer for most any
protocol will get you a long way.
Post by a***@stfc.ac.uk
Doesn't specially need to be CAB bus, but use CAN transceivers as
transceivers on an RS485 bus. Simplifies the TX/RX switching (you don't
need to) and the receiver is 'always on' then you need to compare the
received message with the transmitted message to detect a collision.
-----Original Message-----
Of Denny Esterline
Sent: 22 October 2017 19:17
Subject: Re: [EE} Collision detection
Look into CAN bus.
Even if you just consider mis-using the CAN transceivers and physical
layer,
there's some really interesting possibilities.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
j***@jpes.com
2017-10-23 12:32:38 UTC
Permalink
Don't you mean CDMA?

Regards,

Jim
-------- Original Message --------
Subject: RE: [EE} Collision detection
Date: Sun, October 22, 2017 7:30 pm
I think RS485 chips will survive contention without damage. I've done
master/slave systems with multiple slaves. That avoids contention since
the slaves only respond to requests from the master. Another approach is
"mini-slotted" With a mini-slotted network, each device is allocated a
mini-slot time where it is allowed to start transmission. Once a device
comes on line during its minislot, it may continue transmitting
indefinitely. When it's done, the "site counter" continues to advance each
mini-slot time. I've also called this an "absence of data token passing."
A lack of data "passes the token" to the next site in system. Finally,
there's CSMA with collision detection and random backoff.
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
David C Brown
2017-10-23 15:52:53 UTC
Permalink
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the
usual acronym

__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
Derbyshire eMail: ***@gmail.com
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*
Post by j***@jpes.com
Don't you mean CDMA?
Regards,
Jim
-------- Original Message --------
Subject: RE: [EE} Collision detection
Date: Sun, October 22, 2017 7:30 pm
I think RS485 chips will survive contention without damage. I've done
master/slave systems with multiple slaves. That avoids contention since
the slaves only respond to requests from the master. Another approach is
"mini-slotted" With a mini-slotted network, each device is allocated a
mini-slot time where it is allowed to start transmission. Once a device
comes on line during its minislot, it may continue transmitting
indefinitely. When it's done, the "site counter" continues to advance
each
mini-slot time. I've also called this an "absence of data token passing."
A lack of data "passes the token" to the next site in system. Finally,
there's CSMA with collision detection and random backoff.
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Clint Jay
2017-10-23 15:56:25 UTC
Permalink
CSMA/CD as used by 10b2 Ethernet or you could take a leaf from another
networking technology of similar era and use a token ring contention
control method?
Post by David C Brown
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the
usual acronym
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>
*Sent from my etch-a-sketch*
Post by j***@jpes.com
Don't you mean CDMA?
Regards,
Jim
-------- Original Message --------
Subject: RE: [EE} Collision detection
Date: Sun, October 22, 2017 7:30 pm
I think RS485 chips will survive contention without damage. I've done
master/slave systems with multiple slaves. That avoids contention since
the slaves only respond to requests from the master. Another approach
is
Post by j***@jpes.com
"mini-slotted" With a mini-slotted network, each device is allocated a
mini-slot time where it is allowed to start transmission. Once a device
comes on line during its minislot, it may continue transmitting
indefinitely. When it's done, the "site counter" continues to advance
each
mini-slot time. I've also called this an "absence of data token
passing."
Post by j***@jpes.com
A lack of data "passes the token" to the next site in system. Finally,
there's CSMA with collision detection and random backoff.
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
David C Brown
2017-10-23 16:48:48 UTC
Permalink
Yes. I am familiar with the protocols from that era. It was the hardware
chip that eluded me.

I am settling on a token system but not a ring. Rather a polling system.
No good for a a system with unlimited and uncontrolled drop points. But
excellent for a smaller sytem where the characteristics of each drop are
known

__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
Derbyshire eMail: ***@gmail.com
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*
Post by Clint Jay
CSMA/CD as used by 10b2 Ethernet or you could take a leaf from another
networking technology of similar era and use a token ring contention
control method?
Post by David C Brown
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the
usual acronym
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak Phone: 01663 733236
SK23 7ND web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>
*Sent from my etch-a-sketch*
Post by j***@jpes.com
Don't you mean CDMA?
Regards,
Jim
-------- Original Message --------
Subject: RE: [EE} Collision detection
Date: Sun, October 22, 2017 7:30 pm
I think RS485 chips will survive contention without damage. I've done
master/slave systems with multiple slaves. That avoids contention
since
Post by David C Brown
Post by j***@jpes.com
the slaves only respond to requests from the master. Another approach
is
Post by j***@jpes.com
"mini-slotted" With a mini-slotted network, each device is allocated
a
Post by David C Brown
Post by j***@jpes.com
mini-slot time where it is allowed to start transmission. Once a
device
Post by David C Brown
Post by j***@jpes.com
comes on line during its minislot, it may continue transmitting
indefinitely. When it's done, the "site counter" continues to advance
each
mini-slot time. I've also called this an "absence of data token
passing."
Post by j***@jpes.com
A lack of data "passes the token" to the next site in system.
Finally,
Post by David C Brown
Post by j***@jpes.com
there's CSMA with collision detection and random backoff.
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Loading...