MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Microcontrollers, memory & presets?
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Microcontrollers, memory & presets?
flabby
Just wondering if anyone has experimented with using microcontrollers in conjunction with ADC/DACs to create preset memory for existing analogue synths/designs?

I'm thinking mainly about saving knob/slider settings, not patch points.

Would be great if you could share your approaches, experiences etc. Or point me in the right direction.
groove
flabby wrote:
Just wondering if anyone has experimented with using microcontrollers in conjunction with ADC/DACs to create preset memory for existing analogue synths/designs?

I'm thinking mainly about saving knob/slider settings, not patch points.

Would be great if you could share your approaches, experiences etc. Or point me in the right direction.



You could probably find a lot of schematics here that would give you some ideas(see Roland Juno service manuals, for a start):

http://synthfool.com/docs/
guest
you can easily place a microcontroller on a pot and save its setting (if its being used to pass DC), but what are you intending for playback? a DAC can only produce a voltage or a current, but a pot setting is wierd combo of the 2 (depending upon how it is used). so if i understand the question correctly, i would say that it depends heavily on the application. sometimes you can use a DAC directly, othertimes a digipot, othertimes a VCA is required, or a vactrol.
macsimski
I've thoroughly reverse engineered the drum-x and basically what they (and for example the polysix also) do is they take a lot of analog multiplexers like the 4051 to sample the various pots into one adc, sample and store that, then use a single dac and again the 4051 to demultiplex the signals and use small caps and opamps to hold the voltage long enought till the next round of updates.
Cycle through all the input and output channels as fast as possible but long enough to charge the small caps at the output.


btw. the drum-x does not have a processor and uses cmos logic chips throughout to do the timing and storing in a single 4 bit Static ram chip.
mskala
guest wrote:
you can easily place a microcontroller on a pot and save its setting (if its being used to pass DC), but what are you intending for playback? a DAC can only produce a voltage or a current, but a pot setting is wierd combo of the 2 (depending upon how it is used). so if i understand the question correctly, i would say that it depends heavily on the application. sometimes you can use a DAC directly, othertimes a digipot, othertimes a VCA is required, or a vactrol.


I'd be tempted to replace each physical pot with an endless encoder. That reduces the user-interface issues of what happens when the physical pot is at one point, you apply a preset that takes it to some other value, and then you twist the physical knob. DACs on the other side of the microcontroller for the cases where that will work, digi-pots otherwise.

Digi-pots usually have limitations on how many distinct values they can assume, but that may be a fair trade for presettability.
flabby
guest - My aim initially is just to try saving the controls on an effects pedal, then move on to a synth. The idea is to keep the analogue pots/sliders and use ADC-microcontroller-DAC to scan, save and recall settings.

macsimski I imagined something like that. Although I'm completely new to this, only DIY I've done is kits, so this would be a whole new venture and I'll need a lot of learning resources. I'd appreciate any suggestions of places to start?

mskala Endless encoders had crossed my mind, but then I'm looking to add memory to things that already exist, whether it's an effects pedal or a set of modules. Digi-pots look straightforward, but then I doubt it's just a case of swapping out the analogue pot for a digi-pot. Wouldn't it introduce stepping, noise etc? In which case wouldn't I need some extra circuitry to filter it out? Plus you'd also be back to the problem of indication of parameters not matching presets. ...I'm just guessing at this here.
guest
a DAC only works if the pot is controlling something that is already voltage controlled. for example, lets say you want to control a volume knob. you can disconnect the pot from the audio source, and connect it to 5V. you can then scan this with an ADC and remember its position. but now how do you attenuate the audio signal in the same way a pot would have? a DAC can not do this (an MDAC could). you will need to use a VCA and DAC, or a digipot, or PWM an analog switch, maybe use some vactrols, etc.
Graham Hinton
flabby wrote:
My aim initially is just to try saving the controls on an effects pedal, then move on to a synth. The idea is to keep the analogue pots/sliders and use ADC-microcontroller-DAC to scan, save and recall settings.


If you want the recall to change the circuit you have to redesign all the circuits and as a general rule that increases the circuit complexity and cost by a factor of five and lowers the performance.

A lot of audio circuits are "hot house plants" and rely on features that may not be easily translated to voltage control. A pot may be freely used anywhere in a circuit either as a potential divider or a rheostat, both not necessarily referred to 0V. Voltage controlled elements are usually 0V referenced, apart from vactrols and opto-FETs which are nonlinear.

SSL got around this with their Total Recall system which simply added another wafer to every pot that a computer could read. No audio designs were compromised, but the controls had to be matched by hand, the computer just showing the controls that needed changing.

Quote:

Endless encoders had crossed my mind, but then I'm looking to add memory to things that already exist, whether it's an effects pedal or a set of modules.


The best encoder resolution is 256 cycles per revolution and they cost around £50, most are less, the cheap ones as little as 16 steps. A normal pot can be read with higher than 8 bit resolution ADCs giving better resolution in 270 degrees.

Encoders take more processing and if you miss an edge it will reverse, that's why you don't often see more than four or six together. I've put hardware processing in FPGAs to get over this.

Quote:

Wouldn't it introduce stepping, noise etc? In which case wouldn't I need some extra circuitry to filter it out?


All control systems introduce stepping and you need sophisticated software to reduce its effects. The scanning may also cause audio bleed. You have opened a can of worms, it is not impossible, but it's not a beginner's project.

Quote:

Plus you'd also be back to the problem of indication of parameters not matching presets.


I've never seen this done well on a synthesizer, but I have seen some clever stuff on oscilloscope controls. Have a look at the Trigger operation on a Tektronix 24xx or 224x...
flabby
Thanks for the great replies! This is what I was looking for really, to get a grasp of the size of the project and how realistic it would be for me to take it on. Most things you read describe everything in few steps of 'throw this in here, add one of these and that's it'. They never discuss the pitfalls or what is actually involved in detail.

Anyway....

guest wrote:
a DAC only works if the pot is controlling something that is already voltage controlled. for example, lets say you want to control a volume knob. you can disconnect the pot from the audio source, and connect it to 5V. you can then scan this with an ADC and remember its position. but now how do you attenuate the audio signal in the same way a pot would have? a DAC can not do this (an MDAC could). you will need to use a VCA and DAC, or a digipot, or PWM an analog switch, maybe use some vactrols, etc.


This is why I've seen schematics with a bunch of sample and holds after the DAC and multiplexer?

Graham Hinton wrote:

A lot of audio circuits are "hot house plants" and rely on features that may not be easily translated to voltage control. A pot may be freely used anywhere in a circuit either as a potential divider or a rheostat, both not necessarily referred to 0V. Voltage controlled elements are usually 0V referenced, apart from vactrols and opto-FETs which are nonlinear.


I suppose if I was going to do this to synth modules, I would have to choose those modules and parameters which already have voltage control inputs, and leave the others?

Graham Hinton wrote:
flabby wrote:

Wouldn't it introduce stepping, noise etc? In which case wouldn't I need some extra circuitry to filter it out?


All control systems introduce stepping and you need sophisticated software to reduce its effects. The scanning may also cause audio bleed. You have opened a can of worms, it is not impossible, but it's not a beginner's project.


A can of worms? I thought so! It does look like an uphill struggle for someone just beginning. The initial inspiration came from the Buchla Easel memory slot and iProgram card. Although that doesn't read slider settings, they have to be done from the iPad app.
I suppose looking at how it's done in the easel would be the best way?
guest
flabby wrote:
This is why I've seen schematics with a bunch of sample and holds after the DAC and multiplexer?


no, the sample and holds only allow for control of multiple outputs with a single DAC, they do not help in the fundamental problem, that you need to somehow mimic what that pot was doing in the circuit before you repurposed it as a generic input to your microcontroller.
mskala
There's a basic issue here worth understanding:

Some circuits controlled by pots are really voltage-controlled. They use a pot to generate a control voltage, and then that goes into the circuit and controls it. If you have a circuit like that, it's easy to "convert" it to take an input voltage - it might not be just a matter of phyiscally substituting a jack for the pot, maybe you need to buffer, scale, or offset the input voltage, but it's still a basically simple operation to put in a control voltage from some other source instead of the pot. And you can easily use a DAC to generate the voltage instead of having it be an analog input.

But potentiometers are not just voltage generators; they are really resistors with moveable taps. And they could be used in a circuit in any of the ways resistors are used - including passing a signal through the pot, having it generate a current instead of a voltage, or some kind of combination of several behaviours. When you have a pot used like that, you can't just poke a control voltage in; you need to have something that acts like the resistor did in the original circuit in all ways that are relevant to the original circuit, while still being controllable. There is no generic way to do this; it has to be designed for the individual circuit and the solution will break if taken to some other circuit without appropriate changes. "Hot house plants," as Mr. Hinton said.

All too often, someone notices that someone else has modified one circuit to replace a pot with a voltage control - one of the first kind, a circuit that really was voltage controlled already anyway - and then expects there's an easy master technique to do the same for any other circuit. But it just doesn't work that way. It absolutely depends on the circuit.
flabby
Brillant! Thanks for the explanation, that's much clearer now.
Like I say, good to get an idea of what is actually involved.

Shame, I was quite excited at the idea.
flabby
I think I might still try this a little further down the line just to kill my curiosity.

I was looking at digipots as suggested above and the does look like the 'simplest' way of doing it. Although, how would you guys go about the control? That's to say, would you go for rotary encoder, which is pricey, or use an analogue pot/slider or something else?

I also see mentions of zero-crossing and low noise. Although as mentioned above it probably really depends on the circuit you're using it in. Just thinking aloud here.
av500
flabby wrote:
I think I might still try this a little further down the line just to kill my curiosity.

I was looking at digipots as suggested above and the does look like the 'simplest' way of doing it. Although, how would you guys go about the control? That's to say, would you go for rotary encoder, which is pricey, or use an analogue pot/slider or something else?

I also see mentions of zero-crossing and low noise. Although as mentioned above it probably really depends on the circuit you're using it in. Just thinking aloud here.


a rotary encoder is not pricey, it costs around a dollar. whether to use pots or encoders is more about how many you need to scan/read and how you want to implement your recall and your display of current position.
guest
do you have schematics for the pedal/synth you want to mod? that would be the first place to start. to select a method of control, it would be good to see what the pot is doing in the circuit. if you want to go with a straight replacement with digipot, you will need to know the voltages that the pot is subjected to. also, there arent any decent log digipots.

as for input, i prefer pots, as they are a single line per pot, and its just one call to the ADC to get a value. you also have a pointer for visual feedback about where you at (at least for the input stage).
flabby
I was thinking maybe this....

http://www.cgs.synth.net/modules/cgs101_dcsm.html
guest
well then, youre in luck. both the pan and gain knobs are just creating a dc input from 0V to Vcc, so you can just use a DAC. since its slowly changing signals, you could probably get away with PWM off the microcontroller if you wanted to.
flabby
guest wrote:
well then, youre in luck. both the pan and gain knobs are just creating a dc input from 0V to Vcc, so you can just use a DAC. since its slowly changing signals, you could probably get away with PWM off the microcontroller if you wanted to.


Thanks guest. Yeah I thought that might be the simplest to attack. I was also thinking the filter and some aspects of the DTG.

http://www.cgs.synth.net/modules/cgs77_vcf.html
http://www.cgs.synth.net/modules/cgs114_dusg.html

Will be a while before I break anything open, got a fair bit of learning/reading up to do first.
Nice website you got there BTW.
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group