Friday, October 18, 2019

CEM VCO Part II: Maximus Troubleshooting, and the DOH! Count

From a couple of posts ago: My ASMVCO's are getting old and drifting in pitch.  Might be time to ditch 'em. how about three new VCO's based on the repop of the Curtis 3340 VCO chip?

Module ready to test ("MRT's").  If the module works OK for a couple of weeks I'll create a FPE  front panel for and retire the kludge panel.


OK got rev one of the three boards back from China, got it stuffed and put behind a temp panel. It works!  Holds tune for at least 7 octaves, I have trouble hearing the really high stuff no matter what but let's assume that works as well.




Ho-MORE DOH-KIE: I am using 3 interconnected PCBs to minimize hook up wire: a main board (3340 chip, buffers), an octave switcher (see previous post here--btw, the  TI REF02 based add-one-volt-per-rotary-click seems to work great so far, guess I got lucky?), and a PCB to hold the "Thonk" type PCB 3.5" jacks. The Thonks connect to the main PCB with a 10 conductor IDC ribbon. The octave selector was supposed to mount to the front panel, but I melted my cheapo switches, so for this rev 1 build I used a clunky junk box NOS rotary switch wired to the board, post for the octave board madness is here.

OK, the main board is based on  "VCO Maximus", another classic from the mighty Thomas Henry. A good page on the Maximus for Eurorack is here.

I chose this 3340 design vs. all the other ones out there because a guy I know in my synth meetup group already built a couple of these on strip board; he told me Maximus works and sounds great. I omitted things like the sub octave circuitry and sine wave conversion from triangle; I already know how to do that and have plenty of sine waves and sub oscs in my modular setup now, so these 3x VCO's will just be pulse, saw, and triangle. Good enough.

Old trick: print out the PCB 1:1, lay it over the panel, tape it, punch it and drill.  The drills will line up.

So how did rev one of this module do? Considering the complexity of the board, happy to say: not too bad; I got it all to work in about a day. I had to kludge things, I made mistakes, but so far everything but the sync in, which may be broken or just sounds crappy, is on the air. Update: sync is fixed.  I had the DPDT switch wired wrong. The VCO stays in tune, the waveforms look good on a scope, PWM, linear and FM mod all work. Happy day.

Also the pots turn the right way (clockwise for more of whatever), that's good. I was worried about that.

A
"Obligatory Bench photo"

I modified a left over alubase 2u Frac panel I had lying around so as to not have to test this module with circuit guts flopping everywhere. The drills on the junk panel didn't line up with the PCB's for this project; that's what Dremel tools and drill presses are for.

Almost ready to test?

OK let me go over the mistakes. I document this (and everything else in my blog) mostly for me--if I write this down I might not keep making the same mistakes.

And for levity (?), instead of only bitching I am going to rate my mistakes with Homer Simpson DOHs. Let's begin:

First mistake: Four DOHs! the ramp wave output was busted, I just got a 15V DC at Output, no saw wave, no audio.

Using my scope I could see the saw out worked before the buffer, but not after.

But why, Scotty, why? I traced everything out--no mistakes. I pulled the SMD chip with a HAR and replaced it, same issue. Turns out I did a butt dumb thing: I had an op amp stage flipped, so what should have gone into inverting went into non-inverting. I missed this while translating the Maxiums schematic from the web to Eagle. I have been making this flub since I started laying out PCBs and I am a bit surprised I missed this when proofreading my work--well, I did. To sum this up:

 The moral: Always check Op amp + and - inputs. "I only give negative feedback!" Get em backwards on stripboard, PCB, whatever, and the damn thing will never work.

I fixed this by lifting parts, soldering components together above the PCB, and using hook up wire to put things back where they needed to go. After a day on my bench all of that broke (resistors detached from traces, solder connections shorting together, it was horrible) so I ended up creating yet another small daughterboard for the ramp buffer. So much for cutting down on hook up wire? not pretty, but it works.

Second mistake TWO DOHS:  I used the "net names" feature in Eagle to connect a pulse pin connector to the jack trace, but I called the trace "PULSE" on one side and "8" on the other. Naming nets/traces in Eagle CAD can make your layouts easier to follow but you have to get it 100% right. When you incorrectly join nets, Eagle won't tell you you made a mistake--it will dutifully connect things as instructed, but your board won't work the way you want.

Oddly I have never made this net names mistake before now, but Gabba gabba hey! This was fixed by cutting a trace and using a single 22 gauge kludge wire. Now I have a working pulse at output.  Oh yeh, see how pin 10 is unused?  Why didn't I put the ground on that? Instead I had to run a hookup wire for ground. I add that into the 2 dohs calculated. I will fix it next time.


No, Elmo, these 2 traces won't connect!

Third mistake: ONE DOH  
I forgot to connect ground to one of the pins of the rotary switch PCB.  I will let myself off the hook on that, I was kludging stuff here to accommodate the NOS switch replacement for the bang good crapola rotary switches, and I just missed this.  I also forgot to put a ground run into the 10 conductor ribbon. Wait, I already said that. Both easily fixed in rev 2. Yes there will be a rev2.


Fourth mistake: SIX DOHS!  OK this one gets 6 out of five. I left the entire buffer for pulse out of the REV1 PCB design. I have no idea what I was thinking. Did I think it didn't need a buffer? Overall I  wasn't looking at the Maximus schematic carefully enough I guess. I fixed this by digging into my junk box of tiny buffer PCB's and added the circuit fragment you see below as a daughter board to the main PCB. Since this was buffering a square wave I used a junk box CA3140, which may not have made any difference at all.


OK I think that's it. Last night I plugged in the new VCO and it all works. I may not make a lot of design mods for rev2, rather just all the fixes, but who knows.

UPDATE: I had more PCBs made correcting these mistakes, new ones don't need kludges!  Yeh! post is here.

UPDATE 11-23-19 After a few weeks of having this VCO in my rack the top end v/oct scaling was still not quite where I wanted it to be (it was close, but was still a bit off when I went say 5 octaves above middle C).  After a fair amount of messing with the trimmers to set low and HF scaling, I replaced the 12 turn trimpots with Bourns QV36's, which are 25 turn.  They cost $3USB each from Digikey but it's worth it. Now with the more precise timmers the VCO scales much better, so I am going to add that to the BOM--25 turn pots.

UPDATE: All well and good, but this initial VCO ended up smoking and almost burning down my house. Too many kludges! Glad I was there to cut its power. Otherwsie I'd be writing this update from the public library. Post about smoking this VCO is here.  

Stay tuned.

Saturday, October 12, 2019

Gate Delay Part II: On the Bench--And It Works!


Hello, back from Arduinoland: this time I am continuing work on a gate delay and gate to trigger/gate modifier. I hope this gizmo will allow good control of not just delay but gate duration, and whether or not the gate follows real world note offs--my modular has nothing that can do any of this now. I also have a vague idea that if I can provide some sort or OR and XOR logic I can get get echos, randomness and whatnot.

(Part I, where I ponder the basics of this project, is here....)

The logic I am trying to lay down for this synth module goes like this:


As I was coding this (I used Arduino skretch) I was glad I took the time to write out the logic chart.Getting my mind around the code would have been really hard to write otherwise.


Some of the features I am going for:

  • A pot to control the delay between real world gate's start and when the output gate starts.
  • A pot to control the length of the gate at output.
  • CV control over both the parameters delivered by these 2 pots
  • A switch that says: no matter where the delay pot or delay CV is set, when the real world gate is over, the output gate is over too.
  • Another switch that does the same for the output gate--when a key is let up, the gate goes off, no matter where any knobs are set, any CV comes in, but only after the delay time has passed.
  • I want to fit this on a 1u Frac panel; better yet 2 of 'em in a 1u Frac panel. So the PCB has to be pretty small.
  • LEDs to visually track input and output gate
  • Buffering for input and output gates with 2x NPN transistors
  • Buffering for incoming CV and zener 5V protection 
  • Use SMD op amps to save space

To save space I used an Arduino Pro Mini, a first for me, 5V version. This is an easy Arduino, set it up as described here. Works just like you'd think, and it's smaller than a nano; I needed to buy a programming board to make it go, nothing was documented all too well, as I have come to expect with these Aliexpress knock offs, but I got it all working, soldered on the pins, dropped it into a breadboard and ran the tired ass blinking LED demo, in about a half hour. Minimal muss and fuss.

USB to serial programmer. To save $$, uses a C340 clone chip. Been there, done that!  

One of the main takeaways: you can hook the V+ and GND from the programmer to the Pro Mini and the ProMini's VCC on board pin will become a 5V source you can use for pots, logic etc. I don't know why it took me so long to find that out, I couldn't find that right away online, I just had to hook it up and mess with it. Yep it works.

So time to port the code I had started in VBB. moved to Nano, tried unsuccessfully to make go on an ATTINY85 (not enough pins) and finally settled on a ProMini.

I built a switch for this:



If any of the 3 switches are down it's 5V, up is gnd.  5V is current limited by 100 ohms; the 5V pullup resistors are 10K.  The "output" are repurposed wire wrap headers; it's easy to shove 100mil headers into those receptacles for prototype madness.

Adding 10K pullups....
It took me maybe an hour to round up all the junk box parts for this, drill out the perf, solder it all together.  May come in handy for other projects.


Once I had this working on the bench and was reasonably happy with the sketch code I spent a couple more days (off and on) messing with the schematic for a small dedicated PCB:



Found out again: micro switches for any electronics project, if you buy quality, are going to be expensive. The two switches here could cost as much as $8USD each from Digikey, no sweat. That's a lot of dough. Not sure what I will use yet for this PCB; after some online searching I ordered 100x ALCO TT11's on Ebay for $100 USD, new they are about $7 each, so let's see if this "lifetime buy" works out. If it does, I'll make a custom Eagle device for the TT-11, as I can't find one yet online. If not, I will have wasted about the same $ as I spend treating my old fart cover band dudes to breakfast at Denny's. $100 gone, but I'll live, which isn't how I feel after breakfast.  UPDATE 11-8-19 the TT-11s are here and appear to be exactly what I need. I'll check the PCB for this project and the design a few more times, will send the board out for fab, see if it works, and do a "post part III" for this. 

OK for this gate delay, here's the schematic so far:


So what's next?  I get the lifetime switch buy by (bye bye?) the end of next week, I have to get the board fab'd, and then see what flubs I made. Once I kludge that up and get it working (yeh) I can maybe make a front panel.  And once it's all going I will post all of this, including the code, on my website.  

UPDATE 12-12-19 it works!!  Gate Delay Part III, where doris gets her oats, is here, the website write up for the project, with schematics, gerbers, etc., is here. Front panel Express Front panel is done and fits, yeh, no more ptouch dreck.

Until then, don't delay breathing the fumes.

Saturday, October 5, 2019

CEM VCO Part I: REF02 Based Octave Switcher

I've been using three DIY ASM VCO's for over 12 years now, and they work fine, but they drift a bit in hot weather, the PWM on one breaks, and they collectively use 9U of Frac, a lot of space.

Time to get some new VCO's going to complement the 13700 VCOs I built a while back....

How about basing them on reissued 3340 Voltage Controlled Oscillator ICs?



You may have heard 3340's before, they make VCO builds easy and fun: the tough parts--temperature stability, PWM, synch, 1V/octave response, etc., are all sorted within one Integrated Circuit. These ICs along with other Curtis offerings were popular in the late 70's to early 90's, in the Prophets and OB-X's and whatnot. Then they became harder to find for years; now with the popularity of modular audio synthesis they have been cloned and/or reissued and are back with a vengeance.

OK let's get building! Let's not start with the thing that makes noise, let's start with a peripheral if you will--an octave switcher. The MiniMoog has that; the SH5 has that, the MS20 has that..... 

On the SH5 this feature is called "Range". the rotary switch lets you quickly choose octaves: clunk clunk clunk--I like it!

That means somehow producing 0V, 1V, 2V, 3V etc, accurately, and presenting this stepped voltage as a modulation source to the 3340 VCOs.

But how, Scotty, how?

I studied schems for Minimoog and a few others, and based on that, here is the idea:



OK, the reference voltage IC, in this case TI's REF02 5V, feeds a voltage divider consisting of 10K .1% resistors that stay stable in spite of  hot and cold, an octave select rotary switch, and finally a buffer for the output voltage, which means a decent performing op amp configured for unity gain. 

In this case for the buffer I will use a TI OP07--mainly because I got a bunch of OP07 SMT's at a good price from Tayda.




Breadboard Time: I had a REF02 DIP in my parts box as well, no idea where it came from but it's been there a long time. OK, let's put that chip into the unflappable Radioshack learning lab with some 10K 1% resistors. 

It seems to work!  I can safely assume the rotary switch won't add any resistance and wiring up an OP07 as unity gain buffer is simple, so I didn't bother bread boarding those.  

Whipped up a schematic in Eagle:


....and came up with this board design:


I want to keep each VCO to 2u Frac so I decided to use SMD for as much as I can for this board. I did this to save space and make to things more challenging.  

OK sent that off to China for fab, and it's back:



( I know--IC2 is backwards...fixed in the photo below)

What you see:

  • The Yellow box out is the REF02. 
  • The red shows the location of the voltage dividers, I used an incredibly tiny 4x 10K .1% 10ppm resistor array  from Vishay (ACASA1002S1002P1AT) and a 10K .1% SMT resistors.  
  • The Blue box shows the location of the OP07 op amp.


Here it is in a vice ready to test:
  


....and that's where the problems begin:

  • The rotary knob selects the wrong voltages, at least partly because the Eagle footprint I used matched the geometry of the bang good rotary switch, but not the way the switch is wired up electrically. So what should be pin 3 on the switch is really pin 1, 2 is 2, 3 is 1, 4 is 12, and so on. A mess! I checked three times to make sure the switch would fit physically, but assumed the pin out would match. "When you assume"....OK I will need to fix that and redo the PCB design.
  • I burned up a few REF02s and one OP07 because there is a mistake in the silk screen. From the photo above: on the bottom left where you see GND: The V- and V+ are silk screened backwards.  OH NO! Easily fixed, just wire opposite the silkscreen, but still....dumb mistake.
  • I burned up another REF02 because I shorted out its input supply voltages, this was due to sloppy wiring from my bench power supply. that one was avoidable!
  • OK with all that fixed, here's the bad news: The output voltages are just WRONG. Wrong, wrong, wrong!!!
To address these issues I used a Sparkfun hot air rework station to extract the SMD parts one by one. I lifted some traces under one of the REF02's by overheating, thus ruining the entire PCB, but at least the parts can be reused.

The evening is not going well. 

After a lumbgurius amount of cursing, fear and loathing I discovered  the problem has something to do with the rotary switch. When I removed it from the PCB I could put a DVM on each step of the voltage divider ladder and my DVM would read 5V, 4V, 3V etc, to about 3/500th of a volt, which for me is probably adequate. But why the switch (or the buffer? The traces? Something else?) is introducing crazy errors in output Voltage is a mystery to me. I have to redo the board anyway to accommodate the bang good switch pin outs but still....not sure if fixing that will fix the voltage issue, why would it? 

I confirmed that the rotary switch was at least part issue; after removing it from the board and spinning it I would get unreliable continuity from its inputs to its output. 

Wiring it up back up to the board with pin out errors fixed didn't help things at all, as you'd expect. I felt that it was extremely easy to overheat the switch's contacts, which might have happened when soldering the part to the PCB. I am pretty sure I melted the switch's guts with what I think to be normal soldering. Oops....



I also noticed that the unity gain buffer daughter board was having its own reliability issues, so I swapped the OP07 for an SMT TL071. To my amazement I found the TL071, purchased from Tayda, didn't have any designation re: where PIN1 was (no dot, no line--nothing) which may account for the bargain basement price of USD35c each. I figured I had a 50% chance of getting it right so I flipped a coin and dropped it in with the mgr. logo facing where pin1 should be? UPDATE: Not Tayda's fault, **my fault for not researching this carefully enough**. the Tayda chip has, upon close examination, a sloped side and a flat side. The sloped side "points to pin 1" on SMD chips. Read about how to find PIN1 for SMDs on the webpage here.

OK now presenting 1 to 3V DC into the unity gain buffer board's input, the tiny op amp PCB works flawlessly.

But still: Employing the rotary switch the circuit's output remains spotty--it works occasionally but most often is unreliable.

Not one to give up.....is it the only switch, or something more?  

I got an old 6 position switcher from my junk box:



After throwing in this ancient rotary switch the circuit works perfectly. No hiccups, no dropouts, no issues. 



Test time: I soldered a 3.5mm jack on the unity gain board and a set screwed a chicken head knob on the repaired REF02 circuit's NOS switch, and tested it using a Mutable Links to accurately sum the output of my octave generator and the output from a Kenton Midi to CV converter.  Plugging this into a couple of 1V/octave VCO's the octave tweaker prototype worked well enough, I feel, to proceed with redesigning the PCB for a more reliable rotary switch. I had to bump a VCO's fine tune slightly after changing to a new octave every now and then, but I have to do that now on my beloved 1978 Minimoog and ancient Roland SH5 as well--so: good enough.

Bang-Good-Riddance: It's time to put the cheapo Banggood rotary switches into the e-waste recycle bin. Once again I spent all day trying to fix a problem with a poorly made component and maybe I saved $10 on the "affordable" component vs. something more reliable.  Not a good decision.  I am finding good hardware is worth the extra money.

And I also have an entire VCO to build. Stay tuned.

UPDATE: I got new boards made for the REF2 based octave switcher design. For this I planned on using prepurchased, relatively expensive switches: NKK MRK206's. There is an eagle symbol for it, that's one of the main reasons I used this switch vs. all the other ones you can get from say Digikey.

Got the boards, got the switches, guess what! The expensive switch DOESN'T FIT!  Turns out the NKK MRF206 symbol fits the MRK206 switch and visa versa.  I think whoever was creating the NKK library for Eagle got the 2 parts mixed up. 

Go figure--the lesson learned again: never trust an Eagle symbol! Print out the PCB before fab, lay the parts on top, and make sure everything lines up.  Oh well...toss the boards and try again.....

Pins don't line up!


UPDATE 12-8-19: PCB has been redone (again) to fix the pin issue above. For the new board everything lines up and works. But--a design flaw I hadn't considered--1V, 2V, 3V all all within 3/500mV to each other, but GND is one of the selections as well, and it's not privy to the relative tuning coherence for the rest of the output V's.  So 1V is 0.95666, 2V is 1.95623, 3V is 2.95362, etc., which is fine, since there is a "master tune" tweak on the main VCO board, but also, GND is -6mV!!  I am thus concerned that the "2 foot" setting will be out of tune with the other octave settings. I can't see why it won't be, but I guess we'll see.

Finished Octave switchers, with NKK fancy 6 position switches.  


UPDATE 1-5-20: not a bug a feature!  I cut the trace allowing me to choose ground as one of the "V/octave" settings and wired a jack to it. See the update immediately above--GND is not in lockstep with the switched voltages so using it as a switch setting is not feasible. But 32' or whatever isn't a useful setting anyway. Now, with this EXT switch in play, we have LFO, "external", 2', 4', 8', and 16'.  I have dropped the octave switch into the finished 3340 VCO's.

UPDATE 1-22-20: VCO is done and the ref board (with the mod above) works! More info in the finished VCO post, here.  Part II of the VCO build, where I troubleshoot stupid mistakes on the main PCB, is here.




ProMicro HID Keyboard Emulator

Quick one this time. The Arduino ProMicro (examples here and here ) is based on an Atmel 16u4 MCU and has HID keyboard emulation ready to go...