I'm a CS student with interest in circuit building and electronics. I have some basic knowledge and understanding of circuits, but this time I wanted to make a PCB of my project. I've attached a PDF and an Image of the schematic and PCB I built in KiCad.
My Project consists of an esp32-wroom-32 as the microcontroller, to which I connect:
DHT22 Sensor - For temperature and humidity sensing
IR Led
SCT013-030 AC Current Sensor
Towerpro SG90 Servo Motor
IR Receiver TSOP-38238
Either Time of Flight sensor or Ultrasonic Sensor - I'm not sure which would be more suited for my usecase as well as cost less, so I just added a common sort of connector which would work regardless of what I use. For the ToF Sensor, I'm looking at the GY-530 VL53L0X and for the Ultrasonic sensor, its US-100
I've added a USB C receptacle so it could be powered and programmed via that. For the sensors, I was planning on using JST headers and wires to connect them. A lot (most?) of the schematic stuff related to the ESP32 was taken from the esp32 schematic.
Since this is my first time properly planning and making a PCB, I'd like to learn about any mistakes I made as well as improvements I can make in both the schematic and the PCB.
Don't put vias in pads unless thay are required for thermal purposes.
Trace the shortest ground path from the voltage regulator to the USB connector, see where it goes.
Hey! Is top fill an issue in my PCB design? Or like is it generally avoided? if so, why?
Sure I can lower the value. How low should it be?
As per the schematic attached, I have a manual button which grounds EN pin but havent added one for IO0 pin. Could add it yes.
There are two capacitors connected to the LDO, C4 and C7 (ref schematic). C7 is Tantalum Capacitor as is present on the ESP32 Devkit board. For the rest of the capacitors I think I'll go with ceramic caps? (I havent gotten to that part yet)
2102 RST' (RESET not) is NC'd as per the schematic. Do I need to pull it high or low? I checked the datasheet of 2102 and didn't notice that.
Good catch! Seemed to have missed this. How can I go about adding this?
That would be nice indeed. I could have a look into it. Thanks for the idea!
Seems like I messed those up when retracing some paths, mb
The default trace width was 0.2mm, but I bumped up the traces carrying 5v and 3.3v to 0.4mm. In some places with space issues I had to set trace width to 0.32mm, but thats the thinnest power trace I remember adding.
Those were traces I added to connect to the ground fill.
On a 2 layer board, a top GND pour doesn’t solve any problem; in fact it can cause many noise problems.
It is more important to not break the bottom GND pour with traces.
If bottom traces are needed, add strapping to the top to mend the bottom GND cuts.
Zero ohm resistors can be used to stitch over bottom traces.
Keep bottom traces as short as possible too.
Avoid bottom islands not properly connected to GND.
If you were using a 4 layer board, the inner layers do solve noise situations.
Think about where most traces are when you have a lot of SMD. A bottom GND plane is more logical then. Consider U1 and the GND pad, you can do some vias directly to GND. Also connect pin 3 to the pad, and run the rest more freely.
You can implement something like this (this design is not complete, connectors and other components are missing) ESP32_Files.pdf (293,8 KB) ESP32_3D.pdf (909,9 KB)
Note: To view the 3D design, you need to download the ESP32_3D file and open it with Adobe Acrobat.
Your schematic is fine for PCB layout, but not to read how you circuit is constructed.
Connecting wires and including the DHT, IR Tx and Rx etc would also help.
The servo, what are its specs and have you made sure you have enough power to drive it?
To me it looks like you are powering it from the USB power.
Can you tell us what your project is supposed to do?
Have you bread-boarded it to prove the circuit works?