Analogue Multiplexer Issue

That selects the Mux Enable Lines.

1 Like

Ok, gotcha, the muxa muxb muxc corresponds to your comments. Now i understand. The labeling was a bit abstract for me.

Everything Sequences Fine, all 32 steps run in sequence, but I get these glitches, barely noticeable on the LED’s but a click on the audio.

1 Like

When do the clicks occur? Is it consistent? I read you first post, but im not sure if it happens every 5th step, or exactly on the 5th step. Hook a scope and see if you are seeing those pops as dirty edges. You might be able to just fix this with some decoupling caps.

It looks like there is a regular click when enabling the next mux ( LED 8 always seems to have a little shimmer. Step 2 seems to give led 5 a little shimmer…

But I have changed the order of the mux address lines, had the mux disabled untill after addressing, with a delay, and many other things…

Tried with one board on it’s own, tried different boards, different cables.

Tried with the step delay overall longer.

Watch LED 5th down, and 8th…

You got any floating pins? That video is much clearer as to whats happening. Looks like 7 is also flashing inappropriately. Unfortunately, this also might be routing errors. I dont think code is to blame here.

Maybe try something like GitHub - NicksonYap/digitalWriteFast: Arduino library for faster digitalWrite using port manipulation and macro for ease in pin assignments.
It writes directly to the registers and is much faster than using digitalWrite. Maybe the 4051 is picking up a different output address while you are setting it.

I was going to suggest using registers to write all the pins at once, but Im worried its more fundamental than that. Im curious why if it was a timing issue, we do not see this on every step of the sequencer.

I am going to build the revised Output board tomorrow… After that I am at a bit of a loss.

1 Like

Hmm, maybe you are right. Are the steps connected in sequence to the 4051 output? I mean address 0 is step 1, address 1 is step 2 and so on?

You should definitely try like 10k pulldown resistors on the three address pins. Maybe it’s just random noise.

1 Like

It for sure sounds like crosstalk. Pulldowns or maybe even some diodes.

Seems less prevalent on two of the 4 boards although LED8 still seems flashy…

Would a 10K Pull up on the Enable be an idea too?

Pulldown

Thanks for the input… :slight_smile:

I think I have the general glitches dialled out, partly a couple of dodgy builds but also had to shut down the enable ( I had already tried this but think the hardware issues clouded it)

So now I have no random LED clicks…

But when the sequence moves, on there is often a bit of noise when on low frequencies as the VCA voltage gets shut off… I tried adding some caps to the VCA output but you just end up with notes bleading :frowning:

I will try and take some vids tomorrow… any other way i can stop this noise :frowning:

1 Like

void x32STEP_F(){
Serial.println(“32 Step Mode - loop”);
for ( int DigitX = 1; DigitX < 13 ; DigitX = DigitX + 3 ) {
if ( DigitX == 1 ) {
Serial.print (“A ONE”);
muxy=13; // Select First MUX
}
if ( DigitX == 4 ) {
Serial.print (“B TWO”);
muxy=2; // Select Second MUX
}
if ( DigitX == 7 ) {
Serial.print (“C THREE”);
muxy=4; // Select Third MUX
}
if ( DigitX == 10 ) {
Serial.print (“D FOUR”);
muxy=22; // Select Fourth MUX
}

   digitalWrite(muxy, HIGH ); // MUX Disable
   digitalWrite(41+DigitX,LOW); //A42 B45 C48 D51
   digitalWrite(42+DigitX,LOW); //A43 B46 C49 D52
   digitalWrite(43+DigitX,LOW); //A44 B47 C50 D53
   digitalWrite(muxy, LOW ); // MUX Enable 
   Serial.println(" - 1 ");
   delay(100);

   //ClockIn();
   digitalWrite(muxy, HIGH ); // MUX Disable
   digitalWrite(43+DigitX,HIGH); //A44 B47 C50 D53
   digitalWrite(41+DigitX,LOW); //A42 B45 C48 D51
   digitalWrite(42+DigitX,LOW); //A43 B46 C49 D52
   Serial.println(" - 2 ");
   digitalWrite(muxy, LOW ); // MUX Enable
   delay(100);


   //ClockIn();
   digitalWrite(muxy, HIGH ); // MUX Disable
   // Address Select
   digitalWrite(42+DigitX,HIGH); //A43 B46 C49 D52
   digitalWrite(41+DigitX,LOW); //A42 B45 C48 D51
   digitalWrite(43+DigitX,LOW); //A44 B47 C50 D53
   digitalWrite(muxy, LOW ); // MUX Enable
   Serial.println(" - 3 ");
   delay(100);

   //ClockIn();
   digitalWrite(muxy, HIGH ); // MUX Disable
   // Address Select
   digitalWrite(42+DigitX,HIGH); //A43 B46 C49 D52
   digitalWrite(43+DigitX,HIGH); //A44 B47 C50 D53
   digitalWrite(41+DigitX,LOW); //A42 B45 C48 D51
   Serial.println(" - 4 "); 
   digitalWrite(muxy, LOW ); // MUX Enable
   delay(100);

   //ClockIn();
   digitalWrite(muxy, HIGH );// MUX Disable
   // Address Select
   digitalWrite(41+DigitX,HIGH); //A42 B45 C48 D51
   digitalWrite(42+DigitX,LOW); //A43 B46 C49 D52
   digitalWrite(43+DigitX,LOW); //A44 B47 C50 D53
   Serial.println(" - 5");
   digitalWrite(muxy, LOW );//A // MUX Enable
   delay(100); 


   //ClockIn();
   digitalWrite(muxy, HIGH );// MUX Disable
   // Address Select 
   digitalWrite(41+DigitX,HIGH); //A42 B45 C48 D51
   digitalWrite(43+DigitX,HIGH); //A44 B47 C50 D53
   digitalWrite(42+DigitX,LOW); //A43 B46 C49 D52
   Serial.println(" - 6");
   digitalWrite(muxy, LOW ); // MUX Enable
   delay(100);

   //ClockIn();
   digitalWrite(muxy, HIGH );// MUX Disable
   // Address Select
   digitalWrite(41+DigitX,HIGH); //A42 B45 C48 D51
   digitalWrite(42+DigitX,HIGH); //A43 B46 C49 D52
   digitalWrite(43+DigitX,LOW); //A44 B47 C50 D53
   Serial.println(" - 7");
   digitalWrite(muxy, LOW ); // MUX Enable
   delay(100);


   //ClockIn();
   digitalWrite(muxy, HIGH );// MUX Disable
   // Address Select
   digitalWrite(41+DigitX,HIGH); //A42 B45 C48 D51
   digitalWrite(42+DigitX,HIGH); //A43 B46 C49 D52
   digitalWrite(43+DigitX,HIGH); //A44 B47 C50 D53
   Serial.println(" - 8");
   digitalWrite(muxy, LOW ); // MUX Enable
   delay(100);
   digitalWrite(muxy, HIGH ); // MUX Disable
   //ClockIn();

   }

}

I think I will give this a go as well, I don’t think it will stop the noise but who knows.