Skip to content

Latest commit

 

History

History

pcb

Electronics and PCB

See the assets directory for screenshots of the schematics and PCB.

Component Choices

The combadge is built around an ESP32-S3-WROOM-1.

I chose it because:

  • It has hardware I2S and touch support
  • It is well-supported by the Arduino toolchain
  • It is cheaply available in my region

Sound

I've chosen to adopt I2S peripherals for this project, as they promise better audio quality than their analog counterparts, while reducing the amount of analog circuitry I have to design. The ESP32-S3 supports two I2S peripherals in hardware.

Microphone

I've zeroed in on the Knowles SPH0645LM4H-1. Any similar microphone ought to do the job.

I use the INMP441 for prototyping because it's available as a module. I would have stuck with it for the PCB, but it seems to be discontinued by the manufacturer.

Speaker

The Taoglas SPKM.10.8.A seems like an adequate speaker for the job.

A MAX98357AETE+T class D amplifier drives the speaker. It's what I use to prototype.

Power Management

The unit runs on a lithium-polymer battery. Exact model and size undecided as of now. It will be one of the usual 3.7V LiPo cells. All the chosen components of the combadge operate on 3.3V. I was hoping to find an all-in-one charging and voltage-regulating IC, but my searches yielded none for these parameters.

Charging is handled by an MCP73831. A 300mA TLV74333PDBVR LDO linear regulator provides 3.3V power. A TLV431AQFTA-based circuit conditionally disables the regulator for battery over-discharge protection.

PCB

The PCB has been designed in KiCAD.

PCB

  • Footprints are chosen to be as large as possible where applicable, to facilitate hand-soldering or rework.
  • The PCB has headers to which battery and speaker wires can be soldered.
  • Certain measurements can be seen in the User.Comments layer.

This project makes use of the official Espressif ESP32 KiCAD libraries.

You will need to change the paths to the third party symbols in the library and footprint managers. I've just plonked everything in a gitignored folder called third-party.

Notes

Crackling on speaker

When I was prototyping, I was powering everything off my computer's USB port. The INMP441 microphone module worked well, but the MAX98357 with no power supply filtering was horribly noisy. Some beefy electrolytic capacitors reduced the noise, but did not eliminate it.

The root cause of the noise turned out to be the fact that I was powering the speaker through the AMS1117 3.3V regulator on my ESP32 dev board. The regulator could not handle the current spikes demanded by the speaker, so its output voltage ended up dropping. Hooking the speaker up directly to the USB 5V line (VIN on my particular dev board) solved the issue.

The PCB has been designed such that the amplifier is powered directly by the battery. There are also some large low-transient-response-time ceramic capacitors for any bursts of energy components may need.

SPH0645LM4H woes

The SPH0645 is known to have some quirks in its I2S interface, to do with the synchronization of the clock and data signals. In addition, the signal it outputs has a weird offset from 0.

The required workaround for the first problem has been successfully implemented and the second is more of an annoyance. Nevertheless, a future board revision may be better off with a more standard-compliant microphone like the ICS43434.

Power stability during battery-less operation

The MCP73831 datasheet specifies a minimum value of 4.7uF for a capacitor across the battery side (C2 here) for stable supply when the battery is disconnected. This is enough for the ESP32-S3 to boot, but not enough for more current-demanding tasks like turning on WiFi. Future board revisions should have more and bigger capacitors to avoid brownouts when testing without a battery.