Requesting Feedback on PCB Design for ESP32-C3, Sensors, and SIM808 Module

Hello everyone,

I’ve been working on a PCB design for my project, and I would appreciate any feedback or recommendations you can offer. The design includes:

  • ESP32-C3 for control and communication
  • SIM808 module for GPS and GPRS with SIM card support
  • MLX90614 for temperature measurement
  • MPU-9250 accelerometer
  • APDS-9960 proximity sensor
  • Power management using TP4056 for LiPo battery charging and switching between external power and battery

I've attached the schematic and PCB layout below. I am particularly interested in feedback on:

  1. Power supply stability, especially for the SIM808, as I’ve included components for USB/battery power switching.
  2. Any suggestions to optimize power consumption (using ESP32 deep sleep, etc.).
  3. Ensuring proper communication via I2C between the ESP32-C3 and the sensors (pull-up resistor values, etc.).
  4. Antenna placement and routing for SIM808 (GSM and GPS antennas).

Looking forward to your insights!

Thanks in advance for your help.


It looks good to me. The only thing I would suggest is adding some high-frequency decoupling around the SIM808.

Why are you using three separate I2C buses? Why not have all sensors on the same bus? Is there some kind of inherent address conflict that cannot be resolved?
The pullups are on the weak side but on a board as small as this will likely be OK. I'd drop them to 3k3 though.

image
Why not use a Schottky diode here with a lower forward voltage drop? This one leaves your AMS1117 starved. Dropout voltage is up to 1.3V for this type; this means you need 4.6V input for reliable 3.3V output. The selected diode leaves roughly this, maybe slightly less, and if your USB voltage happens to be slightly lower than 5V it'll become a marginal affair for sure.

image
What's the purpose of R2?

image
How does the 1pF of C14 relate to the parasitic capacitance of the associated traces and pins/pads? 1pF is awfully little; the traces between the ESP32 and the antenna circuit seem awkwardly long; refer to a commercially made ESP32 board to see how it's done. Also refer to the datasheet of your antenna chip for layout guidelines. It seems like your design violates all recommendations.
In all honesty, I'd recommend using an ESP32 module that already has the antenna included on its PCB. This saves you the trouble of undertaking a tricky bit of HF design. Your own design may not work at all, or may have very poor range, and/or may be inadvertently very directional.

image
Are you sure you want to power the SIM808 from battery even if USB power is available?

Where are the decoupling capacitors for the SIM808 module?
Where are the 22R series resistors between the SIM808 and the SIM card module?
How have you determined correct physical layout of the antenna circuit on the SIM808? Where are the matching components as described on page 53 of the datasheet?
Points above: see SIM808 datasheet

The PCB layout I find hard to read. I'm wondering why you have components on both sides. Is there a space constraint that forces you to do this? Even so, are you sure it won't fit all on one side? There's a lot of empty space. Component placement in general I feel is far from optimal and in some cases (where it concerns RF) in violation of guidelines laid out in datasheets of components used, does not appear to keep into account tuning of antenna circuits etc.

Keep in mind when mounting somewhat bigger parts (battery holder, sim card holder) on the bottom of the PCB, this may affect the possibilities of physically mounting the PCB into its housing; clearance can become an issue.

Your power traces are very thin. They'll work in principle, but best practice is to make them a little heavier. Go with 1mm or heavier wherever this is physically possible. An ESP32 with radio on can draw several hundred mA. The SIM808 can draw peak currents of 2A. I see no provisions on your board for these peak currents.

Add some buffer capacitance on the board; 47-100uF should be OK. Near the USB connector would be a nice spot. Use an aluminum electrolytic.

Overall, there's much room for improvement. But I also think you're biting off far more than you can chew by working on a board that involves several RF circuits that require specialized knowledge w.r.t. component selection, physical layout. I suspect you also do not have the equipment required to perform the necessary testing how well your RF designs function. Instead of this bare-metal approach, I would recommend using ready-made modules for the RF parts so that you can rely on pre-made circuitry that can be safely assumed to perform well.

As suggested, I think that you could use the ESP32-C3-WROOM module from Expressiff instead of the bare chip, it will make your life a lot easier and reduce the risk of bad performance. The antenna, xtal and the rest is in the module and properly designed, and it's small and compact.

Check in the datasheet, section 9 "Peripheral Schematics" for the correct placement of the rest of components. I the section 8 you can also see what is inside.
And read carefully all the recommendations in the datasheet. Don't put any component or GND plane below the antenna. But I would fill the bottom layer with a solid GND plane and remove everything what is possible from there.

How do you plan to program it? You could use D+, D- from the usb connector, as suggested in the datasheet. Then you woudn't need a TTL adapter.

Regarding power consumption, the AMS1117 has a quiescent current of 5-11 mA, what is too much for sleep mode. You could find another LDO with quiescent current below 1mA, or it will drain the battery faster.

And the p-mosfet U5 to disconnect the battery when the USB is connected, is correct. But I think that you should tie the gate to GND with a resistor, ~ 10KΩ. Otherwise when the USB is not connected, the gate would be floating and maybe the mosfet is not fully conducting.
EDIT: I see that it's already there.
And the gate resistor, R5, could be smaller 200Ω or 300Ω.