Servo motor doesn't complete your course

I’m trying to control a servo motor (micro servo 9G SG90) through Blynk with a slider but despite having configured the slider to work between 1 and 180 the servo only moves up to 90 degrees. If I increase the slider to any number above 180 it stops at 90 and goes back to 1. Any idea what it could be?

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include<Servo.h>

char auth[] = "xxxxx"; 
char ssid[] ="xxxxx"; 
char pass[] = "xxxxx"; 

Servo servo1;

BLYNK_WRITE(V1)
{
  servo1.write(param.asInt());
}

void setup()
{
  Blynk.begin(auth, ssid, pass);
  servo1.attach(D1); 
   }
  
void loop()
{
  Blynk.run();
}

maybe in web panel slider step is not set to 1?

http://www.ee.ic.ac.uk/pcheung/teaching/DE1_EE/stores/sg90_datasheet.pdf

Tiny and lightweight with high output power. Servo can rotate approximately 180 degrees (90 in each direction), and works just like the standard kinds but smaller.

90° In one direction then 90° in the opposite direction seems to be all that this servo is capable of.

Pete.

1 Like

I tried negative values ​​but the servo does not go beyond 90 degrees. I tried another servo and even opened it to remove the lock that limits its movement but I couldn’t. It seems to be a problem with esp8266 or with that brand of servo because I tried it without Blynk and the problem still persists.

So probably not something that this forum is going to be able to help you with.

Pete.

1 Like