Tuesday, 31 October 2017

How To Use A Linear Actuator Control Board With Arduino

Arduino linear actuator control

Over the past few years, our support department has been receiving more and more questions about how to use a linear actuator with Arduino. We have never officially offered Arduino support. We have a couple of resources on our website and we've directed many people to Robot Geek and a couple of other Arduino pros.

The problem with this is that none of those resources cover how to drive a -P series linear actuator via Arduino and a Linear Actuator Control (LAC) board.

I thought it was time that I did a basic tutorial on how to accomplish this. I'm going to show you how to make the physical connection between the two boards, as well as cover a couple of common issues that our customers have. This will serve as the basis for any additional learning you may want to do with Arduino and linear actuators.

We'll start by going through the things that you will need to operate an actuator via Arduino.

1. -P Series Micro Linear Actuator

Our -P series micro linear actuators are designed to be operated via our LAC board. Using the board's RC input mode, you can effectively control your -P series actuator as you would an RC linear servo.

You can only use -P series feedback actuators with the LAC board. -R, -S and -I actuators will not work.

2. LAC board

As mentioned above, our LAC board was developed parallel to our -P series actuators, and the two are meant to be used together. The LAC board will also work with some larger actuators that offer position feedback. We do not sell such actuators however and can not offer support for this usage.

3. Arduino Board

We often use an Arduino Mega or an UNO around here for various experimentation and testing.

3. Source of Power

You will need either a battery or a power supply to power both your Arduino board and your LAC board. The power supply for your LAC must match the voltage of the actuator and the power supply for your Arduino must be appropriate for the board.

4. Potentiometer Or Another Way To Drive The Actuator

You will need a control mechanism of some type if you want to drive the actuator manually. You can also cycle the actuator using code, which is what we have done here. The code used to drive the actuator in our example is a modified version of the 'servo-sweep' example found in the Arduino library.

Why use an LAC board with Arduino

Using an -R series linear actuator is the simplest way to drive a linear actuator via Arduino. The -R actuators use the same 3-wire connector as a standard hobby servo. The LAC board however, offers a couple of advantages over just using Arduino and an -R series micro linear servo.

The first is that the LAC board allows you to monitor the position of the actuator using the position feedback signal. This is ideal for situations where you can't see the actuator, but want to monitor where it is along it's stroke.

Another reason to use an LAC and -P series device is that the LAC board offers you direct control over certain aspects of how the actuator functions. The LAC has 4 pots on it that allow you to control speed, sensitivity, and both extended and retracted end-of-stroke limits.

Of course, this setup might just happen to be what you have on-hand. If that's the case, keep reading and I'll show you how to get your setup working via arduino.

Wiring The LAC To The Arduino

There are a few things to understand when you're trying to use an LAC via Arduino:

  • First, as mentioned above, you are going to need an external power supply. You can use the same power supply to power both your Arduino board and your LAC board provided the input voltage of your Actuator and your Arduino is the same, but each board must be powered directly.
  • Second, the Arduino and LAC must share a common ground to function correctly. This is the most common issue our customers have when trying to drive their actuators this way.

Below is a wiring diagram showing how we've connected the  LAC board to our Arduino Uno.

linear actuator control board via arduino

The actuator is plugged into the board as usual. We're using the RC output on the LAC to connect the Arduino board via standard RC cable (red/black/white). The red wire has been cut at the LAC as it's not used. The black wire runs from the RC plug on the LAC to gnd on the arduino board. This is the common ground we mentioned before. The white RC wire runs from the RC output on the LAC to pin-9 on the Arduino.

That's it for interfacing the LAC and arduino, but now you need power. We have powered the LAC with a 12V power supply (this matches the 12V actuator) into the + and - terminals on the X6 block, as per the LAC datasheet.The Arduino board is powered by it's own 6V power supply with positive plugged into the -vin terminal, and - plugged into -gnd.

As for code, we used a slightly modified version of the Servo-Sweep example found the Arduino software.

As you can see, this is a relatively basic way to cycle the actuator in and out.

If you are so inclined, you can use your own code and a switch of your choosing to actuate the device another way. This could be via a push button, proximity sensor or any other Arduino-compatible sensor you choose

Below is the code that we used for this example. It is the basic Servo-Sweep example code from within the Arduino software. The only part we modified is the delay.

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15ms for the servo to reach the position
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15ms for the servo to reach the position

Tuesday, 17 October 2017

Opening And Closing Windows With Linear Actuators

Opening Window With Linear Actuator

It's becoming a fairly popular project to automate household windows. Using linear actuators is the most cost-effective and simple way to achieve this.

There are a lot of reasons that you may want to consider automating your home windows, skylights or vents.
  • To prevent your home from getting too cold at night
  • If it is in a difficult to reach spot
  • To keep bugs out at certain times of day
  • For noise abatement if you live near a railroad or airport
  • Just for fun!
Automating your home's windows, skylights or vents is a project that anybody can take on. With only a few basic tools you can create a system that will open windows with the push of a button, wireless remote or even on a timer switch.

Related article: Choosing The Correct Actuator For Your Application

If you're up for taking on a more difficult project, you can use an arduino board to control your actuator. This will open up dozens of new ways that you can control your actuator setup. You can use motion sensors, clap sensors, light sensors, voice command, bluetooth or other inputs to determine when your device opens and closes. This can be particularly useful if you're not home often.

We do not officially support arduino. We do however offer a few helpful resources here. The best place to go for arduino support are the arduino forums.

Step 1

Measure the distance that your window must travel, and select an appropriate actuator.

Our micro linear actuators are small and discreet, making them ideal for applications where you don't want a massive device in your face every time you go to your window

That said, our actuators have a maximum stroke of just under 12". This will be plenty for windows that swing up or out, but you may want more stroke for windows that slide. 

Step 2

Decide how much force and stroke you need and order the actuator and switching mechanism that you want to use. As mentioned above, this can be a simple button or rocker switch, a remote control or an arduino setup.

Step 3

Mount the actuator. Mount the device appropriately for the window you intend to open. Actuonix actuators come with a hardware mounting kit so you won't have to buy anything extra for mounting. Ensure that the actuator has space to move freely and not bind up at any point along it's travel path.

Step 4 

Wire up your switching mechanism according to the data sheet for the switch you're using. You are going to need a power source for this. For indoor applications, most customers use one of our DC power supplies rated at a voltage appropriate to your actuator, either 6V or 12V. 

Related Article: How To Make A DIY Remote Controlled Door Lock

This is one of many household tasks that can be automated using linear actuators.

If you have a project idea and need help choosing the best device to suit your needs, give us a shout via email or phone. Our dedicated sales professionals will be happy to help you choose the best product for you. If our products aren't the best fit for your application, we will always try to recommend another company that can help you out.

Friday, 13 October 2017

2017 FRC Team Sponsorship Winners

The time has come to announce the winners of our 2017 FRC team sponsorships! 

In early 2017, we started looking for new ways to actively support young engineers and robotics enthusiasts. This lead to the creation of two brand new programs - our Scholarship Program and Our FRC Sponsorship Program.

The Actuonix Motion Devices FRC team sponsorship program is brand new for 2017. It was designed as a way for us to give back to the engineering and robotics communities. 

For several years now, we have supported our local FIRST Tech Challenge team and we're excited to reach out to the larger FIRST community and offer more teams the opportunity to win financial and product sponsorships.

I have to say that choosing the winning teams was not easy. We received a big stack of applications that we had to sort through and try to do our best to choose according to demonstrated financial need, teams that had a plan for how to use our products, and of course, those that followed the instructions and applied according to the directions given.

And so, now it's time to announce the winners...

$500USD Financial Sponsorship

Team 6314 - DM Robotics from Scottsdale, Arizona.

Team 1729 - Team Inconceivable! from New Ipswitch, NH.

$250 Product Sponsorship (In-store credit)

Team 6619 - GravitechX from Livermore, California.

Team 2585 - Bellaire Robotics from Houston, Texas.

Team 5618 - From Plessisville, Quebec.

Thanks to all of the teams and mentors who took the time to apply and share this opportunity with other teams. We appreciated all of the interest we got in this opportunity and are looking forward to continue supporting FRC (and FTC) teams moving forward.

Winners will be contacted in the near future to tell them how to take advantage of the sponsorship.