PDA

View Full Version : huge midi controller, I2c expansion question



daveaminal
03-24-2013, 09:03 PM
Hi, I am currently trying to design a midi controller for tractor and have a few questions regarding the amount of digital I/o. Inputs I can have.

I want total control of tractor through my device so as you can imagine I need alot of switches and pots. The design I would like to make needs...
218 switches
55 potentiometers
And 4 rotary encoders

My question is firstly is it feasible to construct and secondly what's the best way to go about it?

I've done some research on building midi controllers, and found the information here and from fuzzywobble very helpful indeed. Fuzzywobbles site has a design that is modular using i2c but I'm thinking using that Design might be a bit to pricey.

Any advice would be greatly appreciated. Thanks for reading.

PaulStoffregen
03-24-2013, 09:10 PM
There are a variety of ways to do this.

For such a huge project, I'd suggest keeping some perspective on "pricey" for the electronics to support several hundred dollars in buttons and pots. A modular approach that reduces the amount of manual soldering (especially wires) and makes troubleshooting easier is a great investment, if you value your time at all.

daveaminal
03-25-2013, 12:56 PM
Thanks Paul for the quick reply.

I have most of The components here already, and most of my boards already made.
I'm at the stage where I need to start thinking of how many teensy controllers I need and what multiplexers would be best to use...
As for time and troubleshooting it shouldn't be an issue, I'm a manufacturing technician for a large security company so I have plenty of time and have split my controller into boards with the buttons numbered and the wire colors all stick to the resistor code. I was thinking of having a motherboard that would hold all the teensys and multiplexers, connected to a distribution board that would hold all The connectors for the other boards.

I have some money here right now that I would like to spend on some teensy ++ 2.0 microcontrollers, and some multiplexers but I'm reluctant to spend it hastily in case there is a better way to construct it.

Any feedback would be greatly appreciated. Thanks

ploveday
03-25-2013, 01:07 PM
Do you need to have multiple buttons pushed at once?

It would certainly be possible to read the buttons in a 16x16 matrix.

It might also be possible to read the Pots in a similar way; but it depends on your requirements. Otherwise, analogue multiplexers in DIP packages are hard to come by for much beyond 16x channels.

PaulStoffregen
03-25-2013, 01:38 PM
Otherwise, analogue multiplexers in DIP packages are hard to come by for much beyond 16x channels.

They're rare because you don't need them. Pretty much nobody does, so they just aren't made. The cheap 8 channel 74HC4051 works great for many more than 8 channels. There's an enable pin that disconnects all 8, so you can connect several 74HC4051's to the same pin and enable the one you need. You can even use another 74HC4051 and 8 resistors to create the signals to drive those enables, so you only need 6 pins to control which of the 64 signals to connect.

ploveday
03-25-2013, 01:57 PM
Agreed.

It's also possible to matrix analogue channels of Pots via a column of Vcc outputs and a Row of Gnd sinks, with ADC inputs per row. It's a lot like one would multiplex a digital (keyboard) matrix, but you can do it with Pots too.

- Peter

daveaminal
03-25-2013, 03:22 PM
Do you need to have multiplře buttons pushed at once?

Yes I would like to be able to activate more than one one button at a time.

Thanks for the suggestions guys... I like the sound of The 74HC4051 chips.I will do some research on these when I get home. Is there a limit of how many of these chips you can connect to one teensy++2.0?

Thanks

daveaminal
03-25-2013, 06:19 PM
I have done some research now and found the information on the pjrc site and it shows exactly what I needed to know regarding how to connect The 4051 chips to the teensy but does not say how many of them is safe to use with one teensy.

I know I will need more than one teensy, linking them the same way that fuzzywobble does in his modular design, but will this method work with the 4051 chips?

Thanks

bibuntu19@gmail.com
11-15-2013, 08:55 PM
Why don't you use some 16:1 Multiplexers such as the HCF4067B (http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00000389.pdf) by ST (or the CD4067B (http://www.futurlec.com/4000Series/CD4067.shtml) from TI)?
That chip has an Inhibit pin too and can give you 16 channels with just 5 pins connected to the Teensy.

Deadp1xels
11-19-2013, 09:30 AM
I've been using a CD74HC4067E with great success to obtain 16 more analogs on my Teensy 3.0

You can get one here for 96p

http://www.coolcomponents.co.uk/cd74hc4067e-analogue-digital-mux-chip.html