Raspberry PI-ANO
A compact digital piano with physical keys, wireless audio output via Bluetooth, and interactive sound modes, built on a Raspberry Pi Pico 2W.
Author: Dragomir Alexandru
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-Alexdr04
Description
This project is built using a Raspberry Pi Pico 2W, seven push buttons for musical notes, a potentiometer for volume control, and a Bluetooth audio module for wireless sound output. It features a loop mode for recording and repeating note sequences, a distortion toggle for creative audio effects, and status LEDs to indicate the current mode.
Motivation
I’ve always enjoyed music and wanted to combine that interest with what I’ve learned about embedded systems. This project gives me a fun, hands-on way to explore PWM audio, GPIO input, and Bluetooth output while building something creative and interactive.
Architecture
Controller:
Raspberry Pi Pico 2W — handles all logic, reads button inputs, and generates audio output via PWM.
Input System:
A set of 7 push buttons for the musical notes and 2 buttons for toggling loop and distortion modes. Connected to the Pico via GPIO.
Audio Processing Unit:
PWM signal from the Pico is passed through a potentiometer for volume control before reaching the Bluetooth module.
Output System:
MH-M28 Bluetooth audio module receives the analog signal and transmits it wirelessly to a portable speaker.
Visual Feedback:
3 LEDs indicate the current playback mode (normal, loop, or distortion). Controlled via GPIO.
Power Supply:
A 5V external power source powers the MH-M28 module separately from the Pico, ensuring stable Bluetooth audio output.
Log
Week 5 - 11 May
After my project was approved, I finalized the component list, ordered everything, and began assembling the hardware. I tested the debugger connection with the Raspberry Pi Pico 2W to ensure proper flashing and communication. I also experimented with basic GPIO inputs and outputs to validate button and LED functionality. Additionally, I started drafting the system schematic in KiCad and planned out the initial wiring layout on the breadboard.
Week 12 - 18 May
Week 19 - 25 May
Hardware
The hardware includes a Raspberry Pi Pico 2W as the central controller, connected to seven push buttons for triggering musical notes and two additional buttons: one for enabling loop functionality and one for toggling a distortion effect. A potentiometer adjusts the volume of the PWM audio signal, which is then sent to an MH-M28 Bluetooth module for wireless audio output. Three LEDs indicate the current system status (normal, loop, or distortion). All components are powered via USB and a separate 5V source for the Bluetooth module. The entire system is built on a breadboard for prototyping.
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W ×2 | Microcontroller | 39,66 RON ×2 |
Breadboard 830 points ×2 | Prototyping | 9,98 RON ×2 |
MH-M28 Bluetooth Module | Audio output | 13,29 RON |
Rotary Potentiometer 10kΩ | Volume control | 1,99 RON |
Tactile Button 6x6x6 ×9 | User input | 0,36 RON ×9 |
White LED 5mm | Mode indicator | 0,49 RON |
Red LED 5mm | Mode indicator | 0,39 RON |
Green LED 5mm | Mode indicator | 0,29 RON |
Resistor 220Ω ×3 | LED limiter | 0,10 RON ×3 |
Male-to-Male Jumper Wires | Connections | 7,98 RON |
Male-to-Female Jumper Wires | Connections | 3,99 RON |
5V Breadboard Power Supply Module | Power supply | 4,69 RON |
Software
Library | Description | Usage |
---|---|---|
embassy | Asynchronous framework for embedded development in Rust | Used to handle GPIO events and multitasking |
rp2040-hal | Hardware Abstraction Layer for Raspberry Pi RP2040 microcontrollers | Provides access to GPIO, ADC, PWM, and other peripherals |
embedded-hal | Generic traits for embedded hardware abstraction | Interfaces with drivers like LEDs and buttons |
defmt | Lightweight logging crate for embedded systems | Debugging and formatted logging |
probe-rs | Debug probe support for Rust-embedded development | Used to flash firmware and debug via the second Pico |
heapless | Data structures without dynamic memory allocation | Used for storing note sequences in loop mode |