http://en.wikipedia.org/wiki/1-Wire
.. might work for you, but it's not exactly what you are asking for
(only a single master).
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
CANbus. Peer to peer (multiple master) with built-in collision detection
and retransmission. Typical microcomputer CAN peripherals have
acceptance filters so that listeners are not bothered by messages they
don't care about. Decent rates, 1 Mbps for short (40 meter) runs, 125
Kbps and 250 Kbps often seen for longer runs.
--
Rich Webb Norfolk, VA
A simpler system would be with an RS-485 line driver.
Google for RS-485 and lots of circuits and software will be made available.
Here's a start: https://secure.wikimedia.org/wikipedia/en/wiki/EIA-485
hamilton
>A simpler system would be with an RS-485 line driver.
>
>Google for RS-485 and lots of circuits and software will be made available.
>
>Here's a start: https://secure.wikimedia.org/wikipedia/en/wiki/EIA-485
>
>hamilton
Or ethernet, with power over ethernet.
Maybe a bit overkill here, but it is sort of a standard, cables and connectors are too.
>I need to construct a network of sensors. Because of limitations they
>MUST be wired. This means NO WiFi, ZigBee, bluetooth, or other rf/
>wireless networking protocols. What I need to do is to transmit power
>to each sensor, and when triggered above a preset level, the sensors
>send their address code and the voltage value. I'm thinking there
>will not need to be more than 8 bits of data in either the address or
>voltage. I assume the data will need to be sent serially. What's the
>best way to do this?
The HART protocol
http://en.wikipedia.org/wiki/Highway_Addressable_Remote_Transducer_Protocol
might be an overkill for your application, but runs on standard 4-20
mA current loops.
>Can someone point me to a reference (preferably
>on-line)? How do I avoid packet collision? Are there alternatives to
>doing data transmission synchronously to avoid this?
Why not simply use a master/slave protocol and address slaves
individually and only the addressed slave sends the data.
>There is no need
>for high speed/high data rate transmission, but what's the highest
>rate I can get over twisted pair? Is there a reference somewhere that
>shows data rates vs distance? And lastly, what is the minimum number
>of wires I could use, assuming I use twisted pair of suffecient gauge
>so there's not a voltage drop (phantom powering?)?
If you do your own protocol, one pair should be enough. Put all
stations in series and power the loop with a sufficient voltage (24-60
V). Each device needs a rectifier and storage capacitor in the power
supply to ride through the time when the "Space (0)" bit is sent. Use
two stop bits so each asynchronous character has at least two bits in
the Mark ("1") state to charge the storage capacitor even if start
bit+8 data bits with "0" and even parity is sent.
Not necessarily simpler if there are multiple, asynchronous
transmitters. A 485 bus with that requirement pushes back onto the
implementer the need to come up with a method of handling collisions.
CAN peripherals can be a pain in the tuckus to set up but once that's
done you get "free" collision detection & retransmission, message
prioritization, and a built-in hardware CRC with every packet.
As Jan mentions, Ethernet -- particularly UDP/IP -- is another
possibility.
All are possible, but depends on distance. What are the spacings and
distances of the sensors?
Don't know yet. Sensors will likely be "clustered" in various areas,
then report back to a central monitor/master. An example (not what
I'm actually doing), would be a fire alarm system. You have sensors
in rooms on different floors. All report back to a master alarm
panel. Each floor could be considered a "cluster" where the sensors
are spaced relatively close to each other. The master station may be
far away from the individual clusters.
Thanks to everyone who responded. You've given me a lot to research
and think about. There look to be several ways to go with this. I
need to carefully evaluate each method and see which will be the best
for the situation, including which is the easiest to implement and
cost is a factor too.
For house size, no reason not to wire with cat-6 (8 wires), whether
you run ethernet or not. You can always use 3 of them for RS232 and 5
for token/polling/arbitration/etc.
For my new house, there will be double cat-6 to every room, including
bathroom. I don't like wireless in the house any way.
Is this homework? Just work out a software handshaking protocol, unless
you need like a billion BPS or something.
You could use telephone wire if you've got a slow enough data rate, and
either async (like modems used to use) or add some wires and clock the
data in/out like that two-wire protocol, which I forget what it's called.
Good Luck!
Rich
> Is this homework? Just work out a software handshaking protocol, unless
> you need like a billion BPS or something.
>
> You could use telephone wire if you've got a slow enough data rate, and
> either async (like modems used to use) or add some wires and clock the
> data in/out like that two-wire protocol, which I forget what it's called.
>
> Good Luck!
> Rich
Nope, not homework, research. "If this was homework, we'd know the
answer"
Not wiring up my house either. Something equivalent to a block of
apartments.
Not looking to re-invent the wheel. I want to work smart when I can,
and only work hard when I have to.
Looks like there are plenty of commercial, simple solutions
available. Thanks again to all who answered..
Still the same: Async. Transfer Mode. Just faster.
> > or add some wires and clock the
> > data in/out like that two-wire protocol, which I forget what it's called.
>
> > Good Luck!
> > Rich
>
> Nope, not homework, research. "If this was homework, we'd know the
> answer"
> Not wiring up my house either. Something equivalent to a block of
> apartments.
For longer distance, you might want to look into fibers. I know you
don't need the speed (Gs), but better isolation. It would cost around
$1 per meter, plus equipments. Right now, I am looking into some
RS232/GBIC converter modules.