ESP32 playing sound example

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

ESP32 playing sound example

Postby pcbreflux » Sat Apr 08, 2017 2:15 pm

There maybe many other ways to play sounds with the ESP32 but this is my example:

https://github.com/pcbreflux/espressif/ ... pio_buzzer

Press GPIO 0 button!
Attachments
Video 0089 - ESP32 playing sound - 4.png
buzzer setup
Video 0089 - ESP32 playing sound - 4.png (5.93 MiB) Viewed 9120 times

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: ESP32 playing sound example

Postby pcbreflux » Sat Apr 08, 2017 3:03 pm

Works also with a small speaker. Hopefully the GPIO will no be abused?
Attachments
sound.jpg
sound.jpg (2.26 MiB) Viewed 9114 times

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 playing sound example

Postby loboris » Sat Apr 08, 2017 4:12 pm

I would recommend using 100 ohm resistor and 10uF (+ toward gpio) capacitor between GPIO and speaker or the gpio eventualy will be damaged.

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: ESP32 playing sound example

Postby pcbreflux » Sun Apr 09, 2017 8:40 pm

Thank you, if I realy think about it (not just try it without a thought) - the speaker is rated 8 Ohms and if the esp32 is supplied with 3.3V the current can peek at 412.5mA - way to high for the gpio. With the 100Ohms its down to 30mA.

Who is online

Users browsing this forum: No registered users and 15 guests