toy alphabet drawing pad and multiplexing.... ?????

Hi! I have an idea for making a simple MIDI controller using a found childs alphabet drawing board toy. The toy has a pad that one puts paper sheets on and then does exercises in drawing letters and numbers. So I took it apart and discovered it has a membrane pad with about 40 or so presses on it. The output of the membrane is two ribbon type cables. One having 14 wires and the other 8. I was wondering if anyone would have any pointers as to how I could connect this via a 4051 multiplexer to the arduino with the arduino registering keypresses as ones and zeros... Can anyone point me in the direction I would have to take to connect the 16 outputs from the ribbon cables to this 4051 chip to the arduino board??? I hope this post isnt too vague and someone has maybe done something similar. Thanks, Steve.

It's a variation on keypads - there are quite a few posts about that. The 4051 looks like an 8 channel multiplexer and you have 22 pins, so one won't be enough. A 16-bit port expander or two might do it:

If you used a Mega you would have enough pins straight out, and you could just use the keypad library fairly simply I would think.

Hi Nick and thanks for the great tutorial! I've worked out the presses for the membrane pad using a battery, an LED and some wires, found and marked the positions of the keypresses connecting from ONE line of the row and then testing the column ribbon connectors from one to 14 on the pad etc with the two ribbons available ( an 8 wire and a 14 wire.) I have found about 105 switches. The pad is arranged in a column/row format but with deviations to allow for the functionality of the toy.. Mostly though it follows a specific pattern. I also managed to order a FREE !? sample from MIcrochip of the MCP23017 you suggested.... I might try looking at using the MEGA option ..I have an arduino mega2560! But.. it only uploads to my MAC when I'm running Parrallels PC emulator... and I would like to be able to upload using the MAC environment ( but thats another story and another post....)...

If you have the Mega2560 it would be the easiest option by far. Just run the 22 wires to 22 free pins and make a keypad object with the right rows/columns once you have worked out what they are. I have a Mac and don't have any problems programming the Mega.

Hi Nick. Thankx again for you input and Happy Easter. . I'll solder some wires to the ribbons and do some experimenting with the pad over the weekend. :}. May I ask a question... ? I have been completely unable to upload to my MEAG2560 using the MAC..( port tty.usbmodem3d11)....all i get is a timeout error... have you heard of anybody else using macs with this problem. ?? I can upload sketches easily using the PC emulator (parallels) on COM port 3 but the MAC side is a no-go???

I haven't heard of that particular problem, although every now and then people have problems with Windows, Mac, Linux. Are you plugging straight into the back of the Mac? Or a USB hub? Whatever you are doing, try doing the other one.

Hi bill. Yeah ive tried the mega2560 in all available usb ports oj the joy. Its a bloody mystery. I can burn bootloaders using dfu programmer. Ive managed to burn the miduino usbmidi to the 8u2 and reburn the mega bootloader back but it wont let me do anything using arduino ide. And ive tried oler versi/ns down to 0022. The company i bought it from(niche geek in china) have been very kind and are sending me another mega board though i know the board works. I should get the new one this week. Ive managed to slder new wirez and male pin headers to the matrix pad ribbon cables so will start some experiments with keypad library in a bit (when my girlfriend finishes on the computer.) Cheerio for now. ...

Hello again! Good news. Ive managed to map all 105 buttons so I know where they are. I've also managed to generate MIDI note info from keypresses sent to a MIDI to CV converter controlling an analogue synth module. And store keypress info into EEPROM. :) I would like to know if it is possible to detect Multiple keypresses with the keypad library? This would greatly enhance functionality for multiple note and parameter changes which is something I would like to implement. Regards, Steve.

I think we discovered a bug in the keypad library, where certain multiple presses would short things out. You might want to search for that.

Meanwhile, I think you need to work out if the keypad has diodes in it. Otherwise multiple key presses can make "phantom" keys appear to be pressed.