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
Summary
Figure 1: The Nucleo Light and Sound Machine controls the music and flashes LEDs in time to the music.
Over the last fifteen years or so, music has found itself encapsulated into digital bits. What if we could tap into this marriage of music and technology to make something even more amazing?
This project is one of a collection of STM32 Nucleo (a.k.a. Nucleo) projects located on Mouser Electronics’ open source hardware site: http://www.mouser.com/applications/open-source-hardware/ In this project we are going to add a visual representation of our music. We will take the audio from our favorite portable music player and electronically sample its waveforms to produce a stunning light show using LEDs. This project can be done both with and without a microcontroller. The LEDs can be driven directly using an operational amplifier or sent to an ST Nucleo via analog-to-digital conversion to add even more fun effects. When setting out to design this project, we aimed to strike a balance between cost, complexity, and educational value. But most importantly, we wanted a project that captured the imagination of students and empowered them to take the basic design and hack it to meet their own unique desires. The circuit is a basic audio amplifier circuit that, in principle, is used in tons of audio products. In a circuit that fits onto a tiny breadboard we can teach Ohm’s Law, voltage dividers, potentiometers, LEDs, capacitors, current limiting, operational amplifier theory, and line level audio! The beauty of the design is that it is self-contained and can be used without having to write any code or interface with a microcontroller, except to provide power to the op amp. Of course, you could provide power to the op amp using 3 AA batteries if so desired. You can use a USB cable (mini-B to standard-A) connected to the Nucleo from a PC to power the Nucleo, as well. The Nucleo is used to power the entire set up regardless of whether you complete it with option A or B instructions.
We would love to hear what you think about this project; please tell us in the comments section below.