-->
Page 1 of 2

ESP8266 Huzzah problem with ext power supply

PostPosted: Mon Dec 14, 2015 6:51 am
by Reinier
I have something real strange

I have connected my Huzzah break out to the USB, using the USB 5V output for power.

Now when I let the led flash with an interval of 1sec, there is no problem. But when I go to 0,7sec I get regular crashes: Hard Restart. So I expected that the USB 5V is not good enough and connected an external power suply.
From that moment I can not connect to the Huzzah board anymore, getting a message to check the baudrate.

GND is connected to the USB...

any idea's?

Re: ESP8266 Huzzah problem with ext power supply

PostPosted: Mon Dec 14, 2015 2:51 pm
by Reinier
This is the very basic code I use:

while 1 do
gpio.write(3, gpio.HIGH)
tmr.delay(900000)
gpio.write(3, gpio.LOW)
tmr.delay(900000)
end

This code results in a crash, as soon as I change the timer value to 1000000 (=1sec) there are no more crashes.

I tried adding a 100uF capacitor, no difference

to solve the connection problem
I tried buffering the TX signal with a transistor to 5V, also no result

I tried another Huzzah module, no result

I'm getting desperate here

Re: ESP8266 Huzzah problem with ext power supply

PostPosted: Mon Dec 14, 2015 3:21 pm
by Reinier
ok, I found the crash problem...... that was caused by the watchdog timer...
odd thing is that with delays over 1sec it doesn't kick in and below that it does

problem with ext power supply however remains

Re: ESP8266 Huzzah problem with ext power supply

PostPosted: Tue Dec 15, 2015 3:59 pm
by Trickuncle
I saw the same thing - short delays reset the module while long ones sort of seemed to work. Try this code below; it should solve two problems at once.

First, notice there is no while loop. The while loop fails to let the module run it's own code when it wants to so it crashes. To get the code to perform periodic activity (ie., blink on/off), see the timer alarm line - it is programmed here for 250 ms and to endlessly repeat. When it goes off, the function 'ledblink' is called which simply checks the state of the output pin and toggles it. All the time waiting for the timer to go off is now given up to the module and it's wifi stack.

I don't know what power supply problem you are having but try this first off...

Code: Select all        gpio.mode(3, gpio.OUTPUT)

        function ledblink()
            if blink then
                blink = false
                gpio.write(3, 1)
           else
                blink = true
                gpio.write(3, 0)
            end
        end

        tmr.alarm(1, 250, 1, ledblink)