Posts Tagged ‘PCB Layout’

WTPA2 Prototype B PCBs Arrive

Tuesday, June 7th, 2011

So the boards got here for the next (and hopefully last) prototype of the WTPA2.

Bare Board Mother Lode

Some exciting changes from the last proto — I not only fixed some dumb hardware bugs and changed some layouts to make more sense, but I added the pulse shaping circuit from the last post and…
Added a Micro SD card interface!

What big mems you have

Again I really owe Olivier over at Mutable Instruments for this, since he once again shamed me out of my sloven embedded ways. Basically I didn’t want to have to deal with the SD spec (I did a little coding on MMC interfaces for the toy world and it sucked) and so I’d made the earlier daughterboard using a cheap SST flash IC. The flash IC was easy to deal with, but was admittedly a cop out. Olivier clowned me about this until I was embarrassed enough to change my ways. Users like removable memory, and a micro SD card provides 2GB of memory for about a dollar (as opposed to my 8MB before). So I sucked it up and made this board. It will be available for sale as a daughterboard (it’s deeply SMT) although I may swear a lot getting the new interface done.

Proto B, close up

Here’s the main board populated. And here’s the new Jack PCB added on:

Proto B and jacks

Video Mess Tool Assembly

Wednesday, April 21st, 2010

Yesterday the PCBs for the Mess Tool came in and I populated them. Like a big dummy I forgot to order the LT1203, so testing was relegated to the bench until today. This turned out to be a good thing, since of course there were legit problems which needed attention.
You can see from the pics that there’s a proto area in the mess tool. That ended up being a good thing. Part of the circuit is a set of clamps which let you keep whatever gnarly signal you’re injecting into the poor unsuspecting TV from spilling over into the sync region.

These clamps ended up being the source of some trouble — they were mushy passive clamps which put a 47k in series with a video signal, which it turns out is TOO MUCH, since all that pretty ground plane (and the IC inputs, and whatever other parasitic stuff is going on) contributes significant capacitance at color frequencies. The diodes I was using to clamp to a reference (SD103s) turn out to also have a 50pF capacitance or so at 1MHz, which again, counts for a lot.

This means that the video through the “snarled up” section tended to just get filtered away to nothing. The solution was (well, will be, I’m still building it) an active clamp which lowers all the circuit impedances and generally burns up more current.

The mux came in this morning (and Digikey was out of parts in the correct footprint, grumble) as did the boards for the synth and some low-capacitance diodes. So today will be busy. More soon.

Also. Not to get gooey, but man do I love hardware. Really. I forget that in the good old days it was me and a scope and I never ever wanted to learn to program. You know, when men were men and all that.

Xoxo, TB

Color Me Baddly Gerbers — a companion video tool.

Tuesday, April 20th, 2010

Just for grins, while I was waiting for the PCBs to come in, I decided to lay out a new design for color synthesis that I’d been fooling around with. This, again, is the gerber file.

The sync and blanking circuits in the above are fairly pedestrian — they’re just an AVR running at 14.318 MHz, which controls a 4051 to gate in the correct resistor values to get sync and blanking levels into 75 ohms. This part is pretty much exactly the same as the circuit from Owen Osborn’s old CA synth (which is a really elegant piece of engineering, I think). The AVR generates the colorburst and color carrier also using a hardware timer to divide the crystal frequency by 4. This means this prototype ain’t gonna do PAL. Sorry.

To my mind, the really interesting thing is the way in which color gets generated. Hue is encoded in analog composite video by _PHASE SHIFT_ of a carrier wave. Someone very smart and very good at electronics figured that out a long time ago. I’ve built synths in past which use the AD724 (lame) and varactor diodes to give continuously variable integration.

The varactors are actually a pretty badass way of doing it — they’re fast and kinda nonlinear and totally work, but it requires A LOT of stages of this to get 360 degrees of shift (enough for all the colors a TV can display). Also, (in addition to not being super cheap) the really good varactors are small SMT devices. I personally don’t care, but some of the cave-people with soldering irons who frequent this site occasionally express concern about this sort of thing and their poor tired eyeballs etc etc. Generally when this happens I turn up the Brandenburg Concertos and have my manservant pour me another Campari spritzer, but this time I decided the unwashed masses should have some cake too.

So.

It took a lot of searching and fiddling to find something that I thought would work, that was both elegant and cheap and didn’t require exotic components or a sensitive board layout or weird supply rails or whatever. I had this suspicion that a PLL could do what I wanted, cause you know, its job is to party with phase. PLLs regularly work at or above colorburst frequencies (3.58MHz) which is also good because it means they aren’t on the edge of some spec.

The other idea I had (a voltage controlled all-pass filter) was generally too hard to do at frequency ranges that high (the LM13700 won’t slew anywhere near that fast, for instance). Other than designing an OTA which works at those frequencies (on my list of things to do, along with dating supermodels, designing invincible armor and generally running Stark Enterprises) I wasn’t sure how to implement this in a simple way.

PLLs are not the easiest circuits to understand (for me, anyway). But they are cheap and ubiquitous and many very smart people have written a lot about them. Eventually I stumbled across this circuit in EDN. The description with it is brief, but pithy, and explains the essential details of what I wanted to do.

Armed with this I was able to create a new design, standing on the shoulders of great nerds past. And when UPS shows up, I’ll know how well it (as well as the Mess Tool) works out!

Xoxo, TB

Video Mess Tool, or, Snuggling With Sandin (for a Bent 2010 lecture)

Friday, April 16th, 2010

The pretty pretty gerbers for a new video tool. This device will hopefully allow you to take all the precious bits of composite NTSC (or PAL, I guess) video and keep them safe, while mucking with the rest of the signal. Sync, blanking, and colorburst are separated with a level comparator, and a mux allows you to inject new signals or perturb the old one. It’s analog, and based on the AD828 op amp, the AD8561 comparator, and the LT1203 video mux/buffer. For one, I hope it works. For two, I hope it looks awesome. Stay posted!

WTPA v0.98 Review and Shakedown!

Wednesday, March 18th, 2009


So I got the test PCBs Monday, bare as the day they were born. The last couple days I’ve been going through all the circuits and checking the hardware for problems, bugs, things to optimize, and stuff that would otherwise be Bad To Deal With in a run of 200 units.
The good news: The third rev of boards does more or less all the stuff it is supposed to, and has most of the performance improvements I’d expected. However, nothing is perfect.

First, let me give you young nerds a piece of advice. Become rich. Then use your dough to buy prototype boards that have a soldermask. Good lord. You will save yourself hours in debugging stupid soldering problems, and gray hair in debugging other problems which you may at first erroneously attribute to solder bridges.
Bare PCBs do offer an advantage in that they’re easy to probe wherever you need to, and all that exposed tin makes it easy to solder fixes in, but in general they will make you crazy at least once with some weird connection that you didn’t mean to make. That was the first round of problems I had to solve.

With those out of the way came the first real, serious, problem: The VCO. The VCO got incorporated in the last board rev and I dutifully wanked on it a few times and then set it aside to deal with other problems. This in retrospect was quite stupid, because if I had paid more attention I could’ve saved myself a lot of time and a little false advertising.
It turns out that the VCO design I used (ripped wholesale, with a few changes, from Horowitz and Hill p. 240, who I’m pretty sure in turn ripped it wholesale-with-changes from the LM324 datasheet) is good in many regards. It is single supply and simple. It requires only opamps and a fairly generic transistor or FET. The problem came in trying to tune the monster over a wide range. Though the TLV2474 opamps I’m using are pretty good at RRIO, they aren’t perfect.
All the drama occurred when the CV was some small number of millivolts from the bottom rail. The ‘2474s don’t really want to drive that low, so I made the little Merce Cunningham looking mess of dancing resistors (pictured above) to help pull them there. Simple enough, but a little ugly.
Approaching REALLY closer to the rail (say within 10mV or less) the VCO stops responding in anything approaching a linear fashion and gets jittery and tends to drop out. Normally I wouldn’t care and would just bias the CVs above 10mV, but that ends up being a significant amount of tuning in the low-sample rate range. Which is silly. _NO_ op amp is that good, really, and no good design should try and expect one to be assuming it isn’t colliding particles or something.
With a marathon all-nighter / all-dayer the best performance I could get from the VCO was a not-so-great 2kHz to 16kHz, a tuning range of 8-to-1. This sucks. In retrospect the humble relaxation oscillator of the first WTPA did something like 60-to-1.

I fiddled around trying to get another VCO design breadboarded for a little while, but all the good ones I know use an OTA. I’ve seen some designs with analog switches and of course plenty with specialized VCO ICs, but I had three op amp sections and a dream. The final decision was to drop the VCO, return to the traditional relaxation oscillator, and reduce the opamp from a quad to a dual. Even Saving You Money(tm) in the process.

For those of you crying “Noooo! How will I make it talk to my Modular?” first let me say — samplers usually don’t talk to modular synthesizers, you’re spoilt. Second, let me say, because I love you, and because that’s a weird and cool idea, I’ve worked out a way to make the sampler’s oscillator clock sync up to audio inputs — so you’re losing a VCO, but you’re gaining a sync! This means that now you can synchronize your samples to your vocal line, synth line, guitar, or any signal in the audio frequency range.
This should work pretty reliably — I’ll know soon. I can no longer say “The only sampler with a VCO” but I think the new effect will probably be cooler anyway.

Everything else: I found a hardware bug in the in-circuit serial programming section related to changing around the data bus. I fixed with some pullup resistors. After that I made sure the switches and LEDs worked with the new bus structure. It’s technically still possible to PWM the LEDs and maybe I’ll do that sometime before release, but it’s low on the list. Next I quantified the bus-turnaround time related to the bus routing changes, and they’re almost invisible. It took some NOPs in the ISR, but I bet I can optimize those out later. I tested the MIDI output — so far WTPA has only received midi messages. But today it took charge, such as it can.
Finally, I took a look at the audio path. This was important and enlightening. Using a function generator and a fancypants benchtop meter set to take dB readings, I figured out the f3dB points for all the different audio paths through the system. They were pretty good — the first reading showed the audio range of the sampler’s pass-through and DAC paths to be about 14Hz-356kHz (pictured above). Not bad!
Still, as a rule of thumb (also ganked from H&H) I try and position f3dB points 10 times greater or less than the frequency of interest to avoid phase shifts in the audio range. You know what they say about phase shifts, right? “They make for weak ass west coast bass, not that Miami shit.” That’s what I heard them say.
Anyway, I got the range for those paths to be more like 2.8Hz to 370kHz with a few changes. In the overdub path I managed to actually DC couple some of the connections which means that there should be no loss in that path relative to the rest of the sampler.
Giving it the listen test, it sounds Really Good. I’m happy with the audio quality. It’s nice and quiet where it should be, with good frequency response, leaving it free to Expose Da Crust in all the important parts.

Finally, there was one more valid thing I found. In an effort to keep impedances (and costs) low I settled on two values of potentiometer for the final thing — a 500k audio taper for the input and output amp gain controls and 1k linear pots for everything else. In all the audio controls on the board, the 1k pots have a resistor from the wiper to ground to approximate a logarithmic curve (and make your life silky smooth). This means that the total resistance in some places in circuit ends up being pretty darn low. Although this does keep noise pickup low and the top f3dB point high, it also ends up working out the driving opamps something fierce. My hot rail-to-rail output doesn’t swing nearly as rail-to-rail as it used to. This of course means less usable bits in our sample. I can fix this a little by chaning the tapering resistors on the pots, but the right thing to do would be to bump the pots up to 10k and scale their related circuits. Easy enough, if I didn’t have a boatload of pots on the way from China already. The ENOB isn’t terrible, but it could be a little better. Hey, what’s a design if there isn’t room for revision?

Lastly, before I leave the soapbox, I’d like to take this opportunity to show this off as yet another example of an old TMB truism: Analog Be Harder Than Digital. Not better, but harder, and perhaps by association more noble and romantic.
While I was frantically breadboarding crappy VCOs, I came across this app note in which that continuous font of inspiration, Jim Williams, designs like 10 analog circuits which are complicated enough that they make my head spin even after reading his explanations, and he figures them out for shits in his garage or something, while on vacation. There’s a badass VCO in there which tests my understanding, and whose makeup is also (or consequently?) not quite right for WTPA.

Oh, and it also made me always remember to refer to VCOs as “Voltage to Frequency Converters” again. Saying VCO makes you sound like Jean-Michel Jarre; saying VFC makes you sound like a curmudgeon with a white beard and a bunch of Teflon caps and bandgaps. Who would you rather be?

Hello, big bag of Chinese boards? Perhaps you would like to come over?

Xoxoxo, TMB