Learn how to modify a custom PCB for an ESP32 walkie-talkie project, including exposing spare GPIO pins, freeing up the DAC pin, saving GPIO pins for the microphone and amplifier, and wiring up the shutdown pin on the amplifier for low power mode.
[0:00] For the walkie talkie project, I made a custom PCB to hold the ESP32 dev board, the I2S amplifier and the I2S microphone.
[0:08] I also added a power filter for the microphone
[0:11] to help eliminate the noise we were getting when transmitting over WiFi.
[0:15] The board works really well, but there are a few things that need improving.
[0:19] The first slightly annoying omission that I made
[0:22] is that I didn’t expose any of the spare GPIO pins.
[0:25] This makes the PCB great if you only want to do an audio project
[0:29] but not very good if you’ve got other peripherals you want to connect.
[0:32] I’ve worked around this partially by using these very long headers, but it’s not ideal.
[0:37] The second thing I want to fix is that I’ve used pin 26
[0:41] this is one of the only two pins on the ESP32 that can be used for Digital to Analogue Conversion
[0:46] so I’d like to free it up for other projects
[0:49] The third thing I want to improve is based on a comment from YouTuber TheRoscop13
[0:54] He’s pointed out that I could save some GPIO pins by using the same pins for the microphone and the amplifier board.
[1:01] And the final thing I’d like to do
[1:04] is wire up the shutdown pin on the amplifier board
[1:06] so it can be put into low power mode.
[1:09] Let fix all these issues.
[1:11] But first I’d like to thank the PCBWay for sponsoring this video
[1:15] PCBWay offer PCB Production
[1:18] CNC and 3D Printing
[1:20] PCB Assembly and much much more.
[1:22] They are great to deal with and offer excellent quality, service and value for money.
[1:26] Check out the link in the description.
[1:28] So let’s get on with the modifications.
[1:31] The first thing I’ll do is change the net ports to make them generic and remove the unneeded ones.
[1:38] I also need to add the SD line for the amplifier board
[1:42] this is really confusingly named as the two microphone boards use “SD” for serial data
[1:48] on the amplifier board, this is actually the shutdown and mode control pin.
[1:53] It combines a bunch of functions including selecting which channel the amplifier is on and selecting low power mode.
[2:02] With both the amplifier and microphones wired up,
[2:05] I can add the header for the remaining GPIO pins.
[2:09] I also find that I’m constantly running out of power and ground pins when hooking things up.
[2:14] So I’m going to add another header dedicated to this.
[2:17] This will give me 3 lines hooked up directly to the battery,
[2:20] 3 3v3 lines and 3 ground lines.
[2:25] With this all done we can update our current PCB and lay everything out again.
[2:31] The first thing I’ll do is hide the ground plane using “fn+shift+m” so we can see our traces more easily.
[2:37] I’d quite like to try and keep the board size the same as the existing one
[2:41] so I’m going to shift everything up to make room for the new headers.
[2:50] I’ll un-route all the existing traces as they are mostly all incorrect now.
[2:56] And I’ll switch off the ground net as this will be handled by our ground pours.
[3:01] We’re now ready to put down the tracks.
[3:06] I’m fairly easy in which pins are used for interfacing to the boards,
[3:09] so I’m quite happy to move them around to make the layout a bit easier.
[3:18] That’s all the signal lines wired up,
[3:21] I’ll add in the power lines now.
[3:24] I’ll make these a bit thicker than the signal traces.
[3:27] For the microphone power supply, this isn’t really important,
[3:30] but for the amplifier, it’s quite good as it can draw quite a bit of current when playing at full volume.
[3:36] 30 mil traces should be sufficient for our use case.
[3:40] I’ll also wire up the power header while I’m down in this part of the circuit board.
[3:45] With the VCC net complete, I’ll wire up all the GPIO pins.
[3:50] Once again I can see some simplifications by moving around pins.
[3:54] And now that I’ve started to wire it up, it feels like it would be much better to swap the power and GPIO header over.
[4:02] After a bit of position tweaking, our layout is almost complete.
[4:06] We can re-apply our copper pour and that should hook up all our ground nets.
[4:10] There is a slightly weird bug where the vias seem to forget which net they belong to,
[4:15] so I just need to set them to GND again.
[4:19] I also need to clean up the connections on the power headers from when I moved them.
[4:25] We’ll hide the ground pours using to make it a bit easier to see what is going on.
[4:31] And now with all done we have all our nets connected and we don’t have any DRC errors.
[4:37] I’ll just add a few more vias to stitch the two ground together.
[4:40] And to neaten things up I’ll redo the copper areas.
[4:44] I often find that leaving a layout for a few hours or even overnight triggers some thoughts
[4:50] and when you come back in the morning or a few hours later there are always some tweaks to make to your layout.
[4:59] In this case, after a nights sleep,
[5:01] I decided that I didn’t really need to make the board exactly the same size as before
[5:05] and making it a bit taller would let me label the GPIO pins.
[5:09] I think this is pretty important in any dev board, so I’m going to do it.
[5:14] I’m pretty happy with this layout now,
[5:16] a quick visual inspection to double-check that everything is wired up as it should be
[5:20] and we’re ready to submit the PCB to PCBWay
[5:23] We’ll download the Gerber file.
[5:25] And then we use the “PCB Instant Quote” option and click on the “Quick Order PCB” to upload our Gerber file.
[5:32] With the Gerber file uploaded, most of the options are set up for us
[5:36] and we can just click the Calculate button before proceeding to checkout.
[5:40] That’s it done
[5:41] this order will take a bit longer than usual as I’ve bundled it up with a board that is being SMT assembled.
[5:46] But normally you’ll get your PCB within 1-2 weeks depending on shipping.
[5:51] Thanks for watching!
[5:52] we’ll be putting this board to good use in some upcoming projects
[5:55] so don’t forget to subscribe and check back.