When using the audio shield with the Teensy 4.0, which analog inputs are free?


New member
I'm using the audio shield, and would like to wire potentiometers to the remaining available analog inputs. Ignoring A10 through A13, which are hard to solder, from the yellow column on the card it looks to me like A2 through A5 plus A8 should be unused. Is this correct?
Yes that is mostly correct. You cannot use pins A4 and A5 since those are I2C pins and the audio shield uses I2C to set up the parameters.

The pins are:
  • A0
  • A1 -- note this is brought out on the shield, and there are some capacitors to improve analog performance, but might be a factor if you use digital input/output on the pin
  • A2
  • A3
  • A8
On the Teensy 4.1 you also have:
  • A10 - A13 on the left side of the Teensy with USB facing up
  • A14 - A17 on the right side
As you mention, A10-A13 are on solder pads underneath the Teensy 4.0.

You could use an I2C potentiometer. For example, this device from Sparcfun provides 4 12-bit potentiometers. By setting solder address jumpers, you can have 4 boards on the I2C bus, or 16 separate potentiometers:
When I look at the pin guide I see A0 and A1 marked as S/PIDIF OUT and S/PIDF IN -- do I need to do anything in software to ensure that these are available for analog reads?

For A1, if there's a capacitor on it then it wouldn't work with a potentiometer, right? Because for that the pin needs to measure the voltage.
Looking at the PCB and circuit found here it does appear that there is a capacitor on A1 (Teensy pin15).

If you don't intend to use the volume input, just remove it. ( Or leave it for analogue smoothing ).
You might use the other analog inputs before A8, because it is physically between the two I2S clock signals. Or only use A8 for something not needing high quality. Unless your analog signal has very low impedance, it's easy to get noise coupled from those clocks to A8.

A0 and A1 won't be used as S/PIDIF OUT and S/PIDF IN unless your program creates instances of the SPDIF objects which take control of those pins (see the design tool right-side docs for details of which pins each input and output really uses). Likewise for serial and PWM, only a problem if your program uses Serail3.begin(baud) or calls analogWrite() for those pins.

For any analog pin, you might wish to use pinMode(pin, INPUT_DISABLE) to turn off the pin's digital I/O circuitry. This isn't strictly required, but sometimes gives better quality.