I am using a TFT SPI display with an ESP32 microcontroller. As soon as i power on the ESP32 the LCD gets fully white and when the program starts the display shows the black background color i want.
I have a LED pinout on the display and when i disconnect the cable the backlight is off but the display boots correctly.
Can i use a MOSFET to power the backlight as soon as the program starts?
I have a BCP54-16 mosfet laying around but i am not sure if i can switch +5v instead of ground?
I think i need to connect B to a GPIO pin, but i don't know how to power the Emitter and Collector between the +5v (or 3.3V)
Can someone help me please?
PS, i also have a FR5505 mosfet laying around, this is a p-channel mosfet? I read this is for switching positive signals?
I think i have connected this one FR5505 the way it supposed to be, the only "problem" is that the display is on already when power is connected. Is my wiring wrong or is this not the correct PNP transistor?
You should add a low value resistor, say 2k2 in series with the gate and a high value resistor say 47K between gate and +3.3V to keep the display off till you want.
What is the gate threshold voltage of that MOSFET, probably want a max of 2V (or less) for reliable switching ?
Can you explain how you got the resistor values? I have 10K resistors, 2K7 but not the values you said. Will this work too or do i have to buy those exact resistors?
Threshold voltage is the point the device switches fully off.
Typical logic level MOSFETs have threshold voltages under 1V.
The only things you need to check in the datasheet are max voltages and the on-resistance rating
(for instance if it says Rds(on) = 50 milliohms for Vgs=10V, you need 10V to turn it on and get 50 milliohm on resistance.)
If there's no entry for a logic level voltage such as 3V, 5V, and only for 10V, its not logic-level at all.
The IRFR5505 shows only an entry for Vgs=10V, and is thus not logic level.