Hi All,
In this blog i write about my project concept and components required to make some noise with Raspberry Pi Pico.
My Project title name would be "Entry Theme Player" , The idea is to play theme track/music when people enters. This can be used in any party, events and sports for welcoming people etc.
In this design challenge i did not want to complicate with more stuffs like coding or using advanced technology since its going to be fun project. This project can be recreated by anyone like students or beginners.
In this design Raspberry Pi Pico is interfaced with sensor and amplifier. It detects the person entry and play a music for a few seconds.
Block Design
Components Required
- Raspberry Pi Pico
- MAX98357A I2S Amplifier
- Speaker
- Sensors (Radar/PIR Motion Sensor)
- Battery or Solar Cells
Block Design
Making of Noise
Board Setup:
To make some noise , I started with breadboard hookup. Took an Pico board and interfaced to the MAX98357A board from Ada-fruit.
It uses I2S communication to stream audio data from Pico.
The Amplifier board is capable of driving 3W speaker. I have connected 8Ohm , 3W speaker to the Amplifier.
Code with Mu Editor:
The coding for Nano is done using MicroPython , I have used Mu Editor for coding and dumping the binary.
To start with coding, i have taken up basic code which generates the sine wave and sends the audio over I2S.
The code has been running on Pico , the LED blinks and makes noise for every seconds once. It also supports the .wav , .mp3 formats to play on speaker.
Create MP3 File
The mp3 files are created/edited from audacity .with below limitations
Mono and Stereo is supported with less than 64kbs and sample rates from 8kHz to 24kHz.
The RP2040 has a PWM output with 10 bits, so there's not much point in using high bit rates.
In this project i have used Stereo with 56kbs bit-rate and 22kHz sampling rate.
Short working video is here -
In the next blog (blog2) , sensor will be integrated to make music on people entry.
Thanks
Ashok R