Close

ESP8266 resets itself -_-

A project log for phone <> ESP8266 spaceship

ESP8266 experiments to control a toy spaceship

sophi-kravitzSophi Kravitz 03/16/2017 at 16:3711 Comments

I've got an annoying problem.

The ESP8266 resets itself intermittently- my guess is that it's power fluctuations since I've got 2 DC motors riding on it. The forums are full of people with similar issues, but the solutions aren't the same per problem. I'm using the Adafruit Huzzah Feather, which probably has a bunch of stability rolled into it.

Step one: separate the Huzzah board from the motors and see if that fixes the problem.

Step two: add a bigger capacitor to the motor power rails (I have a 2.2uF there currently). The motor is powered from 6 AA batteries.

Step three: do some of the stuff that people suggest works in the forums, like downgrading to Arduino 1.6, flashing with Generic ESP8266 and pulling GPIO up or down via hardwiring. This all seems flaky to me though.

Discussions

Sophi Kravitz wrote 03/16/2017 at 18:25 point

UPDATE: I have separated the Huzzah Feather from the rest of the board, by which I mean instead of having the HF soldered directly to the protoboard, it's now attached by 3" wires. Added a 1000uF cap on the power rails, and the reset problem seems to have gone away. I've flashed the board a few times now and it's stable. 

  Are you sure? yes | no

deʃhipu wrote 03/16/2017 at 17:05 point

You didn't say how you are powering the whole thing, or how much juice the motors need.

If it's a single 3V coin cell, and the motors are NEMA17, then I foresee problems.

Also, how are the motors connected? Are you using a motor driver? Is it protected from backcurrent? The motors can generate quite a voltage spike when they change speeds, and that would reset or fry pretty much anything.


  Are you sure? yes | no

Sophi Kravitz wrote 03/16/2017 at 17:15 point

I am powering the motors from 6 AA, they are in a remote controlled car, so this is the power method that was supplied with it. I'm powering the ESP with a 3.7V 500mAH Li-ion battery. ESP need 300mAH to stay alive. Grounds are all connected (motors, batts, ESP).

Yes, the motors are being driven by TC4424 (150mA)

  Are you sure? yes | no

deʃhipu wrote 03/16/2017 at 17:22 point

Wait, so the motor is powered from a separate source than the ESP8266? How are power fluctuations supposed to affect it then?

  Are you sure? yes | no

Sophi Kravitz wrote 03/16/2017 at 17:15 point

I am powering the motors from 6 AA, they are in a remote controlled car, so this is the power method that was supplied with it. I'm powering the ESP with a 3.7V 500mAH Li-ion battery. ESP need 300mAH to stay alive. Grounds are all connected (motors, batts, ESP).

Yes, the motors are being driven by TC4424 (150mA)

  Are you sure? yes | no

Sophi Kravitz wrote 03/16/2017 at 17:15 point

I am powering the motors from 6 AA, they are in a remote controlled car, so this is the power method that was supplied with it. I'm powering the ESP with a 3.7V 500mAH Li-ion battery. ESP need 300mAH to stay alive. Grounds are all connected (motors, batts, ESP).

Yes, the motors are being driven by TC4424 (150mA)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/16/2017 at 17:56 point

TC4424 are not motor driver :-/ They can handle high currents but only during short spikes. Use capable MOSFETs instead :-) (they are meant to be driven by the TC44xx)

Oh and you mistake mA and mAh, current and capacity... (and H is Henry, a unit of induction, not time)

Furthermore, be careful how you connect all the grounds together. There should be only one point where the digital domain is connected to the power domain.

Finally : get a scope ;-)

  Are you sure? yes | no

Sophi Kravitz wrote 03/16/2017 at 16:53 point

Also, step one, separating the Huzzah from the motors seems to have done the trick ;)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/16/2017 at 16:47 point

2.2µF is.... highly inadequate :-D

If you want to protect the control electronics from the motors, you should consider an inductor (say, 100µH) surrounded by 2 large capacitors (in the 470/1000µF range if you have) to make a "Pi" filter. The contrl electronics shouldn't draw much current so from the little I know, I might be safe.

Is there a risk of ground loop, or interference of the motor through the drivers ? how isolated are they ?

  Are you sure? yes | no

Sophi Kravitz wrote 03/16/2017 at 16:52 point

I have diodes on the power rails so I don't think the motors can interfere with the drivers. However you have a good point about the 2.2uF on the power rails being insufficient. I was going to go with a 470uF. no inductor (I don't have one handy).

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/16/2017 at 16:58 point

diodes protect from backward currents but not from spikes on the power rails. The current has to go somewhere !

A 3.3V device should be able to work from 3V to 3.6V but the delta of 0.3V is less than a standard diode drop, the power supply could make abrupt changes and destabilize the voltage regulator...

In any case, what I write here is pure warm air : useless.

Get a scope and spy on the power rails :-)

  Are you sure? yes | no