🌈 ESP32-S3 Rainbow: ZX Spectrum Emulator Board! Get it on Crowd Supply →
View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

I spun some tiny WCH boards at PCBWay around an 8‑pin MCU (48 MHz, 16k flash, 2k RAM) to beep tunes off a coin cell. I tried hand-soldering, then used my paste-dispensing PCB printer—expired paste still worked great. Standby sips under 8 µA, but it locks out programming; a WLink flash wipe rescued me. Wake draws ~3.3 mA, and audio peaks hit ~130 mA (~13–14 mA average), which browned out the coin cell. A tiny 80 mAh LiPo with a TP4056 (modded to ~100 mA) proved the design, then swapping the buzzer’s base resistor from 1k to 10k tamed it to ~56 mA peak and just over 7 mA average—coin cell friendly and still loud. I’m bit-banging audio for now (PWM/timers later). I also made a quick MIDI-to-note tool and a one-bit SFX generator. These boards are heading into my next project—stay tuned.

Related Content
Transcript

I decided to have a go with these WCH
MCUs and I got some boards made up by
PCB way. They came out pretty nicely.
These are Lisk 5 MCUs. The version I’m
using has a massive 16k of flash and a
monumental 2K of RAM. It runs at a
whopping 48 MHz. That’s quite a step
down from our usual ESP32 boards with
their dual core processors. I picked the
smallest package. It’s an 8 pin chip
with six GPIO pins. I didn’t bother with
a stencil this time as there’s not many
components, so I went with the uh
soldering up technique. This did go
okay, but I always forget just how
fiddly it is soldering under the
microscope. Then I remembered I got a
PCB printing machine that also dispenses
solder paste. I’m actually pretty amazed
at how well this came out in the end.
The solder paste I’m using is almost 3
years past its best before date.
Each board has an MCU and a small buzzer
driven by a transistor. In the final
version, it will also be driving a
couple of LEDs. My plan is to power
these boards from a coin cell battery.
So, let’s have a proper look at how much
current is actually required. I am using
standby mode. This device goes into a
very low current mode, just under 8
micro amps, which is pretty amazing.
There is one thing that I have found
with this. When the board is in standby
mode, I can’t actually program it. I
tried adding a delay on startup to give
me time to hit the program button, but
that didn’t seem to help at all. And for
a while, I thought it completely bricked
my MCUs. Then I found some instructions
online on how to wipe the flash using
the WLink utility. This gets us back
into a clean state that we can program
again.
When we push the button on the device,
it wakes up and starts to draw around
3.3 milliamps. When the music starts to
play, we really start to draw some
power, spiking up to almost 130
milliamps, but we do only average 13 or
14 milliamps. I am using a very low mark
to space ratio on my audio, so only draw
current for a small amount of time.
However, it is too much for the coin
cell and the device hits brown out
almost immediately. We sometimes get a
small little squeak, but it pretty much
dies straight away.
Now, I do have a backup plan using this
absolutely tiny lithium cell. This is an
80 mAh cell that I’ve charged up using
my trusty TP 4056 charger. I’ve modified
this so it outputs a charging current
that’s a bit more sensible for one of
these tiny cells around 100 milliamps.
Wiring this up, we get more than enough
juice to power the board and play the
music, but I would like to get it
running from a coin cell.
So, I’ve got a board here where I’ve
swapped the 1k base resistor for a 10k
one. Let’s have a look at how much
current this draws.
So, that’s much more reasonable. 56
milliamps and on average just over 7
milliamps. This version works nicely
with the coin cell and plays all the way
through and it’s still plenty loud
enough for my purpose. I’m not being
very efficient with the audio playing. I
am just bit banging the audio on a
signal on the GPIO pin. There are better
ways to do this using PWM and timer
interrupts, but I didn’t quite have time
to get that working. It doesn’t sound
too bad for one of these tiny buzzers.
It’s pretty good. To get the audio, I
knocked up a quick tool that will load
up a MIDI file and then you can export a
track in a very simple structure that my
code can play. It just gives you the
delay before the note, how long the note
should last, and what the period of the
note is in in microsconds.
I did think about going old school and
doing some chip tune work, but then I
realized it was also way beyond my
skills and I couldn’t get it to work.
However, I did put together a quick
one-bit sound effect generator. You can
just copy and paste the code from this
and it will play some really
entertaining sounds. So, I might use
this to build a little soundboard at
some point. I’ll be using these boards
in my next project, so stay tuned.
[Music]
Heat. Heat.
[Music]
[Laughter]
[Music]
[Laughter]
[Music]


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts