Go Down

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

sonnystikz

what about data encoders instead of pots?  their position is always dynamic and relative to the data adjusted

Grumpy_Mike


what about data encoders instead of pots?  their position is always dynamic and relative to the data adjusted

Yes that is what I suggested in my last reply but one.

sonnystikz



what about data encoders instead of pots?  their position is always dynamic and relative to the data adjusted

Yes that is what I suggested in my last reply but one.


oh ok i seen it-  i'll have to read more into them as well as arrays...... also anychance you can point me in a good direction to find out how to control/stabilize jumpy signals?

i hooked up 1 pot to an analog in on my Mega 2560 and used a basic midi CC code- my software read  the pot well- but sometimes it appeared to send signals while i wasnt touching it- - the software midi Input light came on and the attached midi CC knob seemed to shake by a % or 2- figured i may need a cap on the 5v pot pin- - tho it's off topic i searched and havent found a clear answer yet

PaulRB


i hooked up 1 pot to an analog in on my Mega 2560 and used a basic midi CC code- my software read  the pot well- but sometimes it appeared to send signals while i wasnt touching it- - the software midi Input light came on and the attached midi CC knob seemed to shake by a % or 2- figured i may need a cap on the 5v pot pin- - tho it's off topic i searched and havent found a clear answer yet


Noise. You are dealing with analog signals so it is inevitable. However, with care it can be reduced down to an acceptable level. You could try a 0.1uF cap between the analog pin and ground. Also you can change your sketch to take the average over many readings.

Paul

Grumpy_Mike

Note in MIDI your numbers are only from 0 to 127, an analogue input will give numbers from 0 to 1023. Therefore you can divide the reading from the pot by 8 before using it. this is best done with a right shift:-
Code: [Select]
value = analogRead(0) >> 3;

raschemmel

Where's your code ?

Your question:
Quote
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? 


Quote
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.   


Either there is something fundamentally wrong with your concept or you have not explained something.

Try drawing a BLOCK DIAGRAM that includes ALL the controls , or at least one Midi example  and include an algorythm that describes the
sequence of events IN TIME :
ie:
BEGIN:
SELECT MIDI BANK
SET POT FOR THAT BANK
SELECT NEXT MIDI BANK
SET POT FOR THAT BANK
etc, etc, etc.....

If this is what you want to do then you need to STORE the values read, OTHERWISE , the ONLY moment in time when you can READ
or use a MIDI bank is when that bank is selected and connected to the pot.  (ie, multiplexing).
If what you are trying to do  is use ONE midi bank at a time then you should add LEDS to indicate which bank is selected.
You might even add Serial Print statements to that effect.

I'm not "getting" you concept either....
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

sonnystikz


Where's your code ?

Your question:
Quote
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? 


Quote
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.   


Either there is something fundamentally wrong with your concept or you have not explained something.

Try drawing a BLOCK DIAGRAM that includes ALL the controls , or at least one Midi example  and include an algorythm that describes the
sequence of events IN TIME :
ie:
BEGIN:
SELECT MIDI BANK
SET POT FOR THAT BANK
SELECT NEXT MIDI BANK
SET POT FOR THAT BANK
etc, etc, etc.....

If this is what you want to do then you need to STORE the values read, OTHERWISE , the ONLY moment in time when you can READ
or use a MIDI bank is when that bank is selected and connected to the pot.  (ie, multiplexing).
If what you are trying to do  is use ONE midi bank at a time then you should add LEDS to indicate which bank is selected.
You might even add Serial Print statements to that effect.

I'm not "getting" you concept either....



Grumpy gets it- he got me sorted out

sonnystikz


Note in MIDI your numbers are only from 0 to 127, an analogue input will give numbers from 0 to 1023. Therefore you can divide the reading from the pot by 8 before using it. this is best done with a right shift:-
Code: [Select]
value = analogRead(0) >> 3;


yea i got that part- 

the signal noise was the only problem other than setting up multiple banks

Grumpy_Mike

Yes a capacitor across the pot wiper and ground will improve things.

sonnystikz

thanks- yea i been reading up on it

Go Up