Stufin
Home Quick Cart Profile

Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit

Buy Now on Stufin

Component Name

Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit

Overview

The Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit is a versatile IoT development board that integrates the ESP32-A1S microcontroller, Wi-Fi, Bluetooth, and audio capabilities, making it an ideal platform for developing a wide range of IoT projects that require wireless communication, audio processing, and microcontroller functionalities.

Functional Description

The Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit is a multifunctional development board that offers a unique combination of features, including

Microcontroller

ESP32-A1S

Wireless Connectivity

Dual-mode Wi-Fi (2.4 GHz and 5 GHz), Bluetooth 5.0

Audio Capabilities

The board is equipped with an audio codec and a 3.5mm audio jack, allowing for audio playback and recording capabilities.

Peripherals

The board provides a range of peripherals, including GPIOs, I2C, I2S, SPI, UART, and SD card interfaces, making it suitable for a wide range of applications.

Key Features

  • Dual-Core Microcontroller: The ESP32-A1S microcontroller features two 32-bit LX6 cores, operating at up to 240 MHz, with a total of 520 KB of SRAM and 448 KB of ROM.
  • Wi-Fi and Bluetooth: The board supports dual-mode Wi-Fi (2.4 GHz and 5 GHz) and Bluetooth 5.0, allowing for wireless communication with other devices and networks.
  • Audio Codec: The board features a built-in audio codec, supporting audio playback and recording at sample rates up to 192 kHz.
  • 3.5mm Audio Jack: The board provides a 3.5mm audio jack, allowing for easy connection of audio devices, such as headphones or speakers.
  • Peripherals: The board offers a range of peripherals, including 22 GPIOs, 2x I2C, 2x I2S, 3x SPI, 3x UART, and an SD card interface.
  • Power Management: The board features a built-in power management system, supporting voltages from 2.2 V to 3.6 V, and a low-power sleep mode.
  • Development Environment: The board is compatible with a range of development environments, including the Arduino IDE, ESP-IDF, and MicroPython.

Applications

The Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit is suitable for a wide range of applications, including

IoT projects requiring wireless communication and audio capabilities

Smart home automation systems

Wearable devices

Audio-based projects, such as voice assistants or audio streaming devices

Robotics and automation projects

Operating Frequency

Up to 240 MHz

RAM

520 KB

ROM

448 KB

Audio Codec

Supports audio playback and recording at sample rates up to 192 kHz

Power Supply

2.2 V to 3.6 V

Dimensions

90 mm x 60 mm

Weight

25 g

Conclusion

The Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit is a powerful and versatile development board that offers a unique combination of wireless communication, audio capabilities, and microcontroller functionalities. Its compact size, low power consumption, and ease of use make it an ideal platform for developing a wide range of IoT projects and applications.

Pin Configuration

  • Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit Pinout Explanation
  • The Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit is a powerful and feature-rich development board that combines the capabilities of Wi-Fi, Bluetooth, and audio processing. The board has a total of 38 pins, which can be categorized into several groups based on their functionality. Here is a detailed explanation of each pin, organized by category:
  • Power Pins
  • VIN ( Pin 1): Input voltage to the board, can be connected to a power source (3.3V to 12V)
  • 3V3 (Pin 2): 3.3V power output, can be used to power external devices
  • GND (Pins 3, 4, 5, 6, 37, and 38): Ground pins, used for grounding external devices and providing a common reference point
  • ESP32 Pins
  • GPIO0 (Pin 7): General-purpose input/output pin, can be used as input or output
  • GPIO1 (Pin 8): General-purpose input/output pin, can be used as input or output
  • GPIO2 (Pin 9): General-purpose input/output pin, can be used as input or output
  • GPIO3 (Pin 10): General-purpose input/output pin, can be used as input or output
  • GPIO4 (Pin 11): General-purpose input/output pin, can be used as input or output
  • GPIO5 (Pin 12): General-purpose input/output pin, can be used as input or output
  • GPIO6 (Pin 13): General-purpose input/output pin, can be used as input or output
  • GPIO7 (Pin 14): General-purpose input/output pin, can be used as input or output
  • GPIO8 (Pin 15): General-purpose input/output pin, can be used as input or output
  • GPIO9 (Pin 16): General-purpose input/output pin, can be used as input or output
  • GPIO10 (Pin 17): General-purpose input/output pin, can be used as input or output
  • GPIO11 (Pin 18): General-purpose input/output pin, can be used as input or output
  • GPIO12 (Pin 19): General-purpose input/output pin, can be used as input or output
  • GPIO13 (Pin 20): General-purpose input/output pin, can be used as input or output
  • GPIO14 (Pin 21): General-purpose input/output pin, can be used as input or output
  • GPIO15 (Pin 22): General-purpose input/output pin, can be used as input or output
  • GPIO16 (Pin 23): General-purpose input/output pin, can be used as input or output
  • GPIO17 (Pin 24): General-purpose input/output pin, can be used as input or output
  • GPIO18 (Pin 25): General-purpose input/output pin, can be used as input or output
  • GPIO19 (Pin 26): General-purpose input/output pin, can be used as input or output
  • Audio Pins
  • LRC_IN (Pin 27): Left channel audio input
  • RRC_IN (Pin 28): Right channel audio input
  • LRC_OUT (Pin 29): Left channel audio output
  • RRC_OUT (Pin 30): Right channel audio output
  • MIC (Pin 31): Microphone input
  • SPK (Pin 32): Speaker output
  • Bluetooth and Wi-Fi Pins
  • BT_EN (Pin 33): Bluetooth enable pin, active high
  • WIFI_EN (Pin 34): Wi-Fi enable pin, active high
  • BT_IRQ (Pin 35): Bluetooth interrupt pin, active low
  • WIFI_IRQ (Pin 36): Wi-Fi interrupt pin, active low
  • Connecting the Pins
  • When connecting the pins, make sure to follow these guidelines:
  • Use breadboards, jumper wires, or PCBs to connect external devices to the development board.
  • Be cautious when handling the pins to avoid damage or short circuits.
  • Use voltage divider circuits or level shifters when connecting devices with different voltage levels.
  • Ensure that the pins are connected correctly, referring to the datasheet and documentation for the specific component being connected.
  • Use a multimeter to verify the voltage levels and connections before powering on the board.
  • Always power off the board before making any changes to the connections.
  • By following these guidelines and understanding the pinout of the Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit, you can effectively utilize its features and capabilities in your IoT projects.

Code Examples

Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit Documentation
Overview
The Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit is a powerful and versatile development board that combines the ESP32 microcontroller with Wi-Fi, Bluetooth, and audio capabilities. This board is ideal for IoT projects that require wireless connectivity, audio processing, and microcontroller functionality.
Features
ESP32 microcontroller with Wi-Fi and Bluetooth capabilities
 Dual-mode audio codec: I2S and PCM
 Supports WiFi 802.11 b/g/n/e/i and Bluetooth 4.2
 Onboard audio amplifier and speaker
 Multiple GPIO pins for expansion and customization
 USB port for programming and debugging
 Breadboard-friendly design for easy prototyping
Code Examples
### Example 1: Wi-Fi Audio Streaming
This example demonstrates how to use the Elecrow ESP32-A1S to stream audio from a Wi-Fi connected audio source to the onboard speaker.
```c
#include <WiFi.h>
#include < ESP32_A1S_Array.h>
// Wi-Fi credentials
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
// Audio streaming URL
const char audioUrl = "http://example.com/audio_file.mp3";
WiFiClient client;
ESP32_A1S_Array audio;
void setup() {
  Serial.begin(115200);
// Connect to Wi-Fi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
Serial.println("Connected to WiFi");
  Serial.println("Starting audio streaming...");
// Initialize audio codec
  audio.begin();
}
void loop() {
  // Connect to audio streaming URL
  client.setServer(audioUrl, 80);
  client.println("GET " + String(audioUrl) + " HTTP/1.0");
  client.println("Host: example.com");
  client.println("Connection: close");
  client.println();
// Read audio data and send it to the audio codec
  while (client.available()) {
    char c = client.read();
    audio.write(c);
  }
delay(1000);
}
```
### Example 2: Bluetooth Audio Receiver
This example demonstrates how to use the Elecrow ESP32-A1S as a Bluetooth audio receiver, connecting to a smartphone or other Bluetooth device and playing audio through the onboard speaker.
```c
#include <BluetoothA2DP.h>
#include < ESP32_A1S_Array.h>
// Bluetooth device name
const char deviceName = "ESP32-A1S-Audio-Receiver";
// Audio codec
ESP32_A1S_Array audio;
void setup() {
  Serial.begin(115200);
// Initialize Bluetooth
  BluetoothA2DP.begin(deviceName);
// Initialize audio codec
  audio.begin();
}
void loop() {
  // Wait for a Bluetooth connection
  if (BluetoothA2DP.available()) {
    // Read audio data from Bluetooth
    int bytesAvailable = BluetoothA2DP.available();
    uint8_t buffer[bytesAvailable];
    BluetoothA2DP.read(buffer, bytesAvailable);
// Send audio data to the audio codec
    audio.write(buffer, bytesAvailable);
  }
}
```
### Example 3: IoT Voice Assistant (using Wi-Fi and Audio Capabilities)
This example demonstrates how to use the Elecrow ESP32-A1S to create a simple IoT voice assistant that can connect to a cloud-based voice service, recognize voice commands, and respond with audio output.
```c
#include <WiFi.h>
#include <ESP32_A1S_Array.h>
#include <VoiceService.h>
// Wi-Fi credentials
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
// Cloud-based voice service API key
const char apiKey = "your_api_key";
// Voice service instance
VoiceService voiceService(apiKey);
// Audio codec
ESP32_A1S_Array audio;
void setup() {
  Serial.begin(115200);
// Connect to Wi-Fi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
Serial.println("Connected to WiFi");
  Serial.println("Initializing voice service...");
// Initialize voice service
  voiceService.begin();
// Initialize audio codec
  audio.begin();
}
void loop() {
  // Record audio input from the microphone
  int16_t audioBuffer[256];
  int bytesRead = audio.read(audioBuffer, 256);
// Send audio data to the voice service
  String response = voiceService.recognize(audioBuffer, bytesRead);
// Play audio response
  audio.play(response);
}
```
These examples demonstrate the basic functionality of the Elecrow ESP32-A1S Wi-Fi+BT Audio Development Kit. With this board, you can create a wide range of IoT projects that leverage Wi-Fi, Bluetooth, and audio capabilities.