Components Required

Image Component Quantity Available in Kit
evive 1
USB A-B Cable 1
Micro Servo Motor with Accessories 1

Introduction

In this tutorial we will sweeps the shaft of a RC servo motor back and forth across 180 degrees.

Servo Sweep using evive and Arduino IDE

Circuit Diagram

In the following example, I will be showing you how to control servo through channel 1. Given below is the circuit diagram:

A Servo pin has three wires (Order to be connected in evive, left to right)

  • Brown wire: GND
  • Red wire: VCC
  • Orange wire: Signal
Caution: Power evive using a 12V 2A power adapter for smooth functioning of servo motor. The VVR (Variable voltage) should be close to 6V.

Logic Diagram

Angle at the start of the program should be 0 degrees. Then it should increase until it reasches 180 degree angle, then it should decrease until it reaches 0 degree angle.

Code

Servo Sweep using Arduino Uno

 

Arduino uno has 6 PWM pins: 3, 5, 6, 9, 10, and 11 which provide 8-bit PWM output with the analogWrite() function.

We will controlling serov using Pin 3.

Circuit Diagram

A Servo pin has three wires (Order to be connected in evive, left to right)

  • Brown wire: GND
  • Red wire: VCC
  • Orange wire: Signal

Servo Angle

Caution: Power servos using a 6V 2A power adapter for smooth functioning of servo motor.

Code