WalkPi PCB Edition

by Arnov Sharma in Circuits > Raspberry Pi

1842 Views, 7 Favorites, 0 Comments

WalkPi PCB Edition

WALKPI Music Player PICO 2
22.gif
IMG_0409.JPG
IMG_0404.JPG
IMG_0405.JPG

Greetings everyone and welcome back, This is the WalkPi, a homebrew audio player that plays music from an SD card. It is made out of a Raspberry Pi Pico 2 and a DF Mini Player.

Remember the Walkman? The phrase "walkpi" is a pun.

The WalkPi gets its name from the fact that it is just a walkman that is powered by a Raspberry Pi and is a little less sophisticated.

This project is a follow-up to the walkpi project I created earlier using a breadboard.

We added an SSD1306 OLED display and a few buttons that allow the user to use the WalkPi. The buttons let the user choose songs from the menu on the OLED screen, adjust the volume, choose a song, and switch the device on or off.

Let us get started with the construction since this Instructables is about the entire process of constructing this basic setup, including the code and other specifics.

Supplies

These were the materials used in this project:

  1. Custom PCB
  2. Raspberry Pi PICO 2
  3. IP5306 Power Management IC
  4. 10uF Capacitors, 1206 Package
  5. 1uH Inductor
  6. Vertical Push Button
  7. SSD1306 OLED
  8. DF MINI Player
  9. SD Card with MP3 Songs
  10. WS2812B
  11. Type C port
  12. Battery 3.7V, 600mAh Cell
  13. Slide Switch
  14. Audio Jack
  15. Speaker

Breadboard Setup

WALK-Pi the DFPlayer Raspberry Pi Pico Audio Player Project
02.gif
Capture.PNG
Image1.jpg
Image5.jpg
IMG_20240923_002727.jpg
IMG_20240929_123407.jpg
IMG_20240929_123415.jpg
raspberry-pi-pico-gpio - Copy.png

We already designed the WalkPi's Basic Breadboard configuration.

The star of this project is the DFPlayer Mini, which is a mini MP3 Player Module that is based around a 24-bit DAC IC along with an onboard SD Card reader that fully supports the FAT16 and FAT32 file systems.

The project's brain, the Raspberry Pi Pico, is connected to the DF Mini Player, a small, low-cost MP3 module with a simple output straight to the speaker.

We included the SSD1306 OLED screen to show the song list, volume settings, and other information in addition to song names.

Here's the brief article about how we setup the breadboard setup:

https://www.instructables.com/WALKPi-Breadboard-Version/

In order to simplify the design process for subsequent iterations, we evaluated all of the device's internal workings in the breadboard version, which was the first step of testing this project before proceeding to the PCB design phase.

PCB Design

SCH_page-0001.jpg
01.PNG
05.PNG
06.PNG
04.PNG

The project's PCB design begins with the creation of a schematic, which is separated into seven circuit parts: the Raspberry Pi Pico 2, the WS2812B LED array, the RIGHT Angle Switch Array, the OLED screen, the DFPLAYER, the Audio Jack-Speaker Switch, and the Power Managamenet Setup.

The IP5306 Power Management Board Setup is the first thing we will go over. Its basic configuration includes the IP5306 IC itself, along with decoupling capacitors on the input, output, and battery sides, LEDs for the battery fuel level, a Type C port for input that will be used to charge the cell, and an SMD inductor that will increase the 3.7V cell's output to a constant 5V.

Next comes the Pico 2 Setup, which connects to the OLED display's I2C ports as well as the DF Mini Player's TX and RX pins. To function, the DF Player, the OLED screen, and the PICO's VCC require 5V from the power management board setup.

We added an interesting feature to this device: the DF Mini player's output is connected to the central terminal of a Slide DPDT Slide switch, which is also connected to an audio jack and speaker. The sliding switch allows the user to play music via either the audio jack or the speaker.

An array of WS2812B LEDs was also added; four of the LEDs were connected in their standard configuration, with the first LED's Din connected to PICO's GPIO0. The first LED's dout is connected to the second's din, the second's dout is connected to the third's din, and so on, up to the fourth LED.

Finally, we employed a total of six buttons in this project, five of which are connected to PICO and will be used for up-and-down navigation, music selection, and volume up-and-down control. In order to turn the device on and off, the sixth button is connected to the power management setup.

Following the creation of the schematic, we also created a mockup CAD file for the board, in which we modeled every component that we would need to install in the circuit, including the PCB, vertical push buttons, Raspberry Pi Pico, DF Mini Player, slide switch, and Type C port.

We create the board layout and arrange all the parts to complete the circle using the dimensions obtained from the Cad file.

PCBWAY SERVICE

01.gif
IMG_20241112_194727.jpg
03.gif
02.gif

Following the completion of the board design, we ordered PCBs in white solder masks with black silkscreen and submitted the PCB's Gerber data on the PCBWAY quote page.

PCBs were received within a week, and the PCB quality was outstanding. Here, we added a few design elements on the board's silkscreen layer to increase the aesthetic appeal of the project. PCBWAY made the custom layer properly, which shows their great PCB manufacturing capabilities.

Also, PCBWay is hosting its 7th Project Design Contest, a global competition that invites electronics enthusiasts, engineers, and makers to showcase their innovative projects. The contest provides a platform for participants to share their creativity and technical expertise with the broader community.

This year’s competition includes three major categories: electronic project, mechanical project and SMT 32 project

With prizes awarded for the most exceptional designs, the contest aims to inspire and support innovation, making it an exciting opportunity for both professionals and hobbyists to gain recognition and connect with like-minded creators.

We also used PCBWAY's Giftshop for sourcing the Pico 2, DF Mini Player, and the SSD1306 Display.

PCBWAY gift shop is an online marketplace where you can get a variety of electronics modules and boards for their genuine price

You guys can check out PCBWAY if you want great PCB service at an affordable rate.

PCB Assembly Process

04.gif
05.gif
06.gif
07.gif
08.gif
09.gif
  1. Applying solder paste to each component pad is the initial step in the circuit-building procedure. In this case, a solder paste dispenser synringe with 63/37 Sn/Pb solder paste is used.
  2. Next, we pick and place each component in its proper place.
  3. After that, we lift the circuit and place it on the reflow hotplate, which increases the PCB's temperature to the point where solder paste melts and all SMD components attach to their pads.
  4. Then, using a soldering iron, we solder all of the component leads in their proper locations after placing all of the through-hole components, such as the horizontal push buttons, Type C port, and CON2 JST connectors.

Adding Modules Onto the Circuit (OLED, PICO, DF Player)

10.gif
11.gif
12.gif
13.gif
14.gif
  1. We now set up every module, including the DF Mini Player, Pico 2, and SSD1306 Display, in its proper location. The SSD1306 Display is first added to the circuit from the top side, and its pad is subsequently soldered from the bottom side.
  2. Using a soldering iron, the terminals of the DF Mini Player are soldered from the top side of the board to the bottom side of the circuit.
  3. We also included two JST connectors, which will be used to connect the battery and speaker.
  4. In its place, we finally installed the Raspbery Pi Pico 2. We soldered the Pico directly onto the circuit using its castellated pads.

The circuit assembly is now complete.

CODE

16.gif
17.gif

Next is the project's code, which is large but takes a very straightforward approach.

The constants that specify the display's dimensions and I2C address, as well as the LED pin and number of LEDs, are all included in the first section of this code, which also includes all the libraries you must right away install. Additionally, it includes objects such as the NeoPixel strip and the OLED display, respectively.

The first section also assigns button pins, stores song names in an array called songNames, and uses certain variables to monitor the number of songs, the song index that is currently selected, and the volume level.

The OLED display and the DF Mini player are initiated by the Section's Setup Function, which also includes a tiny part that checks to see if the DF player's initialization failed or was functioning well.

Along with the WS2812B LED, which is configured to glow red, this function also includes buttons that configure each button as an input. We also added a welcome message that will appear each time the device starts on.

The third section, or the Loop Function, is made up of seven parts, including the Current Time, which keeps track of time in microseconds and manages button debounding, Song Menu Structure, Song List, and volume display. The navigation button functions by detecting if buttons are being pressed and updating the song index accordingly. The volume buttons perform the same function as the song index but also control the LED and play the next song segment.

Before using this sketch, make sure you install the libraries listed below.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
#include <Adafruit_NeoPixel.h>

Downloads

Power Source

18.gif
19.gif
20.gif
21.gif

We are using a 14500 3.7V 600mAH Li-ion battery as the power supply, which is a smaller formfactored cell than the 18650 cells that are often utilized. In order to give the lithium battery both low-cut and high-cut functionality, we added a wire harness and a PCM.

  1. The JST connector on the wireharness links to the battery connector on the circuit.
  2. The device turns on when the Power button is pressed, and the four side LEDs that indicate the battery's current fuel level glow.
  3. The device can be turned off by double-pressing the Power Button.
  4. Because of its small capacity, the lithium cell can be charged using the Type C connector in a maximum of two hours using a 5V/2A charger.

Result

WalkPi Test Video! #music #arduino #raspberrypi
22.gif
IMG_E0404.JPG

After the gadget has been set up and updated with the code and power, it turns on when we push the power button. The RGB LEDs illuminate red when the device first powers on, and a welcome message shows on the screen.

The song we wish to play is selected using the navigation buttons, and the song is picked using the select button. When the song has been selected and begins to play, we are presented with a Playing Now splash screen.

The slide switch allows the user to choose whether to connect earphones or play music on the built-in speaker.

RED RGB LEDs turn purple while the song is playing, then change color to blue and back to purple again. This pattern repeats itself.

As of right now, we have only finished the main board for this project. We will be adding a battery layer to the back side of the device's along with a frontside enclosure and making a few small code changes because, as of right now, the device only lists the song names SONG 1, 2, and 3 as specified in the code. However, it will be changed so that it will display the names of the songs that have been added to the SD card and appear directly on the OLED screen.

Stay tuned for the upcoming update.

Thanks for reaching this far, and I will be back with a new project pretty soon.

Peace.