Categories
Eurorack Module Design

AR Envelope Generator Design Part II

Previously I blocked in and picked some basic circuit designs for the Attack part of the AR module, and we learned some things looking at how the ARP2600 handled envelope generation. This time we’re going to expand the ‘control logic block’ to control when the capacitor is charging and discharging. Also I’ve picked out a few component values and calculated the range of control voltages and the range of charging currents and it looks like modifications will be needed. And lastly there’ll be a bit about the release block.

Controls

Last time we decided to ditching trying to time things and just use input and feedback control to enable charging the output capacitor. First the conditions for enabling the attack current source need to be described. The attack current source should be enabled if the Gate input signal is high and the output of the module is below the output set point. In circuit form that’s going to look something like this.

A comparator compares the current output with the setpoint. If the setpoint is higher than the output the comparator outputs a logic high value. If the gate is also high the AND gate outputs high and the Attack current source is enabled. A feedback resistor may need to be added to the comparator to prevent rapid toggling thus making the comparator a Schmitt Trigger. I also would like to note that this control set up will ‘top up’ the output capacitor if the gate is especially long and the capacitor begins to self discharge.

Math

This brings us to the part of the design where we need to pick some component values and transition times and start doing math to see if other component values are reasonable. Here are the initial choices.

Output Capacitor (C)10 µF
Charge time min (tmin)1 ms
Charge time max (tmax)10 s
Output Voltage minimum (Vmin)0 V
Output Voltage maximum (Vmax)5 V

Now using the terminal equation for a capacitor

I = C dV/dt

and the input voltage output current relationship for the current source

Iout = 1/R * (Vcc – Vin)

The minimum and maximum charging currents and control voltages can be calculated.

Charge TimeIoutVin
1 ms50 mA2 V
10 ms5 mA11.9 V
1 s50 µA11.99 V
10 s5 µA11.999 V

Current Range

The output current range seems ok. 5 µA is on the small side, but we’ll have to actually build a prototype to see if it’s too small to work.

Voltage Range

The range for Vin however is immediately problematic for two reasons that require circuit adjustments.

First in order to have a long attack time Vin needs to be approximately the same as Vcc (on the order of 1 mV), and having inputs and outputs of an op amp at either of the power rails tends to cause unpredictable behavior. The ‘rail to rail’ op amps I usually use recommend operating 25 mV to 1 V from the rail for ideal performance. Additionally output current is related to the difference between Vcc and Vin. Vin is controlled and Vcc is 12 V, or is it? Vcc could be higher or lower depending on the power supply and the power input protection. The typical power input block I use for circuit protection and power filtering can drop the input voltage 10’s of mV. So referencing the control current to Vcc is going to cause unpredictable behavior.

So I’m swapping the current source for this one, which uses sources a current proportional to Vin, and has the added benefit of acting as a current sink, so an identical set up can be used as part of the release stage. A limiting factor here will be the maximum current output of the op amps and 50 mA is getting up there.

The second issue is that charge time and by extension input voltage covers 4 orders of magnitude. The table shows that input voltage difference between 1 s attack time and 10 s attack time is 9 mV while . So as is more of the input space for the module is devoted to short attack (and by extension release) times. This use of the input space is backwards to human perception that is it’s easier for humans to notice the difference between 1 s and 10 s than it is for us to notice the difference between 1 ms and 10 ms. So we want to convert a linear voltage input into an exponential voltage input to better match the control voltage to attack time to human perception. Fortunately there’s a pretty typical circuit for that.

Release block

At this point the release block is super easy. It’ll be identical to the Attack block with the following changes. The input voltage to the current source needs to be negative to make it a current sink. The control logic needs to be inverted. That is on when the gate signal is low and the output voltage is above 0 V.

Categories
Eurorack Module Design

ARP 2600 ADSR Analysis

A few days ago I came across the circuit diagram for the ADSR in the ARP 2600. After I got done being amazed at how the designers accomplished so much with just a handful of transistors, I learned a couple of things to bring back to my A(DS)R design. First a simplified version of the ARP 2600 ADSR schematic.

Simplified ARP 2600 ADSR

What’s been simplified? A substantial amount of circuitry has been replaced with ‘black (blue) boxes’ Their functionality is their outputs latch high (1) on event detection and reset low (0) some time after the gate signal falls to 0 (actual operation is more nuanced, but this description is sufficient for this discussion). Next, there are no actual logic gates in the original circuit; however, parts of the circuit function in a similar manner to logic gates. So these have been substituted. Finally, a number of ‘voltage controlled switches’ have been added. These are all transistors in the actual design. However, they are all different types of transistors (NJFET, PJFET, PNP) with different operating modes, and I wanted them all to have the same conceptual functionality for the sake of discussion. So they’ve all be replaced. The ‘voltage controlled switches function as follows a high control voltage closes the switch and a low control voltage opens the switch. (so they’re non latching relays).

Operation

Initial state

Prior to receiving a gate input the Release Switch is closed and the Memory Capacitor is drained to 0 V. The Sustain value is set via the npn transistor charging the Sustain Capacitor in the bottom right.

Gate Rising Edge

When the Gate signal goes high the release switch opens, and the rising edge control is set high. Since the other two detection blocks are still low the Attack Switch closes starting the note.

Gate on Attack ending

The Attack ends when the Memory Capacitor is charged to it’s maximum value somewhere between 8-10 V. The max value detection block is set high turning off the Attack Switch and turning on the Decay-Sustain Switch. Once the Decay-Sustain Switch is closed the Memory Capacitor drains through the Decay control until it reaches the same voltage as the Sustain Capacitor. Elegantly simple.

Gate Falling Edge

The last stage is the falling edge of the gate. The falling edge detection block is set high and the Decay-Sustain Switch is opened. Once the gate has transitioned to 0 V the Release Switch is closed, and the Memory Capacitor is drained through the Release Control. Once the Memory Capacitor is drained the cycle is read to begin again.

Take Aways

My first note is that a capacitor is used as the voltage value storage device, and there’s an op-amp buffer between the capacitor and the output. That’s exactly the configuration I chose. What a coincidence! Great minds think alike. Or there’s really only one device capable of storing analog voltages and that storage mechanism requires a high input impedance to low output impedance buffer to be useful to subsequent modules. Who knows?

The next note is that there is nothing resembling a timer anywhere in this. All transitions happen because of event detection and feedback. So I’m going to drop the timer from my design, and just use feedback. I might add it back in as part of the ‘trigger function’ but we’ll have to get further along in the design to see.

The last note is the simplicity of the Decay-Sustain portion of the circuit. I was originally thinking that I’d need two switches and a current source tuned to the the natural losses of the ‘memory’ capacitor for the Sustain. I was also anticipating needing a fair amount of components to control the transitions between the states. Now I’m thinking of doing a paper design for a voltage controlled Decay-Sustain in a similar vein to the this one to see how much complexity it would add.

Categories
Eurorack Module Design

AR Envelope Generator Design

The next module I’m designing is an envelope generator. Since, I’m doing this while I wait for boards and part for other modules, I’ve decided to do a better job documenting the early part of the deign; so, if this project gets shelved for a bit I can spend less time remembering where the design is at. Now on to the fun bits.

What is an Envelope Generator

In signals an envelope describes how the signal changes in time. Since I’m primarily working with synths, the signal is going to be sound. To make a synth envelope an envelope generator outputs a sequence of voltages that are typically used as control voltages for an amplifier or filter. For example an envelope (blue) is used to control the amplitude of a sine wave (pink) using a voltage controlled amplifier.

Envelope example

A Block Diagram

How do we create a sequence of voltages? To start with lets put together a block diagram for a four part envelope generator commonly referred to as an ADSR (attack, decay, sustain, release).

ADSR block diagram

I’ve expanded the A block to show likely sub-blocks the DSR blocks will contain similar sub-blocks. Working our way through the blocks. The inputs to the A stage, CV and control knob voltages, will be combined (probably added). The mixed control voltages will be fed to the driver block, where the control voltages will be interpreted into a signal to send to the memory block. The mixed control voltages will also be fed into a timer. When triggered the timer will close the switch between the driver and the memory block for a length of time determined by the control voltage. When the timer runs out the switch will open and the timer will signal that it is done to the control logic. On receiving a gate or trigger the control logic will trigger the timer connecting the stages driver to the modules memory block. When the control logic receives a ‘done’ signal from the timer in the current stage it will trigger the timer for the next stage. Articulating all of that makes me think about how easy it would be to do all of this with a micro controller. Which leads neatly into,

Constrains

  • Eurorack module -> size – power – jacks
  • Analog and glue logic components, no micro or purpose built ADSR chips
  • Needs to utilize CV
  • Only AR for first revision
  • Attack peaks at 5 V

If I was sane I would uses a custom made ADSR chip or a microcontroller to build this modules. However I’m a little deranged so for the paper design I’ll be sticking with analog and discrete logic components. If I discover that I’ll need an excessive number of logic chips I’ll probably redo the design with a micro controller before moving on to prototyping. Since I’m only mostly insane there will be some constraints to start decay and sustain stages will be dropped from the first version. And more than likely the peak attack value will be fixed at 5 V. Since the ADSR stages will have a lot of overlap I may revisit some of these choices after I do the component level design for the attack stage. And lastly this is nominally going to be a Eurorack module so I’ll be working inside that voltage and size restrictions as well. Also since this isn’t going to be part of a standalone synth it’ll use CV in addition to potentiometers to determine timing parameters.

Design Outline

Now the blocks can be roughed in. No math yet just picking out common design patterns to fill in the blocks, get an idea of component count that sort of thing.

Memory and Buffer

Were going to start with the easy sections first. For memory the classical analog memory element, a capacitor, seem like an appropriate starting point. and the buffer will be a high input impedance op-amp connected as a voltage follower.

Memory, Buffer, and Output stages

The astute among you will note that this is the ‘hold’ part of a sample and hold circuit, and I mentioned using a switch as part of the driver circuit which would be the ‘sample’ part. Whether this sample and hold will be implemented as discrete components or using a dedicated sample and hold IC will be determined later. Since the capacitor has four potential input ‘signals’ to sample from likely discrete components will be used.

Driver

As the memory component is a capacitor, a reasonable first choice for the driver is a current source (sink for D and R blocks). Right now the switch can be penciled in as an NMOSFET, but switching could be implemented by turning the current source off via the OpAmp inputs. Adding a current limiting resistor between the transistors will probably be a good idea as well.

Timer

The timer is going to need to generate a high voltage pulse to control the NMOSFET in the driver stage. A one shot is an option but a 555 timer comes with a handy control voltage (CV) input pin so that’ll be the starting point. When the ‘TR’ input is pulled low by the control logic the output, Q, will be driven high, and C will begin to charge. When the voltage on C exceeds the input control voltage the output will be driven low and the capacitor will be discharged through the DIS pin. So the values of R, C, and CV will determine on time. reset is penciled in to be always tied on however if the AR is retriggered before finishing ideally the entire process would start again from the beginning. So the reset pin may eventually be connected to the control logic.

Input and Input Mix

The final stage is the input mix. At least one op-amp will be needed to combine and buffer the inputs and adjust their range to match the input range of the driver and timer stages. A second op-amp is needed because the driver and timer stage need different control voltages to achieve the desired envelope shape. The op-amps as shown are connected in inverting configuration because it is anticipated that gains less than 1 will be required between the input and the output of the mix. however both driver and current stages as shown require positive input voltages so a third op-amp may be required. We’ll find out more once all of the math is done.

Everything so far

This is the design so far. I’ve added in a connection for output feedback to the input. Feedback control is almost always beneficial. Although until more of the design is fleshed out it’s not clear if the feedback will be more appropriate at the input or somewhere in the middle.

Next time we’ll do some math or think about the control logic or maybe both.

Categories
DIY Mutable Instruments

Mutable Instruments Rings: Should the SJ1 pads be bridged?

So you want to DIY a Mutable Instruments Module

This is going to be the first in what I anticipate will be a series of posts I’m tentatively titling ‘So you want to DIY a Mutable Instruments Module’. When I started designing Eurorack modules I decided to put together a few DIY modules to learn about common components and design patterns. The modules I picked to DIY were designed by Mutable Instruments. Mutable Instruments has designed a line of top quality Eurorack modules, and because they’re better people than I am, all of their designs are open source. That’s right schematics, bills of materials, PCB layouts, cover panel designs, and software source files are all easily downloadable from GitHub. I generally consider the documentation to be quite good. However there always seems to be something fiddly that doesn’t work quite right for the first one you assemble. And I’m going to discuss the solutions to the questions and problems I had while I was assembling the modules.


Back to the actual topic, the solder jumper on Rings

On the Rings module there is a solder jumper, SJ1, with no clear indication if it is supposed to be shorted or left open. Since the pad is wedged between two mono jacks it is best to pick its state during assembly. What should we pick?

Short version: short the jumper

The longer version:

To answer this question we need to know two things: What does SJ1 do? How is this module expected to function when it passes QC at Mutable? The first question should be pretty easy to answer; we’ll just take a quick look at the circuit schematic.

This section of the schematic covers SJ1, IC8 (output opamp) J9 (Odd output), and J10 (Even output). SJ1 connects the switched pin on Odd output to the amplifier mix for the Even output. Interestingly there is no solder jumper in the connection between the switched pin on the Even output and the Odd amplifier mix. So SJ1 causes the Odd output to be mixed with the even output if no cable is connected to the Odd jack.

Is this desired behavior? Fortunately we’re in luck and this is covered in the official manual for Rings no digging required.

Mutable Instruments rings manual

5. Odd and even audio outputs. In monophonic mode, these two outputs carries two complementary components of the signal (odd and even numbered partials with the modal resonator, dephased components due to picking position and pickup placement with the string resonators). In polyphonic mode, splits the signal into odd and even numbered strings/plates. Note that you need to insert a jack into each output to split the signals: when only one jack is inserted, both signals are mixed together.


The final sentence tells us what we need to know. “Note that you need to insert a jack into each output to split the signals: when only one jack is inserted both signals are mixed together.” So the factory default is both signals are mixed when only one output jack is used therefore we need to bridge the solder jumper SJ1.

Categories
Equipment Fix

Heathkit IP-2718 Fix

A few weeks back I acquired a Heathkit IP-2718 triple output power supply. I fired it up and discovered that only the fixed 5 V output worked, and the two variable outputs were stuck at 0 V. So I did the traditional dance of my people.

This particular power supply is from that magic time between vacuum tubes and ICs when transistors reigned supreme. So I didn’t have to try and find a replacement for an obsolete IC or a binary for a microcontroller.

Inside the Heathkit IP-2718
The inside

After opening the case it didn’t take long to spot the problem. Six power resistors had gone bad.

Since resistors don’t tend to fail in isolation. That is frequently some other component fails and causes the resistor to dissipate power in excess of it’s rating and thus release the magic smoke. I checked the capacitors and diodes for shorts and they appeared ok. The transistors appeared ok as well. Since all of these parts were probed while attached to the board it’s hard to say for sure. So I got some replacement resistors. Pulled out the bad resistors and replaced them. Fired up the power supply and everything seems to be working fine.

In this close up of the bad resistors it’s easier to see the cracking and discoloration. Also note that the new green resistor on the right is smaller and has a higher power rating. I’m not exactly sure how that trick was managed. I’m guessing it’s 40 odd years of materials and process tweaks.

Bad resistors (left) next to a replacement (right)

One of the most interesting parts of this repair for me was seeing the traces on the PCB.

PCB Close up

The copper tracks on the board are wild, almost artistic. compared to modern PCBs where CAD software has made all the tracks uniform width and fine pitch packaging has caused them to get packed as close together as possible. Like this one

Modern PCB from Wikimedia, https://commons.wikimedia.org/wiki/Printed_circuit_boards#/media/File:2435823037_982e775726_o-620x372.jpeg
Modern PCB, Courtesy of Wikimedia

Categories
Uncategorized

Power Supply Noise Non-Analysis

When I started designing modules I decided it’d be handy to have a case to demo modules in. So naturally I decided to build one.

Not too long ago the power supply for this case arrived, and I thought, ‘wouldn’t it be great to compare the ripple of the new supply to the ripple of the ATX power supply I’ve been using to test modules.’

The ATX supply

Let’s start by looking at the ATX supply.

Where I out myself as a Rhode & Schwartz user

Wow look at all the garbage on there. Spikes all over the place. There’s so much high frequency noise that the oscillations blend together to form what looks like a solid 22 mV wide line. So what, if any of this, is coming from the power supply? Let’s start by taking a closer look at the high frequency noise. Enhance!

It’s funny because Oscopes over sample unlike cameras.

Well the high frequency noise looks suspiciously periodic. But with a frequency of 95.2 MHz, I’m pretty sure that’s a local radio station, not my power supply. How about the bigger spikey bits?

The frequency (~380 kHz) on these artefacts is a lot warmer, but they’re not the right shape to be power supply ripple. Power supply ripple should be triangular; this looks more like switch ringing. And sure enough just about all of the spikes go away when I turn off my bench lights, which are dimmable LEDs so they’re being switched on and off at some ridiculous rate.

Bench lights on
Bench lights off

But what’s this with those big spikes from the lights gone it’s easy to see an 85 kHz triangle wave. This could be power supply ripple; it’s impossible to know for sure without knowing more about the supply circuit. And the magnitude is *drum roll* 31 mV; barely larger than the background radio noise. nothing to be concerned about.

New Case supply

Now that we’ve established how little ripple there is with the ATX supply it’s time to fire up the new case supply and see what happens. I did hook it up to a few bus boards before taking measurements because who cares about consistency in experimentation.

Great, turns out a few bus boards more than tripled the background noise level to 70 mV. ~30 mV of ripple will easily be lost in this. At this point I stopped the experiment having determined that in order to meaningfully distinguish between the ripple of the two power supplies I would need to dig my power resistors up from wherever I hid them and try to limit background noise.

Parting thoughts

For me the most enlightening part of this to note that the power supply ripple is dwarfed in magnitude by ambient noise sources. Does this mean everyone with a mod synth should go buy a faraday cage. No, a few 10s mV ripple can be easily filtered by board level supply caps. And since the lowest frequency we looked at today was 80 kHz it’ll get filtered by our ears if nothing else. And we haven’t even started talking about the ambient noise suppression of all those op-amps in modules.

Is this a vote for or against using an ATX power supply to power synth modules? Neither, my understanding of why Eurorack systems shy away from using ATX power supplies has more to do with the current rating of the -12 V rail and the extraneous 3.3 V rail which isn’t in the Eurorack specification. Here’s the rating sticker from the supply I’m using.

300 mA of current at -12V is pretty reasonable for a small rack, but an ATX power supply would take up a substantial amount of space in a small case. So it’s usually a better idea to get a dedicated Eurorack case power supply. For a bigger system an ATX can’t supply enough current at -12 V to be useful.

Categories
LRR Eurorack Modules

Mid Side Module

This Eurorack module enables mid side processing. The top portion of the module converts left and right stereo signals into mid and side components for filtering or other effects. The bottom portion of the module converts the mid and side signals back into left and right stereo components. Mid and Side out are internally connected to Mid and Side in respectively (normalized). These connections are severed if cables are connected to the Mid and Side inputs respectively. The module uses professional audio quality amplifiers which are both fast and have low noise insertion so the module imparts minimal color to the processed signals.

Specs

Width4 HP 
Depth54.5 mm
Power0.38 W
+12 V16 mA
-12 V16 mA

Channel Definitions

L<Left in (Lin)
R<Right in (Rin)
M>Mid out (Lin + Rin)/2
S>Side out (Lin– Rin)/2
M<Mid in (Min)
S<Side in (Sin)
L>Left out (Min + Sin)
R>Right out (Min – Sin)

Connecting

The module uses a standard 10 pin eurorack connector with polarity marked. 

Filter ideas

Uniform Filtering

Separate Mid and Side apply similar filters to both channels before remixing. This minimizes unwanted distortions in left and right channels from using filters that aren’t perfectly matched.

Center the base

Separate mid and side, then apply a high pass filter to the side channel before remixing to left and right. 

Add space

Separate Mid and Side, then apply reverb to the side channel, before remixing to left and right

Control Voltage Mixing

Average
Average+
Sum
Average-
Difference
Half Differential+