Jump to content

Analog pedal controller


Néal Zheimer
 Share

Recommended Posts

Hi

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?

Q4: Am I being clear?

Thanks for reading this far :)

Guillaume

Edited by Néal Zheimer
Link to comment
Share on other sites

Hello !

After a little more time thinking about it, I may split this project in two parts:

1) a midi controller for the pedal (ie. one CC# for each slider on the pedal).

2) a midi interface with sliders and preset management.

I will focus on the first part first. The only thing I miss (apart from experience) is a way to control a resistance value from the circuit.

And yeah, I'm kind of a electronic newbie.

G

Link to comment
Share on other sites

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.

http://www.effectsdatabase.com/model/eh/bassmicrosynth has the schematic.

However i guess you could use motor faders of 10K linear into the Core, and then output CV from the core and try http://www.instructables.com/id/Make-a-Voltage-Controlled-Resistor-and-Use-It/ for the CV to Resistor.. but its a bit of a hack,i doubt it would work to well..

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.

Link to comment
Share on other sites

Hi

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.

Thank you very much!

I found all sliders are 100Kohms linear pots.

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)

However i guess you could use motor faders of 10K linear into the Core, and then output CV from the core and try http://www.instructables.com/id/Make-a-Voltage-Controlled-Resistor-and-Use-It/ for the CV to Resistor.. but its a bit of a hack,i doubt it would work to well..

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'll search again for that.

Thanks for the leads!

Cheers

G

Link to comment
Share on other sites

What do you mean by the required voltage?

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... :)

Edited by Néal Zheimer
Link to comment
Share on other sites

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.

This is me guessing btw.

Link to comment
Share on other sites

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.

Does the core module can "speak" I²C/SPI?

Can it "speak" to 10 of them?

(Any lead on the how?)

Edited by Néal Zheimer
Link to comment
Share on other sites

About I²C

After some interesting reading about I2C protocol, maxim-ic and ucapps.de documentations here is where I stand:

  • On a single I2C bus, there can be a maximum of 8 MAX5418 chips (due to addressing limitations)

  • A PIC or STM32 Core module can address only one I2C bus (on J3 J4)

  • It would require coding a new firmware according to the IIC_MIDI Module page:
    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...

Edited by Néal Zheimer
Link to comment
Share on other sites

It's "(non-)volatile" not versatile or versalite ;)

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's correct that the Core can only speak to one SPI bus, but that doesn't mean one slave. It's a bus, ie you can have multiple slaves on the bus. (see http://en.wikipedia.org/wiki/Serial_Peripheral_Interface)

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 ;)

Link to comment
Share on other sites

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 ( :thumbsup: ) 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!

Cheers

G

Link to comment
Share on other sites

Hi.

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:


USER_LCD_ShiftByte


USER_LCD_ShiftByte_HLP MACRO bit

	bsf	USER_LCD_LAT_SCLK, USER_LCD_PIN_SCLK	; rising clock edge

	;btfss	WREG, bit

	bcf	USER_LCD_LAT_SDA, USER_LCD_PIN_SDA		; set SDA depending on current MSB

	btfsc	WREG, bit

	bsf	USER_LCD_LAT_SDA, USER_LCD_PIN_SDA

	bcf	USER_LCD_LAT_SCLK, USER_LCD_PIN_SCLK	; falling clock edge

	ENDM


	USER_LCD_ShiftByte_HLP 7

	USER_LCD_ShiftByte_HLP 6

	USER_LCD_ShiftByte_HLP 5

	USER_LCD_ShiftByte_HLP 4

	USER_LCD_ShiftByte_HLP 3

	USER_LCD_ShiftByte_HLP 2

	USER_LCD_ShiftByte_HLP 1

	USER_LCD_ShiftByte_HLP 0

	nop

	bsf	USER_LCD_LAT_SCLK, USER_LCD_PIN_SCLK	; rising clock edge


	return

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.

Cheers

Phil

Edited by philetaylor
Link to comment
Share on other sites

Thanks for the info, greatly appreciated! (and a lot to process). :thumbsup:

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

Now I have to come up with a schematics...

Cheers

G

Link to comment
Share on other sites

  • 1 month later...

I'm going to stand-up for SPI for a moment...

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

http://ww1.microchip.com/downloads/en/DeviceDoc/11195c.pdf

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.

JF

Link to comment
Share on other sites

Unfortunately, I don't think these will work..

It is a common limit of most chips that all signals must stay between the upper and lower voltages of the chip supply.

In the case of the MAX5401 and the Microchip option mentioned, the voltage on the resistor leads are limited to:

Maxim: ABSOLUTE MAXIMUM RATINGS VRange -0.3 to VDD + 0.3

Microchip range 0 to VDD

Close enough to call them the same...

But if you read the schematics, most of those pots are subjected to anything between V+ and V-..

and the power supply page shows V+ as +9, and V- as about -10 volts..

SO.. the application is well outside the maximum voltage ranges of the chips you have selected.

I wish I was giving good news..

LyleHaze

Link to comment
Share on other sites

Unfortunately, I don't think these will work..

It is a common limit of most chips that all signals must stay between the upper and lower voltages of the chip supply.

In the case of the MAX5401 and the Microchip option mentioned, the voltage on the resistor leads are limited to:

Maxim: ABSOLUTE MAXIMUM RATINGS VRange -0.3 to VDD + 0.3

Microchip range 0 to VDD

Close enough to call them the same...

But if you read the schematics, most of those pots are subjected to anything between V+ and V-..

and the power supply page shows V+ as +9, and V- as about -10 volts..

SO.. the application is well outside the maximum voltage ranges of the chips you have selected.

I wish I was giving good news..

LyleHaze

I present to you the AD7376 from Analog Devices

http://www.analog.com/en/digital-to-analog-converters/digital-potentiometers/ad7376/products/product.html

  • 128 positions
    Just-right for MIDI controlling, but get ready for zipper noise.
  • 10 kΩ, 50 kΩ, 100 kΩ
    Good pot values for controlling audio circuits.
  • 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...