Monday, March 30, 2020

Smoke on the Forty--3340 that is--Actually a TL074--Burned up Sir!

Before any of this Covid/Corona Shelter in Place thing I could still invite friends to my studio. So I was showing off my CEM VCOs when all of a sudden SMOKE started pouring out of one of them.

Good work Elmo--nice craftsmanship--impressive job on this.

The OCD in me hates electrical smoke but I guess it gets us all at some point.

Here's the VCO PCB that blew up real good:

 I-IV-V: "wuz a TL074SMD.....now charcoal...."

Question: what happened?  The fried VCO was a CEM3340 based "prototype"--but then everything us DIYers build is a prototype right--anyway, the smoked VCO was the first 3340 VCO I built based on the design here. It didn't work at first, de nada, so I added kludge buffer daughter boards, a floating octave selector circuit, and extra 22 gauge wiring fixes affixed with hot glue, and more, all to correct my own design and fab screw ups; see the the previous post here....a horror show.

The front panel wasn't much better....

The other two CEM VCOs I built (post here) fared better--I used a "rev 2" PCB, correcting the mistakes of rev 1. That means: no kludges--and no smoke (yet) from either of these two (yet).



Lucky I was in the studio when the first VCO smoked right? Otherwise this could have really gotten bad.

So the question is, what happened? 

Well being not 100% sure....I dug in a bit.

The TL074 IC used as a quad buffer in the VCO has built in short circuit protection, here is the schemo of a TL071 shamelessly lifted from TIs datasheet:


This means that any current going in or out of a TL07x hits a few resistors first. I didn't know these resistors were there at all, but even so.....as I see it, with +15/-15V power, you're going to be sinking a max of something like 75mA of current through this tiny resistor if you create a dead short to Edison ground. That's over one watt. Since this is an itty-bitty-IC-in-chip resistor, not the honking 2W power resistors you'd find in a tube amp, I figure the resistor can't be take that much punishment in terms of dissipating heat before singing good night Irene.

There are also resistors between the + and - rails I can see in the TL071 schematic as well. Same sort of thing--you get a smidge of protection from overdoing the current from + to - from the looks of things, but there has to be limits to how much current you can put through any of these resistors before blowing up the FETS, transistors, or something else.

I like experimenting with innocent components....so I put a sacrificial TL071 on my bench, created a dead short from its output to ground (through an ammeter) than started cranking up the current from my bench supply.  WARNING: do not try this at home!!! The op amp will heat up very fast, you could burn your house down. PLEASE ALWAYS BE CAREFUL!

Here is my test circuit if you can even call it a circuit? The downward arrow represents my Fluke DVM set to read and display current:
The op amp became hot very quickly when wired up like this.....and could easily have smoked if I left it a few more minutes, possibly taking other things with it, like my entire lab. Again PLEASE DO NOT TRY THIS AT HOME!

AudioDiWhy's lab dungeon of Op Amp Pain.


The data sheet says a max for the FK package (not sure what FK means, perhaps FK-U since this is TI? Help me out here?) is 260C for one minute. I am not sure how hot the TL071 got in my experiments but within a few seconds it was too hot to touch. Probably way less than 260C.

So what happened inside the IC during the torture test? Not sure exactly. There might be clamping circuitry I don't see in the schematic....or maybe I am missing something, but when first powering up my torture test the ammeter read around 20mA, about what I'd expect as the max source output current from the IC, for a few seconds. But then the Fluke read 0A and the chip started to heat up fast. Even at 5V V+ and GND, in the config you see above, once the IC clamped, things heated up, to the point where I couldn't touch the IC, after maybe 15-20 seconds. Not good.

So I think it's safe to assume that in spite of the short protection the TL07x IC will get really hot if you present the output with a dead short to ground. Its in chip short circuit protection is minimal! And the heat has to go somewhere.....

I didn't bother testing things like reverse voltage present at V+ vs. V-, since I know that will kill the IC straight away (been there, done that). So: don't do that either.

So I figure, what could have killed the vco was simple: one of the outputs of the VCO's TL074 buffer must have gotten shorted to ground by a wire or kludge or solder bit or something. From the burn marks it might have been a short on pin 8 pulling way too much current through V-. All Hail Richie Blackmore!




So what is my takeaway from all of this?

First, for modular applications, always use series output resistors for your output buffer op amps--at least 1K, on a TL0xx even though there is already a resistor inside. It isn't going to hurt to increase your short circuit protection.

Second--don't over kludge! This module was a horror show of daughter boards, hot glue, and 22 gauge kludges. Something was bound to go wrong, even though at first it "worked". Resist the urge--toss the overly kludged module and start over.

Third--Turn that sh*t off! YEP! always shut off all your DIY stuff when you are out of the studio, it's not UL listed and can blow up any time.


"Home, Charles": I took the smoked VCO out of the rack, and it was time to rebuild it. I had left over extra rev 2 CEM VCO PCBs for this project--it was a pretty easy single evening job of using my rework tool to remove any parts I wanted to save from the blown out board and building up another main PCB, mounting it to remaining VCO guts, and calibrating it. Worked pretty much first time.

I also made the existing front panel a bit more presentable using "Mr Label", a vinyl sticker front panel process you can read about here.

Overall, good to have the 3rd VCO back, but I hope there isn't some sort of flaw in my VCO layout.  I guess we will see; if I indeed screwwed it up I will be breathing many more fumes at some later date.

Such is life sheltered in place.

Tuesday, March 24, 2020

Noise! Part III: Quad 4051 CMOS Mux

If you're like me, sheltering in place is a geek's dream, you can work at the bench all day and no one will bug you, since you might sneeze on them?

OK, I have been using this strange time to further expand and enhance the Noise! Lunetta circuit (read part I--basic board layout here; part II--digital quad pot control of 4x LunettaVCOs here).

This time I'm extending the Lunetta design from the creative mind of Martijn Verhallen/reverselandfill.org to respond to a 8x4 arduino controlled Mux.  This adds more audio oddness on 2x more output jacks.

The extra board allows CMOS "patching"--which Martijn's original design accomplishes w a jack bay--using CV control of an Arduino Pro Mini and 4x CMOS 4051 MUX SMD IC's.

Turns out, as with most things in Arduinoland, it was really easy to MUX this way.....I see this as a useful thing for any number of CMOS audio projects and I don't why I wasted so much time trying to do this with more complexity. 4051s are easy.

Here is the finished mux board (in front) buttoned up on the bench.


CMOS fun and 4051 for audio is nothing new to this blog--see the voltage controlled switch synth  module here for instance. Yes the 405x chips are endlessly useful to what we do here. BTW it wouldn't be hard to redo this board to use +12/-5 power and +5 logic, which should allow seamless switching of +/- 5V P/P audio signals--I have not messed with 405x powered this way, but it should work? The board would need to be modified to accommodate more voltage regulators, but really that shouldn't be too hard right? Maybe one of these days......


Prototype PCB for the Mux. $2 for 5x from China. Why stripboard or wirewrap, ever?


Once all the various pieces of the Noise! Lunetta are done (really, one of these days!) I'll post 'em on my website....

LOONETTA: The mux output goes to 2 output jacks--again thanks to Martijn's creative work--one an OR of each of 2x 4051s in the mux, the other, each 2 more 4051's outputs are fed through a series of 4070 CMOS XOR logic stages for some Korg inspired ringmod craziness.

The Mux CV is supplied right now by a 0-5V tall trimmer set up as a voltage divider, but I will add jacks and buffers for true CV of mux control in the next few weeks--for that I need yet another PCB. The post on "board # whatever" for the NOISE! project is coming up. Sorry I just can't stop!

OK, What does it sound like? Hello--it sounds STRANGE.

I plan to do more sound clips one of these days, but take a look at this quick vid....it starts with a Turing circuit sort of situation, then inexplicably morphs into some serious audio farting, then back to Turing. This pattern continues forever. odd. Many more sound clips to come.....but not today, I am too busy working on the next PCBs for this project....





OK, on to the obligatory bench photos:




Here's the sketch that makes the whole thing go.  I can see many ways to improve this but for now hey it works:

  int CV0 = 0;
  int CV1 = 0;
  int CV2 = 0;
  int CV3 = 0;

  int MAP0 = 0;
  int MAP1 = 0;
  int MAP2 = 0;
  int MAP3 = 0;

void setup() {
  pinMode(1,OUTPUT);
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(13,OUTPUT);
  pinMode(14,OUTPUT);
  pinMode(15,OUTPUT);
  pinMode(16,OUTPUT);
  pinMode(17,OUTPUT);
  pinMode(A0,INPUT); //tie to mux pins D2-D4
  pinMode(A1,INPUT);  //tie to mux pins D5-7
  pinMode(A2,INPUT); //tie to mux pins D8-10
  pinMode(A3,INPUT); //tie to mux pins D11-13


}

void loop() {

 digitalWrite(17,LOW); //enable IC5
 digitalWrite(16,LOW); //enable IC3

 CV0 = analogRead(A0);
MAP0 = map(CV0,0,1023,0,7);

 CV1 = analogRead(A1);
MAP1 = map(CV1,0,1023,0,7);

 CV2 = analogRead(A2);
MAP2 = map(CV0,0,1023,0,7);

 CV3 = analogRead(A3);
MAP3 = map(CV3,0,1023,0,7);

////////////////////////////////////
//IC2

switch(MAP0)
{
case(0):
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
break;

case(1):
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
break;

case(2):
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
break;

case(3):
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
break;

case(4):
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
break;

case(5):
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
break;

case(6):
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
break;

case(7):
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
break;

}

/////////////////////////
// IC3
switch(MAP1)
{
case(0):
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
break;

case(1):
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
break;

case(2):
digitalWrite(5,LOW);
digitalWrite(6,HIGH);
digitalWrite(7,LOW);
break;

case(3):
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,LOW);
break;

case(4):
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
break;

case(5):
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
break;

case(6):
digitalWrite(5,LOW);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
break;

case(7):
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
break;

}

/////////////////////////
// IC4
switch(MAP2)
{
case(0):
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
break;

case(1):
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
break;

case(2):
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
digitalWrite(10,LOW);
break;

case(3):
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,LOW);
break;

case(4):
digitalWrite(8,LOW);
digitalWrite(9,LOW);
digitalWrite(10,HIGH);
break;

case(5):
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
digitalWrite(10,HIGH);
break;

case(6):
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
break;

case(7):
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
break;
}


/////////////////////////
// IC5
switch(MAP3)
{
case(0):
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
break;

case(1):
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
break;

case(2):
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
break;

case(3):
digitalWrite(11,HIGH);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
break;

case(4):
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,HIGH);
break;

case(5):
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
digitalWrite(13,HIGH);
break;

case(6):
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,HIGH);
break;

case(7):
digitalWrite(11,HIGH);
digitalWrite(12,HIGH);
digitalWrite(13,HIGH);
break;
}




} //end loop

In CMOS we trust: after months of messing with different mux ideas, turns out something simple like this works just fine.

Next up, I am going to add some VCAs to this; more tall trimmers for adjustomatic, I have a few other ideas for add ons.

One of these days the NOISE! synth will be done and racked up, but for now, it's just too much fun adding to it like the winchester mystery house. Stay safe!

Saturday, March 7, 2020

Piece of PAIA: 2720 Bandpass VCF Lives Again!

Howdy again, it's time to get into the time machine and go back to 1974, let's build an audio filter in the spirit of the legendary synth kit maker, PAIA. To wit; a 2700 series filter, that was my first synthesizer, built it with my brother from a kit, and after many hours of fab it sounded pretty damn crappy as I recall.

But hey it got me started down this path right?

PAIA still has a place in my heart, so when I was cruising on the E-M DIY forum and found a reworked schematic of the classic (?) PAIA 2720 bandpass filter from gasboss775 so I said hmmm.....

The original PAIA design is the super low parts count you'd expect:



This was reworked by gasboss with different variations....the one that looks to me like it catches the spirit of PAIA hegemony (but hopefully sounds a lot better) is this one:




Yeh the 2700's VCOs wouldn't stay in tune and its low pass filter was a trailer tragedy, but I remember the 2720 3B bandpass filter sounding a bit better than the rest, especially when buffering its output with the PAIA 2712  inverter buffer module.

Looks like some of the EM members stripboarded the gasboss rework and it works!

But me--stripboard?  Who needs that? Let's fab up a PCB and try it out:





Back from China and it took me about two hours to fab on my bench:


Tall Trimmers are used for this revision for convenience.  I'll probably change that out for rev 2.


Notice the incorrect name of this board on the silk.  It's a 2720, not a 4720.  And also how JLCPBC messed up my part # to better have theirs prominently displayed. But then again--what do you expect for $2 for 5 boards?

Ready To Test!


PAIA in the FACIA: At first my build of gasboss' 2720 variant sounded rel bad--all sorts of issues with driving the filter cutoff, tons of distortion at output, and other maladies.

After a couple of evenings of messing with the circuit and some malodorous swearing, I realized I forgot a critical resistor in my schematic capture: R12, which was screwing w/ the frequency cutoff.  Easily kludged in....

OK That fixed some of the CV issues but the VCF still sounded a bit, well, mild (but I remember the original 2720 VCFs not having a lot of drama either).

After more experimenting, I discovered that using a BOWAL front end (post about that is here and here) to precondition incoming CV helped the sound a lot--the filter seems to respond best when I have control of not just CV level but also CV bias, and then if I crank the CV way down into bipolar-CV-land the gasboss 2720-3B starts to sound a bit more juicy.

I have to think about why that is for a while, but whatever; I will do a revision that includes a BOWAL subcircuit/incoming CV buffer--the CV input should be buffered anyway....

The output needs to be buffered/boosted as well; I fully remember that being the case on the original 2720-3B.

OK: it's time to revise the layout and then do this all again. I'll do a follow up post and hopefully create some sound samples.

That's it for now--until next time, don't breathe the fumes.

Wednesday, February 26, 2020

NOISE! Lunetta Board--Part II--Lunetta Lives!!!

Life in Lunetta Land must be vibrant--my previous post (here) about a 4x Lunetta Oscillator based on the CMOS 40106 IC is one of my most viewed to date.

This time we carry on with part II of ReverseLandFill.org's Noise! Oscillator build (part I of this post is here), combining the AD5254 digital pot board from last time (here) with Martijn Verhallen's Lunetta design. Update: 3-24-20 I added a 4x Arduino controlled CMOS MUX to this--post is here.

Martijn did his usual great job on the initial board, but I can't leave anything alone....hence the digital pots. If you want to hear how the module below sounds so far: clip is here. I'll be adding more circuitry to this self-contained synth and will augment the clip in the future, but so far we already have bad strangeness.


WTL? The concept of my "lunetta stack" is pretty simple--I slightly revised Martijn's original design (he was kind enough to send me Eagle files) to accommodate the quad pot board from last time (here) and then stacked a board on top of it to hold "tall trimmers" and Thonkiconn PCB euro Jacks. That gives us quick control over the CMOS 4093 oscillators (bull schmitt?), which feed a 4040 counter. There is a 4070 XOR IC on the board as well but it's not wired to anything (yet). That addition will be coming one of these days right?

To use the board, for now, let's just power up the stack and plug the output into our DAW.  That's what you hear in the demo--this is all Noise! w/ the quad pot CV board, and a bit of reverb or delay or other minor FX from the DAW so your speakers aren't ripped to shreds. And: the sounds you hear were not created with complex modular patches--just LFO and audio from a single VCO fed into the noise! circuits' various CV ins. Full disclosure: the Noise! board isn't a good fit for a traditional JS Bach revival concert but nevertheless, Martijn's cool design has yielded one of the strangest sounding modules I've built to date, and maybe that's not a bad thing.


The idea of stacking boards is not new--the whole idea of "skiff builds"is based on that; for instance, see the SEM attenuverter project here. For Lunetta work I am trying to standardize on 2000 x 3750 mil PCBs because that will fit pretty easily behind a 20HPish Euro and/or a 2u Frac; I want to keep things small. For this particular build though, I am thinking about putting the entire finished Lunetta synth into a goofy lunchbox, and maybe creating PCB front panels to live inside? not sure yet....that's something for an upcoming post.


One thing I did find out is that #4-40 Phillips screws aren't easily found longer than 2", but I guess that's OK, how big should this stack be, really?

Tall trimmers, available from places like Modular addict, drop into appropriate 9mm 90 degree PCB pot pads. You can cram a lot of pots into small spaces with these things, but make sure to leave room for your fingers....


Schematic is from Martijn; he tells me he was inspired by E-M designs and this book.....slightly modified, but at its core it's all MV!




Dirty Pun omitted! The jacks board is mostly for convenience--debugging and troubleshooting would have been a nightmare with jacks and pots flailing all over the bench. Not sure if I will reuse this "jacks PCB" for the final version of the stack--probably yes but who knows.  Update--read Reverselandfill's post about this post here. Go reverselandfill!

OK what next?  The CV ins for this sound extra bizarre with DC VCAs in series, so I designed a 2x VCA board in 2000x3750mil for that, but it's still off at fab. Same with a 4x 4051 CMOS switching board that I will use between the main board's VCOs and some additional outputs. Those 2 boards, added to the project, should further add to the unabashed craziness.

I'll do a part III for all of that, but as it sits this Lunetta setup is already pretty fun. With a few more boards in the stack and this thing hot but not smoking I'll eventually post all of this on my website including instructions about how it's wired up, but for now it's still a work in progress.

On a minor note: one of my 3340 VCO builds smoked a couple of nights ago--still not sure why--I am still breathing the fumes--this mishap didn't burn down the house, but stunk the hell up out of my project studio. Let's hope today's project doesn't suffer the same fate.


Monday, February 10, 2020

Analog Devices 5254: Quad Pot IC--Arduino Controlled--How to Make this Go!

Hello again!!

This is a continuation of the post started here--way back in April 2019--working on modding a Lunetta Noise! Oscillator circuit from the mind of Martijn Verhallen, found on his reverselandfill site.

It's a cool circuit on its own but sadly I can never leave anything alone.....

To mod this Lunetta Noise! circuit --I hope to have the module mods entirely done (finally!) in the next few weeks--I wanted a way to radically change CMOS Oscillator frequencies using CV, and figured a quad digital pot IC would be a way to get to that. Yes I could have used optos--been there, done that, e.g., here; why repeat something when you can do something completely different?

The pot I chose for the project--there are a lot of choices in digitalpotland--is the Analog Devices AD5254.  Data sheet is here.

It's 8 bit, quad (4 independent pots on one IC) and uses the I2C communication protocol to change its wiper values among other things. Should be easy? Sure--there is a lot of information on the web about using digital pots with MPUs, such as here and here.

But I hadn't seen a lot about getting a quad digital pot ICs going with an Arduino--and AD datasheets can be pretty dense, so, let's try it....why not?

Dead ants!


If you've messed at all with the Arduino wire.h library, you know that implementing Arduino I2C is easy as long as you read the datasheet for the chip under control carefully and understand exactly what sort of data you need to feed the I2C slave. A most-excellent vid from GreatScott!, where he has to decode an AD datasheet to get an I2C FM radio chip working is here; getting this quad pot going is the same idea.

(BTW as long as we are talking vids--a really good intro to I2C vid is here--highly recommended if you want to know how I2C works under the hood.)

Shut up already--Let's build! Nope, Not quite yet.

Here's rev 1 of the pot schemo and PCB:


The digital pot chip is the tiny thing bottom center.....


The idea: in goes 4 CV's, which get buffered with 2x SMD TL072s, and regulated by 5.1V Zeners--this is old hat, I find myself using the op amp + zener fragment seen above over and over. So often that I built a dedicated board for it which you can see at the bottom of the post here.

The CVs are fed into 4 analog inputs in Arduino-land, which get A to D'd. Finally the Arduino translates what it sees at analog in into I2C data, and sends that to the the AD5254 IC to change its four wiper positions.

Piece of cake right?

Shut up already! damn!--just build it!!

OK the boards are back, I bought some AD 5254 chips from Digikey, and of course a lot of other parts were lifted from my parts junk box.....

With that in hand it's time to solder in the SMD chips first, and beware, the AD5254 is really REALLY tiny!




Holy smokes that's a small IC, but fortunately, I tooled up for SMD soldering already, and as I do more SMD work it's slowly getting easier. More info about how I geared up for SMD here.  



OK with all the SMD chips soldered in place it's time to build the rest of the digital pot board.


The Arduino used this time is a super cheap clone Pro Mini, same thing I used in the gate delay module (here). PM clones are ridiculously inexpensive, super small, have I/O silkscreens that are impossible to read, and seem to breed like rabbits.

The first clone PM I soldered into the board above didn't work (at all!! Regulator issue? Don't know. Never will--tossed that damn thing!--No matter what i did, I couldn't upload code to the POS. Good riddance.)

The DOA PM had to be removed using my rework station (I use a Hakko FR300....very useful, a good review vid of this tool is here). Using cheapo clone #2 Pro Mini, uploads from my Linux laptop worked just fine.

Gotta love that clone crap!

OK with that all in place, I whipped up an additional board--to contain all the pots and jacks and whatnot for the upcoming Lunetta Noise! mod project. Bench testing is easiest without CV pots floating around all over the bench right?

Tall trimmers, available from Modular Addict when I wrote this post, are used to save space. The Eagle device defs for tall trimmers can be found in the Music Thing Modular library, here.  VERY useful library! Along with 3.5" M301 "Thonk" jacks, you can pack a lot of hardware into a small space using tall trimmers and 3.5mm jacks. Yeh!


Here's a quick view of the schematic and board for the tall trimmer and jacks PCB:


(The idea: I can combine these two boards with future PCBs--it all should fit behind a 12HP Euro panel, or 2u Frac, as long as any other PCB in the stack follows the 2000 x 3750 mil footprint above.)

With the pots, jacks, and AD5254 PCB all stuffed and wired up, it's time to write the sketch. This was reasonably easy--the datasheet for the 5254 looked intimidating at first because the 5254 can do everything but wash your linens, but at the end of the day the code to change the four wiper positions from analogRead() calls is pretty simple.

For me, the only hard part was getting the correct I2C master address of the AD chip itself, which I tried to figure out from the datasheet, unsuccessfully; but eventually nailed it using the I2C scanner sketch found here. BTW, with the AD5254's AD0 and AD1 pins wired to ground, the address to use is b00101100. Knew that!

OK Here is the sketch so far:
################

#include <Wire.h>

int cv0;
int cv1;
int cv2;
int cv3;

int cv0map;
int cv1map;
int cv2map;
int cv3map;

const int cv0pin = A0;
const int cv1pin = A1;
const int cv2pin = A6;
const int cv3pin = A7;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);

Wire.begin(); 

}

void loop() {
  // put your main code here, to run repeatedly:

cv0 = analogRead(cv0pin);
cv1 = analogRead(cv1pin);
cv2 = analogRead(cv2pin);
cv3 = analogRead(cv3pin);

//map that puppy
cv0map = map(cv0, 0, 1023, 0, 255);
cv1map = map(cv1, 0, 1023, 0, 255);
cv2map = map(cv2, 0, 1023, 0, 255);
cv3map = map(cv3, 0, 1023, 0, 255);

Serial.print("value for CV0:");
Serial.println(cv0map);



Serial.print("value for CV1:");
Serial.println(cv1map);



Serial.print("value for CV2:");
Serial.println(cv2map);



Serial.print("value for CV3:");
Serial.println(cv3map);

Wire.beginTransmission(0b00101100); //tricky. address ignores LSB and pads with 0 at MSB. Eventually nailed with I2Cscanner sketch

//consecutive write mode: n, N+1, N+2 etc bytes are now sent to wipers

Wire.write(cv0map); 

Wire.write(cv1map);

Wire.write(cv2map);

Wire.write(cv3map);

Wire.endTransmission(); 
delay(200);
}

Next I uploaded the sketch into the Arduino PM, then put a ohmmeter probe on the pins on the PCB.

Ha! It worked!!  The only issue I had was I forgot to add a wirepad to the pots-n-jacks PCB for ground. Doh! This was easily fixed by soldering a kludge wire from ground on the pots board to one of the ground terminals on the jacks board. OK with that fix, when I cranked over the CV from the tall trimmer board the resistance between wiper and terminals present on the 5x2 headers varied from about 17K to 97K--this could be seen between SV2 pins 2 and 1 for instance, as well as for the other 3 "pots" elsewhere on the SV1 and 2, with a DVM. GO A'S!

I was hoping to get this closer to 0 ohms fully CCW (0V CV), but perhaps that isn't possible with a digital pot?....I should study the datasheet to figure that out, but I'm too lazy, and 17K to 97K is good enough for what I'm doing here.

Resistance varies between SV1 2 and 1, 5 and 5; same for SV2, based on the incoming CV.
One more tidbit: I found I could hook my 15V bench power output to the 8V regulator I put on the 5254 PCB, feed 8V to the "raw V" input of the PM Arduino, and simultaneously power up the Pro Mini from the USB to serial board, which passes VCC as well.

I thought maybe feeding all of this into the Pro Mini at the same time would blow something up, but it worked fine, and that meant I could have everything on the bench plugged in at once; I could test the pots and buffers, read data from the Arduino IDE Serial monitor, and tweak the Arduino sketch simultaneously, all without smoking Doepfer.


OK, bottom line--I have a working quad pots board!

Next time: let's finish modding the Lunetta Noise! module once and for all. More about that soon, it's on the bench now and almost ready to test. I will probably add a mux board to it as well, which is taking shape as a more grandiose version of the CV controlled 4051 module here. The goal is to add to the CMOS madness, I want this thing to sound very, very weird.

Onward.

In the meantime I recommend getting your hands on some ICs, write some code, and have fun with your quad pot, but don't breathe the fumes. See ya.

UPDATE 2-26-20: this quad pot thing has been married to a Lunetta Osc board and works!  See the post here.

Sunday, February 2, 2020

Ratshack Receivers, Contact Cleaner, and the Fine Art of Indolence

Welcome back. It's tax time! I'd normally ditch doing my taxes on my day off by building a new module (I have PCBs now to finish the Reverselandfill's "Noise" Lunetta circuit mods, but I am waiting for parts to arrive.....).

I also have a gig in about 3 weeks I need to get ready for, as well as an album I said I'd have done and delivered year end.

But instead of working on any of that, I wasted a wonderful amount time this weekend repairing some old receivers and other audio crap I found on the sidewalk near where I live.

DIY?  Not entirely, but there are lessons to learn from this. Read on!!

The Onkyo Receiver and Technics turntable both worked flawlessly and required almost no cosmetic work. The Onkyo was sitting outside a neighbors house w a sign "Free"; the turntable was a castoff from a DJ I did a recording project with--he said I could have it if I could fix it, and even when I told him "N.P.F." he still told me to keep it.

But is it communism?
 I see discarded goodies left on the street in my neighborhood all the time: clothes, shoes, toys, record albums, and every now and then, of interest to one's DIY audio jones: discarded electronics. Not sure it's like that where you live? Perhaps you have relatives or friends who have old stereo dookie they want to get rid of; if you can get your hands on old gear, and need to procrastinate big time, you can try your hand at bench repair/getting them back up to working condition, or gut 'em for parts.

I recommend taking a break from whatever you do over and over and try this....it beats the hell out of death and taxes.

No "before" pictures for any of these...but this Lafayette LA324 was filthy beyond belief, and to my surprise cleaned up very well after disassembling. After a top to bottom scrubbing, some solder joint touch up, pot and switch cleansing, and a few wire replacements, it works as if brand new. Nevertheless, I almost gutted it for the knobs and pots (which are nice for an otherwise cheap stereo) but I dunno, when I was a youngster I loved reading the Lafayette catalog, so I had to keep it around.

To date, I have found three receivers on the street, was given a dead Technics turntable that in reality worked perfectly, and was gifted a really nice pair of Klipsch bookshelf speakers.



To my surprise, every one of these antiques was so easy to fix that it didn't end up in the junk box, landfill, or cannibalized for parts.

Another fully disgusting  bug infested receiver--complete with spider webs and insects living inside--was this Realistic STA65 a neighbor left on the side of the road. After a few hours cleaning: good as new. The knobs are great, and have a cool 70's vibe, but the receiver worked so well after reassembly I ended up giving it to the husband of the lady who gave me the Klipsch speakers below; he is a self-proclaimed Radioshack/Realistic audio fetishist and was thrilled to add this to his island of misfit toys.

The wife of radioshack guy got a pair of nice Klipsch speakers in her divorce settlement from her first husband back in the 80s.  #1 ex hubby apparently loved these speakers more than his penis. She hates this ex so much she never wanted to see him, or these speakers, again, so she gave the Klipsch's to me. After cleaning the wire posts, which were a bit corroded: they work perfectly and sound really good. Not sure her ex was as easily put right, right?



What you get when something can't be repaired: Slide pcb mount switches from an old discarded US made security system. They appear to be of very high quality. I used a Hakko FR300 to de-solder them.
The star of the show is contact cleaner.  By following the directions on the label, it seemed to me even the most filthy pot or switch could be brought back from the dead. I had to disassemble a lot of the gear before applying generous shots of contact cleaner, but once this was done, the pot exercised, the process repeated, and the component left to dry overnight, everything started working again.

Another star is my FR300 Hakko Rework tool.  It was expensive but if you are salvaging hardware from junked gear, a good desoldering station is an excellent investment--it will pay for itself eventually by allowing easy extraction of PCB hardware from junked boards.






So what does any of this have to do with synthesizers you ask? A slight connection. I bought this Euro STGS Sea Devil filter used, and it had a scratchy Frequency pot.  Normally I would have thought it was a leaky cap or cold solder joint or some other damn thing, and would have gone crazy trying to fix it at the PCB level, but after having brought back a few receivers that had similarly scratchy tone controls I figured why not hit it with contact cleaner. That did it--it was just a dirty pot-- Fixed!

OK enough, now on to taxes.  A tech colleague of mine has a saying: "Indolence pays".  Maybe, or maybe not, but killing time on the bench cleaning up discarded audio foolishness can be way fun. My parting advice: waste time and don't breathe the fumes!

Smoke on the Forty--3340 that is--Actually a TL074--Burned up Sir!

Before any of this Covid/Corona Shelter in Place thing  I could still invite friends to my studio. So I was showing off my CEM VCOs when all...