Maker Pro
Maker Pro

CHEAP Serial bus, control 200 devices, 50 meters

B

Brook Stevens

I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

It is not a noisy environment. No welding, for example.
I don't need more than 100kHz speed, and might get by with even less.
I don't need environment protection. The devices can be just a circuit
board. It's indoors, not a washdown area.
I don't need super high reliability. It's not a life support system.
Cost is a major concern.

I've been looking at some industrial bus options. Either they cannot handle
200 devices, cannot handle 50 meters, or are very expensive (x200). But,
there are so many, I don't know them all, and maybe some can be modified to
do what I need that I'm not aware of.

Can anyone offer a suggestion or alternative?
 
C

Chris

Brook said:
I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

It is not a noisy environment. No welding, for example.
I don't need more than 100kHz speed, and might get by with even less.
I don't need environment protection. The devices can be just a circuit
board. It's indoors, not a washdown area.
I don't need super high reliability. It's not a life support system.
Cost is a major concern.

I've been looking at some industrial bus options. Either they cannot handle
200 devices, cannot handle 50 meters, or are very expensive (x200). But,
there are so many, I don't know them all, and maybe some can be modified to
do what I need that I'm not aware of.

Can anyone offer a suggestion or alternative?

Hi, Mr. Stevens. First, you've got a problematic description of what
you want.

* What do you mean by 100KHz speed? Does that mean you have to sense
or control 100KHz inputs/outputs, or that you feel your serial
communications speed should be that fast? If so, why? What are you
doing?

* You're saying you need to control 200 machines with modules that
have 16 in and 16 out. What kinds of I/O do you need? Logic level,
isolated, DC, relay, or AC output, opto input, what?

* You need to give more information about your environment. Do you
need something that's enclosed? What kind of power do you have
available?

* Is this supposed to be a "store-bought" solution, or do you have or
want latitude to roll your own stuff? Are you willing to be married to
this forever? Are your employers willing to let you be married to your
project forever? Or are they your machines (in which case, you do what
you want, unless you ever want to sell your business).

* Obviously we all want to spend a minimum amount, but you have to
give some information as to what kind of price range you're looking
for. That is dependent, on other things, on the rest of your project
definition.

So it goes. Just as a conversation starter, I would purchase a
multi-port serial card which would give you eight double twisted pair
RS-485 outputs. You can realistically expect 31 receivers for each
master from the computer, which would give you the potential for 248
machines.

On the receiver (machine) end, I would start out with an inexpensive
16I/16O programmable Logic Controller (PLC) which has RS-485
capability. As a low end solution, you might want to look at the
Koyo/Automation Direct D0-06DR which has 20 isolated DC inputs, 16
relay outputs, works directly off line voltage, has RS-485 comm built
in, and is off-the-shelf (meaning that you won't be married to it when
it's done). That goes for $215 USD per point, which gets you to around
$43,000 for 200 machines. I would also purchase separate 24VDC power
supplies, small line filters, and cheap NEMA1 enclosures for each unit.
Leaving some wiggle room, it would look like you're talking about
around 50K to 55K for the project hardware.

OK. How about calling Automation Direct, talking to their apps
engineers (they are helpful and will answer questions like this),
firming up whether the D0-06DR will work for you, and what kind of
programming you will require for the PC, as well as whether any of the
industrial busses will help your project, or whether it would be better
to do home brew software for comm and control (dependent on your PC
programming ability). At some point, if there's a major limitation,
you'll have a starting point for discussion. Or if this post is way
off base, possibly you could follow up with more information.
Good luck
Chris
 
R

Rene Tschaggelar

Brook said:
I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

It is not a noisy environment. No welding, for example.
I don't need more than 100kHz speed, and might get by with even less.
I don't need environment protection. The devices can be just a circuit
board. It's indoors, not a washdown area.
I don't need super high reliability. It's not a life support system.
Cost is a major concern.

I've been looking at some industrial bus options. Either they cannot handle
200 devices, cannot handle 50 meters, or are very expensive (x200). But,
there are so many, I don't know them all, and maybe some can be modified to
do what I need that I'm not aware of.

Can anyone offer a suggestion or alternative?

I'd go for RS422, a bidirectional bus with one leading in
each direction. Physically identical to the RS485, it doesn't
require you to switch direction at the cost of an additional
line pair. There are input impedances that limit the number
of devices to 32 or 128, depending on the receivers.
So after the number of devices is reached, just add a
repeater.
I'd use 6 wires for the bus. 4 wires for the signal plus
one for GND and +5V. This would enable you to have the local
RS422_to_CMOS plus perhaps isolators powered from the bus.

Rene
 
P

Paul Burke

Brook said:
I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

It is not a noisy environment. No welding, for example.
I don't need more than 100kHz speed, and might get by with even less.
I don't need environment protection.

There are a lot of serial buses- Profibus, Modbus, Bitbus etc. etc. Most
limit the number of drops- ususally 7 bit or less addresses, but more
often the drivers have a lower limit anyway. So you'll probably need to
partition the system into several buses.

You'll probably need to do that anyway, to get anything like a realistic
speed of response- these buses tend to poll around the connected
devices, and with a well- pouplated bus you vcan get significant delays.


Paul Burke
 
B

BEVERNON

I need PC control/automation of:
There are a lot of serial buses- Profibus, Modbus, Bitbus etc. etc. Most
limit the number of drops- ususally 7 bit or less addresses, but more
often the drivers have a lower limit anyway. So you'll probably need to
partition the system into several buses.

You'll probably need to do that anyway, to get anything like a realistic
speed of response- these buses tend to poll around the connected
devices, and with a well- pouplated bus you vcan get significant delays.


Paul Burke

I think you might consider providing more information about the cost and
performance targets. You can get USB for about 15 bucks a board but distance
is limited. What happens if your circuitry doesn't work? Do you have a
failsafe mechanism?
Brad
 
A

Armin Steinhoff

Brook said:
I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

It is not a noisy environment. No welding, for example.
I don't need more than 100kHz speed, and might get by with even less.

A scan time of 1kHz is possible with Profibus DP (12Mb/s) under QNX6.3
and ~32 devices. In order to handle 200! devices you need at least 2 DP
masters ... but the scan time is much higher.

The fieldbus Interbus is able to handle up to 255 devices by one master
.... but the scan time is then > 50ms. It's going to be faster if
additional masters running bus segments with less devices. Up to 4
controllers are supported in one PC under QNX6.3.

A faster scan time is possible with our new EtherCAT (100Mb/s) master
(available end of Q1, QNX6.3) ... the realistice maximum scan frequency
is then 5-10kHz. One master can handle up to 65k devices :)

Best Regards

Armin Steinhoff

http://www.steinhoff-automation.com
 
N

Nico Coesel

Brook Stevens said:
I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

Look for ethernet I/O boxes. Something like this (I just found it with
Google):
http://www.hw-group.com/products/io_controller/index_en.html
 
J

j.b. miller

If you're going to design this hardware yourself you could use any simple
microcontroller and serial support chips. BAre bone it can be made for about
$1/point or I/O pin.
RS485 ,even RS232 could be used fro serial communications.
What isn't said is speed/throughput of the network, master/slaves,etc.Use of
SSRs for machine I/O ? etc.
Include that with the micro and you could do it for about $200 per machine
as I've been there done that.
Jay
 
A

Armin Steinhoff

j.b. miller said:
If you're going to design this hardware yourself you could use any simple
microcontroller and serial support chips. BAre bone it can be made for about
$1/point or I/O pin.
RS485 ,even RS232 could be used fro serial communications.
What isn't said is speed/throughput of the network, master/slaves,etc.Use of
SSRs for machine I/O ? etc.
Include that with the micro and you could do it for about $200 per machine

A fieldbus related IO module costs less :)

Armin
 
D

Dave VanHorn

Not sure what you mean by "100kHz" but in addition to the rest of the
suggestions, you CAN run RS232 in a ring topology, where A talks to B and
listens to Z, B talks to C and listens to A, and so on. Messages have a
sender and recipient, and anything that isn't for "me" gets passed along the
chain. You also have a "time to live" that is decremented whenever the
packet is passed, so if it is a 30 device loop, you set that to maybe 32..
When it hits zero, the packet is dropped.

All the devices have to implement the protocol, and deal with
dropped/corrupted packets, but it's a pretty nice way to go, in that at any
point in the loop, only one machine is talking to one machine on a cable, so
you get full bandwidth between all machines, at the expense of a short time
delay to move the packets.
 
B

Brook Stevens

Chris said:
* What do you mean by 100KHz speed? Does that mean you have to sense
or control 100KHz inputs/outputs, or that you feel your serial
communications speed should be that fast? If so, why? What are you
doing?

You're right, that was unclear. I meant 100Kbps. I realize the protocol will
have some overhead, and that's fine. And I could maybe get by with a lot
less. For example, I have to feed a powder from a loss-in-weight feeder. The
PC has to control the feeder motor and monitor the weight. I have different
options for controlling the motor. If I use stepper motors and try to
control every step from the PC, I need more speed. If I just tell it
start/stop, then I don't need nearly as much speed.
* You're saying you need to control 200 machines with modules that
have 16 in and 16 out. What kinds of I/O do you need? Logic level,
isolated, DC, relay, or AC output, opto input, what?

Logic level.
* You need to give more information about your environment. Do you
need something that's enclosed? What kind of power do you have
available?

I don't need it enclosed. I have 120v AC, but I expect the devices would run
on 5-12v DC.
* Is this supposed to be a "store-bought" solution, or do you have or
want latitude to roll your own stuff? Are you willing to be married to
this forever? Are your employers willing to let you be married to your
project forever? Or are they your machines (in which case, you do what
you want, unless you ever want to sell your business).

Good question. :) I can be married to it. I would roll my own, but that
depends on how easy it is. If the chips exist that will do most of the work
for me, then I would roll my own. Then it depends on how much money will it
save me over the store-bought alternatives. Looking at the prices I'm
finding, and the prices you listed below, it's looking more and more like I
should build my own.

If I roll my own, I also need not just a bus, but a protocol to address and
communicate with the i/o modules.
* Obviously we all want to spend a minimum amount, but you have to
give some information as to what kind of price range you're looking
for. That is dependent, on other things, on the rest of your project
definition.

I just wanted some suggestions. But, I wonder if I can't roll my own for
$100/machine.
So it goes. Just as a conversation starter, I would purchase a
multi-port serial card which would give you eight double twisted pair
RS-485 outputs. You can realistically expect 31 receivers for each
master from the computer, which would give you the potential for 248
machines.

On the receiver (machine) end, I would start out with an inexpensive
16I/16O programmable Logic Controller (PLC) which has RS-485
capability. As a low end solution, you might want to look at the
Koyo/Automation Direct D0-06DR which has 20 isolated DC inputs, 16
relay outputs, works directly off line voltage, has RS-485 comm built
in, and is off-the-shelf (meaning that you won't be married to it when
it's done). That goes for $215 USD per point, which gets you to around
$43,000 for 200 machines. I would also purchase separate 24VDC power
supplies, small line filters, and cheap NEMA1 enclosures for each unit.
Leaving some wiggle room, it would look like you're talking about
around 50K to 55K for the project hardware.

OK. How about calling Automation Direct, talking to their apps
engineers (they are helpful and will answer questions like this),
firming up whether the D0-06DR will work for you, and what kind of
programming you will require for the PC, as well as whether any of the
industrial busses will help your project, or whether it would be better
to do home brew software for comm and control (dependent on your PC
programming ability). At some point, if there's a major limitation,
you'll have a starting point for discussion. Or if this post is way
off base, possibly you could follow up with more information.


Thanks Chris. That's a good suggestion. That's just the type of info I was
looking for - a low-end solution. Now I wonder if there is a lower end?
 
B

Brook Stevens

Rene said:
I'd go for RS422, a bidirectional bus with one leading in
each direction. Physically identical to the RS485, it doesn't
require you to switch direction at the cost of an additional
line pair. There are input impedances that limit the number
of devices to 32 or 128, depending on the receivers.
So after the number of devices is reached, just add a
repeater.
I'd use 6 wires for the bus. 4 wires for the signal plus
one for GND and +5V. This would enable you to have the local
RS422_to_CMOS plus perhaps isolators powered from the bus.

Thanks Rene. RS-422 seems like a good option for the bus. But, then what
protocol should the devices use to communicate with the PC? The PC needs to
address one out of 200 devices and tell it to set it's outputs, or to send
it's inputs.
 
B

Brook Stevens

Dave said:
Not sure what you mean by "100kHz" but in addition to the rest of the

Sorry, I meant 100k bits per second.
suggestions, you CAN run RS232 in a ring topology, where A talks to B and
listens to Z, B talks to C and listens to A, and so on. Messages have a
sender and recipient, and anything that isn't for "me" gets passed along the
chain. You also have a "time to live" that is decremented whenever the
packet is passed, so if it is a 30 device loop, you set that to maybe 32..
When it hits zero, the packet is dropped.

All the devices have to implement the protocol, and deal with
dropped/corrupted packets, but it's a pretty nice way to go, in that at any
point in the loop, only one machine is talking to one machine on a cable, so
you get full bandwidth between all machines, at the expense of a short time
delay to move the packets.

Very interesting! Thanks for the idea.
 
B

Brook Stevens

j.b. miller on 2/1/05 said:
If you're going to design this hardware yourself you could use any simple
microcontroller and serial support chips. BAre bone it can be made for about
$1/point or I/O pin.
RS485 ,even RS232 could be used fro serial communications.

That sounds good.
What isn't said is speed/throughput of the network, master/slaves,etc.Use of
SSRs for machine I/O ? etc.

I'm thinking speed is not a major factor. The PC (ie: the module that the PC
is connected to) could be the 1 master, and every other module can be a
slave.

SSRs would be fine. As long as I can get TTL i/o at each machine, I can
handle the rest from there.
Include that with the micro and you could do it for about $200 per machine
as I've been there done that.

I'd hoped I could do it for less if designing the hardware myself. Are you
sure it would be that much?
 
R

Rene Tschaggelar

Brook said:
Rene Tschaggelar wrote:




Thanks Rene. RS-422 seems like a good option for the bus. But, then what
protocol should the devices use to communicate with the PC? The PC needs to
address one out of 200 devices and tell it to set it's outputs, or to send
it's inputs.

A master slave protocol. This means the master (= PC)
sends a command and only the adressed device on the bus
replies.
This means there is an adress byte included in each
message. A CRC is recommended. and if the length is
variable, a length byte (word).

Rene
 
J

j.b. miller

$10 for micro and minimal support stuff(xtal,c's,r's,etc)
$5 /SSR * 16= $90
$10 PCB
$10 case
$10 I/O connectors
$10 power supply stuff( c's and reg)
$5/Input proection/level shift etc. *16 = 90

and that's just the rough cut for hardware !

jay
 
N

Nico Coesel

Dave VanHorn said:
Not sure what you mean by "100kHz" but in addition to the rest of the
suggestions, you CAN run RS232 in a ring topology, where A talks to B and
listens to Z, B talks to C and listens to A, and so on. Messages have a
sender and recipient, and anything that isn't for "me" gets passed along the
chain. You also have a "time to live" that is decremented whenever the
packet is passed, so if it is a 30 device loop, you set that to maybe 32..
When it hits zero, the packet is dropped.

All the devices have to implement the protocol, and deal with
dropped/corrupted packets, but it's a pretty nice way to go, in that at any
point in the loop, only one machine is talking to one machine on a cable, so
you get full bandwidth between all machines, at the expense of a short time
delay to move the packets.

I've actually implemented such a topology several years ago. It has a
huge overhead. You won't achieve full bandwidth either because you'll
have to send all the packets through the first device. This divides
the available bandwidth by the number of connected devices. Also, a
small microcontroller won't like a burst of serial data and may drop a
packet. To keep packet management simple, you will only want 1
outstanding packet per device. This dictates you'll have to wait for
the acknowledge which takes a while because it has to travel through
all devices. This take more bandwidth away because of dead time
(especially when all the data originates from one source).

There is a protocol which deals better with these sort of setups. It's
called TCP/IP.
 
D

Dave VanHorn

I've actually implemented such a topology several years ago. It has a
huge overhead. You won't achieve full bandwidth either because you'll
have to send all the packets through the first device. This divides
the available bandwidth by the number of connected devices. Also, a
small microcontroller won't like a burst of serial data and may drop a
packet. To keep packet management simple, you will only want 1
outstanding packet per device. This dictates you'll have to wait for
the acknowledge which takes a while because it has to travel through
all devices. This take more bandwidth away because of dead time
(especially when all the data originates from one source).

As I remember, when we did it, it worked pretty nicely.
It was somewhere in the late 80's I think, but it worked well enough to
reliably move money around. :)
There is a protocol which deals better with these sort of setups. It's
called TCP/IP.

Seems like a lot of overhead, I guess you could toss out the parts you don't
need.
 
N

Nico Coesel

Dave VanHorn said:
As I remember, when we did it, it worked pretty nicely.
It was somewhere in the late 80's I think, but it worked well enough to
reliably move money around. :)

I never said it didn't work or wasn't reliable :))
Seems like a lot of overhead, I guess you could toss out the parts you don't
need.

There are some very space efficient TCP/IP stacks around. I've noticed
its quite hard to put a reliable communication protocol together. It
takes some serious thought on fault detection, re-transmitting lost
packets, time-outs, packet re-alignment, etc. So why try to invent
something new if you can use something that already exists?
 
M

mike

Brook said:
I need PC control/automation of:
200 machines
Each machine needs 16 logic inputs and 16 outputs
Line lengths may be 50 meters

I want a serial bus to connect the i/o devices at each machine with the PC.
This is to reduce the wires needed, lower costs and simplify design.

It is not a noisy environment. No welding, for example.
I don't need more than 100kHz speed, and might get by with even less.
I don't need environment protection. The devices can be just a circuit
board. It's indoors, not a washdown area.
I don't need super high reliability. It's not a life support system.
Cost is a major concern.

I've been looking at some industrial bus options. Either they cannot handle
200 devices, cannot handle 50 meters, or are very expensive (x200). But,
there are so many, I don't know them all, and maybe some can be modified to
do what I need that I'm not aware of.

Can anyone offer a suggestion or alternative?

This sounds like a recipe for disaster.
You sure you want a system where a single-point failure can take down
the whole shop? Can anything bad happen if a machine gets a bad or late
or early command?

Sounds like local control at the workcell level, a PC or SBC with
ethernet to the mothership, would localize faults, increase flexibility,
remove the requirements for 50 meters and 200 machines/controller. Yes,
you could do it with a microcontroller, but how much could you really save?

By the time you get the system designed, prototyped, tested, redesigned,
built, installed, debugged, etc., you're likely to have exceeded your
design budget and schedule by a large margin. Can buy a lot of
hardware for those development labor dollars. If this were your tenth
similar system, I might have a different suggestion.

mike

--
Return address is VALID.
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
http://nm7u.tripod.com/homepage/te.html
Wanted, 12.1" LCD for Gateway Solo 5300. Samsung LT121SU-121
Bunch of stuff For Sale and Wanted at the link below.
http://www.geocities.com/SiliconValley/Monitor/4710/
 
Top