Esp Erasing Software Automatically

mutumandingo
Posts: 5
Joined: Mon Jul 06, 2020 7:04 am

Esp Erasing Software Automatically

Postby mutumandingo » Mon Jul 06, 2020 7:09 am

I have Esp32 based pcb, some leds, drivers, 18650 battery etc. I just simply control the leds with esp but i have flash(code) erase problems, when i leave the esp at ON for example 7-8 hours, the code in the board are deleted, but i dont know the reason.

Please help me, i attached the whole schematic.
LED JOB File.PDF
Schematic PDF
(428 KiB) Downloaded 305 times

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp Erasing Software Automatically

Postby ESP_Sprite » Mon Jul 06, 2020 8:26 am

How did you conclude 'the code in the board are deleted'?

mutumandingo
Posts: 5
Joined: Mon Jul 06, 2020 7:04 am

Re: Esp Erasing Software Automatically

Postby mutumandingo » Mon Jul 06, 2020 1:44 pm

Not works like as expected. Even onboard led not works. After reuploading code, it works again.

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp Erasing Software Automatically

Postby ESP_Sprite » Mon Jul 06, 2020 2:29 pm

Does resetting the board work? What serial output do you get when the board is in a 'broken' state? You say it happens after 7-8 hours, any chance it has anything to do with the LiIons being almost empty?

mutumandingo
Posts: 5
Joined: Mon Jul 06, 2020 7:04 am

Re: Esp Erasing Software Automatically

Postby mutumandingo » Mon Jul 06, 2020 9:07 pm

I dont look serial values, but i think thats not a battery issue because my schematic based on AL8805 led drivers and when no pwm signal is enter the driver leds lights at maximum, and when 'erased status' occurs, leds running on maximum value, i think that no pwm means that no active esp. Because my standby positions in code is based on 0 pwm value. Please help me

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp Erasing Software Automatically

Postby ESP_Sprite » Tue Jul 07, 2020 8:06 am

So please do look what the serial port says, it may have valuable information there. Does resetting the board work at all? The issue may be because of a power glitch, so again, does the issue correlates to batteries running out?

mutumandingo
Posts: 5
Joined: Mon Jul 06, 2020 7:04 am

Re: Esp Erasing Software Automatically

Postby mutumandingo » Tue Jul 07, 2020 6:54 pm

I found the problem, as you said thats a circuit problem not a code erasing. When battery voltage is not enough to supply voltage regulator, the ESP not not powered on and pwm pins of led driver becomes floating positon and gives as much power as they can to leds, so i have one more question that problem can be solved with pull down resistor connected to driver's pwm?

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp Erasing Software Automatically

Postby ESP_Sprite » Wed Jul 08, 2020 7:23 am

Yes, likely. Make sure that the pulldown is strong enough (as your LED driver has an internal pull-up it needs to overcome), something like 4.7K should work. Do know that behaviour for the ESP32 is unspecified when power is too low; you may want to add a voltage supervisor to the circuit if you see that the ESP32 starts behaving wonky when the batteries run low.

mutumandingo
Posts: 5
Joined: Mon Jul 06, 2020 7:04 am

Re: Esp Erasing Software Automatically

Postby mutumandingo » Thu Jul 09, 2020 11:41 am

Please explain more about voltage supervisors :) I will research about that.

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Esp Erasing Software Automatically

Postby ESP_Sprite » Fri Jul 10, 2020 7:32 am

Nothing much to explain... It's a small chip that makes sure the ESP32 is reset properly even if the power supply voltage is too wonky for the internal reset logic to properly do it. There's more information on the Internets, if you need it.

Who is online

Users browsing this forum: No registered users and 142 guests