Go Down

Topic: Multiple pushbuttons - one digital input (Read 2 times) previous topic - next topic

Kitep

You could probably use an RC timing circuit to control how long each push button stays on, if you need to use a digital pin.

clarence

If you can spare an analog pin rather than a digital one it is easy, don't know if that helps at all

jezuz

Let me back up the idea that analog Input + a variety of resistors, each one being different for each button is much better

now let me scratch that idea out and back up the other, better idea of spending the extra bling bling and buying a pair of Xbee's (series 1 will do)... You will also need a second arduino board tho...

magicmike

If you did not want to pay for two xbees and don't like the analog method, use 2 arduinos, one on each end of a wire. You can tie the switches to 1 arduino. It then sends all the signals down a wire using some a convenient protocol to your second arduino, which does something with the information.

If you use a RBBB under the bench, your cost is about ($12+battery pack - say $14, plus switches and some wire), which is pretty cheap, and much less than ($22x2= $44) for two xbees.

technik3k

#9
Jun 11, 2009, 07:40 am Last Edit: Jun 11, 2009, 07:43 am by technik3k Reason: 1
You really have two different problems:

1. you need to read six inputs without 6 I/0 pins
2. 60 meters is too long for any direct input method

The best solution to solve #1 is to use an "I2C expander". You connect several of them to I2C bus on Arduino (analog pins 4 & 5) and each will give you a number of extra I/O pins. You could have 8 inputs chip for as little as $1 (breakout version will cost you slightly more).

However, even if you solve #1 60 meter distance is way to far for i2c bus. I2C bus has capacitance limit of 400pF and the longer wires you have the more power yo need to drive the bus at the nominal speed. I seriously doubt you can get anywhere near 60m without hitting this limit.

You need to have much slower communication channel between your endpoints. Perhaps 2400 bps serial connection will work. You will need to put on the other end second Arduino or a cheaper device with UART interface (like ATTiny2313).

If you have spare funds consider some sort of wireless or RF to deliver your serial communication instead of running wires.

Finally, if you really tight on money try to hack an old PS2 keyboard which Arduino could read. If you are lucky you can get not 6 but 10 x 6 button inputs at once.

Go Up