Posts Tagged ‘WTPA v2.0’

Component Variation, Or, The Least Sexy Electronics Problem Evar

Thursday, July 7th, 2011

Analog is sexy, we all agree, right? Embedded systems on the other hand, are full of lots of unglamorous problems. Filesystems, say. Inherently un-sexy.


But I think component variation is maybe the best, most un-sexy problem there ever was. The unsexy cherry on the diet sundae. Like, you HAVE to solve it if you are making lots of something or that thing as a population will suck, even though the one on your bench always ruled.

All the pots in WTPA2 are these custom Taiwan Alpha jobbies. There are two values, 10kA and 100kA. The VCO uses one of the 10kAs as a coarse control, and it sets the voltage into a current sink which in turn sets the frequency. I’d been messing with the op amps in this circuit to try and get some performance improvements and “all of a sudden” one of the DUTs didn’t work correctly. At first I figured it was the opamp change, but after a lot of measurement and desoldering and component testing, it turned out one of the 10k pots was really 11.4k. This was a greater than 10% variation!

I’d built a margin in for error, but this was above it, and the current sink was getting too high of a voltage. I tested a dozen pots or so from the bin, and all of them were much less off. Still, since one was off, probably another one could be as well. It could even have been a result of the soldering process. I actually bothered to do a DC simulation at this point (using qucs) and fiddled with the component values until they were all as off as I could imagine them possibly being, and then resized the scaling resistor that sets the upper range of the VCO. It was a really crappy annoying unsatisfying solution, because it means that MOST of the units will be operating at a slower maximum clock than they need to. But that one in twelve or one in 100 will work correctly. Serves me right for getting the cheap pots, but there you go. Margin. Component variation.

Least Sexy Problem Evar.


WTPA2: Straight Up Struggle

Sunday, June 26th, 2011

Last week was hellish.
Srrsly, yo. I forgot how much work this is. I flew my buddy Nick out from Chicago to be in charge of kitting and assembly, and my job was to get the firmware rocking. We had from June 20 to June 24 to stuff 300 kits, 100 jack boards, 100 drilled and tapped enclosure kits, build and test 100 microSD daughterboards, build a dozen assembled units, and get ready for Bent and our Solid Sound panel talk with Moog!

Woes, take 1:
China called and were like, yo man, your main boards are gonna be late. I blame myself for letting it get so close to the wire, and to be fair they were totally sports about shipping the paste stencils and small boards early. Still, with no main boards, I would have nothing to show at the festivals. Eff that. So I called up Advanced Circuits and was like, hook a brother up in the meantime, and they were like BLING BLING. So, I got 27 “Limited Edition” green pcbs, and made some acrylic enclosures to match. Financially, it was retarded. But I have my pride.

Woes 2:
Joe at Prototope really nailed it cutting a ton of enclosures. T&T PlasticLand over by Canal also came through in the clutch with like 100 pounds of fluorescent acrylic with prices that McMaster can’t hang with. However, some dumbass specified that all these enclosures should be drilled and tapped, and those operations alone took DAYS, even with my fancy drill jig:

Here’s Nick hating life:

Woes 3:
That effing pulse shaper circuit (see the last couple posts) was wrong. Of course we didn’t figure this out until an hour before Bent. It was borderline such that it worked _a little_ even though the circuit had not changed since the prototype. The routing and components (though not the component values) had changed, and that was enough. Basically the LM358 had shitty rise times into whatever load the circuit presented, and the effective edge frequency (what the pulse shaper really looks at) was too low to work. I threw a handful of expensive TI opamps into some kits and dragged them out anyway, determined to have something to sell, but I only thought of this after Bent (but before we drove to North Adams for the festival). The new opamps slewed a lot faster and were an effective (if again, expensive, bandaid).

Woes 4:
The microSD card. I came up with new swears for these things:
More 0xFF plz
Originally for this project I bought a crappy Kingston 2GB uSD card for testing from a pre-paid cellphone store near my house. FOR WHATEVER REASON, it turned out to be the fastest, most forgiving device ever. This week, on a whim, I ordered every crappy uSD card between 512MB and 2GB that I could find on Ebay. They all behaved differently. It took days to test my drivers to make sure that all the cards behaved correctly, and there are definitely exchanges in there that you have to do which have pretty much zero to do with the SD spec (or at least the free one). This sucked, to say nothing of then trying to make a filesystem and buffers to read audio in realtime. While card access was rock solid for all tested cards by Bent, I kinda though my sample read-write routines sucked. In the end I threw them out. The devices at Bent could format an SD to the WTPA filesystem (which is NOT FAT16, but a more real-timey system that I think makes more sense) and that’s about it.

Woes 5:
Driving to North Adams after Bent with a trunk full of expensive, lovely, VERY PROTOTYPE-EY WTPA2s was the worst experience ever. I’d been up for about 72 hours on about 4 total hours of sleep (none the night before) and I seriously saw animals that do not exist in this world. Anybody who can’t afford bad acid should try writing device drivers for three days while inhaling plastic fumes and then driving through a woods full of deer at midnight.

But then we got there, pounded a bunch of beers with our nerd friends, got pocket protectors from eminent wizard Cyril Lance of Moog and generally had a great time.

And, oh yeah, in the process we made THIS:
Hot shiz

Bent looked like this:
It cost a lot to talk to these 20 nerds

Shop aftermathz:
Counting to 10 a million times
Many tubes dies that we might live.

WTPA2 is not ready to sell, but I have 300 of them and they’re pretty f’ing close. Expect to see the sales link by the end of July.

WTPA2 Prototype “B” Totally Running Shiz

Thursday, June 9th, 2011

Prototype B is up and running–
MicroSD, well, fits at least and the card-detect switch works:

The enclosure getting tapped:
Don't crack please.

And the pretty views of the done project:
From da back
Proto B Top

I’ve found at least two dumb problems so far. The Audio In/Out jacks were interchanged in the harness, and the clock select switch was in the wrong place in line for the pulse shaper (only the RC oscillator was getting its pulses shaped before heading to the IRQ pin). Also I cannot seem to find a screw that is meant to mate with those MIDI jack mounting holes. There’s probably more that’s wrong. Once I am sure I’ve found all the bogeymen, I can pull the trigger on the final PCB order.
The uSD card is already being a bitch.

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

WTPA2 Work Resumed!!

Monday, May 23rd, 2011

All right, so now that Cory’s biz is done and the art world is safe again, I can get back to God’s Work, by which I mean making samples that sound like farts. That’s right, WTPA2!
WTPA2 has been promised now for like a million years. I’m shooting for actually having it ready by the end of June for Bent Festival.

In that spirit, I dug out my old prototype. There’s a lot wrong with it. I found most of the hardware bugs way back when, and I added another input for a separate pitch control to the second sample bank. The idea was to use the spare op-amp to make an RC oscillator and use it to clock the second sample bank and use the main oscillator to clock the first bank. Clock sources could then be switched or interchanged in hard or software.

Problem is, the only uncommitted pins left that can trigger an IRQ are interrupt-on-change pins. That means that I can’t only trigger on a rising or falling edge — the ISR will trigger on BOTH. That means a 10kHz square wave will trigger 20k interrupts a second. I could make the clock half as fast I guess, but that seems like it will confuse people. For the time being I dealt with it by checking the state of the pin in the ISR, but that’s lame too. It means we vector away from mainline code twice as often as we need to. So I came up with this:

Analog Wyzyrdry

It’s a pulse shaper. It takes a clock input, and regardless of duty cycle, spits out a low-going pulse on every rising clock edge. The diode and cap here are responsible for separating out the edges, and the transistor squares them up again (more or less). Hooked up to the function generator (Agilent 33120A, 50ohm out) I can get a nice 0.5uS low going pulse really consistently! I can use this to trigger an interrupt, and the pulse will ALWAYS rise again during the ISR (the fastest ISR in WTPA2 is like 9uS). Then at the end of the ISR I can clear the interrupt flag. Viola, rising edge interrupts with a couple cents worth of hardware! I’ve rolled this and some other hardware changes into the next proto revision and will be ordering it soon.