Deluxe HiTec HS-485HB servo motor control with arduino mega

I am trying to control Deluxe HiTec HS-485HB servo motor with arduino mega, a separate voltage source is used (5V). However, when I run the code with any input angle the servo rotates to the far right, and in case I let it as it is it will be certainly damaged, this is the normal servo motor code:

#include <Servo.h>
Servo myservo;  
 void setup() {
 myservo.attach(9); 
  }
void loop() { 
myservo.write(180);           
  delay(15);                          
 }

Anyone knows what is the problem? thanks in advance!

Note: The motor came with Tetrix max kit, is anything to relate it with the problem?

Is the Gnd(by that I mean the - side) of that separate 5V source connected to the Arduino GND? That is necessary for referencing the servo signal.

Yeah What a mistake, how did I miss that! I noticed that and It worked :+1:

BTDT, recognized the symptom!

1 Like

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