I’m a new guy here (hello everybody) and I have browsed this website and the UCapps website for quite a while now and I think I need some guidance.
I would like to digitally control an analog pedal for bass guitar. This pedal sounds great and is controlled by 10 analog sliders, the only thing lacking on it is preset memorization and eventually expression pedal control of one (or more) parameter(s).
The goal:
control each of the 10 linear potentiometers of the analog pedal
allow real-time control of every parameter
add presets memorization and recall
(later on) add expression(s) pedal(s) control of one (or more) parameter(s) while playing
My first guess would be to build up a digital interface featuring ten motorized faders (one for each pedal parameter) and a set of buttons (or foot-buttons) to store and recall presets.
Recalling a preset would change the parameters on the pedal, display it on the motor sliders and thus allow live modifications.
All those things being controlled by (I think) a STM32 based core and an AIN module two MF modules. For what I’ve seen of the uCApps website, I think it would be doable.
Q1: Do you guys think I’m going the right way about this?
I couldn’t find a way to control variable resistors from a midibox. AOUT module allows variable voltage output but I’m stuck here…
Q2: Can a box control variable resistors?
To my opinion, motorized sliders are well adapted to this use. It allows both control and display of the settings but I found out that motorized faders aren’t cheap (21€ each on ebay and I need 10 of them…).
Q3: Can you guys think of another way around motor faders?
I dont think motor faders would work, as for MidiBox they have to be 10K linear, and the core requires feedback from the fader. the EHX micro synth doesnt use 10k pots/sliders.
im sure someone else will know a better way of doing this. you can use a FET to do 0- +5V to control resistance too. Google voltage controlled resistor.
I dont think motor faders would work, as for MidiBox they have to be 10K linear, and the core requires feedback from the fader. the EHX micro synth doesnt use 10k pots/sliders.
Neither do I, I wasn’t considering soldering motorfaders in the pedal don’t worry. I just think MF are the best way to operate this thing allowing the preset recall feature.
R41 100K LIN (Trigger)
R61 100K LIN (Sub-octave)
R6 100K LIN (Guitar)
R29 100K LIN (octave)
R36 100K LIN (Square wave)
R101 100K LIN (Attack delay)
R92 100K LIN (Start freq)
R65 100K LIN (Stop freq)
R74 100K LIN (Sweep rate)
R86 100K LIN (Resonance)
In lack of another way, I could try this, it’s a cheap way to go! Maybe with some nice softwate calibration, it could do the trick…
I guess something like this or this would be better but I start to feel way over my head.
im sure someone else will know a better way of doing this. you can use a FET to do 0- +5V to control resistance too. Google voltage controlled resistor.
I what thinking of replacing the sliders of the pedal by some digitally controled resistors but maybe you have something else in mind.
I’ve started to search more deeply into the documentation of the AOUT(_NG/LC) modules and while I understand every concepts, I think I’ll need help about the technical details like how to connect the (STM32?) Core module to AOUT modules but I’m not there yet…
It’s not going to be as simple as “replacing” the pots with a midibox controlled CV, as not all of the faders simply act as voltage dividers to supply a CV (see http://www.harpamps.com/schematics/).
A core8 will be more than enough performance-wise.
With those digi pots using I2C/SPI you’d have to drive them directly from free pic pins, which shouldn’t be the problem though. You’d want the non-volatile version. Also I dunno if they resistances you need are available, so you’d probably have to get bigger ones and lose some of the resolution.
100Kohms linear resistances are needed and found on those chips.
So far, I can see three choices for digital pots found at maxim:
the non-volatile MAX5418 100Kohms chip with 2 wire I2C interface (I’ve just disovered about the I2C interface). On power up, the digipots go to the last memorized position.
the non-volatile MAX5423 100Kohms chip with 3 wire SPI interface (I’ve just discovered about the SPI interface too). On power up, the digipots go to the last memorized position.
the volatile MAX5401 100Kohms chip with a 3 wire serial interface (looks like SPI). On power up, the digipots go to half the course.
As a sidenote it should be mentioned, that not only MBHP_IIC_MIDI modules can be attached to the IIC bus, but also BankSticks (IIC EEPROMs), IIC LCDs or even other microcontrollers with IIC slave interface - the MBHP_IIC_MIDI firmware can be used as template for such “gadgets”, like special sensors, analog/digital IO extensions, bridges to RS232, PS2 ports or… how about ethernet, a wireless link or a modem?
Based on that, I’m starting to wonder if I’m not WAY over my head (even if learning about this stuff is kind of fun anyway).
If someone reads any mistake in what I wrote (which in NOT impossible), I’ll be glad to hear about it.
Cheers
G
Edit: Found a TSSOP chip featuring a non-volatile quad I2C controlled 100Kohms digipot, the AD5254, looks promissing…
I was wrong about the (non-)volatile thing, I thought it was sth else So it doesn’t really matter as the midibox will reset the “pot” positions after a restart anyways.
Also I missed the fact that all of the faders are 100k, awesome
It does require writing some code to mod a midibox app to match your needs, but it’s really not as bad as you seem to think, and there’s lotsa people here who I’m sure would be willing to help you out
Thanks for the correction, English is not my mother language so I can get confused sometimes (as long as you get my point…).
Yep, the versatile volatile ( ) feature isn’t really needed since the digipots will be controlled by the box.
I check in more depth the coding part (I’m a computer scientist) and indeed it doesn’t seem to be too hard to get (I thought I had to write some ASM code…).
About the SPI, yeah it’s a bus but if I get this right, you need the same number of Slave Select (SS) wires than the number of chips you want to control no?
How do you select the chip your talking to with the J8 interface? (I might be missing something here).
I couldn’t find the SPI functions for MIOS8 neither… And found it on the MIOS32.
I found a PDIP 4-channel digital potentiometer too.
Still wondering which tech to go for… PIC or STM32 Core? I2C or SPI?
But I’m moving forward in the general comprehension, it’s a good thing!
To support SPI in MIOS32 (EDIT:I meant MIOS8. MIOS32 has multiple SPI ports!), you need to “bit-bang” the data (i.e. manually send it as a stream of data) The SPI based LCD drivers (dog_g) demonstrate how to do this:
As you should be able to see from this it “bangs” each bit seperately!
This is quite resource intensive but is ok for fairly low volumes of data. You are quite right, for SPI you need a CS/SS line for each device so you would need a total of 12 output and 1 input lines (10 x CS, 1 x Data in, 1 x Data out, 1 x Clock).
IIC (I2C) is probably a better bet as you are not going to be using a large amount of data and the PIC has a dedicated IIC port. The limit of 8 devices is a limit imposed by the MBHP_IIC module and not the IIC bus itself (it uses 3 bit address selection jumpers) so as long as the device that you are using allows it, you could (in theory) connect over 100 digital pots to a single IIC bus!
With the Core type, I would probably go for the STM32 as it is much easier to program and is much more powerful. The downside is that not all of the midibox apps are available yet and what is available aren’t as “mature” as the CORE8 versions.
Thanks for the info, greatly appreciated! (and a lot to process).
I think I’m gonna go with I2C digipots chips, seems like a smarter choice (even if it means, I’ll have to solder TSSOP chips).
To sum up, I’ll build up a MBHP_IIC digipot module allowing the use of up to 12 digipots using three AD5254 chips (one could go to up to 16 digipots using 4 of them which is the maximum on one I2C bus).
Check-out the following digipot, utilizing SPI interface. SPI is easier to bit-bang than I2C, and you can daisy-chain many of these chips together (only need three wires: CS, SCL and SDO).
I think it’s worth considering. Also notice that it comes in a DIP package, which is easier for prototyping than surface-mount chips. I plan to use this very chip in a few projects myself.
20 V to 30 V single-supply operation, ±10 V to ±15 V dual-supply operation
At first glance, makes it appear as though you don’t want to use this chip. But the voltage range for the pot is Vss to Vdd, so the higher voltage supply is most welcome.
3-wire SPI®-compatible serial interface
Hallelujah.