ESP8266 not rotating the servomotor 180 degrees

Hello everyone, I am using ESP8266 to control a servo motor (9g tower pro). But the problem is that when I use ESP8266 to control the servo motor, it does not swing the full 180 degrees. and I need it. but with Arduino, it turns the full 180 degrees. My esp8266 is the New Nodemcu V3.

What voltage are you using to power the servo and where is it derived from ?

What voltage is the servo control line using for its signal and what voltage is the servo specified to use ?

The default range for the servo pulses of ESP8266 servo lib is 1000 to 2000 µs. The servolib of Arduino has a default range of 544 to 2400 µs.
You can extend the range for the ESP8266 by giving the min and max values as additional parameters when calling the attach method.

I am using 5V from an Arduino uno R3 . The servo normal voltage is also 5V

How do i do that?

myServo.attach( pinNbr, 544, 2400 );

or what you like as as min and max pulselength. The min pulselength corresponds to angle 0, the max to angle 180° - frrom the library point of view. Whether the servo will really go to this angles depends on the servo,

If you are using the Uno as a 5V power supply for the servo (which is a questionable source of power anyway) then the Uno, ESP and servo need to have a common GND connection

Bear in mind too that the ESP output voltage is 3.3V What is the servo expecting on its data input line, bearing in mind that it is powered at 5V ?

I did like @MicroBahner and it worked

Thanks bro!! It works.

You're welcome. Glad I could help

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.