Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop voltage on 3.3V rail after enabling prw_en pin #98

Open
viteka32 opened this issue Aug 7, 2023 · 21 comments
Open

Drop voltage on 3.3V rail after enabling prw_en pin #98

viteka32 opened this issue Aug 7, 2023 · 21 comments
Labels

Comments

@viteka32
Copy link

viteka32 commented Aug 7, 2023

We using and testing LilyGo 4,7 Plus and have a problem with resetting ESP32 after enabling display with sequences epd_init and epd_poweron. We found a bug on PCB. Enabling display generating 0.9A peak and voltage level on LDO 3.3V drop to 2.2V. There is ESP32 randomly resetting. Used LDO doesn't have the capacity for this current peak. I am testing adding a blocking capacitor on 3.3V rail and 1000uF value can be blocking this peak when the voltage doesn't drop under 3V.

Testing code:

void setup() {
  delay(500);
  epd_init();
  delay(500);
  epd_poweroff_all();
  esp_sleep_enable_timer_wakeup(2 * 1000000ULL);  //sleep in microseconds
  esp_deep_sleep_start();
}

Current measured:
image
The first sequence is correct and the next is wrong.

The voltage on 3.3V supply during a current surge:
image

Have you encountered this problem too? Do you have any solution for this?

@brianwyld
Copy link

Same problem on T5+. I note the original T5 does not seem to have this issue.

Did the 1000uF fix it?

@viteka32
Copy link
Author

viteka32 commented Sep 7, 2023

Yes, the 1000uF capacitor will prevent the power supply from dropping below 3V. Although this is a fairly short peak, the restart appears to be random. Instead of a capacitor, adding a delay (20 ms) right after switching on the display power branch also helped us a lot.

@homonto
Copy link

homonto commented Sep 7, 2023

1mF capacitor for such small project is totally wrong design. It might be a solution but for sure it is a mistake of the design. Btw where does this 0.89A go?

@viteka32
Copy link
Author

viteka32 commented Sep 7, 2023

Yes, for this type of design, a 1mF capacitor is not the right solution. For example, with LTE 2G, it would mostly be necessary. From the measurements, we found that the pulse is generated when the DC/DC converter LT1945 and display are switched on. (The greatest credit goes to the LT1945 power supply circuit with accompanying regulators)

@homonto
Copy link

homonto commented Sep 7, 2023

Yes, for this type of design, a 1mF capacitor is not the right solution. For example, with LTE 2G, it would mostly be necessary. From the measurements, we found that the pulse is generated when the DC/DC converter LT1945 and display are switched on. (The greatest credit goes to the LT1945 power supply circuit with accompanying regulators)

from the datasheet of LT1945 it has a limit to 350mA however, the peak current can reach easily even 1A - after 0.1ms the regulator is OFF completely.
But, the LT1945 is not a load so this current is NOT related to LT1945 being ON, but to other element, that consumes that current during the transient.
The decoupling capacitors are exactly to reduce the voltage swings, but 1mF is not in the normal range of such capacitors

@brianwyld
Copy link

after reviewing the schematic for the T5-PLUS board, and looking at the driver code, I am confused.

1/ epaper power supply control:
In the code (ed047tc1.c), I find epd_power_on() and epd_power_off().

For power on, it sets bits named "scan_direction=true", "power_disable=false", "neg_power_enable=true", "pos_power_enable=true" and "ep_stv=true", in order, with a delay between them.

For power_off, its "pos_power_enable=false", "neg_power_enable=false", "power_disable=true", "ep_stv=false", again in order iwth a delay.

HOWEVER:

  • on the schematic, power_disable->SMPS_CTRL, neg_power_enable->NEG_CTRL, pos_power_enable->POS_CTRL : and all 3 only go to the rPI 40 pin header
    ** NO IMPACT ON EPAPER POWER SUPPLY **

  • 'scan_direction' is in fact PWR_EN, and switches 3V3 from the main LDO to the epaper power circuitry...
    ** is NOT turned off in epd_poweroff(), only in epd_poweroff_all() (which sets all the shift reg outputs to false.... **
    ** is set to true in epd_init() -> hence brownout as soon as driver is initialised, before even epd_poweron() is called! **

Where did you add the 20ms delay to avoid the brownout?

Is this right? If so, I think some fixes are required in the code:

  • no need to do anything to 'power_disable', 'pos_power_enable' or 'neg_power_enable', they are not used on this board
  • scan_direction renamed to 'pwr_en', and set to false in epd_init(), and epd_poweroff()
    ** this should help low power operation as no longer driving the epaper boost circuit **
  1. pwr_en impact on VBAT
  • it seems like VBAT is switched directly onto the '5V' signal when pwr_en is true (by Q3). This seems like a bad thing to do to the battery when plugged in to the USB and hence there is really 5V on this trace (instead of charging it through the HX6610S 'normally').
  • any explanation of what this circuit with Q3 is supposed to do?

thanks!

@brianwyld
Copy link

Tried code as indicated above:

  • saves me 1mA in lightsleep() mode
  • saves about 30mA when not actively writing to the epaper
  • peak inrush when turning on is about 400mA once running,

attached some power captures (OTII on the battery connector @3.75V)
T5P_bootup_2023-09-08
T5P_full-redraw_2023-09-08
T5P_partial_cycle_2023-09-08

@brianwyld
Copy link

One of my boards is very sensitive to the voltage drop, the other less so. A 470uF electrolytic across VDD_3V3 seems to fix it, but is kind of ugly.

@brianwyld
Copy link

For a 'final' fix I went with a SMT 470uF tant capacitor as in the photo below :

  • the capa is the orange rectangle
  • -ve side to GND from the SD card connector
  • +ve side wired directly to the ESP32 VDD_3V3 input pin
  • ignore the black wire which is left from previous tries with smaller MLCC caps)

20230911_153007

@random-0110-dude
Copy link

Hi all,

My board seems to have either a similar, or at least a related issue.

It works fine when I have battery attached to BAT. Without battery, it's very picky about power source. It works with some USB ports and non-brand USB wall adapters. It does not work with Apple 5W and 10W wall adapters, as well as with some power banks.

I was unable to find a correlation between voltage on VBUS and whether the board works. It works fine with some USB ports providing 4.85V and wall adapters with 5.1V, and does not work with other adapters that give 5.1V on VBUS.

What does it mean? When the board does not work, the green LED lights for a few seconds, and then red LED lights. The blue LED never starts.

This is what's happening on VBUS (4.85V):
VBUS

In the same time, 3V3 line looks like (my oscilloscope is single-channel, so these are actually different measurements):
3 3V_ESP-IN
The voltage reaches 3.3V for a moment (green LED), and then drops to 1.04V (red LED).

This is what's happening on VBAT:
VBAT
The voltage reaches 4.18V for a moment (green LED), and then drops to 1.32V (red LED).

Do you have any ideas what's going on here?


I also tried the sketch in the first message here (with delays of 2000ms), this is what 3V3 line looks line on epd_init();

3V3-ESP-IN-EPD-on

I haven't tried adding large capacitor to 3V3 yet. I also have other modifications: #93 (comment) (I removed the 22pF capacitors later, only 47uF is in place).

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 18, 2024
@random-0110-dude
Copy link

Update: I added a 47uF electrolytic capacitor between GND and 3V3. Now the board works fine with all my power sources, except with one USB hub. Maybe I'll replace the capacitor with smth like 330/470 uF.

@viteka32
Copy link
Author

We are using less than a hundred LilyGo-EPD47s and we have noticed another problem that may be related to this behavior. Some PCBs have a very high voltage drop on the 750MA/0603 fuse (output after the fuse is about 1.6V) and only a jumper using a 0R resistor will help.

@random-0110-dude
Copy link

@viteka32 could you please share a photo of your modifications?

@viteka32
Copy link
Author

I don't have a PCB now, but you can replace a fuse with a 0R resistor of size 0603.

image

@random-0110-dude
Copy link

I checked the voltage between GND and fuse pads. On the bottom pad (as in the picture), it reads as +4.640V, while on the top pad it reads +3.585V. I guess my board is also affected?

@pbenaim
Copy link

pbenaim commented Nov 21, 2024

For a 'final' fix I went with a SMT 470uF tant capacitor as in the photo below :

  • the capa is the orange rectangle
  • -ve side to GND from the SD card connector
  • +ve side wired directly to the ESP32 VDD_3V3 input pin
  • ignore the black wire which is left from previous tries with smaller MLCC caps)

20230911_153007

Yeeees the screen work (again) now :-)

But the SD Card and the Touch not working :-(

Demo Compiled with:
|-- SensorLib @ 0.1.9
|-- Button2 @ 2.3.2
|-- Wire @ 2.0.0
|-- SPI @ 2.0.0
|-- FS @ 2.0.0
|-- SD @ 2.0.0
|-- WiFi @ 2.0.0

Any ideas ?

@random-0110-dude
Copy link

@viteka32 btw my (V2.3) board has fuse with code D. Does it mean that it's 250 mA fuse, or I'm wrong?

@pbenaim One of the lib examples (in S3 branch) for SD card is wrong. Make sure your line says
SPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS);

@github-actions github-actions bot removed the stale label Nov 22, 2024
@pbenaim
Copy link

pbenaim commented Nov 22, 2024

@pbenaim One of the lib examples (in S3 branch) for SD card is wrong. Make sure your line says SPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS);

Yes, but no way :-(

@pbenaim
Copy link

pbenaim commented Nov 23, 2024

So, for the moment, I use SPIFFS, for storage, but is not really cool 😎
For the actual project is enough, but maybe later I will need more space...

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants