Help me , running long cables ...

I have a project to log the keypresses from an hall of 60m X 50m area. There are around 500 switches in this area(actually there r 500 users sitting in this hall, each table has one toggle switch,reset switch).

Tables are arranged as 10cols X 50 rows.

I was thinking for a simple matrix logic as its extremely simple and would be cost effective in terms of cabling costs as well as other hardware required.

I have a requirement of running 60 m cables with ttl signals.Is it possible with using BUS Buffers/transreceivers?

ON the computer end i will use 60 bit digital I/O board and write the software which will scan rows and columns continuosly.

Will be feasible or there is any better alternative...

Please , can u suggest me on this.

Thanks alot Best Regards Rishi Bhanot

Reply to
rishi
Loading thread data ...

Not well. Capacitive loading on cable runs that long will do you in. And remember you are really going twice that distance.

Using 1488/1489 transmitters/receivers at a lowish rate (10's of kHz) might be reasonable... but you will not be able to scan if someone holds their button down.

I would suggest a "smart" button and a shared bus (two wires for signal, a third for power) which is used to send keypresses back to the PC. Each button has a serial number, and on a change of state it reports back the new state and serial number.

Tim.

Reply to
shoppa

Hi.

500 smart buttons is a lot of hardware, abd then there are collisions on your serial bus to handle.

But I think it's possible to use one cable for 5 buttons, and put a resistor in series which each button with a value of (2^N)*R0, (eg. 1k 2k

4k ... 16k ), and use a current source on the cable, and an AD convertor to get an 8 bit value (computer rounding to 5 bits).

8 bit AD convertors are fast enough to sample all hundred cables, you still need 100 cables, but only one AD convertor.

I can design and/or build it for you if needed.

Cheers, Jeroen

joenix at gmx dot net

Reply to
Jeroen Vriesman

a third for power) which is used to send keypresses back to the PC. Each

Reply to
Wim Ton

Something for a these Dallas/Maxim 1 wire devices ?

Wim

Reply to
Wim Ton

I would either take the suggestion here and use a smart button, or I'd investigate using a keyboard matrix type of circuit using balanced pairs. For either of these ideas you should use twisted-pair wire (preferrably shielded) and pay attention to suppressing reflections by making sure it's properly terminated.

For the smart button idea you'd want to find the smallest Atmel AVR or Microchip PIC with a serial interface. Use RS-485 (for which many drivers exist) on twisted pair and terminate it at both ends with the correct resistance (most twisted pair has an impedence of about 100 ohms, and close is good enough). Invent a little serial protocol that is robust in the face of collisions. You'd have to manufacture 500 smart buttons, but at that volume a PC board should be cost effective. The nice thing about this arrangement is that the PC will only need an external RS-232 to '422 adaptor, your system will be more expandable and the cabling will be easier.

The keyboard matrix idea should also get you where you want to go with lots more sweat on the cabling and lots less on the software. Use RS-422 transmitters and receivers on the PC, and figure out how to do keyboard-style blocking diodes on balanced-pair lines. You'll have reflections at the switches because the cable won't be seeing a matched impedance. The receivers are terminated, so they'll absorb reflections on the receive side. To do the same on the transmit side you'll want to add a

50 ohm resistor in series with each leg of the transmitter. This _should_ result in a system that will work for you, as long as you don't have everyone in a row pushing their button at once and loading down the poor transmitter.
Reply to
Tim Wescott

Hi,

Well, I would use a pic12f629 at each location and do serial communication in software. Run just 3 wires: power, ground, and bi-directional signal. Each pic has a serial number (in the internal eeprom) and is interrogated by the central PC. Button pushes are stored in the pic's until the PC interrogates it.

No collisions and the buttons will probably cost more than the pics for each location.

--
Luhan Monat, "LuhanKnows" At 'Yahoo' dot 'Com'
http://members.cox.net/berniekm
"The future is not what it used to be."
Reply to
Luhan Monat

Try this:

Use 500x DS2405 (1-Wire addressable switch) - run three (twisted) wires to all devices (each DS2405 is in parallel to all of the others) - +5V, GND and data.

The PIO pin is pulled to +5V via some largish value resistor, and pulled to ground via the switch. Connect the GND and data lines to each DS2405. Then use any uController/uProcessor/PC with a spare serial port to communicate over the 1-wire bus. (See

formatting link
use the 1-wire links for information on how to do this)

Code the computer, and do a "Active Search" of the 1-wire bus which will return all serial nos (8 bytes) of all DS2405 with their PIO pin pulled low - examine the datasheets from Maxim's site above for the details.

The biggest hassle will probably be activating each switch to determine the serial # of the associated DS2405 - so you can determine how the serial # relates to which switch is pressed.

HTH

Trevor

rishi wrote:

Reply to
Trevor Matthews

Rishi. If you just need to detect key-presses, I think the cabling is OK. You can put a pull-up (2.2k) and a capacitor on each line, near where the logic senses it. Then put a 100-Ohm resistor in series with the wire. The switches can be normally-open types. (view with courier or similar)

VCC | / \ 2.2k / \ | /| | / | | 100 60m wire < +---+----/\/\/\/-------------------------+ \ | | | \| = C \ | \ switch | | +------------------------------------+ | 60m wire GND

So when a switch is closed, the logic will detect a low.

There are some things you will have to be careful with. For example, if the capacitor is not big enough, or too big, the logic may switch more than once per press. Also, there are a bunch of issues associated with the scan speed. If you scan fast, (>10 Hz) and they press slow, there should be no problem.

What I don't understand is how you plan to multiplex your 60 IO lines into

500 (or 1000?) switches. Is that where you would use the bus receivers? I guess it could work. Logically you have 10 banks of 50-line bus receivers. In reality, each bank may be more than one chip. The banks are all connected together, and at any given time, only one bank is active, and the others are disabled with their drivers in a high impedance state.

The 10 remaining lines on your IO board can be configured as outputs, and each one can select one of the banks.

It's going to be a pretty large circuit. I hope you can have a board made for it, because I wouldn't want to prototype it with point to point wires!

The other option is trying to find an IO board with 500 IO's on it.

Mac

Reply to
Mac

"rishi" schreef in bericht news: snipped-for-privacy@posting.google.com...

There have been made a number of suggestions. 500 tables are a lot of tables. I would never use a single serial bus to poll 500 controllers, for so many tables. While the cabling will be cheap, you will end up in a mental hospital. Or use one controller for ten tables, so that you only need to poll 50 of those controllers.

A simple matrix is not a bad idea at all. Perhaps it helps to make more smaller matrixes. 5 of 10 by 10.

Another option is a parallel addressing scheme, each table has a small blackbox, with a dipswitch to set the address. With 9 bits, you can address 512 units. You could use a PIC or perhaps better to use standard cmos logic.

I'd go for a simple matrix.

--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)
Reply to
Frank Bemelman

Give us more detail on what you're trying to do. For a general solution, you might want to be able to tell the difference betwen Yes, no, abstain and unused. Toggle switches may be a nono for unmanned positions. You may need to latch the votes simultaneously. You may need the capability to reset the latched vote. You may need some resistance to "stuffing the ballot box". You may want to be able to run the system from ANY laptop. Bite the bullet, put a microcontroller in each switch. Polling 500 addressable controllers should be a piece o cake. yes?? Isn't that what RS422 is all about? Or use I2C or whatever is most compatible with the power distribution system you select. You can break it up into a matrix and still serial poll each group.

Once you have the smart system, you can easily react to the inevitable changes in requirements or system upgrades. You could do a LOT of reconfiguration just by plugging each unit into a reprogrammer. If you're clever and use a bootloader, you could reconfigure the pods on the fly. The LAST thing you want is to discover a flaw when you have 500 unconfigurable boxes built.

Maximum reliable transmission speed is inversely related to cable length. They did get pictures back from the outer solar system decades ago. That was some LONG cable...

Give a lot of thought to failure modes. The system should still work if you short (or open) one of the cables to a pod. You need diagnostic modes to pinpoint failures.

mike

--
Bunch of stuff For Sale and Wanted at the link below.
laptops and parts Test Equipment
Honda CB-125S
TEK Sampling Sweep Plugin and RM564
Tek 2465 $800, ham radio, 30pS pulser
Tektronix Concept Books, spot welding head...
http://www.geocities.com/SiliconValley/Monitor/4710/
Reply to
mike

Probably too expensive...

formatting link

Reply to
CWatters

What do you do, after everything is installed, and it doesn't work as expected?

Imagine, there is more noise than anticipated. You decide to lower the baudrate and add some redundancy in the protocol.

for(n=0; n

Reply to
Frank Bemelman

In article , snipped-for-privacy@bar.net mentioned... [snip]

What I don't understand is why you would want to use so much wiring when you could use a single pair of wires and RS-485, and poll each box with a unique address. This seems to me to be a place where a PIC would show great promise as a solution.

Mac

-- @@F@r@o@m@@O@r@a@n@g@e@@C@o@u@n@t@y@,@@C@a@l@,@@w@h@e@r@e@@ ###Got a Question about ELECTRONICS? Check HERE First:###

formatting link
My email address is whitelisted. *All* email sent to it goes directly to the trash unless you add NOSPAM in the Subject: line with other stuff. alondra101 hotmail.com Don't be ripped off by the big book dealers. Go to the URL that will give you a choice and save you money(up to half).
formatting link
You'll be glad you did! Just when you thought you had all this figured out, the gov't changed it:
formatting link

Reply to
Watson A.Name - "Watt Sun, Dar

Well, it's not my problem, and I just tried to answer the poster's question, but I would venture to say that keeping to a minimum the parts that get multiplied by 500 might be a major design goal.

I like a lot of the solutions proposed, but I guess the OP will have to make the final decision. I surmise that cost is a factor, so it would be interesting to try to assess which of the proposed solutions is cheapest.

Mac

Reply to
Mac

The ID on a PIC12F629 isn't accessible to the processor while its running.

Regards, Bob Monsen

Reply to
Robert Monsen

Not to mention they might walk off...

Reply to
Robert Monsen

Perhaps try something like this. It's a one wire serial addressable I/O device (each chip has it's own unique 64 bit address burnt in). It has 8 I/O lines so each switch box could support a number of switches or a small matrix.

formatting link

Reply to
CWatters

In article , snipped-for-privacy@bar.net mentioned...

A whole bunch of wireless keyfob type buttons might save a whole lot on wiring.

--
@@F@r@o@m@@O@r@a@n@g@e@@C@o@u@n@t@y@,@@C@a@l@,@@w@h@e@r@e@@
###Got a Question about ELECTRONICS?   Check HERE First:###
http://users.pandora.be/educypedia/electronics/databank.htm
My email address is whitelisted.  *All* email sent to it 
goes directly to the trash unless you add NOSPAM in the 
Subject: line with other stuff.  alondra101  hotmail.com
Don't be ripped off by the big book dealers.  Go to the URL
that will give you a choice and save you money(up to half).
http://www.everybookstore.com  You'll be glad you did!
Just when you thought you had all this figured out, the gov't
changed it: http://physics.nist.gov/cuu/Units/binary.html@@t@h@e@@a@f@f@l@u@e@n@t@@m@e@e@t@@t@h@e@@E@f@f@l@u@e@n@t@@
Reply to
Watson A.Name - "Watt Sun, Dar

into

What about a dallas 1 wire network? Pat

Reply to
Pat Ford

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.