Wroom02 and OLED-091 - I2C-Init to early ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Wroom02 and OLED-091 - I2C-Init to early ?

#1 Post by Micha_he » 09 Feb 2019, 15:23

I've this test-build:

- Wroom-02
- OLED-091 (DIY MORE, SSD 1306, 4pin) connected with I2C ( Default IO4/IO5)
- same 3.3V power-supply with the ESP
- Firmware 20190202 2MB

The display works, if I:
- fresh setup the display
- change the display-settings and submit it
- reboot the ESP via web-interface
- power on the ESP, while the display is supplied with the 3,3V

But the display shows nothing when I switch on the power-supply (from ESP & display), until I do some of the 4 points above !

Maybe the I2C-Init is to early (for this/my slow display) ??? Can I re-init the I2C-Bus with a rule ?
Or can we add a I2C-Init-Delay-Value (in sec) to the ESPEasy-web-inferface ?

Thanks,
Micha

Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#2 Post by Micha_he » 19 Feb 2019, 16:01

No one with a similar problem?

Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#3 Post by Micha_he » 18 Jun 2019, 09:40

Same problem with the last version from 20190607 !

Is there anyone else with a working I2C-Display, when display and ESP are switched on simultaneously ?
Or... any idea to re-init the I2C-Display?

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

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#4 Post by TD-er » 18 Jun 2019, 10:33

I have been thinking about adding a 'boot delay' parameter.
The thing is, I've also had reports from someone about issues with the WiFi, which seem to be related by trying things to start too quickly.

The question is then, at what level should this delay be set?
At the end of setup(), before going into the loop()?
Or per plugin (a single parameter defined in the plugin parameters) and maybe also per controller?

I have not seen this happen with any of my own nodes, but then again I usually keep them connected to power.
Was it working fine with builds before 20190607?
What core library are you using? (I prefer core 2.5.2)

Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#5 Post by Micha_he » 18 Jun 2019, 11:00

No, it doesn't work until the first tests in Feb 2019. Older version's I didn't test.
Core-Lib is 2.5.2.

Is there any chance to re-init the I2C-Display within rules ? I've the problem, that no OLEDFRAMEDCMD (ON/OFF/MED/HIGH) work, if it's not been activated while switch on the circuit. Only a additional reboot helps. But I turn on the display via a MSOFET at a GPIO-pin (disabled at deep-sleep) and then the problem exists on every wake !
Last edited by Micha_he on 18 Jun 2019, 11:09, edited 1 time in total.

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

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#6 Post by TD-er » 18 Jun 2019, 11:09

Well you can add some work around.
At power on reboot, the RTC memory is cleared, so it will contain all 0's
This RTC memory is restored at crash/software reboot.
So what you can do using the rules is trigger on boot and check the content of one of the dummy plugin variables.
If it is 0, set it to 1 and call for a reboot.

If that's going still too fast, you can set a timer instead of calling for a reboot and then if the timer is triggering a rules event, you can do the reboot.

Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#7 Post by Micha_he » 18 Jun 2019, 11:14

Not the top-solution, but a work-around. I'll test your suggestion this evening and report then.

Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#8 Post by Micha_he » 19 Jun 2019, 08:37

Some test from yesterday evening:

ESP01 with old release R148 and old OLED-Plugin: Display works as expected, at about ~5 power-on-tests.
ESP01 flashed with actual release from 20190607 (1M): Same problem as the test with WROOM-02 :(

Seems a problem with the firmware/software, not a WROOM-02-problem (too fast or somthing else). I'll test some other (older) versions.

The workaround with a additional reboot via rule, ended in a bootloop... :oops:
The rule:

Code: Select all

on System#Wake do
	if [dummy#var2]=0
		TaskValueSet,2,2,1
		Reboot
	endif
endon
It seems, that the var (#2, #1 is used for another calculation) of the dummy-device (task #2, first is the display) is not set to 1 until the reboot is executed. Even an additional timer of 5s doesn't help. Or where is my mistake ?

But the workaround should probably not help me, because it only works on first power-on of the ESP. But if it wakeup from deep-sleep and the display is powered on via GPIO-output, I've the same problem. The display is too late for the init-phase, or ?

Micha_he
Normal user
Posts: 63
Joined: 07 Feb 2018, 19:14

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#9 Post by Micha_he » 21 Jun 2019, 11:35

The problem concerning the OLED-display is located: The resistor R3 is too large !
With this large resistor the display-internal power-on-reset takes about ~2.6 seconds. Other display's with 4.7k (mostly used layout), the reset takes only 22ms.

Here a picture of my display and the R3-position:
oled_wrong_R3.jpg
oled_wrong_R3.jpg (192.69 KiB) Viewed 373 times

And here the schematic of the display-reset (I've changed R3 from 560k to 4.7k):
schematic_wrong_R3.jpg
schematic_wrong_R3.jpg (41.83 KiB) Viewed 373 times

The problem with the rule-reboot-loop is still not clear, but now not important anymore.
First tests last evening with the modified display, showed no problems while power-on :D

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

Re: Wroom02 and OLED-091 - I2C-Init to early ?

#10 Post by TD-er » 21 Jun 2019, 17:59

Great :)

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests