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
Materials
To make things super simple we are providing a pre-built shopping cart with all the correct components. Remove the RCA and USB cables from the cart if you already have them. No worries on selecting the wrong part by accident! We’ve also labeled each item in the BOM to corresponding part in the provided schematic.
The Bill of Materials (BOM) for this project is for the electronics as shown in Figure 1. In the demo video, a smartphone or MP3 player is connected to the 3.5mm Stereo jack (smartphone/MP3 player not included!)
The electronic components recommended include:
Table 1: Bill of Materials for STM Nucleo Sights & Sounds Project
| Mouser PN |
Mfr |
Description |
Schematic PN |
Order Qty. |
| 854-BB400T |
BPS |
PCBs & Breadboards 400 TIE POINT BB W/PWR RAILS TRANSP |
n/a |
1 |
| 510-WK-3 |
Global Specialties |
Jumper Wires 70pc JUMPER WIRE KIT |
n/a |
1 |
| 806-STX-3100-5N |
Kycon |
Phone Connectors 3.5mm PCB STEREO BLK 5P W/SWITCH |
JP1 |
2 |
| 78-TLHR5400 |
Vishay |
Standard LEDs - Through Hole Red Tinted Diffused |
LED1, LED2, LED3, LED4, LED5, LED6, LED7, LED8 |
6 |
| 594-5063JD220R0F |
Vishay |
Thin Film Resistors - Through Hole .4watt 220ohms 1% 1/8watt body size |
R4, R6, R7, R8, R9, R10, R11, R12 |
6 |
| 594-5063JD100R0F5 |
Vishay |
Thin Film Resistors - Through Hole .4watt 100ohms 1% 1/8watt body size |
R3, R5, one extra to experiment with brightness |
3 |
| 652-3386P-1-103LF |
Bourns |
Trimmer Resistors - Through Hole 3/8" 10Kohms 10% 0.5Watts Square |
TM1, TM2 |
2 |
| 595-LM324N |
TI |
Operational Amplifiers - Op Amps Quad |
IC1A, IC1B, IC1C, IC1D |
1 |
| 71-CMF5510K000FKEB |
Vishay |
Metal Film Resistors - Through Hole 1/4watt 10Kohms 1% |
R1, R2 |
2 |
| 647-UVR1H100MDD1TA |
Nichicon |
Aluminum Electrolytic Capacitors - Leaded 50volts 10uF |
C1, C2 |
2 |
| 172-8362-E (or 172-2208) |
Kobiconn |
RCA Cable 3.5mm TO 3.5mm STEREO (Male/Male) PLUG 36". Connects portable (or PC) speakers to the Nucleo. |
n/a |
1 |
| 538-88732-8702 |
MOLEX |
USB mini-B to Standard-A (male/male) cable assembly to power the Nucleo from a PC if batteries are not used. |
n/a |
1 |
| 511-NUCLEO-F401RE |
STM |
Development Boards & Kits - ARM Nucleo Board STM32F4 STM32F401RE 512K |
F401RE |
1 |
|
We will use an STM32 Nucleo F401RE microcontroller platform. The STM32 Nucleo is programmed using the C/C++ language, but we provide the code for you. Nevertheless, programming tools are free online at mbed.org.
Figure 2: The STM32 Nucleo has a detachable, reusable programming card at the top that is removed once a project is done.
Tools:
Since this project is aimed towards classrooms and not electronics laboratories, we wanted to make sure that no hand tools or electronic test equipment was required. Of course, if you are teaching a course specifically geared towards electronics and have access to a multimeter or an oscilloscope, hooking it up the outputs of the audio jack makes for a very cool visualization of sound (Figure 2.) But to be sure, this is completely optional!
Figure 3: An oscilloscope is not needed for this project, but if you have one, you can visualize the sound with the oscilloscope.
Mouser carries all manner of electronics tools and supplies, however.
If you plan to do more with the Nucleo than what is in this project, try looking at the Nucleo site on mbed.org:
https://developer.mbed.org/platforms/ST-Nucleo-F401RE/
Here, you will find other projects and any additional information, such as this pin-out diagram of the Nucleo:
Figure 4: The STM32 Nucleo pin-out and other Nucleo information and projects can be found at mbed.org
We would love to hear what you think about this project; please tell us in the comments section below.