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.

No comments:

Post a Comment

Rotary Encoder Expermenter's Board: Improving the Hardware

Quick one this time....I have posted a few projects lately that incorporated a Raspberry Pi Pico, rotary encoder, and .96" OLED:  here ...