Clock Radio

Project Goals and the ESP32-C3

Wed Sep 29 2021 14:58

This project started with me wanting to make a bluetooth speaker in a clock radio. I figured why not use an ESP32? And if you're going to use that, why not add more features?

The current feature list:

If I can do all of that with the weaker ESP32-C3, I'll do it since it's cheaper and I'll be able to say I have a RISC-V powered clock radio. And by "cheaper" I mean it's $2 a module instead of $3. Any ESP32 is stupid cheap — It's really just about the RISC-V cool factor. I figure if I can play FLAC (requiring the most I/O bandwidth) and complex tracker files (requiring the most CPU) that validates the prototype.

The C3 doesn't have any external RAM, so I think I've got like 384K to work with. I might not be able to like, play audio and run the HTTP server at the same time.

The other problem with the C3 is it's only available in two kinds of modules - a castellated version with the same footprint as the old ESP8266-WROOM-02, and a super tiny SMD reflow only version. And both of them only have 15 GPIOs available. Two of those are either USB or UART. Three pins for I2S. Four pins for SPI. Two more for I2C. I'm probably forgetting a few. But anyway that would only leave four pins, not enough to drive the button matrix. So I'll have to add some secondary device to handle that.

Yes, three pins for I2S. I've recently discovered you can omit the bit clock signal on I2S with this DAC, so that saves a pin. The CS4334 will recover the bit clock based on the master clock (probably a feature of most I2S DACs these days).

A regular old ESP32 has like 22 I/Os and four more that can do input only. Really, smart money says use the ESP32. But I want to build a RISC-V system.