Replicating Storm Trooper Helmet Voice Changer tutorial.

This idea is for a cosplay idea I had in mind after taking a look at the tutorial from Sparkfun's website. Here's a link to the tutorial below.

https://learn.sparkfun.com/tutorials/vox-imperium-stormtrooper-voice-changer

However, as you can see from the listing of parts needed, the Teensy 3.2 board, the matching Prop Shield, and the LiPo Charger/Booster are no longer available. So I have a few questions that I hope someone with experience with it can help

me with.

Here's the first question. Can this tutorial mentioned above be performed using products from the Teensy 4.0 product line and is it compatible with other microphone components like from Adafruit and Sparkfun?

My second question deals with another component with the tutorial. Where can I find the LiPo Charger/Booster component or its equivalent?

I look forward to any responses related to the product if any and thank you for looking at my thread.
 
Just looking at it, I would think you should be able to do it with a Teensy 4.0 or Teensy 4.1 + either revision D audio shield or direct I2S boards plus some other parts. Note, I haven't looked in detail, this is just speculation.

At its core, it has a microphone, speakers, it can use lipo batteries and recharge them, and it uses the flash memory of the prop shield. It does not seem to use the motion sensors.

The audio shield produces the output. It also has a port for a Electrec microphone, but the tutorial says a MEMS microphone is better.

With the audio shield, it doesn't amplify the sound, so you would need to either add amplification to the speaker, or use a speaker with amplification built-in, such as:

Alternatively without using the sound shield, you could hook up I2S devices to the Teensy directly. For example, these board takes I2S sound, and converts it to a mono speaker with amplification (mixing the left and right channels):

Here is a MEMS microphone that produces I2S digital input instead of analog:

For storage, you can use the extra flash memory on the Teensy itself, or you can use a micro SD card. For micro SD cards, your options are:

The nice thing about micro SD cards is you can remove them from the Teensy, and use a card reader on your computer to put in the sounds.

In terms of using the existing flash memory for storage on the Teensy, look at this thread, and the threads and code I point to within my response:

If flash memory is not enough, and you don't want to use a micro SD card, on the Teensy 4.1, you can solder a flash memory card to the bottom of the Teensy to give you more space to hold stuff. If your soldering skills are not up to soldering a flash chip to the Teensy 4.1, you can buy a Teensy 4.1 with a flash chip (16 megabytes to 256 megabytes) soldered on from protosupplies.com. You can also have them attach an 8 megabyte PSram chip to give you more memory at runtime, but given the project ran on a Teensy 3.2, you shouldn't need PSram, but it is an option:

In terms of using and charging a LIPO battery, Adafruit sells a Teensy to Feather adapter that a Teensy 4.0 fits directly in (the 4.1 being longer needs to be mounted higher or underneath the board):

Adafruit sells some other boards that hook up and charge lipo batteries. You would have to solder wires to connect to these boards:

There is a board that is made to solder directly to the Teensy. My one complaint about this board is you have to be careful in removing the lipo battery because you can rip the JST terminal off the board:

I also like the Seeed lipo rider plus. This is a separate board. It has a JST plug for the battery, a USB C female port for charging the battery, and a USB A female port to connect to the micro-B terminal on the Teensy (i.e., you don't need to do soldering, and the charging is separate from the USB plug on the Teensy):

Most importantly, have fun. It is likely you will need to combine stuff together (i.e. there probably isn't a guide that does all of the steps for you).
 
Thanks for the reply. I think that I will have to take a look at the parts you listed and buy them once I get some sort of finality. If I can get the components and get past the coding process, I think the rest of the process is doable. I'm going to have to learn how to solder things together.
 
Agree with the MEMS microphone suggestion. While we do have ADC input support on Teensy 4, it's noisier than with Teensy 3, especially if the analog signal isn't strong (or to be more technically correct, low impedance) because of so much digital circuitry on the chip running at 150 and 600 MHz.

The prop shield or most other amplifiers can probably use the MQS output. The prop shield has a resistor-capacitor low pass filter which should work nicely with MQS output. If using another amplifier, you might need a resistor and capacitor. We can probably help on this forum with more specific suggestions when you've chosen the amplifier you want.
 
Well, I was planning on buying the STEMMA Speaker - Plug and Play Audio Amplifier just to simplify things. This is my first outing putting components together.
 
Okay, so I took some time out to look at the components needed again and I think I need may have found the parts needed. So I was considering getting 1 of the following.

From PJRC's website

Teensy 4.0 USB Development Board x 1

Prop Shield, Low cost edition x 1

From Adafruit

Adafruit I2S MEMS Microphone Breakout - SPH0645LM4H x 1

Adafruit Audio BFF Add-on for QT Py and Xiao x 1

Lithium Ion Polymer Battery - 3.7v 150mAh x 1

Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy x 1

Adafruit STEMMA Speaker - Plug and Play Audio Amplifier - JST PH 2mm x 1
 
After taking a trip back to my local Micro Center, I did manage to find a couple of components there. So if there are any items that needed to be added on or taken off let me know.

I managed to get a Teensy 4.1 Microcontroller with out the ethernet port, an Adafruit Mic Amp Max, an Adafruit Pro Trinket Backpack add-on, an Adafriut Max 98357 I2S Amp and an Adafruit Lithium Ion Battery 3.7v 2000mAh. I could not find 1 that has a 120mAH.

Is there anything I'm missing or don't need at this time?
 
I have decided, after careful consideration, to buy the prop shield without the motion sensors. I figured that I can get the speakers that comes along with it from Micro Center again. However, if I want my voice to be heard outside of the suit, I have to figure out where I can place it.
 
I have decided, after careful consideration, to buy the prop shield without the motion sensors. I figured that I can get the speakers that comes along with it from Micro Center again. However, if I want my voice to be heard outside of the suit, I have to figure out where I can place it.

I'm wondering what you need the prop shield for? IIRC, the prop shield as 4 features:
  • The prop shield has mono audio output, but you can't use it by default on the Teensy 4.0/4.1 (and you bought I2S boards, so you don't need the prop shield for that).
  • The prop shield has 8 megabytes of flash memory, but there are ways to use the unused flash memory of the Teensy 4.1 in the same fashion, or with the 4.1 you can solder a flash memory card on the Teensy or use the micro-SD card reader.
  • The LC prop shield doesn't have the motion sensors.
  • There are 2 voltage level shifters for neopixels (ws2812/sk6812) or dotstar (apa102) LEDs. If you are running off of batteries, you generally don't need the voltage level shifting. If you do need the shifting you could get the QT PY BFF for external neopixels.
 
I'm wondering what you need the prop shield for? IIRC, the prop shield as 4 features:
  • The prop shield has mono audio output, but you can't use it by default on the Teensy 4.0/4.1 (and you bought I2S boards, so you don't need the prop shield for that).
  • The prop shield has 8 megabytes of flash memory, but there are ways to use the unused flash memory of the Teensy 4.1 in the same fashion, or with the 4.1 you can solder a flash memory card on the Teensy or use the micro-SD card reader.
  • The LC prop shield doesn't have the motion sensors.
  • There are 2 voltage level shifters for neopixels (ws2812/sk6812) or dotstar (apa102) LEDs. If you are running off of batteries, you generally don't need the voltage level shifting. If you do need the shifting you could get the QT PY BFF for external neopixels.

I was trying to get the components in according to the tutorial in order to make it work. I asked a similar question about the components needed and the mediator over there at SparkFun said that the Prop Shield and the Teensy component is necessary to follow the tutorial. Since I chose to use Adafriut products to make it work, I'm just trying to cover my basis. I also waited for a while in hopes of a response , but I grew a bit impatient and pressed on.

So with you telling me that I never needed the prop shield since I have a I2S board means that I could have actually moved on with the tutorial days ago?
 
I glanced at the tutorial, and it uses the prop shield for audio output and flash memory. As I said, the Teensy 4.1 doesn't support audio (*) to the prop shield. That leaves the flash memory. There is a way to use the flash memory on the Teensy 4.1, but it is simpler to just get a small micro-SD card, and read from that. Assuming you have a USB micro-SD card reader on your PC, you can load the sounds onto the card, and read from that. You will have to change the script where it deals with sound to replace the DAC that the Teensy 3.2 used with I2C that the Teensy 4.1 uses, and to replace the SerialFlash call with one that uses the micro SD card.

(*) You can use the MQS system of the Teensy to simulate using a DAC, and connect either pin 10 or 12 to the DAC pin on the prop shield (note, the DAC pin on the prop shield is the on/off pin on the Teensy 4.1 -- you would not want to connect that pin to the Teensy, but instead run a wire from pin 10 or 12).

For information how to use the Teensy flash memory and how to use MTP to copy files to/from the flash memory see the 3 links in this reply I did on another thread. Note, the teensytransfer utility mentioned in the article also does not work for the Teensy 4.1. I have patches for it, but now that I've used MTP, it is less clunky than teensytransfer:

Hopefully you are decent at programming, because you will need to make the changes I mentioned above.
 
I glanced at the tutorial, and it uses the prop shield for audio output and flash memory. As I said, the Teensy 4.1 doesn't support audio (*) to the prop shield. That leaves the flash memory. There is a way to use the flash memory on the Teensy 4.1, but it is simpler to just get a small micro-SD card, and read from that. Assuming you have a USB micro-SD card reader on your PC, you can load the sounds onto the card, and read from that. You will have to change the script where it deals with sound to replace the DAC that the Teensy 3.2 used with I2C that the Teensy 4.1 uses, and to replace the SerialFlash call with one that uses the micro SD card.

(*) You can use the MQS system of the Teensy to simulate using a DAC, and connect either pin 10 or 12 to the DAC pin on the prop shield (note, the DAC pin on the prop shield is the on/off pin on the Teensy 4.1 -- you would not want to connect that pin to the Teensy, but instead run a wire from pin 10 or 12).

For information how to use the Teensy flash memory and how to use MTP to copy files to/from the flash memory see the 3 links in this reply I did on another thread. Note, the teensytransfer utility mentioned in the article also does not work for the Teensy 4.1. I have patches for it, but now that I've used MTP, it is less clunky than teensytransfer:

Hopefully you are decent at programming, because you will need to make the changes I mentioned above.

Alright, I'll take the prop shield back and learn how to program these sounds to it. I never actually had any skills programming so this will take some time.
 
Okay, I have another question about this board. When I do use the micro SD card on the Teensy board alone, do I need to program anything?
 
Okay, I have another question about this board. When I do use the micro SD card on the Teensy board alone, do I need to program anything?

You need to change the various declarations from using a DAC/prop shield on the Teensy 3.2 to using I2S and micro-SD on the Teensy 4.0. If you know the Teensy interfaces, it is probably straight forward, but if you don't, it will be a learning exercise to understand what to change.
 
You need to change the various declarations from using a DAC/prop shield on the Teensy 3.2 to using I2S and micro-SD on the Teensy 4.0. If you know the Teensy interfaces, it is probably straight forward, but if you don't, it will be a learning exercise to understand what to change.

Then I have a long road ahead. I'm going to have to find a large log of tutorials to get the audio to read from the micro SD card.
 
Then I have a long road ahead. I'm going to have to find a large log of tutorials to get the audio to read from the micro SD card.

Note you don't have to learn the ins and outs of learning to read from the micro SD card, as there is a library that already does it. You have to change the declarations to match the hardware you are using.

Note, I have not compiled the following changes, but they look like the right changes:

In particular, change from using RAW files in flash memory to use RAW files on the micro-SD:

Code:
AudioPlaySerialflashRaw  playFlashRaw1;  //xy=535,319

to:

Code:
AudioPlaySdRaw               playRaw1;          //xy=535,319

I.e. the first variable is for playing WAV files that are in flash memory, the second variable is for play RAW files from a micro-SD card. Then you need to go through and change the references:

Code:
AudioConnection          patchCord4(playFlashRaw1, 0, mixer1, 2);

to

Code:
AudioConnection          patchCord4(playRaw1, 0, mixer1, 2);

You need to change the initialization from flash to micro SD card:

Code:
  // Initialize serial flash
  if ( !SerialFlash.begin(FLASH_CS) ) {
    if ( DEBUG ) {
      Serial.println( "Unable to access SPI Flash chip" );
    }
  }

to:

Code:
  if (!(SD.begin(BUILTIN_SDCARD))) {
    // stop here, but print a message repetitively
    while (1) {
      Serial.println("Unable to access the SD card");
      delay(500);
    }
  }


Change:

Code:
  playFlashRaw1.play(filename);

to:

Code:
  playRaw1.play(filename);

Next up, you have to change the output type from DAC to I2S. Change:

Code:
AudioOutputAnalog        dac1;           //xy=844,196

to:

Code:
AudioOutputI2S              i2s1;            //xy=844,196

Change:

Code:
AudioConnection          patchCord7(mixer1, dac1);

to:

Code:
AudioConnection          patchCord7(mixer1, i2s1);

Delete::

Code:
  dac1.analogReference(EXTERNAL); // much louder!
  delay(50);                      // time for DAC voltage stable
  pinMode(AMP_ENABLE, OUTPUT);

If you were using the audio shield, you would need to add the following declaration:

Code:
AudioControlSGTL5000     sgtl5000_1;

And in the deleted lines above, add:

Code:
  sgtl5000_1.enable();
  sgtl5000_1.volume(0.5);

Possibly changing the volume to 1.0.
 
Back
Top