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 with 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. 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? --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 audio farting, then back to Turing. This pattern continues forever. odd. 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 and possibly useless 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(A6,INPUT); //tie to mux pins D8-10
  pinMode(A7,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(A6);
MAP2 = map(CV2,0,1023,0,7);

 CV3 = analogRead(A7);
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!! Yeh Elmo, turns out something simple like this works just fine.

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

One of these days the NOISE! synth will be done and racked up, but for now, it's just too much fun building more stuff for it; like the winchester mystery house will it ever end? Stay safe!

No comments:

Post a Comment

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...