Teensy 4.1 Audio Shield Real-Time Voice Changer (Military Radio)

cobalt

New member
Hi all,

This is my first post and also first project coming back to tinkering after a while (still kind of a rookie at these things). To summarize what I am trying to do, I am looking to create a real-time voice changer using a Teensy 4.1 and Audio Shield. To be specific, I am trying to implement a voice changing effect that would alter a human voice to instead sound like a civil protection officer/metrocop from Half Life 2 as part of a cosplay I am developing.

My physical hardware setup consists of an electret microphone with either a MAX4466 or MAX9814 (experimenting using both) which would act as the line input to the Teensy. Using the audio system design tool and audio library, I've developed a DSP chain to produce the audio effects I am looking for. I would love to receive some feedback on this design and implementation, and if there are other approaches I should look into.

What spurred me to make this post is that I've actually run into a problem that I am struggling to resolve. I have reason to believe it is a grounding issue, but am unsure what to do. I am prototyping by using the teensy fixed onto a breadboard and using short wires to connect everything (besides the headphones). I am powering the teensy via USB and I am powering the mic+9814 with an external power supply. This setup has worked for me with prototyping, however, I don't intend on carrying around a power supply and computer with me :)

When I've tried to power everything using just the supply, I unfortunately do not hear anything coming from the Teensy...

What mistake am I making in my setup that would cause this issue? Am I causing a ground loop? Am I shorting something?

I've attached a shoddy wiring diagram of my simplified setup (I plan on adding pots and buttons for controls and tuning later). I have also attached my DSP chain and code. If I did something silly, please feel free to laugh at my expense, but also please let me know what that silly thing is!

Best,
Ted
 

Attachments

  • wiring diagram.png
    wiring diagram.png
    468.7 KB · Views: 23
  • dsp chain.png
    dsp chain.png
    34.1 KB · Views: 23
  • civil_protection.ino
    3.4 KB · Views: 14
  • bandpass.h
    2.1 KB · Views: 13
  • bandpass_2.h
    2.2 KB · Views: 19
Also, forgot to mention it, but in my final setup I intend to drive a 3W speaker in line with a PAM8403 amplifier!
 
The Audio shield does not use 5V and there is no connection to that pin - silkscreen supplied perhaps just for orientation.

This image showing the active pins from the product page explains why there are no traces leading from the 5V pin on the PCB

teensy4_audio_pins.jpg
 
My apologies for not being more clear. I have the Teensy and Audio shield connected using stack-able headers. I am powering the Teensy4.1 through the 5V pin, which I assumed would drive the 3.3V output to power the Audio Shield. Is this incorrect?

I did notice in further testing that if I wire the Audio Shield's line in directly to the mic+9814 output (output to L and ground to ground) and not connect it to the shared ground as I have in my diagram, I get some audio out, although the output is drastically reduced. I am doing my best to try and investigate this, but I am also fearful of damaging something. If there are any references or resources I could look at, I would be very grateful.
 
You may consider connecting an electret mic directly to the mic input of the audio shield, not the line input, the latter is much less sensitive.
 
You may consider connecting an electret mic directly to the mic input of the audio shield, not the line input, the latter is much less sensitive.
This is something I was considering but wasn't sure of the tradeoffs. One of the attractive features of using the 9814 was the AGC would help achieve the effect I was looking for.

Also, I seem to have solved my problem. Funny enough, I wired my Line In backwards 😶
I may look into getting an audio ground loop isolator if that is a good practice.

In case anyone was curious, I modified my design a little bit and redesigned my FIR filters. It's all still in the prototyping stage, but I'll provide progress updates if anyone is interested (with more context as to why I did what I did). Also happy to receive C&C, always looking to get better!
 

Attachments

  • bandpass.h
    2.1 KB · Views: 7
  • bandpass_2.h
    2.1 KB · Views: 8
  • civil_protection.ino
    3.6 KB · Views: 20
Back
Top