Maker Pro
Maker Pro

Serial bus for controlling a large number of LEDs, switches, and servos - 1-Wire?

E

ErickT

Hello,

I want to drive a number of LEDs, switches, sensors, servos, etc from a
serial bus. Think all the components you would need for a robitics
project, or a pinball machine. The individual devices being controlled
will be quite simple (usually on/off switches or LEDs), but there will
be 100s of them. I want to use a serial bus so that there aren't a ton
of wires floating around, and I want to control the whole set up from a
PC. It seems like 1-Wire might be a good solution, but I don't know
enough about either electronics or 1-Wire to know for sure. Is this a
good use for 1-Wire?

I'm a programmer by trade, so this may be either very easy, or very
difficult. Please let me know, and if there are any good websites on
doing this type of work, please let me know that as well.

Thanks!
Erick
 
P

petrus bitbyter

ErickT said:
Hello,

I want to drive a number of LEDs, switches, sensors, servos, etc from a
serial bus. Think all the components you would need for a robitics
project, or a pinball machine. The individual devices being controlled
will be quite simple (usually on/off switches or LEDs), but there will
be 100s of them. I want to use a serial bus so that there aren't a ton
of wires floating around, and I want to control the whole set up from a
PC. It seems like 1-Wire might be a good solution, but I don't know
enough about either electronics or 1-Wire to know for sure. Is this a
good use for 1-Wire?

I'm a programmer by trade, so this may be either very easy, or very
difficult. Please let me know, and if there are any good websites on
doing this type of work, please let me know that as well.

Thanks!
Erick

One wire is mainly used for interchip communications on a board. The number
of chip types that use it is limited. Although a hobbyist will be able to
control some of them via a COM-port and some short wire, it's not the way to
control tens of devices. Let alone hundreds.

Guess you'll first have to deal with the structural side. Are all components
concentrated in a box (like the pinball machine) or spread over a room or
even a whole building? You'll need one or more power supplies as the
electronics you need can't do without it.

Then you'll have to deal with the wiring. All LEDs and switches have at
least two wires. You will need electronics to connect them and made them
addressable via the COM-port. You can find several I/O modules for serial,
parallel and USB on the net. Just google. For a professional job I'd go for
some of them. If I had to build it myself I'd build some "standard" modules
with a micro, a lot of I/O pins and a RS485 interface. IMHO it's not
difficult. Just a lot of work.

petrus bitbyter
 
M

martin griffith

Hello,

I want to drive a number of LEDs, switches, sensors, servos, etc from a
serial bus. Think all the components you would need for a robitics
project, or a pinball machine. The individual devices being controlled
will be quite simple (usually on/off switches or LEDs), but there will
be 100s of them. I want to use a serial bus so that there aren't a ton
of wires floating around, and I want to control the whole set up from a
PC. It seems like 1-Wire might be a good solution, but I don't know
enough about either electronics or 1-Wire to know for sure. Is this a
good use for 1-Wire?

I'm a programmer by trade, so this may be either very easy, or very
difficult. Please let me know, and if there are any good websites on
doing this type of work, please let me know that as well.

Thanks!
Erick
have a look at 74HC595 and 74HC589, they are serial to parallel
converters and viceversa. These will require a clock, data and load
(and ground) , for any amount of widgets

You dont say what data rate you need, or what cable length you expect
to use.

There is also a lot more to be considered, like power supplies, data
corruption using rs232 signal levels, crap grounds etc.differential
signals may be advisable

since you are a programmer, it may be more interesting to go the
embedded route, say RS422/485 with an AVR or MSP430 at convenient
distances, but there still maybe significant hardware hickups


martin
 
E

ErickT

martin said:
have a look at 74HC595 and 74HC589, they are serial to parallel
converters and viceversa. These will require a clock, data and load
(and ground) , for any amount of widgets

You dont say what data rate you need, or what cable length you expect
to use.

There is also a lot more to be considered, like power supplies, data
corruption using rs232 signal levels, crap grounds etc.differential
signals may be advisable

since you are a programmer, it may be more interesting to go the
embedded route, say RS422/485 with an AVR or MSP430 at convenient
distances, but there still maybe significant hardware hickups


martin

Thanks for the responses.

The cable length will be fairly short (max about 10 feet).

Using the 74HC595 and 74HC589 combination, how would I address each
gadget individually? I understand the theory of how it could be done,
but the problem I always run into is the code->pin translation. This is
why I liked 1-wire, as it seemed to isolate me from all the details of
moving data across the wire.

With the MSP430, would I connect the gadgets directly to the
microcontroller, or would I need another component?

Thanks,
Erick
 
M

martin griffith

Thanks for the responses.

The cable length will be fairly short (max about 10 feet).

Using the 74HC595 and 74HC589 combination, how would I address each
gadget individually? I understand the theory of how it could be done,
but the problem I always run into is the code->pin translation. This is
why I liked 1-wire, as it seemed to isolate me from all the details of
moving data across the wire.

With the MSP430, would I connect the gadgets directly to the
microcontroller, or would I need another component?

Thanks,
Erick
you clock the data into the first SIPO (ser in Parallel Out), feed
the data o/p of the first SIPO, often called Qh, into the serial input
of the next SIPO and then using the same clock. so if you have, say,
10 eight bit SIPOs in series you still only need a clock and data, but
for all the data to ripple through the system to the final SIPO you
need 80 clocks

With the MSP430 you will probably need power interfaces, eg FETs,
relays to control your widgets, a normal micro cant supply much power
from its pins (normally anyway), but that is the same for the SIPOs
above. The great advantage is the MSP has a serial port, so you can
format your data how you like

I think Lewin Edwards (regular contributor here) hase some good books
on micro interfacing on his site


martin
 
H

Homer

Expensive way: buy one of those ready-to-use controler boards. They
take USB, Parallel or Serial input and you can control as many items
you want (based on price you pay).
 
ErickT said:
Hello,

I want to drive a number of LEDs, switches, sensors, servos, etc from a
serial bus. Think all the components you would need for a robitics
project, or a pinball machine. The individual devices being controlled
will be quite simple (usually on/off switches or LEDs), but there will
be 100s of them. I want to use a serial bus so that there aren't a ton
of wires floating around, and I want to control the whole set up from a
PC. It seems like 1-Wire might be a good solution, but I don't know
enough about either electronics or 1-Wire to know for sure. Is this a
good use for 1-Wire?

I'm a programmer by trade, so this may be either very easy, or very
difficult. Please let me know, and if there are any good websites on
doing this type of work, please let me know that as well.

Thanks!
Erick

Max7219. Wire the chips in serial.
 
E

ErickT

Do you have a link to one of those ready-to-use controller boards? I'd
like to take a look at them.

Thanks,
Erick
 
E

ErickT

petrus said:

Thanks for the excellent list. Now, to ask what may be a dumb question,
if I have a simple switch (just an on/off toggle), is that a digital
input, or analog? If I want to control a servo, is that a digital or
analog output?

Thanks,
Erick
 
P

petrus bitbyter

ErickT said:
Thanks for the excellent list. Now, to ask what may be a dumb question,
if I have a simple switch (just an on/off toggle), is that a digital
input, or analog? If I want to control a servo, is that a digital or
analog output?

Thanks,
Erick

A switch requires a digital input, a servo an analog output.

petrus bitbyter
 
T

Tim Auton

petrus bitbyter said:
ErickT said:
petrus said:
"ErickT" <[email protected]> schreef in bericht
news:[email protected]...
[snip]
Thanks for the excellent list. Now, to ask what may be a dumb question,
if I have a simple switch (just an on/off toggle), is that a digital
input, or analog? If I want to control a servo, is that a digital or
analog output?

A switch requires a digital input, a servo an analog output.

That depends on the type of servo. If the OP is using RC servos, they
require a digital pulse train with timing demands which may be beyond
some of these boards (accuracy of several microseconds is required).


Tim
 
Top