Control a Small Linear Actuator With Arduino

Introduction: Control a Small Linear Actuator With Arduino

This Arduino Linear Actuator Tutorial shows how to control a Firgelli Small Linear Actuator using an Arduino compatible board and various input sensors, including a Slider and Rotation Knob for direct control, Joystick for incremental movement, and three buttons with preset positions (preset in the code with each position assigned to a button, so when a user pushes a button the small linear actuator moves to that position).

For Arduino Linear Actuator projects the small linear actuators by Firgelli are excellent. These linear actuators have an internal controller which allows them to be operated just like a servo. By using the Arduino Servo Library we can simply send out the desired position to the actuator and it moves to the position.

Notice that you'll have to physically plug the linear actuator into different ports in order to move it with the different controls. If you have multiple linear actuators, you can control up to 4 simultaneously with this code.

Step 4: Analog Direct Control

For this section:

To use the Rotation Knob, plug your Linear Actuator into Digital Pin 9

To use the Slider, plug your Linear Actuator into Digital Pin 10

So what's going on here? We're mapping the absolute position from the analog sensors to the actuator position. It makes sense, you move the rotation knob or slider into a position, and the linear actuator matches that position.

Want to see some nonsense? Plug your Joystick into Analog Pin 0, and your Linear Actuator into Digital Pin 9. The joystick always returns to center position, causing the linear actuator to match and return to its center value. Not really all that useful if you wanted to use the joystick to move the linear actuator to a position other than center, which leads us to our next section. Make sure to return your sensors to their original pins before moving on.

If you would like a sketch that covers only this section of the tutorial, you can find it here.

Step 5: Incremental Control

For this section:

To use the Joystick, plug your Linear Actuator into Digital Pin 11

So what's going on here? This time, instead of mapping directly to the value of the joystick, we are using the joystick to increment the position of the linear actuator, allowing us to let go of the joystick and have the linear actuator stay where we put it last.

If you would like a sketch that covers only this section of the tutorial, you can find it here.

Step 6: Preset Controls

For this section:

To use the Buttons, plug your Linear Actuator into Digital Pin 6

So what's going on here? In this part, we are using button presses that send the linear actuator to pre-defined positions. This is simple and incredibly useful for when you know what position you'd like the linear actuator to be in under a circumstance defined by an input.

If you would like a sketch that covers only this section of the tutorial, you can find it here.

Step 7: What's Next?

Now you know three ways to control your linear actuator. Can you think of projects that would benefit from this? Do you have a box that you'd like to automatically open? How would you use a linear actuator to do that? All the muscles in the human body are biological linear actuators. Could you make a robotic arm that mimics this? What about making a table that can tilt? We'd love to hear about your project! Go forth and create!

Using a motorized linear actuator such as this one is less complicated, lighter, and certainly quieter than using a compressed air system for linear actuation. There are still cool things being done with air pressure and robotics though! Have you seen the Air Muscle? https://www.instructables.com/id/How-to-make-air-muscles!/ It's pretty cool, but you need a pretty big air compressor if you're going to use more than one of them.

HaHaHa in my Opinion it is a little bit overkill using so many parts to squeeze a Ball, I would give it to my daughter she will squeeze, bite, throw.. it the whole day, or maybe in a few month my daughter would like to play with electronic stuff, she already play with all my projects....