-
Notifications
You must be signed in to change notification settings - Fork 0
Hardware Hack PAM8403 Amplifier Power Off
Before I found this project I had found another project where PAM8403 was used as amplifier for the speakers. When I put everything together and in my room it was very quiet I heard a little noise coming from speakers even system was shutdown and in Firmware halt. This is because the 5V PIN has even power while raspberry pi is in halt. As a result the amplifier will not be switched off anytime.
The PAM8403 has 16 pins. It seems that not all PCBs has the same layout but the pins of the chip are the same. See the Pin above the 4 in PAM8403. It is called PIN 12. This pin is connected on the most boards directly to the 5V input of the board to always enable this chip. The connection between 5V and PIN 12 was cut at the red mark shown in the picture. I used a scalpel for cutting and a multimeter for continuity testing (DurchgangsprΓΌfung) between PIN12 and 5V. If there is still a connection between P12 and 5V you maybe damage your GPIO Port used for enabling/disabling later the amplifier.
From the picture you see that you need to connect the PIN12 to ground to pull down the pin and connect the PIN12 to one GPIO Port. I first soldered the resistor on one end to pin 12 and on the other to GND. Then I attached a wire to connect the GPIO to the resistor. My cabling doesn't look good but it just works.
I connected the PIN12 of the PAM8403 board to GPIO23 (PIN16) of the Raspberry PI. Now the amplifier is active when this GPIO is sending a high signal to amplifier. If you want to to use another pin you need to change the script in the next section. Please consult the pin out to find available pins for your project.
Copy the service file to the systemd folder:
sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/phoniebox-activate-amplifier.service-default.sample /etc/systemd/system/phoniebox-activate-amplifier.service
Now systemd has to be notified that there are new service files:
sudo systemctl daemon-reload
Enable this service:
sudo systemctl enable phoniebox-activate-amplifier
Start this service:
sudo systemctl start phoniebox-activate-amplifier
If you like Phoniebox, consider: buy me a coffee or PayPal
- Code: https://github.com/MiczFlor/RPi-Jukebox-RFID
- Phoniebox home page: English | Deutsch
Phoniebox is a contactless jukebox for the Raspberry Pi, playing audio files, playlists, podcasts, web streams and spotify triggered by RFID cards. All plug and play via USB, no soldering iron needed. Update: if you must, it now also features a howto for adding GPIO buttons controls.
Visit Phoniebox.de
π₯ Version 3
- β Releases
- π΅ Install Jukebox Version 3
- π Report a bug
- π Propose a feature
- βοΈ Feature Status
- π Documentation
- π©βπ» Development
- βοΈ Contributing
- π¦ Code
πΆ Version 2
- β Releases
- π΅ Install Jukebox Version 2
- π Report a bug
- βοΈ Features
- π Documentation
- βοΈ Contributing
- π¦ Code
Version 2 Pages
-
Setup / Upgrades
- Synchronising Phonieboxes in a local network
- Smart Home remote control with MQTT
- Hardware Pinout Overview
- Systemwide Equalizer
- Phoniebox with read-only Filesystem
- HiFiBerry Soundcard Details
- WM8960 Hi-Fi HAT
- PAM8403 Amplifier Power Off
- TPA3118 Amplifier Power Off and EMI improvement
- External Non USB Audio DAC ES9023, PCM5102, etc.
- On-board LEDs with fibre optics
- Setting GPIOs at boot time
- Stop on removal with USB RFID Reader
- Firmware update improves audio out
- Architecture