Clock Radio
Analog Filtering
So let's talkg about ANALOG FILTERING and how I fucked this up.
IT'S ALIVE!
Definitely some audio distortion. I’ll have to track that down.
ESP32 and MicroSD
Got the ESP32 in and much to my relief, it works without issue. :)
Build Jig
I think this is the thing I'll be using the 3D printer most for. Just building jigs and small tools to help out with assembly. This is just a stand to hold the board while I work on it. It's got cutouts for the testing stuff hanging off of it, which works for both orientations.
Light Guide
I’m taking apart more bits of the clock radio that I’ll need. This is an open air light guide for the backlight. Three LEDs shine on a 45deg slope, and down onto this parabolic reflector to give even illumination. All from a piece of white plastic.
CP2102 Scavenging
This is the fastest way to get a CP2102 chip right now.
Battery Protection Bypassing
The resistor I thought was important in the BMS is irrelevant (at least as far as I can tell). Looking at documentation for the compatible and far more common DW01, the part that measures the current is the voltage across the MOSFETs. So it depends on the Rds(ON) of your MOSFETs.
Power Conversion
On the flip side of the board is the 5V step up. This is an identical circuit to what I used in the POWER PAK v2. The MP3414A delivers efficiency and way more current capacity than this board needs.
Battery Protection and Charging
Finally got some time to work on building the clock radio board.
Screws!
So... remember when I was talking about screw holes? I think the problem is that the screws I was using were not, in fact, M2 screws. They were M2.5.
Boards Are Here!
I’m gonna say that’s close enough.
Pixel Fonts
Did a little pixel font work. Just a blocky 5x5 font that looks good on a low-res display. Had a dickens of a time getting this video. Something about how the OLED refreshes was playing havoc with the autofocus. Had to use AF lock and set the exposure manually.
OLED Display Wiring
There’s not much I can do before the boards arrive Monday so I figured I’d square away the wiring on the display.
Testing 3D Printed Screw Holes
Doing some test prints to see how accurate screwholes are.
Boards Finished
I think I've finally got the clock radio board where I want it.
Volume Potentiometer
Jumpers mean never having to say you're sorry.
Karaoke!
I'm in the design stage where I sit and stare at the design and try to figure out why it won't work. Self-review, I guess.
MicroSD Jack and Mute Circuit
Parts came in. One of the things I wasn't sure about was this micro SD connector. It's a Molex part but the documentation is unclear about how the card detection works. See if you can figure it out.
Initial Board Design
USB-C jack
Doin' some whittlin'.
ESP32 DTR/RTS Boot Selection and Reset
The DTR/RTS boot programming is actually worth talking about. The ESP32 and friends enter boot mode by pulling a GPIO low on boot. Inspired by the Arduino method of using the DTR signal to reset the chip, ESPs have an even weirder method to control both an IO pin and the reset line.
Parts
I just ordered parts for the clock radio. Somewhat optimistically, as I haven't finished the board layout. Stocks are dwindling faster than they're replenishing, and it's looking like if I waited until I finished, some of these parts might not ship until late November.
Speaker Specs
I looked up the specs on the speaker.
Battery Test Fit
Doing some test fitting. It seems like there’s baaaaaarely enough room to fit an 18650 where the radio coil used to go.
Active Audio Filtering
I love the engrish you find on some electronics sites.
- High gain—when there are many the transistor so many gains.
- Easy—just add two resistors you so a good audio amplifier.
- Inexpensive—Now IC is low price than a transistor in the same working.
OLED Display Works!
Trying Bluetooth Again
With the proper ESP32, Bluetooth A2DP works!
Bluetooth
So the C3 only supports Bluetooth LE. It can't do regular Bluetooth Audio.
Well that pretty much kills that idea. I'll have to use the regular ESP32.
Testing OpenMPT
Hm. I don't think OpenMPT is going to work.
ld: DRAM segment data does not fit.
ld: region `dram0_0_seg' overflowed by 111504 bytes
Testing libXMP
So what I'm learning about libxmp is it's not designed for memory constrained systems.
FLAC Decoder Test
Something... has gone wrong
Project Goals and the ESP32-C3
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?
MP3 Decoding with Helix
It’s kinda working!
Sine Wave Glitches
So I've been struggling with this I2S thing for a bit. It just isn't working properly. It seems like it's almost working but not quite. I can see something that looks like a sine wave but it's all glitchy.
Glitch Sounds
So I was trying to play a sine wave over I2S and I accidentally made some sort of generative soundscape.
I should probably read the datasheet but this is too cool.
SD Card Hacking
So I'm connecting a SD card socket to my ESP32-C3 dev board, just to see if I can do some basic SD card reading. The SD library doesn't really explain what pins to use but there are designated pins for SPI so I connect it to those. Doesn't work.
Switch Matrix
I'm mapping out the buttons, switches, mounting holes, etc. on this main board so I can design a replacement. I thought it was going to be awkward to use three more individual GPIOs for the three buttons on the main board, when the buttons on the bottom board are conveniently matrixed.
ICF-C713 Power Circuitry
I’ve been poking at the power circuitry on this clock radio. I’m not totally sure how it works but it’s different and interesting.
I picked up a clock radio...
I picked up a clock radio at a garage sale last weekend. Here it is, partially reassembled for demonstration purposes.