The Sound (and Sight) of Music! Teaching Electronics with the STM32 Nucleo
By Michael Parks, P.E., Mouser Electronics
Licensed under CC BY-SA 4.0
Assembly
There is no additional assembly required! Just hook up your audio source to the audio jack of your circuit. Of course, you could take this project and if you had the resources to teach 3D printing you could have students print an enclosure to house breadboard. But again, it is not required and the circuit will work happily with no enclosure.
I am using a 3.5mm splitter on the output of my phone so that I can send the sound to both the circuit we’ve built and a small speaker so I can hear the music as well as see it. I am using 3.5mm male-to-male extender cable from the splitter into the audio jack. Even if we didn’t use the Nucleo as part of the circuit before, we are going to use it now to provide power to the op amps if nothing else. Insert the USB cable into your computer and the other end into the Nucleo. You should notice the little LEDs on the board begin to glow. Simply attach the Vcc and GND rails of the breadboard to the Vcc and GND pins on the Nucleo. When you are comfortable to move on to interfacing your circuit with the Nucleo, don’t forget to wire the outputs of the op amps into the analog inputs of the Nucleo as discussed previously.
Project in Action
Finally, it’s time to fire up your music app of choice, select your favorite tunes and watch the LEDs begin to rhythmically glow in beat with your music. Depending on how your music file (e.g. MP3, WAV) was created audio may not appear on both channels. That’s okay, you just might not see both LEDs flashing to beat of the music. If the 3.5mm jack is not plugged in you might notice the LEDs glowing, that’s fine! It’s an aspect of line level audio and our circuit.
For additional projects and information about open source hardware, go to:
http://www.mouser.com/applications/open-source-hardware/
We would love to hear what you think about this project; please tell us in the comments section below.