genuinequality

Download free music MP3s on genuine quality, the world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, The world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, stats, charts, biographies and concerts. stats, charts, biographies and concerts.

Thursday, May 5, 2022

[New post] Arduino MIDI Multi MUX Controller

Site logo image Kevin posted: "This project revisits my Arduino MIDI Mux Step Sequencer showing how it could be expanded to support 32 potentiometers or more in a MIDI controller. Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not respon"

Arduino MIDI Multi MUX Controller

Kevin

May 5

This project revisits my Arduino MIDI Mux Step Sequencer showing how it could be expanded to support 32 potentiometers or more in a MIDI controller.

IMG_6181

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

  • Arduino Analog Input
  • Arduino MIDI Library
  • The 74HC4051 Multiplexer tutorial on the Gammon Forum
  • Sparkfun Multiplexer Hookup Guide (for the HC4051 breakout, but the principles are the same here)

If you are new to Arduino, see the Getting Started pages.

Parts list

  • Arduino Uno
  • 32x 10k potentiometers
  • 1x 75HC4067(or similar) 16 port multiplexer chip or breakout module
  • MIDI out module (for examples, see Arduino MIDI Interfaces)
  • Breadboard and jumper wires

The Circuit

ArduinoMIDI32MultiMux_bb

The core principle is the same as described in the Arduino MIDI Mux Step Sequencer in that we are using one analog input to service 16 pots via a multiplexer.  But as the Arduino has six analog input ports, it can easily access up to six multiplexers at a time.

And as each multipler can in principle be turned on or off using the EN pin, then each analog input can support several multiplexers at the same time too, but in this project I'm keeping things simple by having one MUX per analog input.

All multiplexers share the same four address pins so the same channel on each multiplexer will be active at the same time.  They all require 5V GND and the SIG pin connecting to the relevant analog port on the Arduino.

I've connected up A0 and A5 for no real reason other than these are simple for the hardware I have to test it with - I used my set of 16 slider pots and the shield part (disconnected from the Arduino) of my "KLONEMIDI" bank of 16 pots as you can see in the photo above.

The Code

The core principle is as follows:

Setup():   Set four address lines as OUTPUT  Loop():    For each address value:       Set the address using the address lines       For each connected MUX:          Read the analog value from the corresponding analog INPUT          IF the value has changed since it was last read             Scale the value from 0 to 1023 to 0 to 127             Send the corresponding MIDI Control Change message

There are definitions at the start of the code detailing all the pins to be used and a list of MIDI CC message values to use for each pot.

Find it on GitHub here.

Closing Thoughts

In this setup there are 8 digital IO pins free on the Uno.  If each of those was used for a MUX EN line, then in theory it should be possible to connect up 48 multiplexers to a single Arduino Uno!?  That would mean it could, again in theory, scan 768 potentiometers!  I shudder to think what the response times would be though.

Without the EN pins, then I still have 6 multiplexers on an Uno and 8 on a Nano.  That would still support 96 and 128 potentiometers respectively.  That is a lot of knobs to fiddle with!

Kevin

Comment
Like
Tip icon image You can also reply to this email to leave a comment.

Unsubscribe to no longer receive posts from Simple DIY Electronic Music Projects.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
https://diyelectromusic.wordpress.com

Powered by WordPress.com
Download on the App Store Get it on Google Play
Posted by BigPalaceNews at 12:40 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

About Me

BigPalaceNews
View my complete profile

Blog Archive

  • June (50)
  • May (82)
  • April (84)
  • March (87)
  • February (90)
  • January (74)
  • December (72)
  • November (95)
  • October (105)
  • September (112)
  • August (116)
  • July (96)
  • June (100)
  • May (105)
  • April (95)
  • March (131)
  • February (111)
  • January (104)
  • December (98)
  • November (87)
  • October (126)
  • September (104)
  • August (97)
  • July (112)
  • June (113)
  • May (132)
  • April (162)
  • March (150)
  • February (342)
  • January (232)
  • December (260)
  • November (149)
  • October (179)
  • September (371)
  • August (379)
  • July (360)
  • June (385)
  • May (391)
  • April (395)
  • March (419)
  • February (356)
  • January (437)
  • December (438)
  • November (400)
  • October (472)
  • September (460)
  • August (461)
  • July (469)
  • June (451)
  • May (464)
  • April (506)
  • March (483)
  • February (420)
  • January (258)
  • December (197)
  • November (145)
  • October (117)
  • September (150)
  • August (132)
  • July (133)
  • June (117)
  • May (190)
  • January (48)
Powered by Blogger.