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.
I spent some time lately playing with Home Assistant. What can I say, it is brilliant. So easy to use with ESPHome integration and so many nice things you can implement with ease.
One of the things I didn't realize, is how easy it is to use ESP Audio docks and Loud ESPs with Home Assistant. It is a 2-minute job to onboard the device to the system, and then you can use it for playing audio or doing voice announcements.
So far I've implemented
- 'Announce hour' automation that is super helpful in the home office
- For similar reasons 'Cuckoo clock' but also just for fun
- Integrated Google calendar to announce the next meeting one minute in advance
- Mopidy 'What is playing' monitor with remote volume and playback control + IR controls for the same
Anyway, the details are here, if you want to follow my steps
Loud-ESP can be described as a universal tool that can be used for a bunch of occasions. You can feed audio either from cd-card or internet stream, you can control it via IR or button, you can visualize it on the screen or LED bar. You rather have a lot of choices about what to make of it.
Even though I'm not too strong in software, I was constantly thinking what kind of project I'd like to do myself using all capabilities of Loud-ESP
Streaming services have a lot to offer, and for devices such as Loud-ESP it is actually a replacement for UI (you have a phone to pick your tunes, no need for buttons). Also they would take care of music sources, as long as the internet is available. Screen is nice to have, but again you have everything you need on your Spotify app.
At this point I started to get rid of the peripheral that I don't really need, giving up sd-card, battery management (I personally don't move speakers around at home) and even screen. I replaced it with an aluminum case that gives that finished look and feeling that it is no longer a development board but a product. At this stage Loud Esparagus was born, which follows the Loud-ESP in many hardware aspects, but much more focused as a consumer product.
Another major change coming was obviously the DAC, which had to be upgraded to something more capable. MAX98357 used in the Loud-ESP is a great little IC, but to drive a large speaker you have to bring more power, and here TI has many options to offer, in fact that are basically own the market. It was not a hard task to find the one DAC that has the right input, the right power and the right level of support.
Last piece of the puzzle was to address those that already have amps at their homes (As I do). Perhaps they already use it with different sources and don't foresee a need to change it. Esparagus Hifi Medialink is the last board in the series that brings streaming capabilities to dumb old amps. It has line level output via Hi-Fi (and I mean it) DAC and can be connected to your beloved audio gear to prolong its life in the 21 century.
Summarizing, you have a HiFi version that you embed into your existing setup, adding modern sources to aging hardware. Then you have Loud Esparagus, that is not way too powerful, but combined with small speakers can enlive a small room or work place. And there is Louder Esparagus which would be a full scale media center you usually find in the living room (or dorm) with relatively large speakers.
I passed the formalities necessary to actually start a Crowd Supply campaign to support production of the Esparagus series boards.
If you're a hobbyist maker it is actually very hard to produce these small projects in small volumes, because of fundamental costs of initial development. When you know in advance what kind of volumes you should expect to produce, it is much easier to build up an adequate price for the unit.
Public campaigns also help to understand if a product is finally ready for a launch, as adding improvements and new features is a never-ending effort. At some point you have to say "Although it's not perfect, it's sufficiently near".
I invite everyone interested to subscribe to campaign updates, as in coming weeks I will need to work hard to finalize the design and prepare for the production run, which will strongly depend on the community interest.
Recently few people contacted me regarding support of squeezelite-esp32. I did some test long ago, and it felt like LMS is a nice piece of software and had few cool features for it's time, but frankly feels out of loop in 2023.
Well, I was wrong. Today it supports both Apple AirPlay and Spotify Connect, not mentioning Bluetooth connectivity. Actually for ESP32 power house that is much more than you'd expect. Especially the Team working on Squeezelite-ESP32 is actually spent some good time working on stability and [using it for a few days] so far I had no crashed or weird behavior.
Long story short, guys confirmed me that it is okay to pre-flash Squeezelite-ESP32 before selling them, as well as simply advertise it's support.
I put step-by-step instruction to help others to setup Squeezelite-ESP32 on the project's github, and welcome everyone to give it a try.
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).
Use Squeezelite-ESP32 installer to flash firmware first.
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