Control Linear Servo Actuator With Potentiometer Using Visui

About the project

In this tutorial you will learn how to Control Linear Servo Actuator with Potentiometer and Arduino using Visuino program.

Project info

Difficulty: Easy

Platforms: ArduinoDFRobotVisuino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Jumper wires (generic) Jumper wires (generic) x 1
Arduino UNO Arduino UNO x 1
DFRobot Gravity:Analog Rotation Potentiometer Sensor V1 For Arduino DFRobot Gravity:Analog Rotation Potentiometer Sensor V1 For Arduino x 1
Linear servo motor Linear servo motor x 1

Software apps and online services

Visuino Visuino

Story

Step 1: What You Will Need

  • Arduino UNO (Or any other Arduino)
  • Linear Servo Actuator
  • Potentiometer module
  • Power Supply
  • Visuino program: Download Visuino

Step 2: The Circuit

  • Connect Servo motor "Orange" (signal) pin to Arduino Digital pin[2]
  • Connect Servo motor "Red" pin to Arduino positive pin[5V]
  • Connect Servo motor "Brown" pin to Arduino negative pin[GND]
  • Connect potentiometer module pin [Out] to arduino analog pin [A0]
  • Connect potentiometer module pin [VCC] to arduino pin [5V]
  • Connect potentiometer module pin [GND] to arduino pin [GND]

Step 3: Start Visuino, and Select the Arduino UNO Board Type

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

Step 4: In Visuino Add & Connect Components

  • Add "Ramp To Analog Value" component (This component is not necessary, but it ads a smooth start of the servo, so it is recommended, you can adjust the values in the properties window)
  • Add "Servo" component
  • Connect Arduino analog pin [0] to "RampToValue1" pin [In]
  • Connect "RampToValue1" pin [Out] to "Servo1" pin [In]
  • Connect "Servo1" pin [Out] to Arduino digital pin [2]

Step 5: Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Step 6: Play

If you power the Arduino module and change the potentiometer tha servo motor will change its position.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.com

Schematics, diagrams and documents

Visuino File

Code

Visuino File

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...