Page 1 of 1

Esp Erasing Software Automatically

Posted: Mon Jul 06, 2020 7:09 am
by mutumandingo
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 304 times

Re: Esp Erasing Software Automatically

Posted: Mon Jul 06, 2020 8:26 am
by ESP_Sprite
How did you conclude 'the code in the board are deleted'?

Re: Esp Erasing Software Automatically

Posted: Mon Jul 06, 2020 1:44 pm
by mutumandingo
Not works like as expected. Even onboard led not works. After reuploading code, it works again.

Re: Esp Erasing Software Automatically

Posted: Mon Jul 06, 2020 2:29 pm
by ESP_Sprite
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?

Re: Esp Erasing Software Automatically

Posted: Mon Jul 06, 2020 9:07 pm
by mutumandingo
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

Re: Esp Erasing Software Automatically

Posted: Tue Jul 07, 2020 8:06 am
by ESP_Sprite
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?

Re: Esp Erasing Software Automatically

Posted: Tue Jul 07, 2020 6:54 pm
by mutumandingo
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?

Re: Esp Erasing Software Automatically

Posted: Wed Jul 08, 2020 7:23 am
by ESP_Sprite
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.

Re: Esp Erasing Software Automatically

Posted: Thu Jul 09, 2020 11:41 am
by mutumandingo
Please explain more about voltage supervisors :) I will research about that.

Re: Esp Erasing Software Automatically

Posted: Fri Jul 10, 2020 7:32 am
by ESP_Sprite
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.