CTRL: on, off, left or right
CTRL is the TK100's on switch and its channel switch at once. The chip reads the voltage on its CTRL pin: near 0 V it is off, around 1 V it plays the left channel, from 1.5 V up the right. A 22 kΩ resistor and the L/R jumper decide which of those a HIGH from the ESP32-S3 becomes.
Three bands on one pin
The NS4168 reads the voltage on its CTRL pin and sorts it into one of three bands, by its datasheet:
| Chip's CTRL pin | The chip |
|---|---|
| 0 to 0.4 V | off, about 1 µA |
| 0.9 to 1.15 V | on, plays the left channel |
| 1.5 V up to its supply | on, plays the right channel |
The gaps between the bands are not defined. A voltage has to land inside one.
What sits between the pin and the chip
The header's CTRL pin does not reach the chip directly. It goes through a 22 kΩ resistor. On the chip's side of that resistor, the L/R jumper leads to 10 kΩ and ground.
With the jumper open, as it ships, the 10 kΩ is not connected, so nothing pulls the chip's pin down and it sees the whole 3.3 V: right channel.
With the jumper bridged, the two resistors form a divider: 3.3 × 10 / (22 + 10) = 1.03 V, worked out, which lands in the left band. The same HIGH from the same GPIO now picks the other channel.
Drive it, always
Driven LOW, the chip is off whatever the jumper says. Left unconnected, it has nothing defining it: with the jumper open the chip's pin floats, and with it bridged the 10 kΩ holds it at 0 V. Neither plays.
So CTRL goes to a GPIO, GPIO 18 in this book, and the sketch drives it HIGH before it plays:
pinMode(PIN_AMP_ON, OUTPUT);
digitalWrite(PIN_AMP_ON, HIGH); // wake the amplifierDriving it LOW again is the clean way to silence the speaker between sounds.
When it does not work
As expected. With nothing on CTRL and the jumper open, the chip's pin hangs on 22 kΩ with nothing on the other end, a state the datasheet does not define; with the jumper bridged, 10 kΩ holds it at 0 V, which is off. Wire CTRL to GPIO 18 and drive it HIGH.
Yes, a wire from CTRL to 3V3 keeps the amplifier on whenever the board has power. You lose the way to switch it off in software, which the record sketch uses to keep the speaker silent between plays.
Bridged, the chip plays the left channel. If your sketch fills only the right sample, that is silence. Write the same sample into both, or remove the solder bridge with a soldering iron and some wick.
The NS4168 has eight pins and spends only one on control. It reads three bands on that pin, off, left and right, so a single wire and two resistors do the work of two switches.
Why neither speaker wire is ground, and what never to connect to them.
Both wires move →Edit this page — content/books/i2s-amplifier/ctrl-on-off-left-right.mdx
Questions about this product
See what other owners have asked, and read their solutions.
I2S Amplifier
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.