Pages: [1]   Go Down
Author Topic: Recommendation on a 13+ inputs digital multiplexer.  (Read 865 times)
0 Members and 1 Guest are viewing this topic.
Maryland, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All,
         I am playing with a 13 keys keyboard project (the keys are made by momentary pushbuttons)  to drive an Arduino Uno and I was wondering if someone can recommend a single multiplexer IC that can accept 13 inputs or more.

I know Arduino can accept up to 14 digital inputs but since the keyboard is going to be far from the Arduino, my goal is to cut down on wires going back and forth by putting a small daughterboard with the multiplexer on the keyboard and run back and forth from Arduino: Power, Ground, the output from the multiplexer and however many wires Arduino needs to select the multiplexer port (4 probably as 2^4 = 16).

If you have any suggestion of a multiplexer, and where to buy them, I would greatly appreciate.

Thanks

Thot

P.S. I searched the forum but I mainly found references to an 8 port multiplerxer. I could use two, but that would partially defeat the purpose on cutting down on wires going back and forth from Arduino and make it for a bigger daugherboard.



.
« Last Edit: November 13, 2012, 01:07:25 pm by Thot » Logged

There are three kind of people in the world: Those who can count, and those who can't

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Arduino as 20 IO, A0-A5 are D14-D19.
You could run some 20 conductor ribbon cable back & forth or 2 pieces of 10 conductor.
http://www.dipmicro.com/store/IDCC10
http://www.dipmicro.com/store/WIRE28X10GR

Then you could PCINTs on the arduino for a fast response to key presses, or multiple key presses.
Or scan all the inputs quickly looking for a pressed key
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Maryland, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick reply!

The keyboard needs to be relatively free to be carried around on stage, much like a singer with a microphone and I thought reducing the number of wires will help accomplish that.

Your solution is feasible and I think I may end up doing something like that.

I was thinking to use RG5 (Ethernet) cables, either 1 cable (8 wires) or 2, if the multiplexer idea goes nowhere.

BTW, what is "PCINTs " is it something to do with interrupts? If so, this is a topic I avoided so far, but I may have to deal with it, can you point me to a good tutorial/book etc.?
I use PC (not Mac).
I was planning to scan the inputs quickly in my program, but maybe there is a better way.

Thanks again
Logged

There are three kind of people in the world: Those who can count, and those who can't

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

PCINTs are part of what Arduino does, search the playground and/or the forum for a library.
Or I can send an example from  home, does 4 PCINTs, once you understand it you can expand to more.
Basically a PCINT gets input as a whole port haivng an interrupt, the code then reads the port and sees which one it was and acts from there.  Takes ~4uS I think, so pretty quick.

If you want true portability, go wireless. Get a 434 MHz RF module and run the virtual wire library on a promini, with your keyboard connected to that.

Try scanning first, if not responsive enough go to PCINTs.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have any suggestion of a multiplexer, and where to buy them, I would greatly appreciate.

P.S. I searched the forum but I mainly found references to an 8 port multiplerxer. I could use two, but that would partially defeat the purpose on cutting down on wires going back and forth from Arduino and make it for a bigger daugherboard.


I assume you mean this: http://www.arduino.cc/en/Tutorial/ShiftIn

You won't need more wires, those chips can be chained together so they act just like a 16-channel chip (or 24...or 32....). You just connect the output of one to the input of the next one.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Maryland, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks again for the replies.

Crossroads: The "Wireless route " was going to be my next step (if I can make the whole thing work with wires, that is). I was thinking bluetooth but I don't know if there is a module for this and even if there is, what would be the simplest solution, Bluetooth or RF?

fungus: I was not aware of that, thanks for pointing it out.

Logged

There are three kind of people in the world: Those who can count, and those who can't

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 22
Posts: 1675
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you considered Repurposing an existing keyboard ? The keys are generally connected in a grid so rather than having to read 100 keys you can just read the columns, the key is then to switch the rows on one by one, each key connects a unique combination of row and column if you know which row is switched on, its easy to know which keys are pressed.

This is my example but there are many other similar approaches, you can even combine this with shift in to get the required pin count down to 5 -

http://rcarduino.blogspot.com/2012/10/five-dollar-synthesiser.html

Duane B
Logged


Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking bluetooth but I don't know if there is a module for this and even if there is, what would be the simplest solution, Bluetooth or RF?

It depends on the distance and what you want to connect to.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27069
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

RF is certainly less expensive - RX/Tx pairs for <$10, or nrfl2401+ transceivers for $5-6 each.
Wiring up 13 keyboard switches to a promini and 1 wire for a TX module won't take long, and then a simple loop to read the keys and create 2 bytes for virtual wire to send out.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Maryland, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you considered Repurposing an existing keyboard ?
http://rcarduino.blogspot.com/2012/10/five-dollar-synthesiser.html

Duane B


Hello DuaneB.
I was aware of your $5 Keyboard, it came up during my researches. It's amazing but it sounds a bit complicated. My project is simpler and I wanted to see if I can do it from the ground up.
fungus: The distance is not much (same room say) but cost is important (and when isn't? smiley).
I think I'll just go with 1 wire per push switch (plus common ground) for the time being and later explore Crossroads' RF option for true portability (I'll have to do some more research on that, any good tutorial out there?).


Thanks again

 
Logged

There are three kind of people in the world: Those who can count, and those who can't

Pages: [1]   Go Up
Jump to: