Controlling Actuonix linear controller in control loop

Hi all,
I am a beginner with the use of linear controllers so I apologise if I have any oversight.
I am using Actuonix P16 50 256 12 P with the LAC control board using a separate power supply, and arduino UNO for programming. I plan to do closed loop control with a load cell so that ideally I can command the actuator to extend until a certain force is sensed by the load cell, and then the actuator should stop in position at that desired force.

Unfortunately, I have been finding it hard to precisely control the P16 actuator. Currently I am trying to command with PWM mode as defined in the datasheet, however it does not seem sensitive enough to minor increases in dutycycle. For example i try to command it to go to 2 specific locations as below, it has a lot of jitter and cannot stay stationary at the 57 duty cycle point until a minute after it is commanded.

const int pwmPin = 5; // Choose the PWM pin on your Arduino board
const int ledPin = 10; // Choose the PWM pin on your Arduino board

void setup() {
// Initialize the PWM pin as an output

pinMode(ledPin, OUTPUT); // Set the LED pin as an output
pinMode(pwmPin, OUTPUT);
Serial.begin(9600);

digitalWrite(ledPin, LOW); // Turn the LED off (LOW level)
delay(3000);

analogWrite(pwmPin, 50);
digitalWrite(ledPin, HIGH); // Turn the LED on (HIGH level)
Serial.println("duty):50 ");
delay(5000);

analogWrite(pwmPin, 57);
digitalWrite(ledPin, LOW); // Turn the LED on (HIGH level)
Serial.println("duty):60 ");
delay(5000);

}

void loop() {

}

Hypothetically, I want to be able to command the actuator to descend in increments of 10N minimum, which means millimeters of movement at a time if possible. With the current PWM method, I cannot get this precision of movement.

Does anyone have a thought on a better way to control this actuator? Some way to control it like a DC motor so that it just extends until the feedback from the load cell tells it to stop? Thank you for advice.

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

May I suggest you first qualify your load cell to determine how linear it's response is, how stable it is and how much time is required to get a response after a know force is applied.

And how repeatable it's resistance is.

Hi Paul,
Thank you for your response. I have done tests with the load cell and its response is relatively linear and stable and fast. For the purpose of this project it performs well, and it is only the actuator control that I cannot seem to figure out. Would you have any advice on this part?

Do you have a link to documentation for the actuator control? So we can both look at the same document!

The PWM frequency is almost certainly not 1 kHz, as the data sheet seems to require. Is the control voltage 3.3V, as also required?

Please read the instructions in the "How to get the best out of this forum" post, state which Arduino you are using and edit your post to add code tags.

Note that there are four other methods of controlling the actuator via the control board.

Post a link to it's user manual.

1 Like

While waiting for the use manual, may I point out the actuator has a built-in potentiometer for feedback, but by using a separate device for feedback, the only use of the built-in pot is the initial position of the actuator after that all feedback is from the load cell.

1 Like

The arduino pin i am using was specifically chosen as it is approximately 1000 Hz (pin 5 on Arduino UNO). Before I chose this pin I did indeed have problems due to the discrepancy in PWM frequency required and supplied.

And I understand there are 4 other methods, however PWM was the best for my application and is what I am currently attempting to solve. I have tried the USB method, and it is a bit more reliable however I still have problems commanding it as sometimes it does not do what i command it to.

Thank you for the advice

Absolutely

and for USB control

I have tried PWM control and USB control. USB control has less jitter, although it is not very reactive. For the purpose of my project, PWM control is ideal as I want a closed loop control with feedback from the load cell, whereas if i use the USB control it is essentially a manual position control. I essentially want it to work like a DC motor where the actuator extends until a load desired is reached, and then the actuator stops in that position for a chosen amount of time before retracting.

The device has a DC motor that draws 1 Ampere maximum to make the device move. Can you provide a schematic showing how you are using the device WITHOUT using the factory controller board?

Did you bother to read post #6? The default Arduino PWM frequency is not 1 kHz.