Overview
This lesson we are going to rotate the servo motor.
Component Required
- EASY plug control board*1
- EASY plug Servo Module *1
- Keyestudio Micro Servo *1
- RJ11 cable *1
- USB cable*1
Component Introduction
If you want to use the Micro Servo and EASY PLUG control board to do some experiments, you need to use the EASY plug Servo extension module.
The EASY plug Servo module is extended into Registered Jack, so you can connect it to EASY PLUG control board using only a RJ11 cable.
The Servo module also comes with 3pins of 2.54mm pin pitch, fully compatible with servo pins.
Servo motor comes with many specifications. But all of them have three connection wires, distinguished by brown, red, orange colors. Brown one is for ground, red one for power positive, orange one for signal line.
Included with your Micro Servo you will find a variety of white motor mounts that connect to the shaft of your servo.
You may choose to attach any mount you wish for the circuit. It will serve as a visual aid, making it easier to see the servo spin.
The rotation angle of servo is controlled by regulating the duty cycle of the PWM(Pulse-Width Modulation) signal.
The standard cycle of the PWM signal is fixed at 20ms (50 Hz), and the pulse width is distributed between 1ms-2ms.
The pulse width corresponds to the rotation angle ( 0°~90°) of servo.
Micro Servo Parameters
- Operating voltage: DC 4.8V〜6V
- Angle range: about 90°(in 1000→2000μsec)
- Pulsewidth range: 1000→2000μsec
- No-load speed: 0.12±0.01 sec/60(DC 4.8V); 0.1±0.01 sec/60(DC 6V)
- No-load current: 200±20mA(DC 4.8V); 220±20mA(DC 6V)
- Stop torque: 1.1±0.01kg/cm(DC 4.8V); 1.3±0.1kg/cm(DC 6V)
- Stop current: 600±30mA(DC 4.8V); 750±30mA(DC 6V)
- Standby current: 4±1mA(DC 4.8V); 4±1mA(DC 6V)
- Operation temperature: -10℃〜50℃
- Save temperature: -20℃〜60℃
- Motor wire length: 250 ± 5 mm
Connect It Up
Connect the servo motor to EASY Plug Servo module. Brown line is for ground, red one for V pin, orange one for signal pin. Then connect them to control board using an RJ11 cable.
Upload the Code
What You Should See
After uploading the code, open the serial monitor, enter the number 1 to 9, and click Send, it will control the servo motor rotate at a certain angle.
Rotating back and forth
Complete the above project, you can also upload the code below to control the servo motor rotating back and forth at a certain angle.
Test Code
All Tutorials
- EASY plug Ultimate Starter Kit for Arduino STEM Education Tutorial
- EASY plug Ultimate Starter Learning Kit Project 1: Hello World
- EASY plug Ultimate Starter Learning Kit Project 2: LED Light
- EASY plug Ultimate Starter Learning Kit Project 3: Knocking
- EASY plug Ultimate Starter Learning Kit Project 4: How much light
- EASY plug Ultimate Starter Learning Kit Project 5: Buzzer clicking
- EASY plug Ultimate Starter Learning Kit Project 6: Capacitive Touch
- EASY plug Ultimate Starter Learning Kit Project 7: Fire extinguishing
- EASY plug Ultimate Starter Learning Kit Project 8: There’s flame
- EASY plug Ultimate Starter Learning Kit Project 9: Avoiding obstacles
- EASY plug Ultimate Starter Learning Kit Project 10: Servo
- EASY plug Ultimate Starter Learning Kit Project 11: Slide Position
- EASY plug Ultimate Starter Learning Kit Project 12: RGB
- EASY plug Ultimate Starter Learning Kit Project 13: Someone is in this area!
- EASY plug Ultimate Starter Learning Kit Project 14: Joystick
- EASY plug Ultimate Starter Learning Kit Project 15: Ambient Light
- EASY plug Ultimate Starter Learning Kit Project 16: Hello, kaka!
- EASY plug Ultimate Starter Learning Kit Project 17: I’m thirsty
- EASY plug Ultimate Starter Learning Kit Project 18: Is there gas leakage?
- EASY plug Ultimate Starter Learning Kit Project 19: Ultrasonic ranging
- EASY plug Ultimate Starter Learning Kit Project 20: What’s the temperature
- EASY plug Ultimate Starter Learning Kit Project 21: What time is it?
- EASY plug Ultimate Starter Learning Kit Project 22: I receive a signal