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

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

Reply to
ErickT
Loading thread data ...

"ErickT" schreef in bericht news: snipped-for-privacy@i3g2000cwc.googlegroups.com...

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

Reply to
petrus bitbyter

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

Reply to
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

Reply to
ErickT

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

Reply to
martin griffith

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 wrote:

Reply to
Homer

Max7219. Wire the chips in serial.

Reply to
miso

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

Homer wrote:

Reply to
ErickT

"ErickT" schreef in bericht news: snipped-for-privacy@k70g2000cwa.googlegroups.com...

formatting link
formatting link
formatting link
formatting link
formatting link
formatting link
formatting link
formatting link

googled on "serial i/o board"

petrus bitbyter

Reply to
petrus bitbyter

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

Reply to
ErickT

"ErickT" schreef in bericht news: snipped-for-privacy@m73g2000cwd.googlegroups.com...

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

petrus bitbyter

Reply to
petrus bitbyter

[snip]

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

Reply to
Tim Auton

Lots and Lots of LEDs.

formatting link

Buy the boards from here:

formatting link

Reply to
Donald

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.