Pages: [1] 2 3 ... 5   Go Down
Author Topic: 24 motorized fader mixer with Arduino  (Read 15867 times)
0 Members and 1 Guest are viewing this topic.
Buenos Aires
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello people!
Well I'm an Arduino beginner and a University professor offered me to set up a mixer with 24 motorized faders. The audio part of the mixer is already set.
My part then consists on reading data from faders that are active (touch sensitive selected), converting this data to a 7 bit 1024 steps midi instrument and send data to the untouched faders so they can reproduce position of the actual level of the track in the used software (let's say protools, but the goal is to make it generic), also with a 1024 step definition.

I find it a little complex, but really interesting as well.

There are 2 general parts of the project then

1) Encoding voltage data from each fader into 24 CC (continous control) 1024 step midi instrument.
   -I know that normal 7 bit midi uses a 128 step definition, but I also know that the Pitch control, for example, has a 1024 resolution in 7 bit midi. How can I reproduce this in CC controls?
   -How should I set up the touch sensitive part to activate writing mode?

2) Decoding midi data of the different positions of each fader into voltage to move each motor to its right possition.
   -I should now OUTPUT 1024 step data from the used software. Can I do this with midi outputs from software to arduino?
   -Is it better to control servos with 0/1 velocity or analog?

This are all the questions that came into my mind by now. I would really appreciate any help or advise.

Fader specifications https://docs.google.com/document/d/1T73_9Q8MKuLk_v-C3MBDKq-txNsqwEBvHIfMgILzMVM/edit

Thanks!
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow. 14 reads and no replies!   I'll take a crack since this looks like an interesting and unique project.

From the spec you listed it looks like you don't have any position of feedback on the faders "are".
It is not reasonable to modify them or in any way add a potentiometer to read each one's position.
After all, they are motorized pots themselves!

I'm thinking that you want to control these while the music is going through them.
I would create an AC signal, much higher than the audio range, say 100-300khz or more and capacitively always mix that in with the audio.
The audio signal from each fader then gets split.  The high frequency AC signal gets filtered out, full wave rectified and capacitively filtered to provide a DC signal of "where" each fader is.   The faders are non-linear, since they have audio taper, but interestingly that doesn't matter for this app.  Your Arduino simply reads and samples these 24 DC voltages and stores them for re-use.

To recall and set the faders, you could do the following. The old fashioned way would be to have a linear op amp controlling each fader motor providing a variable -v to +v voltage using negative feedback.   The two inputs to the op amp would be the current DC "whereis" voltage of the fader and a DC voltage set and stored by your controller or Arduino.  The faders would move fastest when the more they differ from the desired, slowing down as they approach the desired setting, i.e. voltage.

The better way would be to have the Arduino loop do the differencing between a repeatedly sampled "whereis" voltage and the desired one and output a varying correction voltage based on that difference.  This would need a D/A converter(s).   If would be interesting to see if the fader motors can take PWM pulses instead of varying DC.  If not you could simply provide full + or full - voltage to them and have them zoom to the new settings.   Perhaps that is what is wanted or perhaps they have some slew-rate limitting built in.

I hope this helps, or perhaps gets some others to understand the problem and chime in!
Logged

Buenos Aires
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Techylah!
Isn't the "servo track" my potentiometer position feedback?

As I understand, 1,2, and 3 pins are "servo track" and they output an analog signal refered to fader's position. 3, 4 and 5 are the "audio track" pins are used for the audio signal. Pin number 4 is the "touch sensitive track" and the motor has two pins (+ and -) to recieve desired voltage. If i'm not wrong, I think I should get position data from 1, 2 and 3 then. Does this makes sense?

Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes!   I didn't zoom in to the spec and I thought the two were for right and left.
Much easier then.

I think 7-bit, 128 level control of position will be more than enough.  Sensitivity to pitch is much higher.

It doesn't say how much the motors draw in current.   If they're more than 30ma you'll probably want to use control some power darlington chips (ULN2064) for the motors.  I think you should experiment with them using full on/off forward and reverse voltages of 5v or up to 12v.   See if they move too fast or not.  Also you can put an ammeter in series and measure the current draw.

It looks like the touch plate is not a circuit, but just a wire to a plate.
If so I'd not do a DIY touch input circuit but use the Analog Devices AD7147 - real professional.

Are you meant to constantly sample all 24?  If not it would be helpful to have an LED for each fader.
Then you tap them on and off with perhaps a double tap or something.
Alternatively you can do a rest and then just keep track of which ones were ever touched at all.
Those are the ones you save and restore.
Logged

Offline Offline
Edison Member
*
Karma: 32
Posts: 1282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yeah... i was one of those "reads" with no reply....

I'm a little lost...

Quote
The audio part of the mixer is already set.
Do you already have the mixer with the motorized faders?  Or, someone else is working on that part of the design?

Quote
converting this data to a 7 bit 1024 steps
You lost me there too.  But, that shouldn't be a problem.   The Arduino's analog-to-digital converters are 10 bits (0-1023).   That's more than enough resolution in the "input side" for fader-position.   On the "MIDI & digital output side", your firmware (sketch), is "just software" and it can handle whatever format & resolution you need.  Once you figure-out how MIDI interfaces with Pro Tools, I think the firmware will be relatively simple.  Otherwise, it's just your average-everyday servo control and your average-everyday MIDI interface.  And, if you can control one servo, you can control 24.

Of course, you'll need to check the number of inputs/outputs and I'd guess you'll need more than one Arduino.  In theiry, you could multiplex (basically time-share) the ADC inputs for fader position since these don't change at "microprocessor speeds", but that may not be worthwhile.

One thing to watch-out for is electrical noise.   Audio circuits are very sensitive because they handle a wide signal range from a few millivolts to a few volts.  If you get a few millivolts of "digital noise" leaking into the audio, you'll hear it (when the volume or signal level is too low to drown-out the noise).    So if you use PWM on the servo motors, you'll probably have to filter it.   You might even need to filter DC to the servos so you don't get a "click" when the motor current turns on & off.  And, use a separate power supply (at least separate regulators) for the digital stuff, use shielded cables, and just try to isolate and sheild the digital from the audio as much as possible.

Another thing to consider would be USB-MIDI.   That adds to the complexity, and I really don't know if USB-MIDI drivers are available for the Arduino, or if you'd have to write it from scratch.  But it would mean that the computer running Pro Tools wouldn't need a MIDI interface.
Logged

Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 does midi even support 1024 steps? does that not put you in the realm of Open Sound Control?
Logged


Buenos Aires
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

does midi even support 1024 steps? does that not put you in the realm of Open Sound Control?

I think it does. I have a Doepfer CTM64 midi encoder in witch most analog inputs are 0-127, but one (by default, the pitch control) is 0-1023. It's all 7 bit midi in CTM64, so It's a true example.

http://www.doepfer.de/ctm.htm (usb64 website)

Anyways ,I will keep investigating this subjet because It still not clear for me at all.



Logged


Offline Offline
Sr. Member
****
Karma: 0
Posts: 341
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im guessing the way to make it generic is to use the standard mackie control for midi or Baby hui, for most DAW's. And yeah, i think Pitch control will be the only one that is more than 127 steps.
But im not sure you want to use it, due to the fact that if there is another Plug in using it on same channel, then would cause conflicts. Maybe its easier of getting around that through a conversion formula of values to match the 0-127.
Keep us updated on it.
Meanwhile ill try look for some stem code and generic experiments with Behringer motorized faders done for PIC uC's, that might be able to help us get a bit more insight( i just need to remember where i saw it- i remember it was a Brazilian site).
Good luck
Logged

10 LET Loop=Infinite
20 GO TO 10

Buenos Aires
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In response to DVDdoug:
Quote
Quote
The audio part of the mixer is already set.
Do you already have the mixer with the motorized faders?  Or, someone else is working on that part of the design?
Somebody else did it already. Audio from mixer is working. I just need to use rest of the fader pins to motorize it.

Quote
Of course, you'll need to check the number of inputs/outputs and I'd guess you'll need more than one Arduino.  In theiry, you could multiplex (basically time-share) the ADC inputs for fader position since these don't change at "microprocessor speeds", but that may not be worthwhile.
I think I could use 3 arduinos, one each 8 faders. I would avoid multiplexers but still a good option.

Quote
One thing to watch-out for is electrical noise.   Audio circuits are very sensitive because they handle a wide signal range from a few millivolts to a few volts.  If you get a few millivolts of "digital noise" leaking into the audio, you'll hear it (when the volume or signal level is too low to drown-out the noise).    So if you use PWM on the servo motors, you'll probably have to filter it.   You might even need to filter DC to the servos so you don't get a "click" when the motor current turns on & off.  And, use a separate power supply (at least separate regulators) for the digital stuff, use shielded cables, and just try to isolate and sheild the digital from the audio as much as possible.
Thanks a lot for this advise! I will make a test as soon as I can to see if some noise gets in the audio track. Do you think that it could increase depending of the total amount of faders connected to the same board? I mean, can I test the circuit with just 1 fader or I should connect more to have a final result?
« Last Edit: April 20, 2012, 07:38:02 am by Mytx » Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad I sparked some of the experienced guys!
It looks to me from the spec that the motor is not a servo motor, but a plain DC motor.
That being the case, they need not be pulsed, especially since as DVDDoug points out, audio circuits are susceptible to spike noise.
Audio folks are meticulous about this; you don't want a design that contaminates their scrupulously maintained audio.

This Arduino project ( http://www.arduino.cc/playground/Main/RegulatedPositiveVoltageBooster ), shows how to convert Arduino PWM to pure smooth DC.  I'll offer my crack at explanation.  Consider charge to be like water.
The pulse turns on the current flow through the inductor for some duration.  When the pulse ends, that amount of charge flows into the capacitor increasing the voltage on it. The diode make it only flow in and not back out.
It averages out to a voltage depending on the PWM duty cycle.

Now, how to use that voltage to smoothly control a DC motor bidirectionally?
Check out this chip!   The MC33030 does exactly that.  I love it. Internal chip schematic attached.

To make life easier, there are some MC33030 based board kits, though I couldn't find any Arduino shields with them.
I did find this little Anykit M002 board kit:   http://www.scribd.com/doc/56911275/Anykits-co-in-Catalog
All it needs are your servo track voltage, your PWM derived voltage, and your DC motor.
You won't need to mess with power transistors, op-amps, comparitors and all that; it's internal.
It does add a little cost, though.  One little board for each fader.  It will give a smooth noiseless professional result.


* MC33030.jpg (76.08 KB, 856x942 - viewed 141 times.)
« Last Edit: April 20, 2012, 11:59:05 am by Techylah » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mytx,
I'm still thinking about your cool project.
I think you should forget about any Arduino PWM at all and do the analog output part with hardware, too.
The AD7808 chips have 8 d/a converters on them and are serially loaded.
That means you can set all 24 faders using just 3 of these chips and using up only 6 Arduino output pins.

Now you just need a means to read in the 24 fader voltages.
Three of these chips could do that TI  ADS8028   or older ADC0808

So now all your software has to do in its loop is read the 24 fader positions from these 3 chips.
It can save a whole faders snapshot as an array of 24 integers.  You can have many of these.
When you want to recall a set of settings, your code reads the array and outputs all 24 numbers (converting from 12 to 8 bits)
to the 3 AD7808 chips.  Those 24 voltages instantly change and and so the 24 MC33030 chips (or mini boards) automtically
and quietly, without pulses, move the sliders.

Your software can also first read the current settings, compute deltas from the desired new settings, and approach the new
voltages in multiple steps.  The steps could be non linear, in effect quickly zooming and then slowing down at the end.
 
Logged

Buenos Aires
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Techylah, thanks for all the information and for your help!

I'm investigating about all the chips you shared. They look like interesting options.

What do you think about the delay between data sent from the computer and motor response using AD7808 chips? Is it something to be worried about?
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the delay would be insignificant.  The Arduino isn't doing much calculation, just shifting data in and out.
Also motors are inherently slow.  They don't start up immediately because of inertia.
I think it's also good to not ask the Arduino to do too much.  It's an embedded controller.  Not a PC with all sorts of menus and options in a UI.

I would just have a simple save (all 24) and then recall (all 24).  I wouldn't even use a dial to specify the number of which set to recall.
This device will get used in real time.  No sequential user input.   Simple is better.  I think the users would love for it to be simple and inuitive
like a set of radio buttons on a car digital radio.   You have presets 1-6 and 6 separate pushbuttons for them.
A 7th button labeled "Set" or "save", possibly with an LED light to show that it has been pushed, is pushed to save the current settings. ("Save 3").

The user presets his settings before the performance.  Then he simply recalls them as he needs them with one button push each.

After that is working you know the users will next want you to save and restore settings somehow to a PC.  Perhaps use
the serial line and have a few commands like Read-sliders, Set-Sliders, Read-Preset-N, and Set-Preset-N.  Easy stuff to add once you built the hardware.
Have fun.  Glad to share.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 341
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As the main aim of it is to interact with a DAW, i think a button to record automation would be a good thing, either indivudually per channel or a general one ( though that is more on the control side , and probably something to worry more at the end).
 Also some basic transport controls( play pause, fwrd, rew record).
That is something i actually done in order to add to my "old" analog mixer . ADAT uses a resistor series for their RC, where for this i used the midi shield, as a starting point, and went from there( with a few more quirks than the ones mentioned like arming tracks to record, 2 buttons to change channel and solo/mute butons that wil have effect on chosen track.  As the mixer is a likkle monster of 48/24/8/2+1 channels, i had enough space to do as much !
Logged

10 LET Loop=Infinite
20 GO TO 10

Offline Offline
Sr. Member
****
Karma: 0
Posts: 341
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the article i spoke about. It is just a basic thing with some tests he done, but i thought might help( mind you , is with PIC uC's though).
http://pk2lab.blogspot.co.uk/2011/11/controle-de-fader-behringer.html

PS:Brazilian/portuguese but apart from the translator online, let me know if you need any help in case it plays up in the translation.
Logged

10 LET Loop=Infinite
20 GO TO 10

Pages: [1] 2 3 ... 5   Go Up
Jump to: