ESP Easy on M5StickPlus no Display

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

ESP Easy on M5StickPlus no Display

#1 Post by janssenuwe » 06 Jan 2025, 12:25

Hello,

I already tried successfully installing and configuring ESP Easy on M5 Stck Atom Lite and M5 Stack Switch D.

Now I want to use it on a M5StickCplus. (NOT M5StickCplus2 !)
I tried to configure the P116 Plugin with the builtin 135 x 240 ST7789 Display but got no positive result.
Due to schematics I have to use the USER defined pinning for the SPI settings.

This is my configuration (number are GPIO Pins):

Code: Select all

MOSI = 15
SCLK = 13
CS = 5
DC = 23
RST = 18

MISO is not used but set it GPIO 38

Factory Test of M5StickPlus is working.
I also have a working production environment.

Please help if possible,
Thank you,

Uwe

bidrohini
Normal user
Posts: 145
Joined: 03 Nov 2022, 16:24

Re: ESP Easy on M5StickPlus no Display

#2 Post by bidrohini » 06 Jan 2025, 12:31

Is there any error message that you are seeing?

TD-er
Core team member
Posts: 9596
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP Easy on M5StickPlus no Display

#3 Post by TD-er » 06 Jan 2025, 12:54

Is it this model?
https://templates.blakadder.com/m5stack_stickc.html
The pins you mention look the same as the pin table on that page.

It seems to be using the ESP32-PICO-D4.
I don't know much about that one, so I need to look into the datasheet to see if it has some special needs for some pins.
Does it show on the sysinfo page this CPU is detected?

The flyer-images also mention some AXP192. (see: https://docs.m5stack.com/en/core/m5stickc_plus )
Is the display connected to this power management chip? If so, maybe you need to enable some DC/DC output pins of the AXP192 to actually turn the display on?

Edit:
Ah yes on the last page I linked, there is some table describing the AXP192.
TFT backlight is connected to LDO2 and TFT IC is connected to LDO3.
I suspect you may need to turn those on and set them to 3300 mV.

Edit2:
Here the schematic layout from the m5stack docs:
Image

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#4 Post by janssenuwe » 06 Jan 2025, 14:07

Hello ,

thank you for your quick and valuable information.

Seems most reasonable to turn those on.
I'll try to find out how to turn them on.

Thanks again,

Uwe

TD-er
Core team member
Posts: 9596
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP Easy on M5StickPlus no Display

#5 Post by TD-er » 06 Jan 2025, 14:36


User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#6 Post by Ath » 06 Jan 2025, 21:01

Using the AXP192 you should set both the LDO 3 and LDO 2 to deliver power, as LDO 2 is used to power the backlight for the display. Without backlight you won't be able to see the content of the screen, unless when using a strong external light source, but that would be without color.
The AXP192 can be configured as a Priority Task, as described in the documentation, so the TFT will have power directly after boot.

According to the documentation you'll indeed need to configure for a ST7789 135 x 240 px display. GPIO settings look OK.
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#7 Post by janssenuwe » 17 Jan 2025, 11:40

Than you all for your detailed info,
you helped a lot.
I finally got it working now.

Best Regards,
Uwe

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#8 Post by Ath » 17 Jan 2025, 13:06

Can you share your configuration for the AXP192, so I can add this model to the predefined settings?
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#9 Post by Ath » 19 Jan 2025, 13:54

@janssenuwe
I have added a predefined configuration for M5Stack StickC Plus to P137 in PR #5228 and expect that to closely match what you've configured.
The voltage level for the backlight I've set to 2800mV, as suggested in the image above, but can probably be set somewhat lower to not be blinded by the display :o
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#10 Post by janssenuwe » 20 Jan 2025, 17:33

Thank you,
values look good.
I have LDO2 to 2800 and LDO3 to 3000.
LDO2 value < 2600 are rather dark .

Best Regards
Uwe

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#11 Post by janssenuwe » 21 Jan 2025, 13:26

Ath wrote: 19 Jan 2025, 13:54 @janssenuwe
I have added a predefined configuration for M5Stack StickC Plus to P137 in PR #5228 and expect that to closely match what you've configured.
The voltage level for the backlight I've set to 2800mV, as suggested in the image above, but can probably be set somewhat lower to not be blinded by the display :o
Hello,

I am looking for a method to control th AXP 192 from inside a rule. Basically I just want to turn off the backlight.
I tried to use the Tools Tab but for all axp commands 'command unknown' is returned .

For instance:

Code: Select all

axp,ldo2,0
Yields:

Code: Select all

Command unknown
Can You help me?

Thank You,
Uwe

TD-er
Core team member
Posts: 9596
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP Easy on M5StickPlus no Display

#12 Post by TD-er » 21 Jan 2025, 13:43

Hmm that should work...
Maybe Ton has an idea? https://espeasy.readthedocs.io/en/lates ... l#commands

We are working on P139, for the AXP2101, so if there's any bug in here, we can easily take this along.

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#13 Post by Ath » 21 Jan 2025, 13:51

I think that LDO2 needs a flag set to not be protected/disabled, so you can actually control it from rules... :?
Will fix that later today.
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#14 Post by janssenuwe » 21 Jan 2025, 14:21

Thank you for inverstigating, TD-er and ATh.

Best Regards,

Uwe

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#15 Post by Ath » 21 Jan 2025, 21:01

janssenuwe wrote: 21 Jan 2025, 13:26 I am looking for a method to control th AXP 192 from inside a rule. Basically I just want to turn off the backlight.
I tried to use the Tools Tab but for all axp commands 'command unknown' is returned .

For instance:

Code: Select all

axp,ldo2,0
Yields:

Code: Select all

Command unknown
Hm, you found an actual bug :o Thank you for that. Unfortunately it wasn't reported before, even though it hasn't actually worked properly for at least 2.5 years :(

Fixed it now, this GH Actions run is building the binaries for you to download and test.
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#16 Post by janssenuwe » 23 Jan 2025, 01:48

Hello Ath,

Thank you for fixing the bug which causes you can not control ld02 via command.
I wanted to clone and build it but got stuck.
Sorry bothering you but I am trying the whole Wednesday until now without result.

I am using Win11 Pro 24H2, VS Studio/Platformio, Python 3 and Git for windows.
Everything has been perfectly working with a zip file clone from the christmas edition 2024. (Modifications, build and upload to various M5 modules).

I am not sure if I understand your build procedure referred to as GH run action.
How can I see whether the bug #5228 (correct?) has already been comitted?
Sorry for those questions but I have not much experience with git.

Since I do not know how to access the bugfix build, I decided to clone the repository (as of Jan 22nd) and build it myself.
The build result was o.k. but I could not manage to upload it:

Code: Select all

Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM10
Uploading .pio\build\neopixel_ESP32_4M316k\ESP_Easy_mega_20250123_neopixel_ESP32_4M316k.bin
esptool.py v4.7.6
Serial port COM10
Connecting.....
Chip is ESP32-PICO-D4 (revision v1.1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 14:2b:2f:9f:b1:cc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.

A fatal error occurred: Unable to verify flash chip connection (No serial data received.).
*** [upload] Error 2


The communication between build environment and ESP bootloader apparently is not working.
But I am able to upload software to the board (M5 Atom Lite) using TD-er 's web flasher. So the boards are o.k.
I also can open the serial monitor of VS and see log messages if I reboot the ESP32.

I can also switch back to the older working environent and upload is possible.
But there the bugfix is not included.

What is wrong?
Best Regards ,
Uwe

TD-er
Core team member
Posts: 9596
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP Easy on M5StickPlus no Display

#17 Post by TD-er » 23 Jan 2025, 08:11

The fix Ton made is not yet merged into the main code.

The GitHub Action builds are building the usual build-combinations we also have in a normal release.
Via the link Ton gave, you can download the individual bin files, or the complete set in a single zip file. However you do need a GitHub account to download those artifacts.

If you want to build the code including the fix yourself, then you must checkout the branch Ton made for it.
This is not simply downloading a zip file, but you need to use Git to actually interact with the version-control features Git offers.

Steps:
- Fork the letscontrolit/ESPEasy repo to your own account
- Clone the fork to your own computer
- Checkout the branch associated with the pull request Ton linked
- Build your own build

If you ever want to keep up with changes made in the code, I strongly suggest to start learning Git instead of downloading a ZIP file.

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: bugfix working: ESP Easy on M5StickPlus no Display, but other bug

#18 Post by janssenuwe » 24 Jan 2025, 12:07

Hello,

I followed basically your instructions concerning git usage.
I downloaded the espeasy-1 repo and switched to branch

Code: Select all

feature/P137-add-settings-for-m5stickc-plus_03394ac
.
Build worked (ESP_Easy_mega_20250124_display_ESP32_4M316k.bin) but still I cannot upload.
I worked around using another flash tool and setup my previous environment on a M5StickCPlus.

The good news is that a can control ldo2 (connected to backlight/display brightness) successfully.

Alas, MQTT steadily keeps disconnecting and I cannot receive subsribed topics.
Here the log:

Code: Select all

872410: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
872413: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
872425: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
872427: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
872500: MQTT : Connection lost, state: Disconnected
872508: EVENT: MQTT#Disconnected
874241: MQTT : Connected to broker with client ID: Display_1
874247: Subscribed to: Display/#
874266: EVENT: MQTT#Connected
874330: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
874333: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
874346: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
874350: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
874464: MQTT : Connection lost, state: Disconnected
874472: EVENT: MQTT#Disconnected
875981: WD   : Uptime 15  ConnectFailures 0 FreeMem 217104 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
876202: MQTT : Connected to broker with client ID: Display_1
876208: Subscribed to: Display/#
876222: EVENT: MQTT#Connected
876333: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
876349: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
876354: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
876356: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
876421: MQTT : Connection lost, state: Disconnected
876431: EVENT: MQTT#Disconnected
884135: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
884148: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
884152: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
884164: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
884265: MQTT : Connection lost, state: Disconnected
884275: EVENT: MQTT#Disconnected
885999: MQTT : Connected to broker with client ID: Display_1
886005: Subscribed to: Display/#
886016: EVENT: MQTT#Connected
886085: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
886088: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
886102: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
886106: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
886213: MQTT : Connection lost, state: Disconnected
886229: EVENT: MQTT#Disconnected
887954: MQTT : Connected to broker with client ID: Display_1
887959: Subscribed to: Display/#
887971: EVENT: MQTT#Connected
888038: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
888051: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
888056: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
888059: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
888172: MQTT : Connection lost, state: Disconnected
888180: EVENT: MQTT#Disconnected
889909: MQTT : Connected to broker with client ID: Display_1
889915: Subscribed to: Display/#
889925: EVENT: MQTT#Connected
889999: IMPT : [mqtt_import#gridpower] subscribed to evcc/site/gridPower
890001: IMPT : [mqtt_import#batterypower] subscribed to evcc/site/battery/1/power
890013: IMPT : [mqtt_import#pvpower] subscribed to evcc/site/pvPower
890026: IMPT : [mqtt_import#soc] subscribed to evcc/site/batterySoc
890123: MQTT : Connection lost, state: Disconnected
.
.
.
(Repeating)
Am I missing something?
Best Regards,
Uwe

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#19 Post by Ath » 24 Jan 2025, 12:09

How is your MQTT Import plugin setup (ESPEasy side)?
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#20 Post by janssenuwe » 24 Jan 2025, 12:19

may i send a screenshot or is a conguration download usefull?

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#21 Post by janssenuwe » 24 Jan 2025, 12:24

Here my configuration and rules

https://drive.google.com/drive/folders/ ... sp=sharing

Best Regards,

Uwe

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#22 Post by Ath » 24 Jan 2025, 12:26

Better include the screenshot as an attachment to the message, so it will retain
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#23 Post by janssenuwe » 24 Jan 2025, 12:43

Screenshots attached.
By the way I did not change anything in the settings.
The same setups are perfectly working on my other M5 devices.
Attachments
mqtt_controller_settings.jpg
mqtt_controller_settings.jpg (53.59 KiB) Viewed 3201 times
mqtt_import.jpg
mqtt_import.jpg (89 KiB) Viewed 3201 times

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#24 Post by Ath » 24 Jan 2025, 14:56

Maybe the MQTT Controller Keep Alive Time setting should be changed from 0 to 60 sec. (AFAIK, that should have been done by the automatic upgrade :shock:)
/Ton (PayPal.me)

janssenuwe
Normal user
Posts: 17
Joined: 06 Jan 2025, 11:13

Re: ESP Easy on M5StickPlus no Display

#25 Post by janssenuwe » 24 Jan 2025, 19:46

I have been AFK until.
That helped, Thanks a lot. :D
Did the default values change?
I did not change my settings. As a matter of fact I just installed a new binary.
New setup was not required.

Now I want to solve the upload problem.
VS Studio upload after building does not work with neither branch.

The last edition it worked with was the Christmas branch.
I will create a new topic for that.

Best Regards and many thanks to the team,

Uwe

User avatar
Ath
Normal user
Posts: 4161
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP Easy on M5StickPlus no Display

#26 Post by Ath » 24 Jan 2025, 22:07

janssenuwe wrote: 24 Jan 2025, 19:46 That helped, Thanks a lot. :D
Did the default values change?
I did not change my settings. As a matter of fact I just installed a new binary.
That field was added recently, and the intention was to set it to 60 seconds by default. Maybe it didn't happen because you upgraded from a different release(/build-date).
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests