Git Product home page Git Product logo

pico-pwm-audio's Introduction

pico-pwm-audio

Raspberry Pi Pico PWM Audio Project

This code goes with a YouTube video which demonstrates PWM audio out with a simple cicruit on a raspberry pi pico.

Raspberry Pi Pico Audio Output

Building

Sync

git clone https://github.com/rgrosset/pico-pwm-audio.git

Make

Build project using cmake. This requires Raspberry Pi Pico C/C++ SDK to be installed.

mkdir build
cd build
cmake ..
make

Then copy pico-pwm-audio.uf2 to your Raspberry Pi Pico!

The Circuit

The circuit is based on the reference design from the raspberry-pi-foundation. We will just need one channel and the connector, as well as the logic buffer, is up to you.

circuit-diagram

You will need:

  • 1.8 kΩ resistor
  • 220 Ω resistor
  • 100 Ω resistor
  • 100 nF capacitor
  • 47 µF capacitor
  • an Audiojack

Using the Audito Converter Notebook.

The conventer is a Jupyter Notebook so you need to install Jupyter Notebooks for this to work. These instructions work on MacOS and Linux. For Windows the proess is the same simply follow instructions to install Python and related items for that platform.

Installing

  • First you need a working install of Python preferably a 3.x verson. To install python if you don't have it already go here https://www.python.org/downloads/

  • Second you need pip which is the python package manager, install this using the following

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
  • Install the notebook dependancies. These are the python libraries the notebook needs to run.
pip install soundfile 
pip install matplotlib
pip install samplerate
  • Next you need to install Jupyter Notebooks you can find instructions and many ways to install here https://jupyter.org/install my favoured way to do this is simply
pip install notebook

Usage guide

Launch the notebook user interface by issueing the command below in the same folder as this project. This will open the Jupyter user interface. Open the notebook file in the user interface.

jupyter notebook

The notebook itself is fairly self explanatory. Run each cell in order using the run buttons in the UI. The final cell will create a data array that you can copy and paste into your project. The notebook is configured to convert just about any WAV file to a mono 11Khz data which you can then use in your projects!

Have fun! Let me know if you have any feedback or questions.

pico-pwm-audio's People

Contributors

rgrosset avatar robin7g avatar mrsmoer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.