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 NASA we already have 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 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. UPDATE: 4070 is now being fed by a 4051 mux....works.  Post is here.

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. (Update--4051 MUX board is done and works. Post is here)

Those 2 boards, added to the project, should further add to the unabashed craziness I hope.

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!

UPDATE: After more bench time I found that I had at least 3 more ProMini Clones that didn't work.  Same issue--the little mofos wouldn't eat code. So it's not the single Arduino clone right I already tossed right?  I have a bigger issue. What is it? No bootloaders? No, that's not it. Blah blah ginger blah blah? Nope. A mystery. the odd thing is that on very rare occasions the code would upload, but then simple things like blink didn't work. Ha! After a couple of  evenings of malodorous swearing, I found the issue under the microscope: The clones advertised themselves on Aliexpress as being AVR 328 based but were really 168 based.  This was very, very tiny writing on the chip.  Is it stupid yet?? No wonder the code didn't upload.  I changed my Arduino IDE to accommodate and compile for the 168 chip and everything started to work. Yeh!

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. Turns out Deox-it is somewhat legendary with electronics repair folks; after trying it, this stuff really works!! 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!

Anything to Clock Subcircuit

Readers:  If you want to build the project featured in today's post, please go to  PCBWAY's  Community pages --a gerber ready to dow...