Inkplate 4 TEMPERA BQ27441 gauge not responding on I2C and touchscreen configuration

Customer:

I’m having two issues with Inkplate 4 TEMPERA.

First, I’m struggling to operate the BQ27441 sensor on Inkplate 4 TEMPERA. Neither the examples in your Arduino library nor the SparkFun library get a response to the first I2C interrogation. I’ve run an I2C scan and the address 0x55 doesn’t appear to exist. When I modify the SparkFun library slightly, other interrogations like voltage and current do show traffic on I2C, but I can’t calibrate the battery capacity, making it unusable.

Second, I’ve set up Inkplate 4 on ESPHome by modifying the base library. I can’t find a touchscreen device on the schematic - what I2C protocol is used for the touchscreen? Do I need to enable it first? I’ve tried using the Inkplate 6 touchscreen configuration since it seems most similar from the schematic.

Originally submitted via email support on 7 March 2025. Migrated to the forum for community visibility.

Soldered Support:

The board uses BQ27441DRZR-G1A, which corresponds to the library and should work. The issue might be with the powering on or off - these components have a MOSFET which controls power to them.

For the touchscreen, it uses this driver: https://github.com/SolderedElectronics/Inkplate-Arduino-library/blob/master/src/include/TouchElan.cpp (also check the corresponding h file). Check the tsInit function - you need to turn on the touchscreen via GPIO expander TOUCHSCREEN_EN, which on Inkplate 4 TEMPERA is 0 on the GPIO expander. See the Inkplate 4 TEMPERA board file: Inkplate-Arduino-library/src/boards/Inkplate4TEMPERA.h at 2dd263f2f9548aadac8638413a143beddf068a64 · SolderedElectronics/Inkplate-Arduino-library · GitHub

The schematic is here: GitHub - SolderedElectronics/Soldered-Inkplate-4-TEMPERA-with-glass-panel-hardware-design · GitHub in the OUTPUTS folder for pin details.

Customer:

I’ve managed to get both the gauge and touchscreen working. The issue with the gauge was that the GPIO expander direction for the gpout pin was in default state and was preventing the chip from replying. The touchscreen issue was that I was using the wrong GPIO. I’m wondering if an ESPHome configuration with an external component for the gauge would be useful.

Soldered Support:

If you want to share your ESPHome implementation for Inkplate 4 TEMPERA, please send a GitHub repository or similar - we’re looking to add Inkplate ESPHome support for all Inkplate devices and can use your code as a starting point, with credit to you for your contributions.

Customer:

Here is my repository for Inkplate 4 working on ESPHome with LVGL: GitHub - 00nippi/espstuff · GitHub

Soldered Support:

Thank you for submitting. I have tested the BQ27441 on Inkplate 4 TEMPERA and all our models - it should respond at minimum to the I2C ping to the fuel gauge. I will share your repository with our colleagues. Seeing Inkplate work with LVGL is exciting and we want to add more support like this beyond just standard Arduino/Adafruit GFX.

Customer:

It’s now working perfectly. I had to reduce the I2C speed somewhat to minimize overruns. I rewrote some communication parts in the SparkFun library to use with ESPHome - feel free to use and share the code.

Soldered Support:

Great to hear! We use the default Arduino I2C speed but we’ll keep this fix in mind for the future if more issues arise. I’ve shared your repository with our team.

I see your code has the LVGL config YAML - is this all the code required for LVGL to work on ESPHome? Does ESPHome handle making the frame buffer and then it just gets drawn on Inkplate? espstuff/4inkplate/lvgl.yaml at main · 00nippi/espstuff · GitHub Is there any lower level LVGL code here that I can examine?

In our existing library, the Inkplate library has the Adafruit GFX library included underneath. For example, here is the code which fills a single pixel in the frame buffer: Inkplate-Arduino-library/src/boards/Inkplate4TEMPERA.cpp at 2dd263f2f9548aadac8638413a143beddf068a64 · SolderedElectronics/Inkplate-Arduino-library · GitHub