Posts Tagged ‘Analog’

WTPA2 4046-based V-to-F Circuit, take 2

Saturday, June 12th, 2010

Boom! Current sinks all the way:

Because I am late to a BBQ I will not bother here to kick on the corporate dog and grumble about how not a single Rat Shack in downtown Brooklyn sells solderless breadboards. I will however sing the praises of H&H (buy that book. I’m not kidding) and the value of the current sink in the previously discussed VCO clock circuit. I soldered this mess up on some perfboard and in short order had a VCO that happily went from DC to >> 1MHz! The linearity is TERRIBLE, but it proves that the range is there. I’m pretty sure I can fix it adequately for my needs with just fiddling with the passive components in this circuit. Hopefully. Here’s the schematic, captured in time honored analog fashion:

Those component values are way stupid, but I think this is the topology. I may yet get away without the op-amp. Live and learn. And happy BBQing.
xo
TMB

WTPA2, Current Sinks, and the 74HC4046

Wednesday, June 9th, 2010

So once again somebody on the forum came through and found this guy’s page about designing a switched capacitor filter, where he talks about using a CURRENT SOURCE (sink, actually) instead of a resistor on one of the 4046′s frequency setting pins. This was a real forehead smacker. Thanks Kyle (erschlagener) for the heads up, and thanks to Tim for putting that out there in the first place!

Requisite googling found an EDN note about this, too:

Which claims a 1000:1 frequency range out of the 4046′s VCO!
It also confirms what I’d found on the breadboard before, namely that the 4046′s frequency output is not particularly linear outside of about 1v-4.75v, and that inside there you can expect to get about a decade of range. So I felt less dumb.

This note also has the bright idea of putting the sink in the feedback loop of an opamp, which almost certainly helps linearize the sink’s behavior at low voltages by getting rid of base current related weirdness.

Enter a quick trip to findchips for some pricing data. Turns out that the 4046 and a transistor are certainly cheaper than the LM331, although they take up more real estate. Even throwing in an cheap LM358 still costs less than the LM331, although the savings start to get less significant. Now, if there was some good use for that second op-amp in a ’358, that’d be something…

This recalls some quote I heard and want to attribute to Jim Williams, though I can’t recall exactly where it’s from, about how in modern circuits like 80% of the thing is digital and takes 20% of the time to design, whereas the 20% that’s analog takes the 80%. Sometimes it does seem true, although it might just be (for me anyway) that the analog parts are a lot of fun :-)

Back to the breadboard!
xo
TMB

Adafruit Headphone Amp Design

Saturday, June 5th, 2010

So a few weeks ago I met up with my old buddies Limor and Phil at Adafruit Industries and was griping about work being slow, and they were like, design us a kit.

So I did. They wanted a headphone amp which, in their words, “didn’t suck”.
This was really exciting to me! I do a lot of contract work, but I almost NEVER get to do something that’s exclusively analog! Granted, an HPA is not exactly pushing the boundaries of silicon magic in 2010, but I’ll take what I can get. It was a blast. I got to figure out phase margins and characterize ringing and overshoot and make a cable mess (and then worry about the capacitance of it) and just generally get my party on. Plus it was a chance to flex skills in an arena that is full of a lot of crappy designs.

And though the thing is GPL’d,, they did ask me not to go into specifics here or post any schematics or juicy bits UNTIL they have the product out, so until that happens I’m afraid I can’t go into a lot more detail.

Can’t wait to see them lay it out.
Thanks guys!

ALSO — I’d be remiss in not mentioning my friend Shea who had a lot of great advice on this circuit and who has generally forgotten more about audio electronics than I’ll ever know. He re-did the Trident A Range board at Soma Electronic Music Studios when I was back in embedded diapers and let me help re-cap some modules and generally be a solder monkey. I got paid $10 an hour for that and those were still some of the most exciting electronics dollars I ever made.

WTPA2 Initial Clock Test

Friday, May 21st, 2010

Normally I hate solderless breadboards, but I was kindof inspired by doing recent work with Adafruit that they were OK for iterating through low frequency, proof-of-concepty kind of stuff.

And a good thing I was, too. WTPA2 was slated to have a VCO as a sample clock source, bringing that feature back from the murky WTPA v0.98 days. However, a standard 4046 clock had some troubles, at least as I breadboarded it.

Using a 5v supply, and a CV at the VCO input of 0-5v, and varying the values of the VCO resistors and caps I wasn’t able to get much better than a decade of frequency out of the part. I scribbled these numbers all down on various post-its that no longer make a lot of sense to me, but getting an FMax of 20KHz and an Fmin of <100Hz seemed pretty much impossible, both experimentally and once I bothered to do the math problems in the datasheet. Moreover (and I'd seen this before with the 4046 in video synth stuff) once the CV gets too close to 0v or too close to the positive rail, the oscillator tends to either stop or jump up in frequency.

If you haven't already, it's worth referring to the 74HC4046 datasheet while reading this pontification, at the very least to convince yourself that I am not totally making this up.

This is not the most rigorous breakdown, I know, but it was enough to convince me that a standard 2 resistor, 1 cap, and and CV style 4046 VCO was not going to hack it without some kind of magic. I’d been curious about the LM331 V-to-F so I got its datasheet and did some more scratchpad math and convinced myself that it was a lot more likely to come close to what I wanted without serious massage. It’s quite a bit more expensive than the 4046, but at least it’s physically smaller.

Bent 2010 / Video Mess Tool / Color Me Baddly Breakdown

Wednesday, April 28th, 2010

So, Bent 2010 is over, and as such my arbitrary deadline and excuse for spending time and cheddar on this particular device has been pulled. The above are the final circuits I presented with at the lecture.

The thing on the left is “Color Me Baddly” from the Gerbers below. It’s a color video synth (based on PLLs) which takes a CV in for the color generators (which is peculiar about its input range, to be sure). It also takes a CMOS level input which can invert the color carrier phase by 180 degrees. On the output side it spits standard composite video as well as a CMOS level color carrier (with no sync, blanking, or burst).

The PLL color tracking is pretty good! But not perfect. The PLL keeps lock over a range of a few volts in, and tracks as high as 30+ kHz, which is better than I’d hoped. It took a lot of fudging the loop filter, although the RC calculations weren’t very hard. The invert is a cool input, which originally I just made for the proto because I needed it to to get 360 degrees of color. But in general (not suprisingly) I’m finding that the more inputs you have to things like this the more weird interactions you can get between modulating signals. So I think the invert is here to stay.

The thing on the right is the “Video Mess Tool”. The circuit is different than I originally intended w/r/t the clamping circuits, which had to be made active. The crap you see over in the far right side in the proto area is that new clamp. The clamp ranges changed a little, too. The LT1203 and AD828 and AD8561 are all pretty great ICs and basically do EXACTLY what you’d expect. Even using the opamps in unity gain for the clamps (not recommended) worked without any hitches.

I think this circuit would look a lot cooler with a window comparator — something which muxed many different mess or non mess signals and was smarter about selecting when, and which had a _still_ better series of clamps for restricting signal range. A HSYNC+burst specific monostable following the comparator would also probably not be amiss, although some of the glitchiness would be eliminated. This could be selectable — “sloppy sync” vs “Teutonic Sync” or the like.

The thing in the back is a color synth I made for Christams 2009. It uses varactor diodes instead of a PLL and is its own weird animal. There are pics of that here.

So before finally throwing these guys into the mothballs for who knows what/how long, I made a couple more videos. They showcase some of the more complicated waveforms that can be generated. Neither has any audio involved; both use input from function generators. The above uses the mess tool to mux in a rainbow from the color synth into golf. The lower one is basically two synths being muxed together and inverted all around multiples of 60 Hz, which makes the trippy horizontal band.

Naturally, all this stuff looks better in person; taping an LCD screen with a webcam is not exaclty the height of majesty. And there’s a couple more tech notes on the Narrat1ve youtube channel.

This might be it for this project for awhile, so feel free to write to me or get on the forum if there’s anything else you’d like to know about!

[NOTE: Collin Cunningham of MAKE took a pretty kickass video of my lecture at Bent, and one day I'll put it up here. Thanks, Collin!]

Xoxo, TB