I recently brought a couple of ST7567 displays for use with ESPHome, however I discovered that there is no control over the backlight, it is just on when power is applied. (Unless I missed something which is totally possible!!)
A little bit of prodding later with a multimeter and I have added a BC547 transistor to allow the ESP to control the backlight!
To secure it I have used some hot glue. Not my favorite way but it is quick and this is not much more than a test to make sure it all work.
If anyone else wants to copy this (possibly daft) way of doing it, then here are my steps:
- Desolder R5
- Solder a 330ohm resistor to the
Base
pin of the BC547 - Solder the
Collector
pin to the top pads of C9/C11 - Solder a current limiting resistor to the
Emitter
pin (what value depends on the max brightness you want. The original used a 10ohm resistor (R5) from the 3V3 LDO regulator (U1) and was running around 80mA on my unit)
I chose 47ohm as I wanted it quite dim at full anyway.
Also: this will be running at the supply voltage so adjust your value if you are running from 5V or 3V3! - Solder the
Emitter resistor
to the right-most pin on the FPC connector - Solder a
single pin header
to the free side of the330ohm resistor
- Hotglue (or what ever method you want to secure)
Finally just connect the header pin to a PWM pin on the ESP and set as a light. Here is my code:
light:
- platform: monochromatic
name: "Backlight"
output: output_component1
restore_mode: RESTORE_AND_ON
output:
- platform: esp8266_pwm
id: output_component1
pin: D3
Hope this helps or is even slightly interesting LOL