Mark has a thing with Audio Analyzers: "They are simply fun to look at. Patterns moving up and down to the music. Amazing. On my private channel, called The Electronic Engineer, I published dozens of analyzers. I also did a few for element 14 like a web-based analyzer and another one made of Lego bricks."
In this episode of element14 presents Mark builds a new backdrop item, a Smart Youtube Counter with Audio Analyzer.
Watch the Video:
So, with my mind set for analyzers, I just had to include one when I designed this YouTube subscriber counter and the result is amazing. I am very pleased with the outcome:
- YouTube subscriber counter
- Playback of audio files for new subscribers
- Possibility to program different sounds for milestones.
- It’s connected to the internet using WIFI, so adding a clock or a messenger service is technically possible
- Audio analyzer displaying FFT results of the audio.
- Microphone input!
Components and Parts:
Although the number of components is only a few, I did design a PCB. You can order your own (check out the part list). The PCB production files are included.
Take note when assembling the PCB, not all components are required. I added two row headers only for the purpose to have the pins available if I need those. No need to actually assemble those headers. Same goes for connector H9, you only need it if you decide to use a microphone on a wire.
Programming
If you are using the designed PCB, programming the firmware is easy. The only things you need to change is your WIFi credentials and the info to your youtube channel.
The author of the specific library that is used made a nice tutorial on how to do that:
https://github.com/witnessmenow/arduino-youtube-api
One important thing that is not shown in the video:
You need to upload the mp3 files from the data folder to the Arduino internal storage.
To do so you have to select the ESP32 Sketch Data upload function from the Tools Menu in Arduino IDE
Bill of Materials:
Product Name | Manufacturer | Quantity | Buy Kit |
---|---|---|---|
Trimpot, Multi Turn, Cermet, Top Adjust, 10 kohm, Through Hole, 12 Turns 10K | Bourns | 1 | Buy Now |
Pin Header, Wire-to-Board, 2.54 mm, 1 Rows, 2 Contacts, Through Hole Right Angle, KK 254 7478 | Molex | 2 | Buy Now |
Pin Header, Signal, 2.54 mm, 1 Rows, 3 Contacts, Through Hole Right Angle, KK 254 7478 | Molex | 1 | Buy Now |
Pin Header, Signal, 2.54 mm, 1 Rows, 4 Contacts, Through Hole Right Angle, KK 254 7478 | Molex | 1 | Buy Now |
Pin Header, Signal, Wire-to-Board, 2.54 mm, 1 Rows, 5 Contacts, Through Hole Right Angle | Molex | 1 | Buy Now |
Pin Header, Signal, Wire-to-Board, 2.54 mm, 1 Rows, 6 Contacts, Through Hole Right Angle | Molex | 1 | Buy Now |
Fixed LDO Voltage Regulator, 2.6V to 27V, 1.3V Dropout, 5Vout, 5Aout, TO-220-3 | Texas Instruments | 1 | Buy Now |
DIODES INC. Schottky Rectifier, 60 V, 3 A, Single, DO-201AD, 2 Pins, 740 mV | Diodes Inc. | 1 | Buy Now |
LITTELFUSE Fuseholder, PCB, 1 Fuse, 6.3 A, 250 VAC, 250 VDC, TE5, TR5, Solder Lug | Littelfuse | 1 | Buy Now |
LITTELFUSE Fuse, PCB Leaded, 1.6 A, 250 V, TR5 370 Series, Fast Acting, Radial Leaded | Littelfuse | 1 | Buy Now |
KYCON DC Power Connector, Jack, 3.5 A, 2 mm, PCB Mount, Through Hole | Kycon | 1 | Buy Now |
XP POWER AC/DC Power Supply, ITE & Medical, 1 Output, 10 W, 5 VDC, 2 A | XP Power | 1 | Buy Now |
XP POWER Power Supply Accessory, Interchangeable AC Input Plug, Euro, ACM Series | XP Power | 1 | Buy Now |
KOA Through Hole Resistor, 330 ohm, CF, 250 mW, ± 5%, Axial Leaded, 300 V | KOA | 1 | Buy Now |
KOA Through Hole Resistor, 100 kohm, CF, 250 mW, ± 5%, Axial Leaded, 300 V | KOA | 1 | Buy Now |
MULTICOMP PRO Electrolytic Capacitor, 10 µF, 25 V, ± 20%, Radial Leaded, Polar | Multicomp Pro | 1 | Buy Now |
MULTICOMP PRO Electrolytic Capacitor, 22 µF, 16 V, ± 20%, Radial Leaded, 2000 hours @ 85°C | Multicomp Pro | 1 | Buy Now |
MULTICOMP PRO Electrolytic Capacitor, 10 µF, 16 V, ± 20%, Radial Leaded, 2000 hours @ 85°C | Mulitcomp Pro | 1 | Buy Now |
KEMET Multilayer Ceramic Capacitor, 0.1 µF, 50 V, ± 10%, Radial Leaded, X7R, 5.08 mm | Kemet | 2 | Buy Now |
Speaker, Mini, 5 cm, 3 W, 50 ohm, 180 Hz to 17000 Hz | Visaton | 1 | Buy Now |
MULTICOMP PRO 6MS1S3M1RESlide Switch, SPDT, On-On, Through Hole, Side Actuator, 100 mA, 20 V | Mulitcomp Pro | 1 | Buy Now |
PCB Receptacle, Board-to-Board, 2.54 mm, 1 Rows, 24 Contacts, Through Hole Mount, Tiger Claw BCS | Samtec | 2 | Buy Now |
Additional Parts:
ESP32 DOIT DEVKIT 1,0 Aliexpress or local store I used: https://nl.aliexpress.com/item/32797879940.html |
||||
PCB-> use the included pcb production files to order a pcb at your prefered manufacturer or get it here: https://www.tindie.com/products/35039/ |
||||
I2S Audio Board based on MAX98357 https://nl.aliexpress.com/item/1005005985389931.html |
||||
INMP441-MEMS-I2S-MIC-MODULE I used: https://nl.aliexpress.com/item/1005005933408624.html |
||||
ledstrip WS2812 approx. 1 meter I used: https://nl.aliexpress.com/item/4001322411818.html |
||||
8-Bit Max7219 60 × 60 Dot Matrix Module Microcontroller Led Display Module Voor Diy Kit I used: https://nl.aliexpress.com/item/1005006222492232.html |
||||
TM1637 Led Display Module 0.56 Inch 6 Digitale Led Indicator Buis Voor Arduino I used: https://nl.aliexpress.com/item/1005002060120661.html |
Downloads and Links:
- Code and PCB Design Files inc arduino youtube-api snapshot
- https://github.com/witnessmenow/arduino-youtube-api