Go Down

Topic: Virtual, variable resistors, with saved presets recallable by MIDI (Read 10361 times) previous topic - next topic


The TLC2264s are quad rail-rail opamps.  Naturally their ouputs can't go below the -ve supply, so 1 of the 8 opamps is probably used to generate an artificial '0v' at about 1/2 the supply . so everything swings about  this - roughly +/- 4.5 v . That's how I'd do it. And that's where the dc of the pots will live.

Identify this 0v, and see if one end of the pots is connected to it - I bet most are.

Since the supply is floating ( a battery) there's no reason why you can't attach the arduino's 0v to this artificial 0v.

Since there are only plain opamps in the design, it's unlikely that it uses anything which is dc critical - just connect your digipots where the existing ones are . If worried, connect them with mediumish capacitors - with 100k impedance 10uF's would be fine.  I wouldn't bother with optos.  But ferrite beads on all the wires between the arduino and the audio stuff would be a good safety measure - ie making seperate analog and digital earths .  And if you want to power the arduino with the board's '0v' and it's +4.5 ( quite feasable) add a ceramic cap  on either side of the bead to digital and analog earths respectively.

I'd use a 8MHz pro mini for this, and remove the power LED to reduce power consumption - see Nick Gammon's exellent write-up on reducing power.

Good luck.



Great info, thanks so much! 

Related to your comment about the floating power supply (ie: the 9v battery):  Sometimes I power this with a battery, but 90% of the time I use a 9v wired power supply instead.  The pedal has a 9vdc jack on the side, which I connect an isolated lead from a TrueTone 1SPOT Pro into. 

Does that cause complication in using the pedal's artificial 0v and 4.5v to power the Arduino? 


Nope.  Unless the -ve of the supply is earthed, which is unlikely - check with a DMM.

If it is it means that you'll have to programme  the in-circuit arduino with an isolated computer - eg a laptop - to avoid shorting out the audio's virtual earth. And since you're using a mains psu you needn't worry about power consumption, so ignore my comments on the pro-mini ( which, would, nevertheless, be a good solution.)



I'd use a 8MHz pro mini for this, and remove the power LED to reduce power consumption - see Nick Gammon's exellent write-up on reducing power.
I took a look at the Pro Mini specs, and saw this:

The Arduino Pro Mini can be powered with an FTDI cable or breakout board connected to its six pin header, or with a regulated 3.3V or 5V supply (depending on the model) on the Vcc pin. There is a voltage regulator on board so it can accept voltage up to 12VDC. If you're supplying unregulated power to the board, be sure to connect to the "RAW" pin on not VCC.

The power pins are as follows:

RAW For supplying a raw voltage to the board.
VCC The regulated 3.3 or 5 volt supply.
GND Ground pins.
So considering the bold statement, could I just connect the Mini directly to the incoming 9vdc jack on the side of the pedal and the integrated regulator will take care of stepping it down to 5v?


Yes.... but....

If you do you MUST isolate the digipots running from the arduinos's +5 from the audio stuff with capacitors - 3 per pot - since their 0v will be 4.5 volts or so lower than the audio's '0v'.

And if any of those audio  pots ARE handling dc, they won't work. Check with a DMM.



I stuck a meter on the audio POTs and get a reading of 4.3v on one POT (each leg had the same reading) and 5.5v on the other POT (each leg had the same reading). 

Rotating the POTs did not seem to change the reading value.

I tested by placing the POS lead of the meter on the POT's leg, and the NEG lead of the meter on the battery's NEG pole. 

Is this what you mean by "handling DC"?


Just thinking out of the box here: 

Is there such a thing as a Potentiometer which allows the shaft to be manipulated from the bottom, as well as having the standard knob on the top of the shaft?  Something like the shaft extending through the bottom plate, or a hole in the bottom plate with a hollow shaft POT for a coupler to be inserted?

If something like this exists, I could swap the two POTs for this type, then use micro servos on the bottom to provide automation control over their position.  and control the micro-servos with the Arduino. 

I could then use an external power supply as well, because the Arduino would not need to be powered up for manual operation of the pedal.

This would certainly simply things if it's possible. 

EDIT:  Oh, and BTW:  I read somewhere that the 'B' indicator on the POT means "linear taper", and an 'A' designation would mean "Audio taper".  So I took an OHM measurement of the POT sweep, and it appears they are liner, being that the reading was 1/2 the overall value when the shaft was turned 1/2 way.



well yes , I suppose it could be done. And you can buy dual concentric pots. Plus all the servos etc.....



 I'd attach all your analog pots to analog inputs on the ARDUINO, and several modes ...

1- just reproduce the analog pot values on the digipots - ie 'straight through'
2 - store settings - perhaps triggered by a push button - preset 1,2,3 etc
3 - replay settings - again triggered by another button .

A display eg a 2x16 LCD would be a help in telling you where you are.

Plus.. just for fun - a sequencer which fades between given or indeed random presets  -  perhaps triggered by a microphone on the bass drum..........

could be ghastly - but rather fun? Stockhausen, Boulez etc, make way!

Or , of course, you could get the MIDI master to do all this.


ps there are ways to suppress the clicks, but these add considerably to the complexity.


The thought around the servo idea was to not interrupt the audio signal.  Plus, it would be rather cool to watch the knobs locate when a preset was recalled. 

I did hear back from Tech21, and they confirmed the audio signal does pass through the POTs. 

So using servos would negate the issue of the clicks, as well as the power isolation problem. 

I can't seem to tell which POTs could be turned from the bottom though.  I found these, and they seem small enough to work, but I don't know if that hole in the bott could be used with a shaft or coupler to turn it. 



Back in the 70s I worked for a major console manufacturer - Neve in the UK, where we invented the modern automated mixdown system with 'flying faders'

They weren't cheap.



Oh ya, flying faders are great!  I've used several consoles with them.  Also have used Presonus, who implemented scene recall without moving faders.   Talk about adding confusion! Especially when the sound engineer forgets to recall the positions. 


The flying faders had 2 tracks - one linear for the position, and one audio taper .  Penny and Giles made the faders, and we installed motor drives and control loops.

I often thought it might be possible with 2 LDR's, equally illuminated by a light source, to do a similar job.  A crude VGA. I never followed it up. Electrically a 4-quadrant multiplier such as a MC1495, or a discrete equivalent as used by DBX achieved  much the same. Or a balanced diode ring as in the Neve 2254 limiter compressor.



Belt driven, right?  Pretty sure that solution is still in place today on the current consoles. 

For my project, I was thinking the POTs I linked to above would be good since they are dual.  1 for the audio signal and 1 for location data back into the arduino.  Basically, the same purpose you are describing with the two tracks.   

I know some servos can feed back location info, but I think I'd rather get it from the POT directly.  Besides, I can't seem to find single POTs that have the bottom plate open for a servo to connect. 


Yes, they were belt driven.  More recently some use linear motors.

I you're going gown this route I suggest you buy them in - at Neve it took a team of 3 mechanical engineers several months to get the prototypes working well.

A general note... - why not use the electronic techniques covered above? 0.01% distortion isn't going to be noticable in your device, and it's an awful lot smaller, cheaper and simpler....



    I'm still considering both options, weighing the benefits and drawbacks of each as I think through them.

    Things going through my mind are: 
    • Ease of implementation
    • Clicking, or other generated noise, when changing preset values
    • Being able to use the pedal as normal, or if something goes wrong with the Arduino setup
    • Available space inside the pedal
    • Isolating the power between the audio circuit and the Arduino/digital POT circuitry
    • Not impacting the audio output tone of the pedal

    If I use the servo method, the clicking isn't an issue, but the servo motors may cause EMI and generate noise.  The servo method also does not intercept the audio signal at all, so the pedal functionality remains intact even if not using the digital piece, or if the digital piece fails.  Not sure how the programming would be different between the two methods, or how preset storage and recall would be different.

    I just ordered a Nano, a breadboard, and various piece/parts to start experimenting with.  It seems this right thing to do is to try try a few things and see what happens. 

Go Up