DIY GUY ChrisJLCPCBBob Alsone
Published © Apache-2.0

High torque servo motor control

High torque servo motors are special, so here is a special tutorial to learn how to use them with Arduino baord.

BeginnerFull instructions provided2 hours22,041
High torque servo motor control

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
We used this Arduino in our tutorial to control the servo motor
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
You can use this smal size servo to test your skills, we used another servo which is the Carson CS6 (high torque servo)
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
analog input controller to monitor the servo
×1
Breadboard (generic)
Breadboard (generic)
×1
EMax 12g ES08MD high Sensitive servo
Seeed Studio EMax 12g ES08MD high Sensitive servo
×1
Arduino UNO
Arduino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE
EasyEDA
JLCPCB EasyEDA
We used EasyEDA to create the wiring diagram for the testing circuit

Story

Read more

Schematics

Circuit diagram

Code

Arduino Knob example from the vservo library

Arduino
/*
 Controlling a servo position using a potentiometer (variable resistor)
 by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

 modified on 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Knob
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there
}

Credits

DIY GUY Chris

DIY GUY Chris

48 projects • 331 followers
I'm having fun while making electronics projects, I am an electrical engineer in love with "Do It Yourself" tasks.
JLCPCB

JLCPCB

68 projects • 38 followers
JLCPCB, is the largest PCB and PCB Assembly prototype enterprise in Asia. Coupon code "JLCPCBcom" for all and permanantly available.
Bob Alsone

Bob Alsone

8 projects • 4 followers

Comments