Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESP32-A1S and esp-adf
#1
Hi.

Some of you might have noticed, that you can now buy ESP32 boards with I2S codecs, and even ESP32 modules with integrated codes (ESP32-A1S).
To support audio functions, including mp3 and aac file playback and streaming, as well as cloud services, there's an audio SDK called esp-adf.

You might imagine, that adding those functions to Micropython would be really cool.

What I don't know (yet) is, how the audio SDK differs from the standard SDK, and why EspressIf put the audio functions into a separare SDK at all.


Also, I don't know, how hard it would be to add I2S and audio decoding to Micropython.

What I've done so far, is compiling the examples for the AIThinker A1S development board.

I guess it would be possible to start a FreeRTOS task from Micropython, that handles audio decoding and playback.

Any thoughts?
Reply
#2
Thanks for the info. I didn't realize this hardware was available. I only found 1 place atm that is selling a complete dev board on Aliexpress see https://www.aliexpress.com/item/ESP32-Aduio-Kit-WiFi-Bluetooth-module-ESP32-serial-to-WiFi-ESP32-Aduio-Kit-audio-development-board/32947719301.html?ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10130_10547_319_317_10548_10696_10924_453_10084_454_10083_10618_10920_10921_10922_10307_537_536_10131_10132_10133_10059_10884_10887_100031_321_322_10103,searchweb201603_51,ppcSwitch_0&algo_expid=2757f056-031d-422f-9f71-bafa3f35f33e-6&algo_pvid=2757f056-031d-422f-9f71-bafa3f35f33e

They r a little more expensive than other dev boards but obviously they have a lot more hardware on the board.

Can you answer a couple of questions on the above board I posted? It states that it has a uart plug but it looks like a USB plug and it looks like a CP2104 uart to usb bridge next to it, can you confirm it has usb? Also I see stereo speaker plugs and it appears there is a little amp chip next to the plugs, can you confirm that you can juts plug speaker striaght into the plugs without needing external amp?
Reply
#3
That's exactly the board I have.
I bought it from Seeed Studio. They don't sell it anymore, but they still have a page with all the links:
https://www.seeedstudio.com/Ai-Thinker-A...-3160.html

Yes, it has a stereo speaker amplifier.

The upper USB port is for the USB to UART bridge, that also has the usual reset and programming circuitry, but doesn't supply the board.
The lower one is only for 5V supply. Background is apparently, that standard USB ports, that can only source 500mA, may be too weak to power both the ESP32 and the amplifier, so you should use a separate USB power supply (phone charger or such).

So far, I can play mp3s from the SD card, and stream internet radio over WiFi.
Reply
#4
What's the battery circuits like? I assume it uses a 1S Lipo (3.7v).

Does it have circuits for converting the bat voltage?? If so what sort linear or switching and buck or boost or both??

Does it have charging circuits or do u need to charge external?

How many amps does the bat need to be able to supply to run everything?
Reply
#5
(11-29-2018, 09:13 AM)OutoftheBOTS Wrote: What's the battery circuits like? I assume it uses a 1S Lipo (3.7v).

Does it have circuits for converting the bat voltage?? If so what sort linear or switching and buck or boost or both??

Does it have charging circuits or do u need to charge external?

How many amps does the bat need to be able to supply to run everything?

You can look at the schematic.
Here is the ESP32-A1S Product Specification.

BTW, I'll start working on the audio MicroPython module soon.
Reply
#6
(11-29-2018, 10:22 AM)lobo Wrote:
(11-29-2018, 09:13 AM)OutoftheBOTS Wrote: What's the battery circuits like? I assume it uses a 1S Lipo (3.7v).

Does it have circuits for converting the bat voltage?? If so what sort linear or switching and buck or boost or both??

Does it have charging circuits or do u need to charge external?

How many amps does the bat need to be able to supply to run everything?

You can look at the schematic.
Here is the ESP32-A1S Product Specification.

BTW, I'll start working on the audio MicroPython module soon.

Thanks LoBo.

So if I am reading the schematic correctly there is a battery charger and a buck converter that can converter either the 5v from USB or the battery voltage down to 3.3v

I have never tried to put a lower imput voltage into a buck converter, what will happen when the battery falls below 3.3v, will it still run??
Reply
#7
It is not clear from the schematic which switch converter chip is used.
Swithing step-down converters usualy have Under-Voltage Lockout (UVLO) implemented, which shuts down the output if the input is below some voltage.
For example, MP2315, I'm using most often, has the falling threshold of 3.25V, which means it should work if the battery voltage is above this value.
UVLO has some hysteresis, and after lockout, it will start operate when the battery voltages reaches 3.9V.
Reply
#8
I am a little surprised they didn't go for a 2S battery then you wouldn't have the Under-Voltage Lockout problem and the battery would handle the current requirements to run the amps better.

They also haven't put a voltage divider on to an ADC pin fro a battery monitor either.

I have also noticed they didn't include a pot on the amps for volume control but rather software is the only way to control volume.

Still it is am amazing bit of hardware. I would buy 1 but an super bogged down in a number of projects atm and can't justify buying anymore hardware ATM
Reply
#9
(11-29-2018, 10:22 AM)lobo Wrote: BTW, I'll start working on the audio MicroPython module soon.


What are you planning to do?
Using the routines from the esp-adk, or your own ones?

Most i2s codecs require configuration via i2c, the adk takes care of that, if you choose the right board via menuconfig.
But that also means, that you can't change that configuration later.

I think it would make sense to use the C i2s routines from the adk, but let the user do the codec configuration via Micropython, respectively provide python drivers for different codecs.

The buck converter is a SY8089, that runs from 2.7V to 5.5V. Undervoltage lockout is 2.5V.
Reply
#10
the onboard dacs are fairly awful and the esp32 only downfall.
pyboard 1.1 has 12 bit and i2s but too expensive
so I will wait for i2s micropython esp32
arduino already has i2s on the same board working. so its not hardware but software
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)