Schematic / PCB Check

Hi

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.

Here's the pdf

And an image of the schematic:
ChiggyRoom

And an image of the PCB:

I've uploaded the project on github as well.

Hi chiggy,

What is it supposed to do?

Can you post the schematic as a picture file or pdf? Just make sure it got a decent resolution.

  • A GND pour on the bottom is good, on the top is not necessary.
    Cross-unders should be shortened and strapped.

  • The I2C pull-ups could be lower value, also suggest you add jumper option to place them in play.

  • Suggest add the option of having manual switches on the EN an IO0 pins.

  • LDO capacitors are ceramic ?

  • Confirm 2102 RST’ is not floating ?

  • You are powering TOF, DHT22 etc. with 5v, the ESP is 3V3; where is level translation ?

  • Adding a heartbeat LED would nice.

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.

Did your schematic pass the ERC and your PCB pass the DRC?

Reminders to run the DRC?

  • Op needs to regroup . . .

  • Please confirm your trace widths to us.

If my vision works, it's pin 3 = GND.

  • OP should add vias to bottom GND pour. (as mentioned, get rid of top pour)

Hi! I've attached an svg image as well as the pdf link of the schematic in the original post. Attaching them again if they are not visible

PDF: https://drive.google.com/file/d/1wYrpqakGsiq1XudowP2NlmguCJ8T6Jqp/view?usp=drive_link

Image: https://drive.google.com/file/d/17A7AsToTtjIPKtC3qkjj-SyAx2tqPkLt/view?usp=drive_link

Hey! Is top fill an issue in my PCB design? Or like is it generally avoided? if so, why? :sweat_smile:

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 :sweat_smile:

uhh?

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.

  • Watch Time 42:00 onwards:
  • Low ESR MLCC ceramic chip capacitors are best. (22uF)
  • 4.7k is often used with 3V3 I2C
  • RST’ is LOW true, tie it HIGH thru a 10K.
  • 5mil for traces, 20mil for power 5v/3v3 is often suggested.
  • Add vias to bottom GND pour.

Call me stupid but that seems, funny :joy:

  • 5mil and up for signal traces
  • 20mil and up for power 5v/3v3 is often suggested.

1mil = .001” = 0.0254mm

I watched the video, thanks!
But I still have a doubt, wouldn't having a top ground fill help with noise and/or EMI reduction?

  • 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.

Hi, @chiggy
Welcome to the forum.

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?

Tom.... :smiley: :+1: :coffee: :australia: