Hardware Problems: Difference between revisions

From IoT with AME
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Stacks]]
[[IoT with AME|Home]]


=Hardware Problems - Current spikes, Flaky ESP8266 behavior=
=Embedded Hardware Problems=


The EP8266 is great: It gives your IoT device WLAN and IP connectivity for only a few bucks.
Bugs are not limited to software - plain electricity can be tricky, too! Sometimes it even kills (and I'm referring to Arduinos here).


On the other hand, the ESP8266 is quite a hand full: It creates power spikes that have negative impact on its own operation and possibly that of your circuit, it experiences out-of-the-blue resets that have to be dealt with, and it suffers hang-ups that can only be cured with a hardware reset or uttering "The IT Crowd" mantra ("have you tried turning it off and on again"; https://www.youtube.com/watch?v=nn2FB1P_Mn8).
* [[Staying well-grounded]] - Why not everybody can have their own GND (ground; this is important to the health of your Arduino!)
* [[Sufficient power-supply]] - Some chips suck (power)
* [[Port-Power]] - How to not power an Arduino (via an I/O port)
* Fun with [[pitfalls-power lan|power LAN]] adapters (don't plug your fridge into one)


I have had A LOT of problems with the ESP8266 before I had a lot of fun. Some can be solved with the proper power supply, a bit of hardware, and somewhat sophisticated error handling. Other, more persistent problems can only be addressed with resetting the chip or even cycling the power.
[[IoT with AME|Home]]
 
==Power Supply==
 
The chip sometimes needs quite a lot of power (current), in example when connecting to a WLAN, or setting up a connection. It definitely needs a proper power supply (using the 3.3V supply of the Arduino is NOT enough). Additionally, give it a 100uF or greater electrolytic capacitor across the power pins, as close to the chip as possible (I soldered it ONTO the chip). The capacitor acts as a buffer when the demand of the chip surges; this helps the stable, reliable operation of the chip and the operation of the rest of your device.
 
If you get erratic or unexpected behavior, try these measures first. I wasted hours looking for presumed software bugs that were caused by insufficient supply voltage, loose/ corroded contacts, and wimpy power supplies that could not supply the current required.
 
==Flaky ESP8266 Behavior==
 
It resets, it hangs, it does not behave as expected - what can you about it?
 
My Arduino library uses three levels of measures to straighten out the balking chip:
 
* Soft-reset, by issuing a "restart" command to the ESP
* Hard-reset, by connecting an Arduino digital port pin to the reset pin of the ESP. This just requires a piece of cable.
* "Turn if off and on again", by connecting an Arduino digital port pin to a transistor that controls the ESP power supply. That requires two transistors and a bit of wiring.
 
You can't do more without modifying the ESP8266 firmware.
 
[[Stacks]]

Latest revision as of 13:42, 24 June 2018

Home

Embedded Hardware Problems

Bugs are not limited to software - plain electricity can be tricky, too! Sometimes it even kills (and I'm referring to Arduinos here).

Home