I have already published ESP8266 WiFi Microphone project and due of the a lot of requests, I have built another WiFi microphone project for esp32 modules.
IntroductionThis project is an ESP32 WiFi Microphone firmware arduino source code (.ino) which can play live sound and voices with up to 96Kbps (12bit @8KHz) quality. (To using more powerful WiFi microphone and voice recorder arduino project, please refer to our website: https://wicard.net/projects)
There are the following files in this project:
1- ESP32WiFiMicrophoneFree.ino (Main handler file)
2- AC.h – Project global variables and definitions file.
3- AC.ino – Project WiFi settings and config file.
4- MicPage.ino – This file contains the WiFi Microphone WebApp’s script.
Uploading the projectFirst open one of the files with Arduino program, then set the settings as the following image (Board revision and board type):
• The “Board” must be set on one of the ESP32 Modules before doing anything.
WaveShare Sound SensorWaveShare sound sensor is an audio amplifier and sensor with LM386. This module is compatible with this project.
It’s suggested to use a standard 3.3V microphone module (like “WaveShare Sound Sensor”). The ADC pin (GPIO 33) of esp32 is the audio signal input. Before using the WiFi microphone, build one of the following circuits.
Here’s a simple circuit with WaveShare Sound Sensor and ESP32 DEVKIT:
After upload, the program will run automatically.
Then the blue LED on the board would be turned on. Then you’ll be able to see the module’s hot spot ssid via the WiFi networks in your PC or smart phone.
The default SSID is WiCardMp and the default password is 12345678. Connect and go to 192.168.4.1/config with a web browser.
The WiFi configuration page:
In the “Modem Configuration” section, you’re able to view/edit the SSID and password of WiFi modem/router and then click on “Save” after inserting. The module would connect to the modem after about 30 seconds in case of validity of ssid and password.
• This page is also available via the DHCP IP of the module.
In the “Device Hot Spot Configuration” section, you can set the module hotspot’s SSID and password. Also you can set a password for the internal page with Secure Link section. (Example: the secure link is ABCD and the root page would be at 192.168.4.1/ABCD/ address)
The “Hidden HotSpot” button will set the module’s hot spot as hidden hotspot and the “Disable HotSpot when is connected to the modem” would disable the module’s hotspot, when is connected to the modem.
The stream configurationThe stream configuration is in the bottom of “config” page.
With “Audio Stream Bitrate” the quality of the audio stream can be set in 72, 84 or 96Kbps.
• The signal strength must be higher for higher quality.
The “Audio Stream Packet Length” sets the stream time in 5, 10, 30 or 60 minutes.
The Audio Stream PageThis page is in the root address (192.168.4.1 or the router’s given IP) and decodes the received data from module to the audio stream.
After opening the page, wait for a few seconds for the initial file loading. Then click on the “play”.
This page records audio data to in the browser’s cache automatically. Also you can play the audio and listen to the audio lively at the same time.
The preset time is 10 minutes. After this time spent, you can refresh the page and record again.
To downloading the audio file directly, go to 192.168.4.1/s (or the router’s given IP).
* If you close the web page, recording will be aborted.
* Do not open two pages at the same time. The module can handle only one page at a time.
Comments