Author Topic: Control backlight from GPIO  (Read 429 times)

0 Members and 1 Guest are viewing this topic.

Offline jemarro12Topic starter

  • Contributor
  • Posts: 13
  • Country: es
Control backlight from GPIO
« on: December 17, 2023, 09:57:32 pm »
I´d like to turn off G9CA01 based LCD display with ESP32 GPIO. i´d like to switch on/off display with GPIO, don't know if better turn off only backlight or if better turn off all vcc line. Attach Schematic of display. Wich kind of transistor should i use for the job? Consumption about 50mA at 3.3V
In addition i´m using powerboost 1000C as battery charger which provides LBO pin (normally at BAT level and when BAT<3V LBO pulled to GND). I´d like to detect this LBO pulled to GND in a GPIO. Maybe compare LBO pin (adapted to be 3.3vmax) with VCC/2 V??
« Last Edit: December 17, 2023, 10:08:13 pm by jemarro12 »
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 3484
  • Country: us
Re: Control backlight from GPIO
« Reply #1 on: December 17, 2023, 10:46:18 pm »
Turning off the backlight (BL) will save almost all of the current drain and will not require going through re-initialization like turning off VCC will require.  I control the BL with a moderate frequency PWM and a small, logic-level mosfet driven by a GPIO pin.  I just use 3 levels.  You can still read the display in decent light.
 

Offline Shonky

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: au
Re: Control backlight from GPIO
« Reply #2 on: December 18, 2023, 03:53:41 am »
Just turn off backlight. Rest of the LCD won't use much power. I would suggest that the 10k pull up to 3v3 be switched to a pull down to ground if anything. Do you really want the back light on by default when the unit starts before your ESP32 enables the output? As is it will also not pull the transistor base to 0V. With your GPIO low you'll still see about 0.3V on the base.

As for detecting the LBO pin you should understand what kind of output it is. If open collector a simple pull up on an input GPIO could be enough.
« Last Edit: December 18, 2023, 05:02:38 am by Shonky »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5927
  • Country: es
Re: Control backlight from GPIO
« Reply #3 on: December 18, 2023, 04:21:25 am »
Also send "turn off" cmd to the lcd, so it enters deep sleep while keeping the configuration and framebuffer data.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf