I cannot connect to clients over bluetooth with my ESP-C3. I program with Arduino and can scan and list nearby clients with success (BLE/Scan example), but I can't connect to my iPhone app BLE Scanner (for this I used BLE/Write arduino example). BLE scanner just reports connection time out. I read in a few forums, connecting to a client requires much more precision (frequency/crystal, voltage ripple, etc), than just listing nearby clients.
I then checked the power rail with an oscilloscope, and saw periodic ripple when bluetooth was active. I see 3 rather large dips, then stable, then dips again. I didn't measure the periode between the dips. The shape and amplitude vary depending on if I draw power from a li-ion battery or USB (both through the same voltage regulator) or directly inject 3.3V from my RD6006 power supply.
I also wrote other code that did not activate bluetooth (turning on and off LEDs, reading switches, etc.), and the power is stable with no ripple.
I'm not sure if the ripple is the actual cause of the problem, or maybe timing. I measured the crystal in circuit and it swings at ~40MHz, but it's difficult to get precise measurement down to 10ppm (which is the requirement).
I've followed the ESP32-C3 hardware design guidelines with all decoupling/bypass capacitors, inductors, resistors, etc (and recommended values). 40MHz crystal is 10ppm.
This should be battery powered, so it's crucial I can make it work on battery (which at the time experience the largest rippe of them all, strangely enough).
Anyone have an idea what could be wrong?
ESP32-C3 Periodic ripple on 3.3V
ESP32-C3 Periodic ripple on 3.3V
- Attachments
-
- USB to voltage regulator
- usb-into-vreg.png (38.25 KiB) Viewed 1421 times
-
- Li-Ion battery to voltage regulator
- liion-battery-into-vreg.png (39.5 KiB) Viewed 1421 times
-
- RD6006 3.3v injected directly on 3.3v rail
- RD6006-directly-into-3v3.png (54.3 KiB) Viewed 1421 times
-
- Posts: 198
- Joined: Sun Jun 23, 2024 6:18 pm
Re: ESP32-C3 Periodic ripple on 3.3V
Add extra or larger low-ESR ceramic capacitors close to the ESP32-C3’s VCC pin to smooth out voltage dips. Typically, 10 µF, 1 µF, and 0.1 µF capacitors in parallel are used. These capacitors should be very close to the chip.
Re: ESP32-C3 Periodic ripple on 3.3V
I have followed the design guidelines to the letter and have 10uF+100nF+2nH+1uF on VDD3P3, 10nF+1uF on VDDA, 100nF+1uF on VDD3P3_CPU and 100nF on VDD3P3_RTC.
-
- Posts: 1725
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ESP32-C3 Periodic ripple on 3.3V
FWIW, three brief current spikes of several hundred mA are normal while the ESP is advertising via BLE.
I guess it's not a coincidence, given that BLE uses three RF channels to broadcast the same advertisement message three times each advertisement cycle.
I don't think the power supply ripple is a problem in this case. Although the battery may not be quite up to the task and may warrant a few extra caps...
I guess it's not a coincidence, given that BLE uses three RF channels to broadcast the same advertisement message three times each advertisement cycle.
I don't think the power supply ripple is a problem in this case. Although the battery may not be quite up to the task and may warrant a few extra caps...
Re: ESP32-C3 Periodic ripple on 3.3V
Regarding the battery. I'll definitely try more caps. It could also be the problem that battery goes though a MOSFET but USB goes through a schottky. I have a power path circuit that disconnects the battery when USB power is present. Similar to the attachment.
What could be the problem then? I ran XTAL_N under the crystal. Could that interefere?
I attached part of the layout.
What could be the problem then? I ran XTAL_N under the crystal. Could that interefere?
I attached part of the layout.
- Attachments
-
- Layout
- Screenshot 2024-09-10 at 17.36.23.png (98.53 KiB) Viewed 1383 times
-
- Similar
- power-path.png (17.54 KiB) Viewed 1383 times
-
- Posts: 1725
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ESP32-C3 Periodic ripple on 3.3V
I guess the problem is either with the firmware, with Apple's BLE or its configuration, or with the BLE scanner app.
Try another device (Android phone or PC) and see if anything changes.
Do you get any logging output from the ESP?
Try another device (Android phone or PC) and see if anything changes.
Do you get any logging output from the ESP?
Re: ESP32-C3 Periodic ripple on 3.3V
I tried with a ESP-WROOM-32D dev board and it works. With the "BLE/Write" example i can write in the iOS app (BLE Scanner) and the text shows up in the serial monitor via the ESP.
Who is online
Users browsing this forum: No registered users and 110 guests