View All Posts
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

In this video, I explore the functions of my newly arrived little boards - essentially a PCB that an esp32 S3 room module can be connected to. I put the board's voltage regulator, battery charger, and a 3 watt class D amplifier to the test, and damn, they work perfectly! I even use breadboards, connecting them together to facilitate a wider workspace. I gave the pcbs a spin, conducting sanity checks to ensure full functionality. With a successful battery charge and impressive voltage measurements, my PCB's are up to the challenge. I also dabble in some circuit jargon, explaining schematics, amplifiers, battery chargers and a clever mosfet approach. To top it off, I solder on an ESP32 module and prove that yes, it actually works. Stay tuned for a following video where we'll work with a speaker and display!

Related Content

[0:00] it’s alive it works there’s nothing more
[0:03] satisfying than a blink sketch my new
[0:05] pcbs have arrived from PCB way these are
[0:09] little boards that I can connect an
[0:10] esp32 S3 room module 2. they’ve got a
[0:13] voltage regulator battery charger and a
[0:15] 3 watt class D amplifier this is the
[0:18] first version and there’s definitely
[0:19] some improvements that can be made I’ve
[0:22] also got these adapter pcbs that I can
[0:24] solder my board onto and plug into a
[0:26] breadboard that you may be thinking
[0:28] that’s way too wide to fit on a
[0:30] breadboard but people often forget that
[0:32] you can connect multiple breadboards
[0:33] together and make yourself a very wide
[0:35] breadboard so let’s have a look at the
[0:38] pcbs and see if they actually work so
[0:41] I’ve plugged it into a USB Supply and I
[0:43] just want to do some sanity checks on
[0:45] the on the board to make sure it works
[0:48] before we solder on an esp32
[0:51] so these two top pins here should be
[0:54] ground so I will put one of our probes
[0:57] on the ground pin
[0:59] and this should be 3.3 volts
[1:02] so you can measure that got 3.3 and then
[1:06] the enable pin should also be 3.3 volts
[1:10] so I also want to just check what’s
[1:13] happening on the battery charger
[1:15] so we can um probe the battery pins
[1:19] um it’s moving around a bit that’s
[1:21] probably because we don’t have a battery
[1:22] connected
[1:24] so what I’m going to do next is solder
[1:26] on a battery and we’ll see if it
[1:28] actually charges up without any problems
[1:31] so let’s do that next
[1:33] so we’ll just turn these two wires and
[1:36] put a bit of solder onto the pads and
[1:39] these should just easily Reflow and
[1:42] we’ll have our battery connected so
[1:44] there we go battery is connected now if
[1:47] all things are working we should still
[1:49] be getting 3.3 volts so let’s double
[1:51] check that ground pin and that should be
[1:55] and that absolutely works so that’s
[1:57] pretty impressive quite pleased so far
[1:59] so good so let’s see if our battery
[2:02] actually charges well we’ve got a red
[2:06] light
[2:07] uh that should mean our battery is being
[2:11] charged let’s try and rearrange this
[2:14] this we can actually measure the voltage
[2:17] out of the battery so there we go
[2:19] battery is charging up nicely
[2:25] so I’ll leave that charging and we can
[2:28] see it’s um drawing about 200 milliamps
[2:31] which about right given the resistor I
[2:34] used so let’s leave that for a while and
[2:36] see what happens
[2:37] okay charging is complete the LED has
[2:41] turned blue
[2:42] and we can see the current has dropped
[2:45] down to well practically nothing really
[2:47] so let’s measure our battery voltage I
[2:50] also found these uh
[2:51] find verbs which makes it important yeah
[2:57] so our battery is fully charged up so
[3:01] that’s great should still have 3.3 volts
[3:03] so let’s double check that
[3:08] so there we have our ground pin
[3:11] and our 3.3 volt pin so that’s pretty
[3:14] promising let’s have a look at this
[3:15] schematic and then we’ll get a module
[3:17] soldered on there’s really not much to
[3:19] say about the USB connection we’ve got
[3:22] two 5.1 K resistors on the CC1 and cc2
[3:25] lines these will let us put potentially
[3:27] three amps at 5 volts from our USB power
[3:30] supply assuming it can actually provide
[3:32] it the amplifier schematic is also
[3:34] pretty straightforward we’ve got its
[3:36] decoupling capacitors and the only thing
[3:38] really special is this resistor which
[3:40] should switch it into a mode where it
[3:42] takes the Left Channel and mic channels
[3:44] and mixes them together the battery
[3:46] charger is the classic
[3:48] tp4057 chip the only exciting thing here
[3:51] is that I use the dual color led to
[3:53] indicate charging and standby mode I’ve
[3:55] done a bit of bomb optimization by using
[3:57] 5.1 K resistors pretty much everywhere I
[4:00] can get away with it it’s probably made
[4:02] very little difference to the total cost
[4:03] but it’s kind of fun the interesting
[4:06] part for me on the schematic is the
[4:08] power circuit I basically borrowed this
[4:10] from The Unexpected Maker’s tiny S3
[4:12] schematic this solves a really
[4:14] interesting problem we need to take
[4:16] power from either the USB Supply or the
[4:19] battery and we need to stop the USB
[4:21] going straight to the battery or the
[4:22] battery feeding power back into the USB
[4:25] now an obvious way to solve this problem
[4:27] is to use two diodes to isolate the
[4:29] supplies and that’s what I’ve done for
[4:31] the supplier to the amplifier ISO
[4:32] foreign a normal diode is not really
[4:35] suitable for this a 0.6 voltage drop on
[4:38] our battery’s nominal voltage of 3.7
[4:40] volts takes it down to 3.1 volts and we
[4:43] want a system voltage at 3.3 volts now
[4:46] an obvious solution is to just use a
[4:47] shock key diode they’ve got a low
[4:49] forward voltage and that is what I’ve
[4:51] done for the supplier to the amplifier
[4:53] IC but if we look at the data sheet for
[4:55] the shock key diode we’re using we can
[4:57] see that the voltage drop is
[4:59] surprisingly High when we’re drawing a
[5:00] lot of current at just 200 milliamps the
[5:03] voltage drop is typically 500 millivolts
[5:05] and our esp32 could draw up to 500
[5:08] milliamps when it’s using Wi-Fi or
[5:10] Bluetooth so the voltage drop could
[5:11] actually be quite a bit higher our low
[5:13] Dropout regulator needs 190 millivolts
[5:16] Headroom so even the shock key diode
[5:18] isn’t going to do it for us so let’s
[5:20] have a look at the very clever mosfet
[5:22] approach and see how that works our
[5:25] battery is controlled via a p-channel
[5:27] mosfet looking at the datasheet for the
[5:29] mosfet we’re using we need to make an
[5:31] educated guess at what the RDS
[5:33] automobile be our battery is going to be
[5:35] around 3.7 volts so our vgs should be
[5:38] between these two rows so around 0.3
[5:40] ohms if we’re drawing 500 milliamps that
[5:44] will give us a voltage drop of 150
[5:46] millivolts with our 3.7 volt battery
[5:48] we’ll have 3.55 volts left for the ldo
[5:51] giving it 0.25 volts to play with which
[5:54] should be plenty there are some quite
[5:56] clever things about this circuit when
[5:58] the USB is connected we have 5 volts on
[6:01] the gate so the p-channel mosfet turns
[6:03] off power fuse into the system via the
[6:05] diode and it can’t reach the battery
[6:07] because the fet is turned off and the
[6:09] body diode of the fat is reverse biased
[6:12] if the USB is disconnected then the Gate
[6:15] of the mosfet is taken Low by this
[6:16] pull-down resistor at the same time the
[6:19] battery voltage can flow through the
[6:20] body diode taking the source of the
[6:22] mosfet High we now have a negative gate
[6:25] Source voltage which turns our p-channel
[6:27] mosfet on letting the full battery
[6:29] voltage through to the system the diode
[6:31] on the USB Supply blocks this from going
[6:33] back through to the USB port it’s a very
[6:36] elegant and clever circuit we can check
[6:38] it actually works by probing in the
[6:40] voltages on the source of the mosfet
[6:42] with the USB disconnected the battery
[6:44] voltage comes through and with the USB
[6:46] connected we have the USB voltage minus
[6:49] the diode drop which is quite small as
[6:51] we aren’t drawing much current and if we
[6:53] check the voltage of the battery it’s
[6:55] completely fine there’s no USB power
[6:57] coming here
[6:59] so let’s get the module soldered on and
[7:01] we’ll see if it actually works now I
[7:03] could manually solder the module onto
[7:05] the board I’ve done this before but it’s
[7:07] a bit fiddly so instead I’m going to try
[7:09] and use my mini hot plate we’ll apply
[7:11] some solder paste to the pads I’m really
[7:13] not sure how much to put on and this is
[7:15] probably way too much
[7:18] and then we’ll just position the module
[7:20] in place
[7:23] since we’ve got components on the bottom
[7:25] of the board I’m going to use the
[7:27] breadboard adapter to lift the board off
[7:28] the hot plate I’m hoping that the heat
[7:30] will transfer through it and it will get
[7:32] hot enough
[7:33] well it does work I had to bump the
[7:36] temperature up quite a bit which was a
[7:37] bit worrying as I don’t want to damage
[7:39] the components that are already on the
[7:40] board but the solder paste has all
[7:42] melted we’ve got some reasonable results
[7:44] there’s a couple of solder Bridges
[7:46] caused by too much solder paste but
[7:48] that’s easily fixable with the soldering
[7:50] iron on closer inspection I think I’ve
[7:52] done a pretty reasonable job everything
[7:54] seems to be connected nicely I’m
[7:56] actually quite surprised now before
[7:58] putting this anywhere near my computer I
[8:00] want to check the current draw ideally
[8:02] I’d hook this up to a current limited
[8:04] Supply but I don’t have a lab bench
[8:06] power supply if there’s anyone watching
[8:07] who manufacture them get in touch
[8:10] everything does seem good we’re not
[8:12] drawing too much current at all it’s
[8:13] looking pretty promising
[8:15] well I’ve plugged it into the computer
[8:17] let’s see if we get any USB devices
[8:19] showing up and we do this is looking
[8:22] very very promising I’ve got a simple
[8:25] blink sketch here and it uploads our
[8:28] module is fully functional and what’s
[8:30] more the LED actually blinks this is a
[8:33] resounding success I’ve got a video on
[8:36] minimal Dev boards and what you can
[8:37] strip off and still get away with on the
[8:39] screen right now but this video is now
[8:41] pretty long so we’ll check the speaker
[8:43] and connect up a display in a follow-up
[8:45] video thanks for watching

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


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