Go Down

Topic: is reverse Multiplexing possible? (Read 14973 times) previous topic - next topic

sonnystikz

I have a few CD4051s and a few CD4067s

With an analog multiplexer i can take multiple signals that control or can be controlled by one analog signal into or from an arduino.

My question is...is it possible to run one signal into a multiplexer and use a digital signal to control multiple pin connections between the arduino and the multiplexer?


I am building a Midi controller and need to assign multiple controls to a single potentiometer.  I would like to wire corresponding buttons that will change the "Bank" of a Pot.  When the button is pressed the Mux switches to the respective pin so the same Pot now controls a different arduino analog pin.

Figured this would be much easier than reassigning midi values

raschemmel

That's an Analog Ssitch application.. Look up CD4016 analog swtch.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Grumpy_Mike

Yes it is possible but it is stupid to do so.
This is because the output is only valid while it is being addressed.
What you need is a chip called an addressable latch, that is very similar but keeps a constant output when not being addressed.

raschemmel

Unless I misunderstood the OP, he is only interested in the output that is being addressed at any given  moment and doesn't care about the banks that are not selected. I don't know if that design will work  without more information.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

PaulRB

#4
Jul 15, 2014, 08:05 am Last Edit: Jul 15, 2014, 08:12 am by PaulRB Reason: 1
Hi, you don't need an external multiplexer chip or to use multiple analog inputs to achieve what you describe. It can all be done in your  sketch with the pot wired to a single analog input, and your bank switches wired to other digital inputs.

Multiplexing and demultiplexing are techniques used to allow you to do more with fewer resources. What you seem to be describing is doing less with more resources!  ;)

Paul

steinie44

Quote
is reverse Multiplexing possible

Yes, it's called  Demultiplexing. There are  Multiplexers and  Demultiplexers.
http://en.wikipedia.org/wiki/Multiplexing


raschemmel

I think a schematic would help but you need to clarify whether or not you need latches . I don't think you have clarified that.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

PaulRB


When the button is pressed the Mux switches to the respective pin so the same Pot now controls a different arduino analog pin.


Seems to me the OP is proposing to connect the same pot to one of several Arduino analog inputs via a multiplexer. The multiplexer is controlled by the Arduino based on the setting of some "bank" buttons, also connected (directly or indirectly) to the Arduino. If I have understood correctly, this would be a waste of several Arduino analog inputs, a waste of several Arduino digital outputs (which would control the multiplexer) and a waste of a multiplexer and any latches. Simply connect the pot to a single analog input and read the value into one of several variables (maybe an array) depending on the setting of the bank switches.


Figured this would be much easier than reassigning midi values

I don't know much about MIDI, so don't understand this part, so maybe I have misinterpreted the entire proposed circuit?

raschemmel

Is there any point in further speculation without a schematic ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

sonnystikz

#9
Jul 25, 2014, 03:07 am Last Edit: Jul 25, 2014, 03:09 am by sonnystikz Reason: 1
I dont have a schematic yet but i will post one soon-  

but i'll try to clarify my overall problem.....

I am creating a midi Mixer for use with software apps like FL Studio

Fl studio has 99 mixer channels- each has 3 assignable knobs, a volume fader, a stereo spread knob, a pan knob and 8 effect volume knobs


I would like to control all of these functions using a small number of physical mixer channels,.

ex.    10 total mixer channels each has one fader, 8 effect knobs and 3 eq knobs,  when you press a corresponding bank button you can control 1-10, 11-20...etc



so I need each control to permanently be assigned to a number of different functions
so knob 1 controls the pan for channels 1, 11, 21.....etc
I wouldn't need the other outputs to be addressed since I would only be using the knob for the currently assigned bank-

I figured if i demux the knob and spread the analog signal i could achieve this-

sonnystikz


Unless I misunderstood the OP, he is only interested in the output that is being addressed at any given  moment and doesn't care about the banks that are not selected. I don't know if that design will work  without more information.



you are correct

sonnystikz


Hi, you don't need an external multiplexer chip or to use multiple analog inputs to achieve what you describe. It can all be done in your  sketch with the pot wired to a single analog input, and your bank switches wired to other digital inputs.

Multiplexing and demultiplexing are techniques used to allow you to do more with fewer resources. What you seem to be describing is doing less with more resources!  ;)

Paul



Well i need tons of Pots,   so if i could Mux a pot into a de mux both 4067s then ideally i'd have  16 pots going into 1 analog channel- only one usable at a time of course.... but will it work?

Grumpy_Mike

Quote
then ideally i'd have  16 pots going into 1 analog channel- only one usable at a time of course

Here is an example of having 16 inputs (you can use pots) going into 2 analogue inputs. With the right multiplexer you can just use one chip.
http://www.thebox.myzen.co.uk/Hardware/MIDI_Footsteps.html

sonnystikz


Quote
then ideally i'd have  16 pots going into 1 analog channel- only one usable at a time of course

Here is an example of having 16 inputs (you can use pots) going into 2 analogue inputs. With the right multiplexer you can just use one chip.
http://www.thebox.myzen.co.uk/Hardware/MIDI_Footsteps.html



follow me for a sec........... one pot...16 different positions/pins = 15 "Virtual" pots


sonnystikz

I have a sample schematic but where can i upload it?

Go Up