Trying to build a white noise microphone blocker

Here was my solution use audacity to make white noise. Then buy this convo from Amazon

Lysee DC1.8-12V TDA2822M Amplifier 2.0 Channel Stereo 3.5mm AUX Audio Amp Board Module https://www.amazon.ca/dp/B07F8K374S/ref=cm_sw_r_apan_glt_i_9G1SPWT3DECDTX3BJEJT

And

Gikfun 2 inch 4Ohm 3W Full Range Audio Speaker Stereo Woofer Loudspeaker for Arduino (Pack of 2pcs) EK1725 https://www.amazon.ca/dp/B01N74TGFM/ref=cm_sw_r_apan_glt_i_RGTECCFX2FFHD4GX050P?_encoding=UTF8&psc=1

If I need additional speakers I will double the amplifier or triple it. Thanks for the advice.

@johnboyman

I did look into generating white noise some time ago for a purpose not dissimilar to yours. That is for a charging mat with audio privacy for mobile phones
What I did notice was that (a) white noise is actually quite well specified. That is, it is random within certain constraints and (b) if you attempt to use a hardware method, say the noise of a zener diode, then most of the circuits appear to need 9 or more volts for best effect.

These two sketches, collected from various bits I found, are as far as I got with this project:

// https://arduino.stackexchange.com/questions/6715/audio-frequency-white-noise-generation-using-arduino-mini-pro


const uint8_t speakerPin = 8 ;
uint32_t reg = 0xfeedfaceUL ;
//uint32_t reg = 0x33333333UL ;

void generateNoise()
{
	uint32_t newr;
	unsigned char lobit;
	unsigned char b31, b29, b25, b24;

	b31 = (reg & (1UL << 31)) >> 31;
	b29 = (reg & (1UL << 29)) >> 29;
	b25 = (reg & (1UL << 25)) >> 25;
	b24 = (reg & (1UL << 24)) >> 24;
	lobit = b31 ^ b29 ^ b25 ^ b24;
	newr = (reg << 1) | lobit;
	reg = newr;
	digitalWrite (speakerPin, reg & 1);
	delayMicroseconds (50);  // Changing this value changes the frequency.  //was 50
}


void setup() {
	Serial.begin(115200) ;
	// put your setup code here, to run once:
	pinMode(speakerPin, OUTPUT) ;

}

void loop() {
	// put your main code here, to run repeatedly:
	generateNoise() ;
}

and

// https://arduino.stackexchange.com/questions/6715/audio-frequency-white-noise-generation-using-arduino-mini-pro

#if 0
/*
 * ORIGINAL
 */
 #define speakerPin 8

unsigned long lastClick;

void setup() {
  // put your setup code here, to run once:
   pinMode(speakerPin,OUTPUT);
   lastClick = micros();
}


/* initialize with any 32 bit non-zero  unsigned long value. */
#define LFSR_INIT  0xfeedfaceUL
/* Choose bits 32, 30, 26, 24 from  http://arduino.stackexchange.com/a/6725/6628
 *  or 32, 22, 2, 1 from
 *  http://www.xilinx.com/support/documentation/application_notes/xapp052.pdf
 *  or bits 32, 16, 3,2  or 0x80010006UL per http://users.ece.cmu.edu/~koopman/lfsr/index.html
 *  and http://users.ece.cmu.edu/~koopman/lfsr/32.dat.gz
 */
#define LFSR_MASK  ((unsigned long)( 1UL<<31 | 1UL <<15 | 1UL <<2 | 1UL <<1  ))

unsigned int generateNoise(){
  // See https://en.wikipedia.org/wiki/Linear_feedback_shift_register#Galois_LFSRs
   static unsigned long int lfsr = LFSR_INIT;  /* 32 bit init, nonzero */
   /* If the output bit is 1, apply toggle mask.
                                    * The value has 1 at bits corresponding
                                    * to taps, 0 elsewhere. */

   if(lfsr & 1) { lfsr =  (lfsr >>1) ^ LFSR_MASK ; return(1);}
   else         { lfsr >>= 1;                      return(0);}
}


void loop() {
      /* ... */
      if ((micros() - lastClick) > 50 ) { // Changing this value changes the frequency.
        lastClick = micros();
        digitalWrite (speakerPin, generateNoise());
      }

}
 */

#endif






#define speakerPin 8

unsigned long lastClick;

void setup() {
 // put your setup code here, to run once:
  pinMode(speakerPin,OUTPUT);
  lastClick = micros();
}


/* initialize with any 32 bit non-zero  unsigned long value. */
#define LFSR_INIT  0xfeedfaceUL
/* Choose bits 32, 30, 26, 24 from  http://arduino.stackexchange.com/a/6725/6628
*  or 32, 22, 2, 1 from
*  http://www.xilinx.com/support/documentation/application_notes/xapp052.pdf
*  or bits 32, 16, 3,2  or 0x80010006UL per http://users.ece.cmu.edu/~koopman/lfsr/index.html
*  and http://users.ece.cmu.edu/~koopman/lfsr/32.dat.gz
*/
#define LFSR_MASK  ((unsigned long)( 1UL<<31 | 1UL <<15 | 1UL <<2 | 1UL <<1  ))

unsigned int generateNoise(){
 // See https://en.wikipedia.org/wiki/Linear_feedback_shift_register#Galois_LFSRs
  static unsigned long int lfsr = LFSR_INIT;  /* 32 bit init, nonzero */
  /* If the output bit is 1, apply toggle mask.
                                   * The value has 1 at bits corresponding
                                   * to taps, 0 elsewhere. */

  if(lfsr & 1) { lfsr =  (lfsr >>1) ^ LFSR_MASK ; return(1);}
  else         { lfsr >>= 1;                      return(0);}
}


void loop() {
     /* ... */
     if ((micros() - lastClick) > 50 ) { // Changing this value changes the frequency.
       lastClick = micros();
       digitalWrite (speakerPin, generateNoise());
     }

}

Yes. All the circuits I've seen use 12 at least. I've used 18 volts, 2 x 9 volt PP3 smoke alarm type, as the current drawn is quite low.

I needed noise for a deep dive on another topic. I remembered and obtained some copies of the old MM5437 Digital Noise Source, thinking that it would suit a 5-volt only project better.

Imagine my surprise and disappointment to find that that chip's clock varies with the supply voltage - to get the desired output you need to supply 15 volts. It produces a sequence that repeats at one minute intervals. Shift register too short!

a7

You could just conduct your shady business conversations in the middle of an open field and don't allow your buddy to bring his phone :joy: You're on a computer (I guess) and possibly have speakers. You could just google for white noise and crank it.

Very interesting 6v6gt do you use a digital to analog converter how loud does white noise have to be to block microphone s can you make silent sounds that effect microphones but not our ears noticablely like thoughs machines to make dogs stop Barking.

No, as far as I remember, I simply did a test connecting some head phones via a resistor or maybe a low pass filter (with the simple addition of a capacitor) to the Arduino pin while running the sketch. There was definitely no DAC involved. You can also add a simple high pass filter if you are concerned about non-audible sound pollution affecting dogs etc.
An Arduino pin can tolerate max ~40 mA

But that is as far as I got with this experiment although I don't rule out returning to it later.

I'd imagine that a sound source very close to the phone (or in direct contact with it) would not have to be very intense to block the microphone(s).

Four days have elapsed since your first post. Isn't it about time to just take some ideas from here and run with them? Unless, you've tried some things? Then post.