Help Needed: Speaker, Amplifier, and Secure Wiring for Child Use

Alice

New member
Hello,

I'm fairly new to working with the Teensy 4.1 and its soldered-on audio adapter. I'm building a small piano
for my granddaughter using the SDpiano.ino sketch from this GitHub repository, with added code to
support six LED arcade buttons. It works well and sounds great — many thanks to h4yn0nnym0u5e for
the excellent code!

Right now, I’m testing the setup on a breadboard, using an externally powered speaker connected to
the audio adapter’s stereo jack. Everything sounds great so far.

As I move toward finalizing the build, I have a few questions:

1. Amplifier and Speaker Setup
What amplifier and speaker combo would you recommend to preserve the same sound quality I'm
getting now from the powered speaker?

2. Wiring the Amplifier to the Audio Adapter
How should I properly connect the amplifier and speaker to the audio adapter (SGTL5000) to ensure
safe and high-quality audio output?

3. Enclosure and Connections
I’m using a plastic container as the enclosure, with six holes drilled into the lid to mount the LED arcade
buttons. To wire everything together, I plan to use:
Since this piano is for my granddaughter, and she’ll likely be a bit rough while playing with it, I want to make
sure everything is secure and durable.

Will the breakout board and terminal block be strong enough for this kind of use? Or would you recommend
a more robust solution for long-term durability and safety?

4. Wire Type and Gauge
What size and type of wire would be best for connecting:
  • The buttons to the Teensy
  • Power and ground lines
  • The audio output to an amplifier/speaker?

5. Power Supply
I'm powering the Teensy using a USB battery charger (similar to the kind used for iPhones). It works
well during testing, and I plan to use it as the final power source for the piano. Any suggestions on
making the setup more robust or tips for finishing the build would be greatly appreciated!

Thank you.
 
"USB battery charger" could be anything from a fully certified and compliant device to unsafe cheap junk - make sure its manufactured by a reputable company. Same goes for the amplifier which will also be a mains powered unit I presume. Apart from the mains powered components the voltages are 5V or less, perfectly safe.

If any part of the circuit can be touched (say ground on metal parts of a button), the supply should ideally be earthed (class I, 3-prong plug). This is preferred to class 2 (double insulated) with modern switch-mode supplies, which put out a lot of electrical noise (bad for audio) and can cause very low-level electric shocks (a tingling feeling).

Audio signals typically use twin screened cable - the simplest option is a pre-made cable with stereo 3.5mm jacks at each end, but there is an important caveat - the headphone output on the audio adaptor is not at ground potential, and connecting it to ground will cause it to malfunction. The line-outputs on the audio adapter are designed to feed to an amplifier (but don't come with a connector fitted).

For 5V supply the size of wiring is dictated by the maximum current the supply can generate - the wiring must be adequate to carrying this. AWG20 or 22 may be sufficient for a small supply - check the values and come back with the details here if you are unsure.

Avoid long runs (yards/metres) of power wires at low voltage - you risk losing too much voltage to wire losses.

For button wiring any convenient hook up wire is fine, the current is tiny. If there will be a lot of vibration then multi-strand wire is preferred over single-core.

Yes PCBs with terminals are robust. PCBs are extremely tough. Ensuring the wires are properly screwed into the terminals is the main detail to get right. Over-thin wires need bootlace crimps (ideal but requires a crimp-tool), or can be folded double.
 
MarkT,

Thank you so much for your detailed reply—it really helped clarify things. I plan to use AWG 22 wire for the amplifier’s main power and ground lines. Which size is better, AWG 24 or AWG 26, for the button and LED signal and ground wires?

For the audio connection, I intend to use the line out pins on the audio adapter to connect to an amplifier. Both line out and line in are male header pins on the audio adapter board, so I’ll be connecting directly to them.

For the power supply, I’m using an older Jackery battery charger with a capacity of 3200 mAh (11.84 Wh). I appreciate your advice about keeping wires short to avoid voltage issues.

Could you recommend a specific amplifier and speaker combination that delivers high sound quality? Sound quality is important to me.

I’ll have to google bootlace crimps as I don’t know what that is.

Thanks again for your help!
 
I'm thinking of using Adafruit STEMMA Audio Amp (Mono 2.5W Class D - PAM8302) and the Adafruit Mono Enclosed Speaker (3W 4 Ohm) into my audio setup. Has anyone used these components before and can share their experiences?
 
Back
Top