ESP8266 (ESP-01) GPIO has problem with servo motor and power
Posted: Mon Aug 06, 2018 2:27 am
ESP8266 (ESP-01) GPIO#0 OR #2 doesn't work properly with servo motor when power resets with GND in ESP8266.
Source code is very simple. Just include <Servo.h> and move the servo from 0 degree to 180 degrees in loop().
Everything works fine if I reset the power of ESP8266 and then connect GPIO pin to servo's pulse pin.
But whenever I reset the power of ESP8266 with GPIO to servo still remained connected, servo doesn't work as programmed but moves in a wrong direction and stuck.
Servo motor is powered by 5V, ESP8266 is powered by 3.3V. Both are from Raspberry Pi and sharing the GND.
How can I solve this problem?
Source code is very simple. Just include <Servo.h> and move the servo from 0 degree to 180 degrees in loop().
Everything works fine if I reset the power of ESP8266 and then connect GPIO pin to servo's pulse pin.
But whenever I reset the power of ESP8266 with GPIO to servo still remained connected, servo doesn't work as programmed but moves in a wrong direction and stuck.
Servo motor is powered by 5V, ESP8266 is powered by 3.3V. Both are from Raspberry Pi and sharing the GND.
How can I solve this problem?