compilerbitch: That's me, that is! (Default)

I kind of got all enthused today and started designing a modular synthesizer.


Note to future self: I apologize, I knew it was going to be a pain in the ass, but it’ll be awesome. Honest!


I’ve wanted a modular since I was in the single-digits-of-age. Specifically, I wanted a Moog modular. A System 55. A really really big System 55. I just wanted to get that out there right away, so you all realize that the crazy started really young.


In more recent times, two albums ago realistically, I started using softsynths in a big way. I have a fairly chunky investment in Native Instruments and East West plugins as well as licenses for Logic, Ableton Live and suchforth. Don’t get me wrong — softsynths are awesome and are utterly unapproachable for sheer awesomeness-of-noise-per-buck. The only problem is that they drive me batshit freaking nuts because of the delay and latency associated with doing digital audio with an operating system that really wasn’t designed for it.


I’m not a classically trained player, but I’m probably describable as traditionally trained, in the sense that I put in the years of no friends and 8 hours a day and the bleeding fingers. I can, and actually usually do, play my instruments real-time and have the skills to pull that off. This also comes with an annoying tendency to be able to hear when timing or pitch is off when any normal sane human would be totally fine with it and already on the way to the pub, thank you very much. Pitch isn’t so much of an issue with digital gear, but AARGH FREAKING BASTARD timing kind-of is. I can hear when something is a few milliseconds off — not only does it make things sound wrong, but it also throws off my playing. If you can tell the difference between a really good wired gaming mouse and the nasty Bluetooth mouse that came with your computer, it’s like that, but much worse.


I’m wanting to start on another album, but I really want to fix this before I get into it because it’s just way too frustrating otherwise. I’d also like to find a solution for gigs that gives me rock solid timing — I’ve done some live performances with softsynths, but it is quite challenging to pull off playing anything fast when you can’t quite hear exactly what you’re playing when you’re playing it.


Old skool analog has no timing problems whatsoever. Response time is basically in the order of single audio cycles, not the time it takes to queue up a couple of buffers and hoof them out over USB to an audio interface. Faster than I can hear, which is fast enough anyway. The undisputed Kings and Queens of analog are of course modular synthesizers. Happily, these days they are merely really expensive and complicated rather than the price of a Ferrari and complicated. I’m not so great about the really expensive. I’m OK with the complicated.


A ridiculously awesome A-100 system that does not existIf you want to lose the rest of your day, go to Analog Haven and have a play with their modulargrid tool. This thing lets you spec out an arbitrarily enormous modular in one of several rack formats with modules from about 30 or so manufacturers. I had a go with it and came up with a truly epic modular configuration that would have cost >$10k. Basically I set out to spec a synth that could do the kind of things I typically do real-time with soft synths, except (nearly) all analog and fully real time. I went for the Doepfer A-100 Eurorack format because of the large variety of third-party modules available off-the-shelf and relatively low cost relative to some of the other formats. That and the smaller module size means I could cram more awesome into the lack of space that I haven’t quite got available. The picture above (you may have to go over to the original post on mageofmachines.com in order to see all the images if you don’t see them) is not actually real — I made it with modulargrid. It’s basically three synthesizers in one, maybe four, kind-of. There are enough VCOs, Moog clone ladder filters, VCAs, VCOs and ADSRs to manage a 4 voice polyphonic pad, simultaneously with a 2 oscillator bass monosynth, a completely separate 2 voice Karplus-Strong plucked string synth, a 4 operator monophonic FM synth, digital delay, digital reverb and 16 channel CV, 16 channel gate and 8 channel MIDI interface that will let the whole lot be run from Ableton Live. That’s a LOT of stuff in about the same physical space as a midrange Moog modular, for about a fifth the price. That said, a fifth of the price of a really nice car is still more than I want to pay, and I kind of have the bug to actually design some of this stuff.


There are a few things that give me the heebie jeebies. I’m not so keen on doing my own scratch-built VCOs because getting them dialed in so their tuning tracks accurately without drifting with temperature is the kind of problem I could solve, but I’d kind of rather it was someone else’s problem, if you see what I mean.


So basically to sum up the stuff in the rack, there are a lot of little 4 into 1 audio mixers. These things are pretty much ubiquitous because there are so many cases where several signals need to be combined before moving on to the next stage. I picked out the modules so I hopefully wouldn’t run out of mixing capability if I tried to patch just about everything all at once. I think I counted 7 of those. I threw in a 4×4 matrix mixer too because it looked like a nice thing to have. Mixers aren’t too difficult to design — not necessarily trivial because there is still a fair bit you have to get right, but it seemed like a tractable place to start.


This morning I had at LTSpice and came up with a basic circuit for a module that loosely corresponds to a Doepfer A138a Linear Mixer. Since I seem to need a boatload of these things, it’s low-hanging fruit that’s worth going after, I think.


m001-ltspice-modelThis is what I knocked up fairly quickly. A word of warning — I’ve not built one yet, so if you pick up on this circuit and find it doesn’t work, then sorry, but not my fault. :-) It’s a bit messy, but basically it models a 4 input mixer with a pot for each channel and a master gain pot. There is some extra voodoo in there for ESD protection on the inputs and outputs and for bandlimiting — it should have a -3db point at about 75kHz and optionally also at about 5Hz. There’s a not-drawn bypass switch that bridges out the cap that links the summing bus to the final gain stage so you can choose whether to run this DC or AC coupled. The idea is to have an essentially flat response from 20Hz to 20kHz, but not have too much response outside that band because modulars have lots of wire everywhere whose main object in life is to receive the transmissions of passing taxi drivers. I also separately came up with a really simple analog 8-0-8 LDO reg and dual pi filter arrangement that should squash any hum on the power well below the noise floor. Yeah, NE5532 opamps, old skool, I know, but there is plenty of drooled-over classic gear stuffed full of those things and they are both multiple sourced and really cheap. Input impedance should be very close to 100k, with output impedance close to 1k, as per the Doepfer standard. I have to say, it’s really nice to do some old skool dual rail analog again after all these years. Running 3.3V single-supply is all the rage, but it’s just not the same somehow. :-)


m001-schematicI redrew the schematic in EAGLE next. It was actually pretty straighforward — for once, I could find all the parts I needed in the EAGLE library. Normally, this never freaking happens, so I have to spend hours creating the parts from scratch. But anyway, here it is. It looks a little odd because things that I’d normally draw as variable resistors are drawn as header connectors because, at least for the prototypes, the connectors and pots are going to be hand wired rather than soldered direct to the PCBs. This is actually standard practice for most modules of this kind, but to be honest if I ever have to make a lot of these things I’ll be looking to eliminate that wiring because it’s the most likely single point of failure.


m001-pcbNext up was a PCB. This was actually pretty straighforward. I went for 0402 surface mount for most of the passives, but chose to go old skool for the regs because of easy availability, low cost and extreme reliability. I went for through hole inductors because I won’t know exactly what I’ll be dealing with until I measure a real synth power bus, so it may be that something as simple and cheap as a wire link with a ferrite bead threaded on it will be sufficient. If not, I can chuck in a 1 microhenry inductor with decently low series resistance easily enough. The ESD protection is a bunch of surface mount Schottky diodes that clamp the inputs and outputs around the power rails — to maintain their own survivability, they are at the inboard end of series resistors and they have low value ceramic caps across them. Seems like overkill somehow — this board is about 80% power filtering, ESD protection and band limiting and about 20% actually doing stuff.


Web


So anyway, I think the panel artwork will look something like this. Kind of like the Doepfer module that inspired it, but with the AC/DC coupling switch. I kind of want to go for a minimalist black panel look too, because Modular Moog (and end of argument). Since I have the CNC equipment for it, I’ll most likely engrave the panels from sign material — this stuff has a white core with a shiny black surface laminate, so I think it’ll look really good. It’ll be rather slow  to machine, but at least all the holes and the outer cutout can be done at the same time (though not with the same cutter, naturally!).


I’m not quite done poking at this yet. I think I’m going to swap out the 3 pin power connector for one that matches the Doepfer standard directly to make cabling easier. I think I also need to give the gain pot circuit a bit of attention too to limit the maximum gain. Channel activity blinkenlights would be nice too. Hmmm…


I’m intending writing up the designs as I go along. I’m going to open source the design. I’ll probably end up selling partial and/or complete kits or maybe even prebuilt modules if people are interested, but first time around this is for my own use.


So what do you think? Am I as nuts as I think I am for attempting this?




Please note: this was cross-posted from my main blog at http://www.mageofmachines.com/main/2015/02/08/oops-i-appear-to-be-designing-a-modular-synthesizer/ -- If you want me to definitely see your replies, please reply there rather than here.

#Electronics, #ModularSynthModules
compilerbitch: That's me, that is! (Default)

I’ve used various versions of Cadsoft’s EAGLE PCB design software for years now, mostly with the full commercial version with all the add-ons enabled. I stuck with version 6.5 for a long time, mostly because I didn’t want to jinx my space camera board by upgrading before the final rev was out to manufacture.


Anyway, I’ve been working on another project recently that has a lot of duplicated subcircuits, so I decided to drop the hammer and upgrade to version 7.2. This wasn’t a free upgrade — it cost me $550 to make the jump from 6.5, but after a few days use I’m thinking it was worth it.


The biggest differences with EAGLE 7 are the ability to create hierarchical designs. Some other PCB CAD systems have had this ability forever — I remember drawing schematics in ORCAD in the late 1980s that were hierarchical, but this is a new thing for EAGLE, and to be honest it was the one thing that always wound me up and had me longing to use something like Altium Designer instead.


So anyway. Hierarchical schematics. The basic idea here is that, rather than having a single schematic split over multiple pages with named signals connecting across them, you have the option of creating subcircuits that appear as a rectangle in the top level design that are defined by one or more separate sheets. If that’s all this meant, it wouldn’t buy you much, and you could kind of fake the same thing by drawing a rectangle and naming the signals coming out of it. However, the big win is that you can create as many copies of this subcircuit as you like — in some designs, this is an absolute lifesaver. Nothing sucks more than getting a board back and finding that one of the eight amplifiers you painstakingly drew had a wrong connection — this way, wherever possible, things are only ever drawn once regardless of how many times they are reused. To a programmer, this is pretty obvious, to the extent that flattening out a design and manually cutting and pasting would seem like a really stupid way to work, but there really are two different cultures here, so what should seem obvious isn’t necessarily.


I had an idea a while ago for a musical instrument inspired by the Hang Drum — I wanted something electronic that triggers synthesized sounds, but existing electronic hand drums (I own a couple of them, a Korg Wavedrum and a Yamaha thingy whose designation I can’t remember off hand) didn’t quite work for me. I wanted something with faster response times than usually possible via MIDI (the Wavedrum solves that), with the ability to drum with a very light touch (nothing seems to support that). The light touch thing is a requirement of getting older and suffering from arthritis — if I whack away at a djembe for a couple of hours, I typically regret it for a few days. I’d like to be able to play really softly, but otherwise keep dynamic control. I had the idea of building a drum controller that will be shaped roughly like a Hang Drum, with playing surfaces most likely made out of hardwood. The obvious approach of sticking microphones or accelerometers to the bottom of the pads doesn’t really work for me because it wouldn’t be likely to be sensitive enough, and in any case I want to be able to mute a decaying sound intuitively they way I would with a real drum, so I wanted something pressure sensitive. Strain gauges were my first thought, but they tend to be super-spendy, unrealistically so given that I’d need quite a few of them. It then occurred to me that you can get strain gauges already set up as a nicely matched set in a bridge configuration if you just buy a load cell instead. eBay has tons of extremely cheap load cells available because of the ubiquity of low cost electronic scales — though a standard scale circuit wouldn’t be effective, an amplifier with a faster response time, sampled at 2kHz or more, would do the trick quite nicely. I started sketching a circuit in EAGLE, partly because I ultimately want to build one of these things, but mostly because I wanted to throw something not completely trivial at EAGLE 7.2 before I have to use it to design something that flies for work.


At the time of writing, the design is nowhere near done, but I entered enough of it to give EAGLE a bit of a workout. I used a microcontroller with built-in ADCs (Atmel ATMEGA128), with some jellybean opamps (2 per channel) as amplifiers. I’ve not tweaked or verified the amplifiers yet, so the component values are a wild guess, but I cared more about giving EAGLE some exercise than details. The nice thing was that I only drew the load cell amplifier circuit once, then used EAGLE to duplicate it multiple times. This all just worked basically — it was surprisingly easy.


On the layout side, your design gets flattened, so the modules go away. There isn’t a way to lay out a module, then copy that layout to other instances of the same module — I suspect that this could be done in an ULP script, so we might see this added by a third partly developer relatively soon.


One weird thing was component naming. In hierarchical designs, rather than C3, you see its position in the hierarchy fully expanded, e.g., TRIGGER1:STG_AMP6:C3, meaning module TRIGGER1, submodule STG_AMP6, component C3. Though this is pretty convenient during the layout process (you can type commands like show *amp6* to highlight everything within a module, for example), it doesn’t really work if you want to put component legends on the board. There is an option to renumber parts so that each module starts on a multiple of 100, so something like the above might appear as C603. I can live with that, and I kind of like the implicit structure that this naming gives you, which would be nice when poking around with a built-up board in the lab later.


EAGLE circuitOne thing I really wasn’t expecting was the improvements Cadsoft made to the autorouter. I should say, I’ve always been agnostic about autorouters. I don’t generally use them because I typically find that their results are awful compared with what I could get from doing the tracking by hand. However, having once briefly attempted to hand route an FPGA (back in the late 80s using one of the first Xilinx devices, and XC3000 series I think), I am quite aware of my limitations and do accept that there is no guarantee that a human layout will do better than that of a carefully crafted AI algorithm. I always like to have autorouters available to me, however, because they are awesome if you want to do a quick sanity check to see whether a board has routing issues or overly restrictive design rules before jumping in feet first and committing to days or weeks of work. Anyway, the short version is that EAGLE now has a topological router algorithm that does a much better job than its older autorouter. Playing around with my design, I did a quick manual placement of the parts then fired up the autorouter, expecting it to do a crappy job. I was shocked to find that not only did it produce a nice looking layout using just two layers, it managed to almost completely avoid traces on the back of the board. I manually added a power and ground plane — you still need to hand-place vias giving access, but the autorouter will pick them up and use them. With this in place, there was only a single route on the back of the board, which actually turned out to be an extra power plane-like voltage reference signal. Not only that, the routes looked pretty good on the top, much more like something a human would have made. I found a couple of minor things I’d want to change in a real board, but nothing serious. I am shocked to hear myself say this, but this is an autorouter I’d actually be prepared to use for a real design.


EAGLE still doesn’t do autoplacement. There seems to be a knee-jerk avoidance of autoplacement these days (ORCAD had it in 1987!), but experience working with simulated annealing based FPGA layout systems show that autoplacement can beat human placement by huge margins if you give it some structural hints. Maybe in EAGLE 8?




Please note: this was cross-posted from my main blog at http://www.mageofmachines.com/main/2014/12/24/eagle-7-2-first-impressions-an-autorouter-that-doesnt-suck/ -- If you want me to definitely see your replies, please reply there rather than here.

#Electronics, #MakerCulture

Profile

compilerbitch: That's me, that is! (Default)
compilerbitch

January 2016

S M T W T F S
     12
3 45 6789
10111213 141516
17181920212223
24 252627282930
31      

Syndicate

RSS Atom
Page generated Jun. 29th, 2017 02:09 am

Style Credit

Expand Cut Tags

No cut tags