Тёмный

Arduino Audio Analyzer (Tutorial for Beginners, SSD1306 OLED, u8g2, Arduino UNO) 

upir
Подписаться 60 тыс.
Просмотров 33 тыс.
50% 1

Do you like the video? Please consider buying me a coffee, thank you! www.buymeacoffee.com/upir
PCBway: www.pcbway.com/setinvite.aspx...
Source files: github.com/upiir/arduino_audi...
WOKWI sketch: wokwi.com/projects/3655895711...
------------------------------------------------------------------------------------------
In this project, I will show you how to create a simple audio analyzer using Arduino UNO, an OLED display (SSD1306 128x64px I2C), Audio Analyzer module from DFRobot and Microphone from DFRobot. Enjoy!
------------------------------------------------------------------------------------------
Links from the video:
- DFRobot Audio Module: s.click.aliexpress.com/e/_Deq...
- DFRobot Audio Module Documentation: wiki.dfrobot.com/Audio_Analyz...
- DFRobot Analog Sound Sensor: s.click.aliexpress.com/e/_DmU...
- WOKWI starting project (OLED menu): • U8g vs. U8g2 Arduino G...
- 128x64 SSD1306 OLED Display: s.click.aliexpress.com/e/_DCY...
- 128x64 SSD1306 OLED Display (smaller): s.click.aliexpress.com/e/_DCK...
- Arduino UNO: s.click.aliexpress.com/e/_AXDw1h
- UNO Shield with male pins: s.click.aliexpress.com/e/_Dcv...
- Photopea (online Photoshop-like tool): www.photopea.com/
- Arduino breadboard prototyping shield: s.click.aliexpress.com/e/_ApbCwx
- u8g2 documentation: github.com/olikraus/u8g2/wiki...
Related videos with Arduino and OLED display:
- Arduino Parking Sensor - • DIY Parking Sensor wit...
- Turbo pressure gauge with Arduino and OLED display - • Turbo pressure gauge w...
- Arduino Car Cluster with OLED Display - • Arduino Car Cluster wi...
- Knob over OLED Display - • Knob over OLED Display...
- Arduino + OLED = 3D ? - • Arduino + OLED = 3D ?
- Arduino OLED Gauge - • Arduino OLED Gauge
- Smaller & Faster Arduino - • Smaller & Faster Arduino?
------------------------------------------------------------------------------------------
PCBWay is a service for manufacturing custom PCBs. If you click the link above, you will get a coupon for $5, which is exactly the price of 10 pieces of custom PCBs. In that case, you will only pay for shipping. Do you have any experience doing this? Please let me know in the comment section!
------------------------------------------------------------------------------------------------------------------------------
Do you have any questions? Suggestions for the next video? Please put those down in the comment section. I try to answer as many questions as I can. Thank you for watching, reading the video description and I hope to see you next time. Good luck with your projects!
--------------------------------------------------------------------------------------------------------
#audio #arduino #oled
--------------------------------------------------------------------------------------------------------

Опубликовано:

 

23 май 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@upir_upir
@upir_upir 5 месяцев назад
Do you like the video? Please consider buying me a coffee, thank you! www.buymeacoffee.com/upir
@fernandoboaro8363
@fernandoboaro8363 Год назад
Love these tutorials, really well made and easy to follow, thank you!
@upir_upir
@upir_upir Год назад
That’s great to hear, thank you for your comment and I’m glad it’s useful.
@upir_upir
@upir_upir Год назад
Here are more videos with Arduino and OLED display - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-HVHVkKt-ldc.html
@TimeFadesMemoryLasts
@TimeFadesMemoryLasts Год назад
Since the arduino is so slow, you can supercharge this project by impementing a sliding discrete fourier transform. It's faster than a fast fourier transform and the fastest you can get with digital fourier analysis. You will be able to implement more frequency bins without bogging down the arduino.
@upir_upir
@upir_upir Год назад
Here all the calculations are actually done on the dedicated chip that’s on the audio analyzer board, so Arduino is not doing anything, other than drawing on the OLED display.
@bimokayoba
@bimokayoba Год назад
Thanks for your efforts and tutorials ♥
@upir_upir
@upir_upir Год назад
You are welcome, I’m glad it’s helpful.
@Cichlor
@Cichlor Год назад
Thank you for Sharing your Knowledge! :)
@upir_upir
@upir_upir Год назад
You are welcome, I´m glad you like it!
@Wokwi
@Wokwi Год назад
Thank you for another great tutorial!
@Wokwi
@Wokwi Год назад
p.s. you could even simulate the MSGEQ7 with Wokwi by creating a custom chip that feeds random data through I2C, or even record the user's microphone through the undocumented wokwi-microphone part.
@upir_upir
@upir_upir Год назад
Thank you, but my tutorials would be much more boring without your great emmulator! Do you have any links to how to create a custom chip/more details about using the microphone? I would be very interested in that. Thanks!
@andymouse
@andymouse Год назад
This is awesome I sometimes like the easy ones !!!.....cheers.
@upir_upir
@upir_upir Год назад
Thank you!
@alirezaakhavi9943
@alirezaakhavi9943 Год назад
such a great video tutorial thank you very much! subbed :)
@upir_upir
@upir_upir Год назад
Thank you and welcome to the team 🙂
@noman1819
@noman1819 7 месяцев назад
Superb Tutorial
@upir_upir
@upir_upir 7 месяцев назад
Thank you, I´m glad you like it!
@Oshan_Dissanayaka
@Oshan_Dissanayaka Год назад
Super And Amazing!
@upir_upir
@upir_upir Год назад
Thank you, I´m glad you like it!
@luisrey8986
@luisrey8986 Год назад
Excelente! 😃👍
@upir_upir
@upir_upir Год назад
Thank you, I’m glad you like it!
@TryptychUK
@TryptychUK 9 месяцев назад
A great little project. I have a requirement for a simple board or circuit for an audio signal amplitude from an MP3 player board running off Arduino to trigger an LED light. (Basically an audio envelope follower/trigger.) The analyser board you are using is over-specced and too expensive for my needs. Is there anything you can suggest?
@upir_upir
@upir_upir 9 месяцев назад
Thank you. Could you use this chip alone, not in the form of a module? You can also try processing the audio signal directly on Arduino.
@TryptychUK
@TryptychUK 9 месяцев назад
@@upir_upir The chip is still too expensive and complex for what I need. I will probably go with an op-amp solution.
@upir_upir
@upir_upir 9 месяцев назад
@@TryptychUKOK, hopefully you will be able to find a solution that works for you. I´m sorry I cannot provide more guidance, but I´m not that familiar with audio processing.
@TryptychUK
@TryptychUK 9 месяцев назад
@@upir_upir Not a problem. Thanks anyway. I'm just surprised something so simple seems to be so hard to find a solution.
@elias.keller_photography
@elias.keller_photography 7 месяцев назад
hi! learned a lot from your videos and highly appreciate them. i am currently working on a simmilar project but on an arduino nano and a temp/hum sensor instead of a frequency sensor. howere i really stuggle to get it working with i2c connection. oled itself works, sensor itself works, setting the adresses seems to work (at least from the code side) but the program somehow does not start propperly. did you ever have problems with i2c and the u8g2 library?
@upir_upir
@upir_upir 7 месяцев назад
Thank you for your comment. I actually had a problem with u8g2 library and some OLED displays, and it helped to slow down the IIC connection from 400 down to 100Hz. Could you try that?
@elias.keller_photography
@elias.keller_photography 7 месяцев назад
@@upir_upir not yet but i just saw that 100khz is the standard speed and i didnt change that. i will still try and see if changing the speed affects this problem
@BlondieSL
@BlondieSL 9 месяцев назад
That library that you are using for this OLED display, does it also work for the color version of that tiny display? With full colors? If so, is the foot print of that library smaller than Adafruit's massive libraries?
@upir_upir
@upir_upir 9 месяцев назад
No, the u8g2 library is only for monochrome displays. You need to use a different library, and yes, I´m sure you can find a lightweight ones compared to Adafruit libraries. You can start with TFT_eSPI.
@BlondieSL
@BlondieSL 9 месяцев назад
@@upir_upirYeah, at one time I did find a "lightweight" one for the color display. It was ASCII mostly and just a couple of graphics calls like draw line. I had lost it for a while, but then found it. But I moved over to ESP32j and that lib didn't work so well. I don't actually use those little color displays so much anymore, but there are a couple of projects where I'd like to use them as long as the character set looks good. Fun times.
@firstworldpilipinas
@firstworldpilipinas 9 месяцев назад
can i use real microphone like shure sm58 for the input and for the lcd can i make it a 31 band frequency?maybe i can have a longer lcd...thank you
@upir_upir
@upir_upir 9 месяцев назад
You can use different microphone, but this particular chip only supports 8 frequencies. You would need a different chip / approach.
@firstworldpilipinas
@firstworldpilipinas 9 месяцев назад
@@upir_upir can you suggest chip for 31 band frequency and for sm58 microphone
@firstworldpilipinas
@firstworldpilipinas 9 месяцев назад
your suggestion will help me with my project.... im planning to create a 31 band audio analyzer with the use of shure sm 58 mic... can you help me?thank you
@ex1stenz
@ex1stenz 3 месяца назад
How to display more bars? Even 1 or 2 pixels width?
@upir_upir
@upir_upir 2 месяца назад
You can do that easily (the display part), but the used module only provides those 7 bands. You would need a different audio analyzer module.
@TobiahGieser
@TobiahGieser 7 месяцев назад
Is there a way to adjust the sensitivity of the mic? This analyzer seems to peak very easily.
@upir_upir
@upir_upir 7 месяцев назад
The microphone just provides analog voltage, so you might be able to just reduce it using a resistor/potentiometer before feeding this into the audio analyzer module.
@noman1819
@noman1819 6 месяцев назад
Hello Upir, Can you please share an example for the same Audio Analyzer display on Max7219 dot matrix display ? Your help in this regard will be highly appreciated.
@upir_upir
@upir_upir 6 месяцев назад
I have a video about using the MAX7219 dot matrix display using the u8g2 library - i.e. the same library as used here, so merging those two sketches together should be very simple. Please search for my video "Arduino + Matrix Display (The Proper Way)".
@noman1819
@noman1819 6 месяцев назад
@@upir_upir Yes, I followed your video using the MAX7219 dot matrix display. It's working perfectly well displaying the RU-vid logo and 6 digits on 4 dot matrix display of mine. But I need your guidance how to display 7 frequencies audio visualizer on dot matrix display. Kindly provide some details.
@quinman16
@quinman16 Год назад
Can you increase the amount of bars that the audio analyser detects?
@upir_upir
@upir_upir Год назад
Unfortunately not. The number of analyzed frequencies is set by the used chip on the audio analyzer board. You can do this manually using Arduino, but it will consume quite a lot cpu time
@alberttaber6349
@alberttaber6349 3 месяца назад
could you use an ad2 make the signal
@upir_upir
@upir_upir 3 месяца назад
I’m sorry I don’t understand the question.
@foenixsc5412
@foenixsc5412 3 месяца назад
Can you use the computer audio instead of the audio analyzer?
@upir_upir
@upir_upir 3 месяца назад
You mean using computer audio to analyze the audio signal? Yes, that should surely be possible.
@xedtronicsph3877
@xedtronicsph3877 8 месяцев назад
Hello there. Is the code from Github the "Complete code"??? Ir do i need to edit it just like you did on the video
@upir_upir
@upir_upir 8 месяцев назад
Yes, the code on GitHub is complete. It´s just the WOKWI simulation that is showing some random values because it does not support the chip.
@xedtronicsph3877
@xedtronicsph3877 8 месяцев назад
Thank you Very much
@tarek_hosni8348
@tarek_hosni8348 Год назад
Can you run it on GC9A01 LCD round display?
@upir_upir
@upir_upir Год назад
Yes, if you use proper libraries, it should be possible.
@igort5418
@igort5418 Год назад
I have an idea for a next video, could you make a program for the arduino to stream your pc screen on a 128x32 oled display, and have like a tiny second screen.
@upir_upir
@upir_upir Год назад
I like that idea quite a lot, but unfortunately I don´t have enough knowledge how to make sure project - yet. If anyone else has that kind of solution, I would be the first one to buy it.
@naveenfrancis9833
@naveenfrancis9833 6 дней назад
Very nice project... Could you help me to make a stereo spectrum analizer...
@upir_upir
@upir_upir 5 дней назад
Thank you. I believe the sample code shows exactly this- you will need two of those boards, and process left and right channels separately.
@naveenfrancis9833
@naveenfrancis9833 5 дней назад
@@upir_upir okey... Will try this.. Thank you 👍
@SAMETELMACI
@SAMETELMACI Год назад
ı love it
@upir_upir
@upir_upir Год назад
That´s great to hear, thank you for your comment!
@gbangyt-codmobile7037
@gbangyt-codmobile7037 8 месяцев назад
Does it take stereo input?
@upir_upir
@upir_upir 7 месяцев назад
No, but you can use two modules to get the stereo readings.
@RoSi4You
@RoSi4You Год назад
Hello there. Where did you source a MSGEQ7 chip please? Aliexpress is full of fakes.
@upir_upir
@upir_upir Год назад
This one is from DFRobot, it´s the entire module, but you can remove the chip if you want. Is there a way how to tell the chip is fake?
@RoSi4You
@RoSi4You Год назад
@@upir_upir Not really just plug it in and try, or there are some guides, how to determine it by measuring some voltages between and current draws on some pins. Basically, all aliexpress are considered (by me) as fakes. Dfrobot price is just bit over the hill.
@carlfranz6805
@carlfranz6805 7 месяцев назад
I'm finding it a little difficult to understand how a male human voice produces that much sound in the 16k hz range.
@upir_upir
@upir_upir 7 месяцев назад
Is it too low? Too high? According to Wikipedia, During a conversation, the fundamental frequency of a typical adult man ranges from 80 to 180 Hz and that of a typical adult woman from 165 to 255 Hz. I guess the chip is not super accurate or perhaps something else is going on..
@carlfranz6805
@carlfranz6805 7 месяцев назад
@@upir_upir 16K is WAY to high for a mature male human, you're not even going to get (natural) harmonics in that range. Makes me wonder if something else is going on. Since 16K is really hard to hear (unless you're young), perhaps something else to generating the sound in the upper ranges? Or, it is possible the pre-amp is not very good and is augmenting harmonics. It's also possible that the conversion of sound pressure measurement to bar graph is suspect. Anyway good luck.
@jimsnodgrass8454
@jimsnodgrass8454 Год назад
Terriffic
@upir_upir
@upir_upir Год назад
Thank you, I´m glad you like it! Good luck with your projects.
Далее
Tiny Board, Tiny OLED, Tiny Project
29:19
Просмотров 4,1 тыс.
mood всех бабушек
0:11
Просмотров 396 тыс.
#419 ESP32 Audio Tutorial with lots of examples
13:48
Просмотров 235 тыс.
Arduino ATtiny85 OLED Menu
34:46
Просмотров 20 тыс.
14 Band Spectrum Analyzer Part.3  | Acrylic Tower
22:57
My First ATTINY85 Project!
23:48
Просмотров 80 тыс.
Arduino Spectrum Analyzer with OLED Display
16:02
Просмотров 24 тыс.
CHEAP DIY BOOST GAUGE
43:58
Просмотров 100 тыс.