This library will utilize the SPI output of the ES321 chip to form a digital audio interface according to EBU tech 32502. The code has been testet on the LilyGO TTGO-T display3 and the ESP32 D1 R32 UNO from Wemos 4.
The code has been developed in Microsoft Visual Studio VS2019 with the Visual Micro5 extension but it is fully compatible with the Arduino IDE6. Tested with version 1.8.9 Installation of arduino IDE and the TTGO-T can be done by following the procedure described at Joen's code snippets pages3 and the development board can be bought from various sites on the internet. Visual Studio can be downloaded directly from Microsoft's homepage7;
Download the library in zip format.
Open the dropdown menu Sketch and pick Include Library, Add zip library and select the file in the dowload directory.
Search for ESP32 and install esp32 by Espressif Systems version 3.0.5
Open AddLibrary from the task bar and install library from zip and re-scan under vMicro-General.
In the AES.h the digital audio pins are assigned and the output samplerate. Please note. The assigned samplerate is two times the audio samplerate because of the bi-phase mark encoding[¨2]. GPIO_NUM_26 is the serial data output and leave the other pins un-connected. A FrameFlag is defined to pin 17 but any pin can be used.
The specification calls for a ballanced 300 Ohms or 50 Ohms un-ballanced out. The output impedance of the native pin of the ESP32 is approximately 10 Ohms so adding an external resistor of 39 Ohms in series with the pin will satisfy the requirement for impedance matching and protection of the ESP32 output
The sinetone generator can be found in the example/basic folder or in the dropdown Example list under AES3.
The sinetone generator has been tested with a FFT Analyzer8 on the DK-Technohogies9 DKT7.
- Channel Status
Please contact me if you like to contribute10.
Updated Oct.10. 2024 to be compatible with esp32 by Espressif Systems version 3.0.5
Footnotes
-
EBU Standard Tech 3250-E 2004. ↩
-
Pinout for the Wemos D1 R32 [https://bpb-ap-se2.wpmucdn.com/blogs.auckland.ac.nz/dist/9/698/files/2021/08/2_Pinout_D1_R32.png] ↩
-
Visual Micro (https://www.visualmicro.com/). ↩
-
Arduino IDE (https://www.arduino.cc/en/software). ↩
-
Visual Studio (https://visualstudio.microsoft.com/downloads). ↩
-
Fast Fourier transform (https://en.wikipedia.org/wiki/Fast_Fourier_transform). ↩
-
DK-Technologies (https://www.hansens.dk/); ↩
-
Contact: Karsten Hervoe Hansen khh@hansens.dk ↩