I started my idea with the sound processing. At the beginning I wanted to make the device that had different behavior depending on how fast the music is and how exciting it is. However, I figured that it would be difficult to set up and distinguish the beats. Therefore, after the discussion with professor I decided to do project with the loudness. This device has 8x8 bicolor LED matrix which displays different faces depending on how loud the sound is. When there is no sound, it alternating two sleeping marks(Zz Zz), and if it gets sound it gives faces with heart eyes, and when sound is louder, it changes into different faces. Since it alternating two faces for same volume, it looks like Tengu is singing.
Front view | Back view | Side view | Video | |||
For this project, I used Adafruit bicolor 8x8 led square matrix with I2C interface [ADA902] for implementing faces, a microphone to get sound, and microcontroller EFM32ZG110F32 from Silicon Labs. Also, a USB connector is used to connect with the power source. A DC/DC converter is used to drops 5V USB voltage down to 3.3V. The amplifier part gets the sound from the microphone and drives the peak detector at its output. Pins PE12 and PE13 of the microcontroller are configured for I2C interface and are connected to the LED matrix to display faces.
Schematic | Assembly | |
I used C programming language to develop a code for this project. After the microphone and amplifier catches the sound volume, the ADC converts it into a digital code. I saved the ADC data into variable and filtered it out with a moving average filter of order 4. This filtering helps a lot for not reacting on short signal peaks. I used the RTC to set up the time interval between changing faces. Whenever, the RTC requests an interrupt, it starts the ADC conversion via a PRS channel. Upon waking up form sleep, the software checks whether ADC flag is 1. If it is 1, it means that our device captured the sound volume. The code then selects face to display depending on the ADC reading. Also, I used the variable for altering the faces, then it gives different face depending on this number, even though different ADC data are in the same range, see the table below.
Here is oscillogram of I2C communication between the microcontroller and the LED driver HT16K33
Since I never developed my own microcontroller program before I started my project, it looked hard to finish the project. However, while I was doing this project, I really enjoyed and it was really fun to design and implement my idea. Also, it was as difficult as I expected with Sergei's help. It was also difficult to find the appropriate range for each faces. It looked like the microphone is very sensitive to where the sound comes from. Hence, I needed to find ranges for that. I am really satisfied with what I have done and willing to do another microcontroller project if there is an opportunity.
Last modified:Mon, Jan 23, 2023.