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.