Pico Piano
Inspired by the idea of the Power Glove accessory for the Nintendo Entertainment System, the Pico Piano is built to give the same cyber-punk feeling of virtual control over an instrument, without needing the actual piano physically.
Author: Bercut Remus-Gabriel
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-GnarGnaw
Description
The Pico Piano simulates playing the piano by using incline sensors on each finger, connected to a Pico 2W board for each hand which communicate wirelessly to a main Pico 2W sending signals for each note to a DFPlayer.
Motivation
I got the idea after browsing optimus and seeing incline sensors. I knew immediately that it would be amazing to connect them to a finger and work some magic. After that, everything came naturally with the musical instruments, piano was the most intuitive idea.
Architecture
Components used
Raspeberry Pi Pico 2W: This is used for communicating with the sensors through GPIO, controlling the DFPlayer through UART, debugging throughout.
DFPLayer: This module is used for playing the actual sound. It includes a DAC and an SD Card reader which reduces the amount of work needed in order to communicate between modules. Connection with the Pico is done via UART.
Incline Sensors: The sensors use a very simple mechanism inside with 2 balls that are acted upon by gravity. They send a signal when they touch each other and a metal pin at the base of the sensor. They communicate via GPIO with the Pico.
Log
Week 5-11 May
I've received all 12 incline sensors and the DFPlayer last week so I can finally start to test everything. The sensors can communicate through GPIO since their signal need not be processed, but I'm having trouble figuring how the DFPlayer works and how to use UART.
Song of the week is: TOOL - Reflection
Week 12-18 May
Hardware
Setup consists of 3 Raspeberry Pi Pico 2W boards, one for each hand and one acting as the main unit for playing the music. The music is played through a speaker connected to a DFPlayer module which receives signal from the main Pico board. The DFPlayer connects to the main Pico 2W through SPI and to the speaker via the SPK pin. VCC is supplied by the Pico board. 5 incline sensors are connected through GPIO to a Pico 2W for each hand.
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
3x Raspberry Pi Pico W | Microcontrollers | 120 RON |
DFPlayer Mini | MP3 Module with SD Card | 14 RON |
10x Incline Sensor | Incline Sensor | 10x5 RON |
Resistor 1K Ohm | Resistor from Kit | 15 RON |
Wires | Wires, Male-Male and Female-Female | ~10 RON |
Speaker 8Ohm | Speaker | Couldn't find speakers available anywhere for a good price actually, nobody seems to sell these anymore, I ripped one out of a toy, I will edit this later if I buy a speaker |
Software
Library | Description | Usage |
---|---|---|
embassy-rp | For communication with the peripherals | |
embassy-executor | Executor for tasks | |
embassy-time | Used for timers, delay, duration etc | |
embassy-sync | Used for synchronization | |
dfplayer_async | Found on crates.io, made specifically for the DFPlayer module |