Teensy 4.1 Guitar Looper

tedm

Active member
I'm a (just) retired embedded engineer (hardware design and some coding e.g. drivers) but just starting on Teensy. I have this idea for a looper based on the Teensy 4.1 but, to have useful loop storage, it would have to store data on the micro SD card. I have looked through the audio forum and found 1 project that uses the SD card for real time capture so I'm assuming it's possible. I aim to end up designing a PCB that would include the audio Codec ICs but any pointers on what hardware, software, or existing projects, or shield PCBs I could start off testing on would be welcome.

I'll post the design here as I get it going.
 
I have this idea for a looper based on the Teensy 4.1...any pointers on what hardware, software, or existing projects, or shield PCBs I could start off testing on would be welcome.

@tedm:

Welcome to the Teensy world. You have chosen an excellent platform to potentially base your project upon. I'd suggest you take a look at the Audio Adapter Boards at this <link> (don't be scared that the website URL indicates teensy3, as there is a version for the T4.x as well). The audio library has fantastic capabilities, so you should be able to easily add effects to your looper. With the current chip shortage the way it is, many of the older Teensy models are out of stock. Hence, the T4.1 is a very good choice, but you might want to get one as soon as possible so you can start playing right away, else you might have an extended wait for things to come back into stock. The T4.1 also as a microSD socket right on the processor board, so that will also help with getting started quickly. One thing that you'll need to be extra careful with is the actual hardware interface to the incoming audio, especially if you are planning to connect to a guitar. Searching the forum, you can find some excellent references showing effective circuits for accepting guitar inputs.

Good luck, have fun, and feel free to ask any other questions. There are some really talented individuals on this forum (most especially, Paul Stoffregen himself, the Teensy master) who go out of their way to answer questions & to help newcomers with any challenges that they may encounter.

Mark J Culross
KD5RXT
 
Thanks for all the input and ideas so far. I managed to order a Tennsy 4.1 from Adafruit and the audio PCB that goes with it from Amazon. I thought about using RAM to store the loop data but the biggest SOIC RAM chip that's suggested for either of these boards is only 2 M Bytes; has anyone got suggestions for a bigger IC (8 Meg or bigger) that's maybe QSPI that might be suitable?

[EDIT] Looks like the ISS66 which is 32 Mbit QSPI would fit on the audio PCB
 
Last edited:
This thread might be of interest. You can fit a couple of PSRAM chips to the Teensy 4.1 and another to the audio board, which gives you a total of 4.75 minutes of delay (not all in one lump, though). This is not supported directly in the Audio library at the moment, though I have a pull request in to add it.

The part you linked may work, but it’s 8Mbit or 1Mbyte, so not as big as the ones sold as PSRAM for Teensy (which are 8Mbyte): it will only give you about 12s of delay.
 
Thanks for the steer to a VERY relevant thread :D

I have a Teensy 4.0 running with a Rev D audio board (my first Teensy project) plus I have a Teensy 4.1 on the way to me. It strikes me that the Rev D audio board is kind of unsuited to the Teensy 4.1 because both have a micro SD card holder; it seems that, at least for looping RAM, I could satisfy my requirements using 2 x 8MB PSRAMs on the 4.1 board and, if I used the uSD card holder on the 4.1 board, a dedicated audio board for the 4.1 would not have a uSD card holder. So with the aim of defining requirements for a 4.1 audio PCB design (remember my main skill is as a PCB designer) that would form the basis for various guitar pedal/audio effects projects, let's try for a requirements list:
1. Audio Codec IC (any suggestions for one that's different to that on the Rev D board?)
2. Power supply to run system from the standard 9V pedal supply
3. Input/output buffers to handle the guitar level signals
4. Voltage level translations for matching the 3V levels for the Teensy IC
5. Rotary encoder connections (perhaps with an intermediate IC that runs multiple encoders)
6. Display interface - probably OLED
7. Button interface

Feel free to chip in ideas by way of add/change/deletes

PS does the uSD card holder on the 4.1 pcb uses different pins to the uSD card holder on the Rev D audio pcb?
 
Agree the Teensy 4.1 renders some of the rev D audio board redundant, but it's all useful for those who prefer to use the Teensy 4.0 (for size reasons etc.), and I guess it doesn't make sense for PJRC to offer lots of devices with only minor differences.

If PSRAM can satisfy your (current) needs then it'll probably be easier to use than an SD card, which have a bit of a reputation for high latency and poor performance for multi-channel audio use. I'm planning to take a look at this at some point. The rest of your requirements look sensible to me, though do bear in mind I'm not a loopist myself. Definitely worth making a lash-up to try ideas before doing your PCB, I'd've thought. I haven't given any thought to using other codecs, though I believe there have been a few discussions on the forum about the merits of various other options. You may find yourself constrained by what you can actually get hold of - perhaps allow for a separate PCB for that, with a footprint compatible with the audio board, so you can drop in replacements to try out? Also, I think the audio board is a little compromised on how clean its power supply can be, because it's shared with the high-speed digital of the Teensy; I'd be inclined to look at giving it its own clean power source.

The schematics are on the PJRC web site: Teensy 4.0, Teensy 4.1, audio adaptor. The µSD on the Teensy 4.1 doesn't clash with the one on the audio adaptor, and is much faster as it's on a QSPI bus.
 
For guitar work, keep in mind you will also need a high impedance preamp as most audio boards expect line level inputs around 1Vpp. Your preamp will likely need to offer variable gain up around +20dB to get vintage pickups (approx 20 mV) up to line level, but also potentially lots of attentuation if you put high gain pedals in front of your DSP board. Remember, Guitar pedals with 9V supplies can easily get up to 7V output! I've seen people fry their ADC boards from strumming to too hard when going through another pedal so you also might want to consider hot-signal protection.

You can refer to the public schematic for the TGA Pro (I am the creator of this Teensy based guitar effects platform) to get an idea for what you would likely need.
 
For guitar work, keep in mind you will also need a high impedance preamp as most audio boards expect line level inputs around 1Vpp. Your preamp will likely need to offer variable gain up around +20dB to get vintage pickups (approx 20 mV) up to line level, but also potentially lots of attentuation if you put high gain pedals in front of your DSP board. Remember, Guitar pedals with 9V supplies can easily get up to 7V output! I've seen people fry their ADC boards from strumming to too hard when going through another pedal so you also might want to consider hot-signal protection.

You can refer to the public schematic for the TGA Pro (I am the creator of this Teensy based guitar effects platform) to get an idea for what you would likely need.

Thanks, I have designed, made PCBs for, and built a few guitar effects pedals plus an entire guitar amp (presently at Vn 2) so I do have some experience on handling guitar signals but I don't claim to know it all so I will take a look at your schematics.

Thanks also to h4yn0nnym0u5e for the great input.
 
One dream I've had for a while is the idea of a guitar pedal that's on the floor but the controls are remoted to an iPad - ideally wirelessly. A long time ago, I briefly worked on a project that used an iPhone for control of a small micro PCB via Bluetooth but the hoops we had to go through to work with Apple on the hardware side were near show-stoppers (had to buy special sample Apple authentication chips). I think that it can be done if the Teensy was connected to a LAN and then the iPad could communicate over WiFi - it can also be done using BLE but range is limited. Any thoughts on this aspect guys?

Ted
AB6B
 
1. Audio Codec IC (any suggestions for one that's different to that on the Rev D board?)

Blackaddr uses the WM8731 in his guitar shield and chipaudette uses the TLV320AIC3206 in his Tympan. I'm building something with the TLV320AIC3106 and I've also built something using PCM5242 and TLV320ADC5140. I hope to get back to building and hopefully release something useful!

The PCM5102a and PCM1802 seem to be cheap and sound great. They might be a good fit for a pedal.

There is a list of hardware here: https://github.com/TeensyUser/doc/wiki/Audio-Library-Hardware
 
Last edited:
Thanks JayShoe, that is a big list of supported Codecs. For the PCMxxxx ICs you suggested, how do they work as pedals if they only have 2 outputs?
 
A codec is a chip that has both ADC and DAC in one. Or you build it with discrete ADC/DAC chips.

Thanks, I know what a codec is but I was thrown by the column in the list that says the PCMxxxx chips have 2 outputs - I should look at the actual datasheets I guess.
 
Yes, sorry. The PCM5201 is a DAC and then use the PCM1802 as the ADC. Just a thought. Hope it's helpful.
 
Hi, I was trying to figure out how to make myself a digital pedal and stumbled upon this thread. Can you please tell me (assuming you did finish the project) what you ended up using? does it work well? could you share the result?
 
Back
Top