Introduction: I Built a Portable Decibel Meter Using Raspberry Pi Pico, Micro Python and Fusion360
Greetings everyone, and welcome to my Instructables tutorial. Today, I'll guide you through the process of creating a Portable Decibel Meter Using Raspberry Pi Pico and Micro Python.
Project Overview:
I build a portable Decibel Meter using Raspberry Pi Pico and a high-precision INMP441 I2S MEMS microphone. The device measures real-time sound levels, displays them on an OLED screen, and runs completely standalone with a battery-powered design.
This project covers:
- Real-time sound level measurement (dB)
- I2S microphone interfacing with Raspberry Pi Pico
- OLED visualization
- Custom 3D-printed enclosure made using fusion360
- PCB-based final assembly for a professional finish
This is a practical electronics + embedded systems project, perfect for IoT, environmental monitoring, noise analysis, and learning MicroPython with Raspberry Pi Pico.
Before beginning, a huge shoutout to JLCMC for sponsoring.
Now, let's get started with our project!
Supplies
Electronic Components Required:
- Raspberry Pi Pico
- INMP441 MEMS I2S Microphone
- 0.98" OLED Display
- 3.7V Li-Po Battery
- TP4056 Battery Charging Module
- Slider Switch
Additional Components:
- Custom PCB
- 3D-Printed Enclosure
- Hot Glue
- Cutter
- Soldering Iron
- PLA Filament
Software:
Step 1: Breadboard Testing (Microphone + Pico)
Follow the steps:
- Place the Raspberry Pi Pico and the INMP441 microphone module on the breadboard, and make the connections using jumper wires, exactly as shown in the circuit diagram.
- Once the connections are done, connect the Raspberry Pi Pico to my computer using a USB cable.
- Now, inside the Thonny IDE, I’ll paste the code, save it as main.py, and run it.
As you can see in the shell, the sound level values in decibels are updating in real time.
Step 2: Elevate Your Electronic Projects - JLCMC
JLCMC is your one-stop shop for all electronic manufacturing needs, offering an extensive catalog of nearly 600,000 SKUs that cover hardware, mechanical, electronic, and automation components. Their commitment to guaranteeing genuine products, rapid shipping (with most in-stock items dispatched within 24 hours), and competitive pricing truly sets them apart. In addition, their exceptional customer service ensures you always get exactly what you need to bring your projects to life.
For my next project, I’m planning to buy a timing belt from their Transmission Components section.
What I really like is how easy it is to customize the part. On the left side, you can select all the required options, and just below that, you get the complete specification and documentation, so you know exactly what you’re ordering.
JLCMC has recently upgraded their new-user registration benefits, increasing the value of the welcome coupon package to $123 in discount coupons. Whether you’re building DIY electronics, robotics, or mechanical projects, JLCMC has you covered with quality parts and fast delivery. Don’t miss out—visit https://jlcmc.com/?from=RL2 to explore their amazing range of products and grab your discount coupon today!
Step 3: Adding OLED Display
Now let’s add the OLED display to the breadboard.
- Mount the OLED on the breadboard and connect it to the Raspberry Pi Pico using I2C, following this circuit diagram.
- After that, connect the USB cable again and open Thonny IDE.
- First, save the ssd1306.py library file on the Raspberry Pi Pico.
- Then open a new file, paste the main code, save it as main.py, and run it.
And there you go, the decibel values are now displayed live on the OLED screen, as seen in the video.
Attachments
Step 4: 3D Printed Enclosure
To give this project a proper handheld form, I designed a custom enclosure in Fusion 360.
I’m still a beginner in 3D modeling, but I wanted this project to feel like a real device instead of just a breadboard setup.
After designing the enclosure, I 3D-printed it, and the final result looks clean, compact, and portable.
Decibel meter
Step 5: PCB & Power Circuit
To make the project more reliable and professional, I moved the circuit to a PCB board.
I mounted header pins and soldered the Raspberry Pi Pico onto the PCB.
Then, following the circuit diagram, I soldered the header pin connections for the microphone, OLED display, and other components.
For your ease I have also made the PCB, and here is the Gerber File Link: https://github.com/ShahbazCoder1/Portable-Decibel-Meter-Using-Raspberry-Pi-Pico-and-Micro-Python/tree/main/PCB%20Gerber%20File
Finally, I assembled the power supply unit using the battery and charging module, making the device fully portable.
Step 6: Troubleshooting
If your decibel meter does not work as expected, don’t worry. Most issues are related to wiring, power, or software configuration. Go through the checks below step by step.
1. Device Does Not Power ON
Possible causes:
- Battery not charged
- Incorrect wiring to the TP4056 module
- Power switch wiring issue
Solutions:
- Fully charge the Li-Po battery using the TP4056 module.
- Double-check B+ / B- connections on the charging module.
- Ensure the VCC and GND connections are correctly wired to the PCB.
- Verify that the slider switch is wired in series with the power line.
2. OLED Display Not Turning ON
Possible causes:
- Incorrect I2C wiring
- Wrong I2C address
- Missing or incorrect driver file
Solutions:
- Check that SDA and SCL pins are connected correctly to the Raspberry Pi Pico.
- Confirm the OLED I2C address (usually 0x3C).
- Make sure the ssd1306.py file is uploaded to the Pico.
- Ensure the display is receiving 3.3V, not 5V.
3. OLED Turns ON but Shows Nothing
Possible causes:
- Code not running
- Display initialization failed
- Contrast issue
Solutions:
- Re-upload the main.py file and restart the Pico.
- Check the display initialization code.
- Ensure the screen is not damaged or glued too tightly.
4. No Sound Readings / dB Value Not Changing
Possible causes:
- INMP441 microphone wiring issue
- Incorrect I2S pin configuration
- Microphone power issue
Solutions:
- Verify the I2S pins (BCLK, WS, SD) match the pins defined in the code.
- Check that the microphone is powered with 3.3V.
- Make sure the microphone hole is not blocked by glue.
- Try speaking or clapping near the microphone to test response.
5. Random or Incorrect dB Values
Possible causes:
- Loose jumper connections
- Electrical noise
- Unstable power supply
Solutions:
- Secure all jumper wires properly.
- Avoid long or loose wires near the microphone.
- Ensure the battery and power connections are stable.
- Restart the device after assembly.
6. Code Upload Errors in Thonny
Possible causes:
- Pico not in boot mode
- Wrong interpreter selected
- File not saved correctly
Solutions:
- Press and hold the BOOTSEL button while connecting the Pico.
- Select MicroPython (Raspberry Pi Pico) in Thonny.
- Save the main file as main.py on the Pico.
- Ensure all required files are uploaded.
7. Device Works on USB but Not on Battery
Possible causes:
- Battery voltage too low
- Charging module wiring issue
- Power switch problem
Solutions:
- Fully charge the battery before testing.
- Check connections between TP4056 output and Pico power pins.
- Test continuity of the power switch.
8. Device Stops Working After Closing the Enclosure
Possible causes:
- Wires getting pinched
- Loose connections inside the box
Solutions:
- Reopen the enclosure and inspect all wiring.
- Ensure no wires are under pressure when the lid is closed.
- Secure loose components with hot glue or tape.
9. General Debugging Tips
- Always test the circuit on a breadboard first.
- Upload and test code before final enclosure assembly.
- Test each module individually:
- Pico
- OLED
- INMP441 microphone
- Keep a USB cable connected for quick debugging.
Following these steps should help you resolve most common issues and get your portable Raspberry Pi Pico Decibel Meter working correctly.
⭐ Pro Tip
If you modify pin assignments or hardware layout, update the code accordingly to avoid conflicts.
Step 7: Final Assembly
Follow the steps below to assemble all the components inside the enclosure and complete the portable decibel meter.
1. Mount the Raspberry Pi Pico
Place the Raspberry Pi Pico onto the PCB board.
Once aligned properly, use double-sided tape to fix the PCB securely to the bottom of the enclosure, as shown in Image 1 & 2.
2. Fix the PCB Inside the Enclosure
Carefully position the PCB board inside the box so that the Pico is centered and properly aligned.
Press it gently to ensure the tape holds firmly (Image 2).
3. Place the Battery
Using double-sided tape, place the Li-Po battery beside the PCB board, as shown in Image 3.
Make sure the battery wires are accessible and not pinched.
4. Install the Charging Module and Switch
Insert the TP4056 battery charging module into the designated slot in the enclosure.
If it feels loose, secure it using hot glue.
Similarly, mount the slider switch into the provided slot on the enclosure (Image 4).
5. Mount Display and Microphone
Insert the OLED display and the INMP441 I2S microphone module into their respective cutouts on the front panel.
Once aligned, use hot glue to fix them securely in place (Image 5 & 6).
Ensure the glue does not block the microphone hole or display area.
6. Connect Jumper Wires
Attach the male-to-female jumper wires to the Pico pins according to the circuit connections (Image 6).
7. Power Connections
Connect the VCC and GND pins from the battery charging circuit to the PCB board to complete the power supply wiring (Image 7).
8. Final Wiring
Now connect the jumper wires from:
- The OLED display
- The INMP441 I2S microphone
to their corresponding pins on the PCB board, as shown in Image 8.
Double-check all connections before proceeding.
9. Close the Enclosure
Once everything is properly connected and secured, place the lid onto the enclosure and close it carefully (Image 9).
Your portable Raspberry Pi Pico–based Decibel Meter is now fully assembled and ready to use!
Step 8: Working Video and Tutorial
Congratulations! You’ve successfully built your Portable Decibel Meter Using Raspberry Pi Pico and Micro Python. A demonstration video of this project can be viewed here: Watch Now
Thank you for your interest in this project. If you have any questions or suggestions for future projects, please leave a comment, and I will do my best to assist you.
For business or promotional inquiries, please contact me via email at Email.
I will continue to update this instructable with new information. Don’t forget to follow me for updates on new projects and subscribe to my YouTube channel (YouTube: roboattic Lab) for more content. Thank you for your support.








