How to Automate Linear Actuator Using Arduino & Visual Programming
2025-10-08 | By Ron Cutts
License: General Public License DC Motor Drivers / Controllers Motors Arduino
In this step-by-step tutorial, you’ll discover how to create sequences that control your actuator with precise timing (in milliseconds or even microseconds). You’ll also see how to set the speed and direction of movement, giving you complete automation control. Perfect for beginners and advanced makers, this project shows just how easy it is to bring your actuator to life with Arduino + Visuino visual programming.
Step 1: What You Will Need
Visuino program: Download Visuino
Step 2: The Circuit
Connect the Power supply (batteries) pin (gnd) to the motor driver controller pin (gnd)
Connect Power supply (batteries) pin (+) to motor driver controler pin (+)
Connect the Power supply (batteries) pin (+) to the Arduino pin (VIN)
Connect the GND from the Arduino to the motor driver controller pin (GND)
Connect digital pin(6) from Arduino to motor driver pin (IN1)
Connect digital pin(8) from Arduino to motor driver pin (IN2)
Connect the Linear Actuator to the motor driver, as you can see on the schematic
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 in Picture 2
Step 4: In Visuino, Add Components
Add "Sequence" component
Add "Analog Value" component
Add "Start" component
Add "Toggle(T) Flip-Flop" component
Add "Speed and Direction To Speed" component
Add "Dual DC Motor Driver Digital and PWM Pins Bridge (L9110S, L298N)" component
Step 5: In Visuino Set Components
Double click on the "Sequence1" and in the Elements window drag to the left as many "Digital period" elements as you like. In this example, we will add 4 "Digital period" elements, and for each, we will set the Delay in the properties window:
Digital Period1: 1000
Digital Period2: 6000
Digital Period3: 10000
Digital Period4: 15000
Double click on the "AnalogValue1" and in the Elements window drag to the left as many "Set Value" elements as you like. In this example, we will add 4 "Set Value" elements, and for each, we will set the Value in the properties window:
Set Value1: 1000
Set Value2: 6000
Set Value3: 10000
Set Value4: 15000
Step 6: In Visuino Connect Components
Connect "Start1" pin [Out] to "Sequence1" pin [Start]
Connect "Sequence1" > "DigitalPeriod1" pin [Out] to "AnalogValue1" > "Set Value1" pin [In]
Connect "Sequence1" > "DigitalPeriod1" pin [Out] to "TFlipFlop1" pin [Set]
Connect "Sequence1" > "DigitalPeriod2" pin [Out] to "AnalogValue1" > "Set Value2" pin [In]
Connect "Sequence1" > "DigitalPeriod2" pin [Out] to "TFlipFlop1" pin [Reset]
Connect "Sequence1" > "DigitalPeriod3" pin [Out] to "AnalogValue1" > "Set Value3" pin [In]
Connect "Sequence1" > "DigitalPeriod3" pin [Out] to "TFlipFlop1" pin [Set]
Connect "Sequence1" > "DigitalPeriod4" pin [Out] to "AnalogValue1" > "Set Value4" pin [In]
Connect "Sequence1" > "DigitalPeriod4" pin [Out] to "TFlipFlop1" pin [Reset]
Connect "AnalogValue1" pin [Out] to "SpeedAndDirectionToSpeed1" pin [Speed]
Connect "TFlipFlop1" pin [Out] to "SpeedAndDirectionToSpeed1" pin [Reverse]
Connect "SpeedAndDirectionToSpeed1" pin [Out] to "DualMotorDriver1" > [Motors.Item[0] pin [In]
Connect "DualMotorDriver1" > [Motors.Item[0].Direction] pin [Out] to "Arduino" pin Digital pin [8]
Connect "DualMotorDriver1" > [Motors.Item[0].Speed] pin [Out] to "Arduino" pin Digital > Analog PWM pin [6]
Step 7: 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 8: Play
If you power the Arduino module, the Linear Actuator will start to move according to your settings...
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project that I created for this. You can download it here and open it in Visuino: https://www.visuino.eu
Download Visuino file: Linear-Actuator-Sequence.visuino