Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Sonatino – small audio dev board based on ESP32-S3
64 points by sonatino 2 days ago | hide | past | favorite | 39 comments
Hi!

My name is Ben, and I recently updated my audio dev board "Sonatino" after receiving a lot of good feedback from the initial launch a year ago.

I began working on this after building a few projects that required audio capabilities. I was getting tired of wiring up external DACs and amplifiers to ESP32 boards, so I decided to look for a more compact, integrated solution. The available options either had larger footprints, non-standard connectors, or features that I didn't typically need for my projects. That's when I started working on a custom PCB that could be a sort of "audio swiss army knife". The result was Sonatino.

Some have criticized the use of a DAC and ADC that support HD sample rates and bit depths, especially when other factors will limit the usefulness of anything over 44.1kHz/16-bit audio. I actually agree - HD audio in this context is mostly overkill, but most modern audio chips support it and it's entirely optional. My primary goal was for the ADC and DAC to be easy to use - no I2C configuration required (like many of the CODECs available). It needed to be easy to use from an Arduino programming environment. The chips I selected (from Cirrus Logic) were a good fit; they just also happened to support higher sample rates / bit depths.

The latest revision drops the built-in antenna in favor of an external one. It also has a better speaker amp (3.2 W), an RGB LED, and improved power circuity. It's been a fun little board to work with!

https://sonatino.com/

Check it out and let me know if you have feedback. Price is currently higher than I'd like, but that's a result of it being manufactured at low volumes.






It’s kind of sad how many electronic hobbyists complain about price for these small production run boards.

It’s way too easy to think “I can get 10 PCBs for $5, and the total BOM for this is only X on LCSC - what a rip off!”

This ignores:

Assembly costs, Shipping, Taxes and duty

And then when you actually sell something:

Packaging costs, Distribution costs, Platform fees, Things getting lost in the post, Refunds, Etc…

A good rule of thumb is that you need to charge at least 3x your production cost to actually make any profit at all.

And all this ignores the actual time that’s invested…


Absolutely. Coming from a software background, it's been eye-opening for me just how quickly those costs add up. And how painfully slow it can be to iterate.

I wouldn't be doing this if I didn't just enjoy making stuff. I probably won't break even for a long time, and even then the margins aren't great.

If you deploy to production and it goes live in a matter of seconds or minutes, be grateful you're in software :)


How does this stack up against a Teensy? The rev 4 is ~$24, and the audio shield is ~14, so that clocks in at about 75% the price of the sonatino. Looks like the sonatino picks up more flash, wifi (at the cost of an antenna, though), ble. AFAICT the teensy is limited to 44.1/16 but can do up to 16 channels, but doesn't 'officially' support the adc for audio in. Looks like teensy ends up with another addon board for a PT8211 dac...

At this price point an arduino due seems like maybe a better comparison. The Due has 16 analog inputs, 2 DACs, bluetooth, but no wifi, no sd card, and no amplifier. And of course it's a much larger form factor.

Hm. It's a narrow niche - compact, battery, speaker amp, audio in/out, wireless - and you need to want at least half of those for this to really justify the price - but might be a good board when a pi is overkill. Even so, I just yesterday finished an esp8266 / max98357 build; yeah, wiring up the six pins on the max is not as convenient, but then again a d1 mini and the max are both less than $3 apiece, and $6 is a far cry from $50. (Note the max98357 is the same amplifier present on the sonatino).


Teensy 4.1 uses an imxrt MCU - a crossover chip that is considerably fast. The ESP32 is slow in comparison, more aligned with IoT applications than realtime processing.

Looks like a nice package. And the website is clean and nice. I would recommend including some projects/demos there also. Cause most people in the target audience are prospective makers - they want to make something like A,B,C. The ability to do that is what you are _actually_ selling :)

Any idea of how many bits of signal to noise ratio you're getting? It usually takes pretty careful board design, extra ground planes on the board, and awkwardly large capacitors to clean up power supplies in order to get more than 10- to 12-bits of signal to noise ratio.

Good question! I haven't gotten around to proper SNR testing, but I'm planning to do that. The board design has undergone quite a few revisions and improvements based on my own perceptual tests along the way. I've done my best to follow best practices and recommendations, but the size of the board (which was a priority) does limit how much can reasonably be done. If you're looking for audiophile-level performance, you'll probably want to consider other solutions :)

Looks cool. How is the input/output latency on this? For example if you were to use it as an effects processor (which would use both input and output), or a MIDI keyboard controlled synth/sample player (output only)? I had a Mod Duo which I stopped using due to the quality of the sounds/effects not making the latency it had worth it.

For reference, I currently use a Motu M2 which gets roughly 3ms in, 3ms out at 128 bit buffer size and 6ms in 6ms out at 256 bits. The 3ms out is fine, but when I get to 6ms out I start to notice the lag when playing virtual instruments from a MIDI keyboard.


The most common DSP used for Sound OpenFirmware (SOF) is based around a Tensilica DSP. I've beenn curious if the Tensilica esp32 chips might be a natural port for this code... https://thesofproject.github.io/latest/introduction/index.ht...

Annoyingly if you do have a real DSP you seemingly need Cadence's proprietary XCC compiler to use the Xtensa HiFi SIMD instructions. But given that these probably aren't available on these host cpus anyways the gcc build is probably just fine!

Would be cool to have some of the tip top DSP software actually usable. Alas SOF kind of gets to the last quarter mile then drops dead, isn't generally usable, it feels like. But something like this might perhaps make a somewhat interesting way of getting close-ish.


Can the developer or any Rust users comment on using Sonatino with the Rust ESP32-S3 toolchain?

Is there an SVD file defining the Sonatino's specialized peripherals so one can use rust2svd to create a Peripheral Access Crate (PAC) specific to the Sonatino? I'm interested in the other ergonomic Rust HAL representations as well.

https://github.com/esp-rs/esp-pacs/tree/main/esp32s3

https://github.com/rust-embedded/svd2rust

https://github.com/rust-embedded/awesome-embedded-rust?tab=r...


That sounds cool, right on.

But I don't really agree with those people who insist that 44.1/16bit is all you need.

I do all my audio work at 48k/32-bit float. There is a reason for this: it's to avoid clipping when you are doing destructive effects. With 32-bit you can spike above zero-db but still preserve the curve of the waveform, and bring that spike back down under zero-db before you render.

Not sure how this impacts your board or your use-case, but I wanted to point this out. It's probably overkill in your context.

I convert everything to 48k/32-bit, even when I am ripping from AAC video, converting mp3s, whatever.


The overhead to do the conversions to and from your preferred format on the CPU isn't really significant enough to impact performance. And even on highest quality DACs, you're really only getting 22 bit integer precision out of the ADCs and into the DACs regardless of how the samples are represented. And on cheap ADCs and DACs, it's common to get only 10 or 12 bits of signal to noise ratio.

Totally agree though, that 16-bit isn't enough for guitar effects.


Thanks for your comment! Yes, there is a place for higher sample rates and bit depths - especially for authoring content and playback on high-end systems. As you mention, real-time effects can also benefit.

I could have worded what I said better; I don't think people are arguing it's never needed, just that on a small board like this (with limited space for more filtering, isolation, balanced inputs/outputs, etc), other factors can somewhat limit the usefulness of higher sample rates and bit depths. That said, the audio quality has been great for the things I've done with the board.


I don’t see how your 32bit float argument applies to codec specs, since you can only get a 24bit signed int from/to a codec. You’ll need a limiter to convert floats to ints either way, 24bit or not.

> I convert everything to 48k/32-bit, even when I am ripping from AAC video, converting mp3s, whatever.

Assuming the mp3 files originated from music CDs, isn't converting from 44.1k to 48k destructive?


Same. You can render out to 44.1/16 really well but it's not a good format to work in.

The thing I have bookmarked for when I get to try some audio projects is this "Daisy" board [1].

Other than the MCU difference (ARM Cortex-M7 vs ESP32), I wonder if you are familiar with it and can talk more about the differences. From afar, it seems like the Daisy has a bit more muscle while being cheaper ... but raw processing power is not always the whole story!

Thanks!

--

1: https://electro-smith.com/products/daisy-seed?variant=452342...


I've seen Daisy before but never tested it personally. Looks like a nice board, and if it covers what you need, go for the more economical option!

For me, it comes down to convenience and connectivity. Sonatino has WiFi, BLE, a built-in 3.5mm jack, integrated amplifier (for a small external speaker), and battery charging. I was building some toys and interactive audio/art projects (example: https://hackaday.io/project/191186-sax-a-boom-clone ), and Sonatino made it really quick to get up and running.


Have you ever noticed the complete lack of good options for unlicensed two way radios under $300 or so?

Seems like this could be a perfect platform for intercoms, with the right firmware.

2.4Ghz LoRa might be better, but ESP-Now seems like it would be a perfectly good walkie talkie.

If there was an end-user-ready version with a speaker, a mic, and a display, it could probably replace a lot of audio related devices, but even as is it seems perfect for a mesh belt pack intercom.


This seems useful for me. It's out of inventory at Amazon, so am unable to see the price.

I am looking for 3+ audio input channels at 24 bits each, synchronized capture. Can this help?

Thanks.


True 24-bit (146db SNR!) capture is rather difficult to do. You need to be very careful about layout and noise reduction. I can suggest the https://www.cirrus.com/products/cs5304p/ if you want to build one, though.

Yes, I understand I won't hit that SNR.

Thanks for the part recommendation. :-)


The ESP32 has two I2S peripherals, so 4 channels with afaik a max resolution of 32 bit. I suppose you can run them off a common clock, but I‘m not sure.

Do you need analog inputs? This board has two input channels and two output channels via on-board DAC / ADC.


Yes, I need analog in.

If it used a TRRS jack instead of a TRS jack and an esp32 (not the S3, which does not have a DAC) then it could also output video from these projects:

https://github.com/rossumur/espflix

https://github.com/rossumur/esp_8_bit

https://github.com/bitluni/ESP32CompositeVideo


I don't know anything about audio jacks, but on the Docs page, there is an image, where the audio jack is labelled as "3.5mm TRRS Audio Jack".

Purchased! I've recently been poking around with two audio-related esp32 things I might use this for: Home Assistant Assist via ESPHome, and audio streaming with esp-adf (Espressif's official audio development framework). Excited to try out your board! With the high quality DAC I'll probably end up making this into an audio streamer board for our office.

Interesting, but at this price range we're overlapping something like Raspberry Pi 4 which has significantly more compute power.

I'd like a very cheap WiFi 2-way audio device that one could use like an "Alexa / Echo" sort of thing against a self hosted (LAN) powerful server that can do all the STT, TTS, audio streaming, etc. locally. Does that exist already?


Looks great! Have buyers used it to create a Wyoming Satellite? A write-up of such a project would help gain a lot of traction, as Home Assistant users are using S3Box and M5Stack boards now and feeling like they're not getting good quality result.

That hardware look much better than the feature-full but buggy (the board not the chip) ESP32-A1S board that I have used to build a toy synthesizer (monophonic 2 "flute" voices , multitap delay and fuzz, controlled by MIDI-BLE).

In what way is it buggy? I was eyeing the A1S.

Buggy might be a strong term but some io are weirdly multiplexed and the switch are terribly bouncy and prone to spurious interrupts. The A1S module are OK it's the ESP32-A1S-AudioKit board that somewhat problematic, at least the one I received from Amazon.

This looks very useful to get started prototyping a few project ideas I have! Seems like Amazon link is US only though? Are you planning on selling in EU anytime soon?

It kind of depends on demand. So far I've been doing fairly small production runs to test the waters (and I'm still new to selling physical products; I'm a software engineer by day). If sales pick up, I'd love to start selling it in Europe.

This looks great, would have loved this back when I was doing audio stuff on the ESP32. There were no good compact options. It is a bit on the expensive side tho!

It is expensive. Perhaps if demand is high enough, the production becomes cheaper?

Can they be linked together to do multi-room synchronized audio play back?

[flagged]


Please stop posting low effort LLM summaries of HN text posts. It doesn’t add anything to the discussion and is literally spam.

This reads like an AI generated text :/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: