I'm looking for perfect audio DAC for ESP8266/ESP32
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
As all Crowd Supply orders are shipped and delivered to respective backers (thanks every single one of you!), I'm listing Loud ESP on Tindie as well. Price is the same as CS or Mouser, but if you're in Europe, delivery probably will be cheaper from Tindie. That's because I'm myself live in Europe.
Looking forward to hear from any of the backers on their projects and use cases.
Having all preparations ad testing done, our campaign is finally live! Financial target is really modest, but enough to push the price down to $30 for mini version, including all taxes, fees and charges.
Last week before campaign I spent porting nice [Visualizer](https://github.com/donnersm/TwinVisualizer) project created for Teensy boards, and having some cool visualisations on the screens same size and resolution as mine.
Code is not processing audio just yet, rather visualisation-only proof-of-concept. But final result is just as appealing, as the prototype. So I leave it to better coders to actually attach it to fft-processed audio stream.
To support my Crowd Supply launch I've decided to promote ESP8266 version of the board via Tindie store. This board is a baby version of ESP32 design, lacking some features and having much smaller power house. I consider it 'just enough' for smaller projects, like talking gadgets or sound boxes, left alone speechless visual projects that can start talking with this board.
All funds received will go for ESP32 version development, which I hope will see the daylight, as long as the project pre-launch will receive enough subscriptions. Having that said I'd like to ask again everyone to subscribe to Crowd Supply campaign, I'm really keen to release it to backers and see the projects it can host.
Just wanted to mention that I'm starting preparations for Crowd Supply campaign. Actually some work already performed and pre-launch page is live now. Currently I'm collecting subscribers that would be the basis for price and volume calculations, and if there is an interest for the board in the first place.
I'd appreciate if everyone interested in this board to see daylight would subscribe, mainly because only high enough volumes would allow to keep the price reasonably low.
I've decided to run funding campaign for this project with Crowd Supply. I did it before with another project of mine and it went well. This means among other things a huge to do list for me, including finalizing design (and feature list accordingly) and working on thorough testing and validation.
Closing feature list is the most complicated for me, since it is always so tempting to add few more bells and whistles here and there. Good method in that case is implement something myself and check what is missing and what is not used along the way. Following that path I've came to conclusion that I need mini board - this designed to be placed inside all kind of smart speakers and therefore has no screen and generally take considerably less space.
I introduce to you ESP Audio Development Board Mini
And the second project would be more sophisticated speaker based on ESP32 version of the board and great cspot repo which implements Spotify speaker on ESP32 chip.
To house this project I've bought Logitech iPod speaker (that what we've called smart before). It has no use in today's standards and anyway it is sold as broken and I couldn't care less if it was possible to fix it.
First I need to disassemble it and I did a monkey job of it and broke a couple of parts on the way, but in the end it is showing it's internals
Here is the original PCB, it goes to spare parts box
When I've tested MAX98357A module before in this project, I came to conclusion that it is only capable to produce moderate quality audio for non-demading projects. Funny enough I couldn't be more wrong about it.
While performing audio tests with the development board shared in the previous post I got the same scores, quite disappointing audio quality with hearable distortions. Datashees was much more optimistic on the chip's performance, so I sit to play around with some components to see if I can make it play better. Since there are not so many components to play around with, I started poking around output filters.
Originally I put output LC-filters similar to Adafruit's module as on the picture above. Not very happy with the result I revisited MAX98357 datasheet and found that it does not require any output filters apart from the speaker itself service as LR filter
So out of curiosity I've removed the filters altogether and funny enough DAC started to produce clear audio! Below is waveform with no filters (taken from toy-oscilloscope, sorry again)
1KHz
Based in the investigation done in this project I've decided to build series of development boards with audio capable DAC, starting from the ones with built-in amp. Since I already have in mind a kind of project I'd like to implement (no spoilers) i also planned some advanced peripheral on the board to support those projects.
To be fair I've done both ESP8266 and ESP32, since in my opinion they are both great chips and being similar on the paper, they are in a quite different league if it comes to power reserves, therefore they are not really competing. For smaller projects I prefer simplicity of ESP8266, for larger projects - spacier ESP32.
I'm using them both quite regularly, so why not to have 2 development boards instead of one.
With that said, here they are.
ESP8266 closer look
ESP32 closer look
So commonly they have
- Stereo DAC with built in amp (2x MAX98357)
- Power circuit with backup Li-Ion battery (using built-in battery holder or external using battery socket)
- Battery charging IC and battery overcurrent protection IC
- Battery voltage measurement with built-in ADC
- Boost converter to keep the music going when battery voltage is too low
- TFT screen (with touch support on the ESP32)
- USB-serial bridge for normal flashing and serial debugging, with auto-flashing circuit
- IR reciever to support IR remotes
- Micro SD-CARD socket
Given the extra pins on the ESP32 is exclusively has
- RGB led on the board and connector for the external RGB LED strip
- PSRAM
- Joystick OR rotary encoder
- Few HW touch pads
- JTAG header for real debugging
Currently I'm testing all the peripherals and doing some small improvements. Also I've adopted cspot repo to play Spotify as a smart speaker, and looking into adding visual feedback to above project. I want to put it into the case, for that purpose I've bough broken smart speaker and planning to replace internals with my dev board. More details in the next post (hopefully).
At one point I've decided to create ESP-32 based web-radio in the case of old classic radio.
This one I've bought for around 50 euros, it wasn't working obviously, and frankly didn't bother to fix it. From one point I'm not a big fan of AM, from the other it has a very peculiar schematics, it runs from mains directly without input transformer of any kind. If you push the socket in the "right" direction all metal parts will be live, so decided I wouln't want to have that anywhere in the house near children playing with screwdrivers.
Going back to the project. I've forked Ka-Radio32 repo, which is a ready to use wifi radio project. What I needed to do is to add HW definition of my board, and more importantly add TAS5805 amp support, since this is the amp I have on the board.
With that done it is relatively easy to fins some space within the box for new board and remote control receiver. Also I've connected power-on switch from the radio itself, and put IR receiver under the front panel
And the final result is below.
I've decided to take stakes a little higher and prepared bigger version of previous prototype. New one used Texas Instruments TAS5805M DAC, which is a big upgrade actually
- It have high power stage, producing up to 23W per each of 2 channels (yeah!)
- obviously it requires more than 5V over USB, so i had to redesign power circuitry completely.
- it requires I2C additional to I2S to communicate and few GPIOs to report it's status.
Because power stage took a lot of PCB space, screen went other side of the board for now. On the bright side, i could take a larger screen, since i have plenty of space now.
So all together it is quite a different beast and I'm trying to find time to write firmware to get it started even. I get Ka-Radio32 firmware working on both prototypes and it works brilliantly on PCM5102 version. Currently working on TAS5805M addon to jump start the big thing.
To play more with best DAC found so far i preapred and ordered custom PCB. This uncludes ESP32 module socket, power converter for PCM5102, and DAC itself. Just for fun also added 8 sensor buttons, IR reciever and OLEd screen. For now no specific plans, just made audio part produce sound and looking for specific project to drop in
And yes, i switched to ESP32 now. Having experimented a little, i see that single core ESP-8266 is not capable to handle wifi and mp3 audio decoding on single core. One way to go around that is to use external mp3 decoder, another it to use more cores. Second option looks more fun to me.
For now flashed great ESP32_MP3_Decoder to start with. It plays internet stream smoothly, and audio quality is great, as far as i can tell.
And last note. For this one i used 10uF ceramic caps instead of tantal ones. Normally they are not recommended for audio applications due to piezoelectric effects, but as far as i can tell, they are just good enough. I can't tell a difference, that is all that matters to me
Create an account to leave a comment. Already have an account? Log In.
Mike, that's great idea, board has plenty of both flash and RAM, I see no reason for it not to support micropython. I'll try to take a look if I'd be able to run it on the board.
Hi Mike, just tried play_tone.py example on the ESP32/micropython v1.18, works like a charm. Just had to update pinout. On the esp8266 on the other hand I'm failing to install micropython altogether and about to give up.
Right on ! For the esp8266 there isn't much point in trying Micropython as the esp8266 port doesn't have any I2S support.
It would be interesting to include the ESP32's on board native DAC channels in the comparison, against the additional discreet components. I'd love to know if the existing ESP32 (no additional cost, circuits or wiring) DACs would be as good.
This is quite a neat comparison.
Will you be testing the PCM1808 in the future?
Also, considering your graphs, have you considered an alternative firmware for the toyscope? There's DLO-138 open source FW for the DSO-138 which sends the samples over UART. Here's the git repository for it: https://github.com/ardyesp/DLO-138
I also made recently a simple script to acquire and plot this data in a neat form: https://github.com/HummusPrince/DLO-138_plotter
It does make your graphs much better looking, and also much less cumbersome to acquire. You'll also be able to analyze the signal with more than the eye, if you'd want to :)
Hi,
As far as i can see PCM1808 is an ADC, I'm looking for good cheap DACs at this point. So no plans to include it.
And thanks for the DLO-138 tip, I definitely will go for it.
Whoops, I missed it. And already bought some to sample (pun not intended). Oh well.
Become a member to follow this project and never miss any updates
I just saw your pre-announcement on Crowd Supply. This is a great looking project. Congratulations! For the programming side, I was wondering if you have considered the option to use MicroPython on these new boards? Since July 2021, MicroPython supports I2S on the ESP32. If you would like to investigate this option, please take a look at a Github repo that I maintain -- it has fully worked and tested code examples, showing how to use I2S on MicroPython with various hardware platforms, including the ESP32. The MAX98357A device is one of the devices that are used. Perhaps this is something to look at? Good luck with your launch! Mike
https://github.com/miketeachman/micropython-i2s-examples