Digitally controlled analog effects

Started by Fancy Lime, April 24, 2019, 01:52:23 PM

Previous topic - Next topic

Peter Snowberg

I've never been a fan of PWM in general for some reason which may be simple bias, but when you get towards the extremes of the available range PWM shows where it has a tougher time.

If you look at schematics of 1980 synthesizers such as the Prophets from Sequential Circuits for example, you'll find plenty of DACs driving OTAs or VCAs.
Eschew paradigm obfuscation

ElectricDruid

Quote from: Peter Snowberg on May 01, 2019, 06:24:44 AM
I've never been a fan of PWM in general for some reason which may be simple bias, but when you get towards the extremes of the available range PWM shows where it has a tougher time.

Ironically, it's the centre values that are toughest for the filtering. There's more feedthrough of the PWM frequency close to 50% than at the extremes. PDM reverses this, which is another interesting difference between the two techniques.

Quote
If you look at schematics of 1980 synthesizers such as the Prophets from Sequential Circuits for example, you'll find plenty of DACs driving OTAs or VCAs.

You will indeed. Or at least, plenty of DAC outputs - often there's a single DAC and a lot of demultiplexing to sample-and-hold stages. Lots to be learned from those old schematics. And Stanley Junglieb's service manuals are some of the clearest. I owe that guy a lot.

ElectricDruid

Quote from: roseblood11 on May 01, 2019, 06:11:12 AM
You're re-inventing the earliest multi fx units, like the Boss ME-5, which used multiplexers to switch resistors

Hey, it makes a change from re-inventing the earliest fuzz pedals! :)


Fancy Lime

Quote from: ElectricDruid on May 01, 2019, 09:26:58 AM
Quote from: roseblood11 on May 01, 2019, 06:11:12 AM
You're re-inventing the earliest multi fx units, like the Boss ME-5, which used multiplexers to switch resistors

Hey, it makes a change from re-inventing the earliest fuzz pedals! :)

@ roseblood11
Well, yes and no. Sure, the basic techniques are nothing new. Show of hands, who here invented something actually new that isn't based on principles that have been around since the 60s? Some people on this forum have, actually, but that is not my ambition for this project. The point is to build something where the hardware is generic enough (and possibly modular) so that a large variability can be achieved by simple reprogramming. PICs provide fairly generic inputs so we can use all kinds of things as control signals for all kinds of effects and even couple effects (or modules) together in more elaborate ways than (hardware) multi effects usually can. Sure, you can do just about anything digitally, but we like analog audio paths, don't we? Another important point is that I want to learn something, not just have a device that no-one else has.

@ Tom
No no no! My fuzz uses two transistors to amplify and distort a guitar in an absolutely new way that no-one has ever thought of before. And it has eight ultra high precision resistors in a circle around both transistors to shield the circuit from ambient bad vibrations and is connected to an orgon accumulator to counteract the unmusical harmonics of chemtrails. So now it sounds EXACTLY like Hendrix. Completely revolutionary, you see.


Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Mark Hammer

It has been MANY a year since I've heard anyone refer to Wilhelm Reich in any capacity.  Boy, does that take me back!  I was reminded of the oddball film "WR: Mysteries of the Organism", which in turn reminded me of the Kate Bush video for "Cloudbusting" in which Donald Sutherland plays Reich, and Bush plays his son, dragging an orgone accumulator up a hill.

Fancy Lime

The Orgone Accumulator, Ancient Aliens or Hitler riding Velociraptors in the Hollow Earth (entrance at the South Pole) may be relatively harmless examples, but all sorts of hokum from these murky depths is making a major comeback recently. And now children die of the measles again. Does take me back all right but not in a good way. Sorry, off topic, I'll stop rambling.
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

ElectricDruid

This thread made me go and read the Boss ME-5 schematics. It's an interesting "transitional" design, if we're being charitable. It's a mish-mash of various digital and analog techniques if we're not.

As far as the "digital control of analog" goes, it uses some odd chips which are basic early digital pots (with only 13 steps) and some VCAs controlled by digital-to-analog convertors, and then some multiplexers (4051's, so eight options) switching in different resistor values. Plus a smattering of other analog switches and FETs for routing duties.

So...it's a mixture, and it uses most of the techniques we mentioned above.

garcho

i love the idea of having more than one function per pot
  • SUPPORTER
"...and weird on top!"

ElectricDruid

I agree, as long as that doesn't come at the cost of usability.

It's *far too easy* when designing a digitally-controlled device to fall into the trap of adding more features and saying something like "Well, we'll just have this button you press that selects the mode.." and before you know it you've got an interface where what everything does depends on the settings of everything else. It's ok when you use it all the time, but if you forget about it for a couple of months, you can't operate the bloody thing when you go back to it.

There's a clear risk. But that said, being able to keep the interface simple and still have the features, without having to build a knob-encrusted monstrosity is also good. It's just that it requires some actual good design, not just chucking it together.

Incidentally, the ME-5 doesn't include any pots at all. Since the parameter ranges are so limited (13 steps is a lot on this unit) there isn't much point, so it's all done with buttons. Very 80's.


garcho

^ yeah, i agree, was thinking more along the lines of replacing concentric pots with digi stuff, maybe 3, 4 functions max, more like 2 and then a pushbutton pot to select which function you're adjusting, no need for extra push buttons. For 1U units and pedals cutting the pots in half could help a lot!
  • SUPPORTER
"...and weird on top!"

amptramp

If you do have one pot or input device controlling more than one function, you may need to add displays that show what the parameters are for all the functions you can select from that one input device.

A modern car radio uses shaft encoders (which I recommend but I don't think have been mentioned yet) and the display can be set to show whether you are currently controlling volume, bass or treble and this shows on the display for the mode you have currently selected.  For a stompbox, you would have to have displays showing all the parameters, even the ones you are not currently controlling and an indicator LED showing what parameter the input device is currently controlling.  For example, you may have one control to set both tremolo speed and depth.  If you turn that control, you had better know which parameter you are changing.  You may also want to initialize the settings to either zero or the last position you had set since the shaft encoder does not remember absolute settings, just whether the setting has increased or decreased.  If you are controlling a multiplying DAC like a DAC0808 or DAC1208, you could have hexadecimal displays reading the stored setting for each DAC.  You could have a radio button selector where there is a button above each display and as soon as you push it, the control changes to that parameter and there is a LED showing what parameter you are going to control.

You may want to group the settings so you an just step through preset values for all parameters as you proceed through your playlist at a gig.  You would have settings 1, 2, 3... which you would switch to as you came to another song or even in the middle of a song and the steps would be sequential (with a capability to step backwards if you overshoot a setting).  This would set all parameters to a value from memory and make it as simple as possible to get through a gig - just add the setting to the playlist.  This works best if you never change the order of the songs and never get an encore.

Ripthorn

I'm working on a project that uses a mini OLED display to display the different parameters for presets. This type of stuff is so cheap now, that we can start to rethink the DIY and single stompbox UI. Nothing wrong with the old ways, but if you want deep editing and larger feature sets, you need to go beyond the 60's. I also have more digi pots, encoders, and uC units to play with.
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Sooner Boomer

A straightforward way to control analog with digital is the R/2R resistance ladder.  You can use your favorite digital switching method to apply a variable voltage (between two values, or between V+ and ground), attenuate an analog signal, or apply a control resistance.

A ladder with 8 elements (1 in 256) gives an acceptable adjustment range, but it's easily expanded because each element is repeated.
Dan of  ̶9̶  only 5 Toes
I'm not getting older, I'm getting "vintage"

amptramp

Quote from: Sooner Boomer on May 13, 2019, 06:37:51 PM
A straightforward way to control analog with digital is the R/2R resistance ladder.  You can use your favorite digital switching method to apply a variable voltage (between two values, or between V+ and ground), attenuate an analog signal, or apply a control resistance.

A ladder with 8 elements (1 in 256) gives an acceptable adjustment range, but it's easily expanded because each element is repeated.

Your wish is my command:

http://www.ti.com/lit/ds/symlink/dac0808.pdf

Figure 9 shows a programmable gain attenuator using a DAC0808 which has an R/2R resistance ladder and 8 elements giving a 256 element range.

ElectricDruid

#34
Quote from: Sooner Boomer on May 13, 2019, 06:37:51 PM
A straightforward way to control analog with digital is the R/2R resistance ladder.  You can use your favorite digital switching method to apply a variable voltage (between two values, or between V+ and ground), attenuate an analog signal, or apply a control resistance.

A ladder with 8 elements (1 in 256) gives an acceptable adjustment range, but it's easily expanded because each element is repeated.

Agree, but it's worth pointing out that you need to start worrying about the tolerance of the resistors. 1% resistors aren't really close enough for an 8-bit network. You should go to 0.1%. More details/theory here:

https://forums.parallax.com/discussion/download/81061/LADDERNETWORKS.pdf

For this reason, resistor-string or R-2R DACs are a good option, since they've already done this work for you.

(Or sometimes not - MCP4822 is a 12-bit resistor string DAC, but the resistor tolerance is such that the nonlinearity is +/-4LSB or something.)

Sooner Boomer

I have to respectfully disagree that precision resistors are needed in this case.  We're trying to emulate a potentiometer in a distortion effect (or sommat).  If this were a case of measurement and control for an industrial system, you would need them.  For just music, not so much.
Dan of  ̶9̶  only 5 Toes
I'm not getting older, I'm getting "vintage"

ElectricDruid

It's not a question of accurate control. If it was, I'd agree. With a R-2R DAC, if the resistor accuracy isn't good enough, you get uneven jumps in the value, with the biggest problems caused when the most significant bits switch. That makes the kind of digital stepping that everyone hates.
Resistor strings don't have this problem, since the resistors aren't weighted, so although the steps might vary a bit, they always increase as expected ("guaranteed monotonicity" - https://www.analogictips.com/what-is-monotonicity-and-why-is-it-important/ ).

It might be just music, but we still want smooth controls.

MetalGuy

#37
0.1% resistors are a MAJOR OVERKILL especially for guitar effects. Also smooth controls are not a must. For practical purposes 20-30 values would be enough. Imagine a pot labeled from 0 to 10 and what is the actual resolution. If you still want smooth, no problem - go for it.
There are many projects for volume controls using relays (or SSRs) and resistor ladders so as usual there's no need to discover the wheel here.

ElectricDruid

Quote from: MetalGuy on May 15, 2019, 04:07:01 PM
0.1% resistors are a MAJOR OVERKILL especially for guitar effects.
Yes, complete overkill in virtually all situations. Building a R-2R DAC from discrete components is a pretty specific use, and not one that comes up that often in guitar effects in general. If you want to make sure that the voltage you get out of your R-2R DAC for the value "128" is definitely bigger than the value you get out for the value "127" you *need* 0.1%. With even 1% resistors, the value can actually go *down* not up! So 0.1% resistors are *required* to solve specific problems, and a complete waste of money everywhere else!

Quote
Also smooth controls are not a must. For practical purposes 20-30 values would be enough. Imagine labeled from 0 to 10 and what is the actual resolution. If you still want smooth, no problem - go for it.
Agree, imagine how accurately you can set the position of a pot repeatably - it's probably a little better than "on the 0 to 10 marks or half way between them" (e.g. about 20 positions) - but not by much.
Certainly 8-bit resolution is more than adequate, and even 6-bit or 5-bit would be enough (and a R-2R with standard 1% resistor *is* possible at that level). At 4-bit (16 settings) people might start to complain a bit about the limited resolution, but in reality everyone would be able to find a setting they liked - we don't really *need* as much detail as we often get. No-one's knocking the ME-5 for only having 0-7 ranges on a lot of its parameters.

Quote
There are many projects for volume controls using relays (or SSRs) and resistor ladders so as usual there's no need to discover the wheel here.
Absolutely. And there are specific chips for a lot of this stuff nowadays in a way that there weren't when the Boss engineers were working on some of these designs we've been discussing.

Sooner Boomer

While you *can* buy resistor ladder arrays in chips, you're stuck with whatever value(s) the mfgr wants you to have.  I think that kinda goes against the grain of a DIY Stompbox.  And there's no real reason to spend a pot of money on precision resistors.  Just like people do with many other components, one can buy in bulk and ohm-out the resistors into matched values. 
Dan of  ̶9̶  only 5 Toes
I'm not getting older, I'm getting "vintage"