I've not had time to post to this blog lately; COVID stats are improving here in the Northwest US, and thus I am commuting to my day job again.
This is good news I guess--the "health is improving" aspect, anyway?
During the (hopefully) final few weeks of our collective two year COVID house arrest I found myself digging through my box of old audio IC's: which puzzle to solve next?
The Curtis ElectroMusic System's CEM3394, intrigued me: an "all in one" synthesizer chip used in the Sequential Multitrak, an instrument I owned and loved back in the late 90's.
I don't know what happened to the Multitrak.....I sold it? Loaned it? Couldn't remember.....
I had four new old stock CEM3394's in my junk box. Could I make a single board, low parts count synth out of these IC's?
Where would I start?
Like the popular CEM3340 IC, the CEM3394 required analog control voltages to function. I wanted to understand how the internal control voltages ("CV's") were implemented in early digital/analog synthesizers--and use that in a future 3394 project--since I wanted to stay true to the spirit of these venerable old designs.
I'd need a to pick an MCU for the project--the 3394 chips were designed to be microprocessor controlled. Some old synths used Z-80's, but would an Atmel328 work?
I started to research and came across this post. Short answer: yes, this could work!
(Aside: The post's final comment from "Grumpy Mike" makes me sad, it's the kind of fear and loathing and BS I really dislike; besides, he's wrong. Sequential CEM based gear from that era didn't use 16 or whatever DACs in a single synth, and when they worked correctly had internal CV's that didn't sag--you could hold a single chord for hours and it was solid).
How did Sequential avoid putting several (expensive) digital to analog converters ("DACs") in every instrument? And how did they keep critical MCU controlled CV's, like oscillator V/octave, rock solid?
Turns out they used multiplexers, or MUX's (for the Prophet 5, CD4051 IC's) and had a Z-80 processor refresh a DAC that in turn fed many MUX'd sample and hold capacitor + op amps circuit fragments, quickly, over and over--sequentially.
That way the SH's outputs would not droop, and very few MCU and DAC's--relatively expensive components then and now--I see just one of each in the Prophet 5, right?--were needed for a complete, complex microprocessor controlled analog synth.
 |
Prophet-5--thing of beauty! |
No Holds Barred
The Prophet-5's service manual helped me understand Sequential's no-droop sample and hold. Get its PDF here; an excellent explanation of how the MPU > DAC > S/H mux's work is on page 29.
But!! As a curious DiWHY dude, why read when you can build?
I designed and laid out a simple quad sample and hold board, which I called, predictably, "Sequential Quad SH".
Coded it--built it.
Worked first time (WFT).
MCU control was from a "Minimalist" Atmel328 C dev board; you can get that from sponsor PCBWay's project site, here.
For the Digital to Analog Converter (DAC) I chose a SPI 12-bit Microchip MCP4921; download an embedded C library for it and its 10 bit cousin for AVR328 processors here.
I used Eagle to lay out the PCB:
 |
The PCB has provisions for an External DAC feeding the 4051 MUX, if you use the MCP4921 make sure to jumper the 2 "DACLINK" pins in the middle of the board; if you want to use a different DAC IC (for a CEM3394, an AD5792?), tie your external DAC's output to the right pin of DACLINK and omit the MCP4921. |
The Eagle gerbers were uploaded to this blog's enthusiastic, burning-the-midnight-oil sponsor: PCBWAY. Please help support this blog and check 'em out.
Soon the PCB was back, so I built it....
 |
Board, breadboard and minimal Atmel 328 dev board....next, hook it all up.... |
 |
Let's try some different caps.... |
 |
Ready to test!
|
The board worked pretty much first time....I made a few dumb mistakes during fab--I forgot to solder on some caps, but once I corrected that mistake this was a win.
Code Me Up Scotty!
Crafting the Embedded C firmware for the Sequential Quad SH was pretty easy. I used my usual toolchain: Atmel ICE and Atmel Studio 7. I leveraged my minimalist AVR board (here) for the brains of this proof of concept but most Arduino development boards with AVR processors should work with little to no modification to the code. I uploaded code for the SH project to Github--repo is here.
I also created repos for the drivers used in the project, each with its own main.c. Get the DAC code here. For the 4051 MUX the .c and .h files are here.
The main.c's infinite loop sent hand-coded values to each channel of the mux. For real-world applications I would change the demo code to read values from the outside world--from the MCU's ADC's for example.
while (1)
{
write4921(4000);
_delay_ms(2);
single4051_out(0);
single4051_inhibit();
_delay_ms(1);
write4921(0);
_delay_ms(1);
single4051_out(1);
single4051_inhibit();
_delay_ms(1);
write4921(2500);
_delay_ms(2);
single4051_out(2);
single4051_inhibit();
_delay_ms(1);
write4921(1000);
_delay_ms(2);
single4051_out(3);
single4051_inhibit();
_delay_ms(1);
}
I had to experiment with timing--the Sequential manual says one should inhibit MUX operation whenever the DAC value changes, and I found that doing so got me the cleanest looking DC output on a scope.
Here's one of the 4 S-H outputs, with a 12 bit DAC value of decimal 4000:
And yes, the CV never sagged as long as the PCB and Dev board had stable DC power. I went away for coffee and came back a half hour later--spot on.
Bust a Cap
 |
One of four sample and hold subcircuits. Voltages are captured in C9; since the non-inverting input of the opamp is almost infinitely high impedance, as is DAC2 sourcing the voltage, the voltage is held until changed. |
I didn't know what type of capacitor to use for each sample and hold subcircuit; I have heard techs (passionately) discuss what is the best and most stable capacitor for sample and hold applications.
I tried poly film, polystyrene axial, and mylar .01uF's. No difference was seen on my scope for any of these.
I ended up using .01uF poly box film caps because I had a lot of them lying around.
Samples to Hold
If you want to play along at home, get the embedded C code, Eagle files, gerber, drawings and so on from Github (
here). The project can also be found on a PCBWAY project page (
here).
Overall, this was a fun proof-of-concept to research and build.
Once finished, the circuit provided a simple way to get a lot of horsepower out of a single inexpensive DAC. I figure with a reasonably fast MCU this idea can be expanded to accommodate 40 CV channels, maybe more; for more ideas see the Sparkfun page
here.
I can now see why MUX's were so critical to the Prophet-5's design as well as other classic computer controlled synthesizers: mux IC's are relatively inexpensive; DACs, not as much.
It would be pretty easy to turn this design into a Euro 4- or 8-channel "no sag" S/H Eurorack module, but I don't have time for that now, with my post-Covid19 day job ramping back up.
Overall, with affordable multichannel DAC's like the
MCP4728 available the CD4051 MUX approach may not always be necessary, but it's a good tool to have in one's toolbox. But in general, this MCU > DAC > MUX paradigm, I figure, will be find inclusion into upcoming audio DiWHY projects.
Hats off to Sequential for providing rock solid CVs that don't sag, in a manner that doesn't break the bank, presented in a the service manual is clearly written--so much so, even I can follow it!
Sample well, Luke. See ya next time.