The backlight waits for BL
BL does not power the backlight; it switches it. It drives the gate of Q2, a BSS138 MOSFET in the backlight's return, and a 10 kΩ resistor holds that gate at 0 V. So the backlight is off until BL is driven HIGH, and a display that is drawing perfectly looks dead. PWM on BL dims it; the BL-3V3 jumper keeps it on without a pin.
A switch, not a supply
The backlight is LEDs behind the glass, inside the panel. Their anode is on 3V3. Their cathode comes back out on contact 1 of the ribbon socket, through R6, 2.2 Ω, to the drain of Q2. Q2 is a BSS138, an N-channel MOSFET: a switch that a voltage on its gate opens and closes. Its source is on GND and its gate is BL.
Between the gate and GND sits R2, 10 kΩ. With nothing on BL it holds the gate at 0 V, so Q2 is off and no current flows through the LEDs. That is deliberate: a floating gate would drift, and the backlight would flicker with whatever the pin picked up. It also means that the backlight is off until your sketch drives BL HIGH.
The page this book replaced said the backlight was "always on, or PWM-controlled". It is never on by itself.
What your pin carries
Almost nothing. A MOSFET's gate takes current only while it switches. Held HIGH at 3.3 V, BL feeds only R2: 3.3 V across 10 kΩ, 0.33 mA. The backlight's own current runs from 3V3, through the LEDs, R6 and Q2 to GND, and never through your board's pin.
So any output pin will do, and the first line of every sketch in this book sets it HIGH before anything else.
Dimmed, or always on
PWM on BL dims it. Switch BL on and off hundreds of times a second and
the backlight is on for that fraction of the time: analogWrite(BL, 64)
is about a quarter. On an ESP32, an ESP32-S3 and a Pico any output pin
can do it. On an Uno, D7 cannot: move BL to D6 or D5.
The BL-3V3 jumper keeps it on. A blob of solder across the pads marked BL and 3V3 on the back ties the gate to 3V3: on whenever the board has power, and one wire fewer. Then BL must stay unwired, since a pin driving it LOW would short 3V3 to GND. The two jumpers has the rest.
When it does not work
Check BL. It has to be wired to the pin the sketch drives, and the sketch has to set that pin HIGH. With BL unwired or LOW, the 10 kOhm on the board keeps the backlight off, whatever the controller is drawing.
Not on D7: it has no PWM, so analogWrite gives only fully on or off. Move BL to a PWM pin, D6 or D5 (D9 to D11 are taken by the display), and use analogWrite(6, value).
On the ESP32 Arduino core 3.x, once a pin has been used with analogWrite, a later digitalWrite on it is ignored. Keep to analogWrite on BL: 255 for fully on, 0 for off.
Yes: on panels like this the backlight is usually most of what the board draws, and at a lower duty cycle it is on for less of the time. Nobody has measured this board's current, so this book does not give a figure.
Eight wires, one library, and a sketch that lights the backlight before anything else.
First light →Edit this page — content/books/tft-1-8-inch/the-backlight-waits-for-bl.mdx
Questions about this product
See what other owners have asked, and read their solutions.
1.8-inch TFT Display
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.