กลับไปหน้ารวมไฟล์
bluetooth-volume-control-for-an-old-stereo-with-buttons-cff390-en.md

What is this project about?

This is an in-depth guide on how to modify a classic stereo system that uses a "Rotary Encoder" for volume control, converting it into a Push Button controlled system with Bluetooth support, using a custom-designed control board.

Demonstration of the new volume control system

Introduction

This project started with the Panasonic SA-AK45 stereo, a late 90s component stereo system known for its excellent sound quality. However, a common issue was the faulty volume knob, as systems from that era began transitioning from variable resistors (Potentiometers) to Digital Rotary Encoders.

The core of this work is: even though I used the Panasonic as a prototype, the engineering principles can be applied to any stereo system that uses a Rotary Encoder for volume control, simply by making minor software logic adjustments to match the signal pattern of that particular model.

The original Encoder in this Panasonic model was a complex mechanical device, very difficult to find replacement parts for (internal components are tiny and fragile). So, I decided to remove the original mechanism and replace it with an ATtiny85 microcontroller, which is small, inexpensive, and has sufficient resources to simulate the Encoder's Quadrature signals.

For wireless communication, we will use an HC-06 Bluetooth module, which acts as a Slave to receive commands from a smartphone and then relay them to the ATtiny85.

Decreasing volume via newly installed push buttons

Supplies

  • Panasonic SA-AK45 (or any stereo system that uses an Encoder-type volume control)
  • ATtiny85 Microcontroller (the core processing unit)
  • DIP-8 Socket (for placing the ATtiny85 to facilitate easy programming removal)
  • HC-06 Bluetooth Module (or HC-05 can be used interchangeably)
  • 2 LEDs (used as status indicators and part of the voltage divider circuit)
  • 2 Tactile Switches (for increasing/decreasing volume)
  • Resistors: 100Ω, 1.2kΩ, 2.2kΩ, 100kΩ
  • Capacitor: 100 nF (for power supply Decoupling)
  • Universal PCB (approximately 4x6 cm)
  • AVR Programmer or Arduino Uno (to burn Code onto the ATtiny85)
  • Basic tools: Soldering iron, solder, desoldering pump

Step 1: Preparing to Disassemble the Stereo

Accessing the Encoder requires caution, as it is installed on the Front Panel circuit board, which often consists of multiple layers. Engineer's Tip: Take photos at every step when disconnecting Ribbon Cables and find the "Service Manual" for that model as a reference. In the case of the SA-AK45, we are heading towards the "E - Operation PCB" board.

Diagram from the Service Manual showing connections of various circuit boards

Step 2: Opening the Device

Disconnect all power and signal cables. Unscrew the screws securing the top and side covers (3 on each side) and the back. Note that the cover is held by 3 metal latches to the front panel; gently lift it to release the latches. Then, pull the plastic volume knob straight out.

Internal view after opening the cover
Removing the original knob to prepare the space

Step 3 - 4: Removing the Front Panel and CD Changer Unit

The front panel connects to the Main PCB via 3 ribbon cables:

  1. White ribbon cable: Pull straight out from the socket.
  2. Thick black ribbon cable: You must "lift the locking tabs" on both sides of the connector on the main board before you can pull the cable out.

Additionally, the CD Changer unit, which is mounted on top, must be removed by unscrewing it from the back and disconnecting two more ribbon cables connected to the front panel.

The CD changer unit that must be removed first
Front panel completely separated

Step 5 - 6: Accessing the Encoder Mounting Point

The Encoder is hidden beneath the Panel PCB (G). We must unscrew all screws and carefully lift the board, as some ribbon cables are still connected to the JOG PCB and Deck PCB. Once lifted, we will see the Operation PCB (E), which houses our target Encoder.

Operation PCB revealed beneath the main circuit board

Step 7 - 8: Analyzing the Rotary Encoder Signal

In engineering terms, this type of Incremental Encoder sends signals called "Quadrature Signals" through 3 main pins: A, B, and GND. The operating logic is:

  • Clockwise rotation: The signal changes in the sequence A LOW -> B LOW -> Both HIGH
  • Counter-clockwise rotation: The signal sequence reverses to B LOW -> A LOW -> Both HIGH

From disassembling and analyzing the original device (which was broken due to fractured plastic contacts), I found that it had a resolution of 24 PPR (Pulses Per Revolution) and no complex signal overlap between A and B, making it easy to simulate these signals using digitalWrite and delay commands in ATtiny85.

Internal damage to the original Encoder causing system malfunction

Step 9 - 10: Circuit Design and Control Logic

The challenging problem is that the ATtiny85 has limited I/O pins (5 pins), but we need to use:

  1. Output signals (A and B) = 2 pins
  2. Input signals (2 push buttons) = 2 pins
  3. Bluetooth communication (RX and TX) = 2 pins Totaling 6 pins! Which exceeds the available number.

Solution Technique (Embedded Optimization): We will use only one Analog Input (A1) pin to read the values of 2 push buttons, using the principle of a Voltage Divider.

  • No button pressed: Voltage near 5V (Analog value ~1023)
  • Decrease volume button pressed: Voltage 0V (shorted to GND, Analog value ~0)
  • Increase volume button pressed: Voltage approximately 2.5V (through voltage divider resistors, Analog value ~512)

Bluetooth System Upgrade: We connect the HC-06 module to pins 3 and 4 using the SoftwareSerial library. Since the HC-06 operates at 3.3V while the ATtiny85 operates at 5V, we must use 1.2kΩ and 2.2kΩ resistors as a voltage divider circuit to reduce the voltage at the HC-06's Rx pin, preventing module damage.

Complete circuit including push buttons, status LED, and Bluetooth

Step 11 - 12: Programming the ATtiny85 and Preparing Connection Points

You must use an Arduino Uno in "Arduino as ISP" mode to burn Code onto the ATtiny85, using the board settings for ATtiny85, Internal Clock 1MHz (or 8MHz as appropriate).

Code Logic Analysis: In the volUp() and volDown() functions, we will simulate the actual Encoder rotation:

void volUp() {
  digitalWrite(VOL_A, LOW); // Pin A touches GND first
  delay(80); 
  digitalWrite(VOL_A, HIGH);
  digitalWrite(VOL_B, LOW); // Pin B touches GND next
  delay(80);
  digitalWrite(VOL_B, HIGH);
  delay(80);
}

The SIGNAL_DELAY value of 80ms was determined experimentally to ensure the stereo responds to button presses promptly and not too fast, causing it to skip steps.

For connecting to the stereo, I soldered 4 Jumper wires to the original Encoder points (A, B, GND) and found a 5V power supply point from the Panel PCB to power our new circuit.

Soldering signal and power supply wires to the original stereo board

ข้อมูล Frontmatter ดั้งเดิม

title: "Bluetooth Volume Control For An Old Stereo With Buttons!"
description: "How about getting rid of that broken volume knob on your stereo and replacing it with some buttons, LEDs and Bluetooth?"
author: "kot_behemot53"
category: "Internet of Things, BT & Wireless"
tags:
  - "audio"
  - "repair"
  - "remote control"
views: 6532
likes: 4
price: 2450
difficulty: "Intermediate"
components:
  - "1x Breadboard (generic)"
  - "1x 2x2 Female Header Connector"
  - "1x Solder Flux, Soldering"
  - "1x Arduino UNO"
  - "1x Resistor 100k ohm"
  - "4x Male/Male Jumper Wires"
  - "1x DIP-8 socket"
  - "1x Resistor 100 ohm"
  - "1x Resistor 2.21k ohm"
  - "1x Capacitor 100 nF"
  - "1x HC-06 Bluetooth Module"
  - "1x Desoldering Pump, Metal"
  - "1x Soldering iron (generic)"
  - "2x LED (generic)"
  - "1x Universal PCB"
  - "2x Tactile Switch, Top Actuated"
  - "1x ATtiny85"
  - "1x Resistor 1k ohm"
  - "1x Solder Wire, 40/60"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/03d19a45-7686-41a8-9de9-3f7fdc61e87c.ino"
  - "https://projects.arduinocontent.cc/03d19a45-7686-41a8-9de9-3f7fdc61e87c.ino"
documentationLinks: []
passwordHash: "740ba31f18fc9abf02d939c9dd1d5f8791e6c90f2f4ed5fabe07df87749775f5"
encryptedPayload: "U2FsdGVkX1/QAkU808MIW359uV34RmePrIm39aH19ZeeAzLl97hnGN4GEwhvJSf4yYDcYFBY97s7lhHU5fyNghzuhg1Duy2/gFQ5XUqcQz8="
seoDescription: "Upgrade your old stereo with Arduino-based Bluetooth Volume Control using buttons and LEDs. A fun DIY project to replace broken volume knobs."
videoLinks:
  - "https://www.youtube.com/embed/sUiJ-OtWtyw"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/bluetooth-volume-control-for-an-old-stereo-with-buttons-cff390_cover.jpg"
lang: "en"