Go Down

Topic: Newbie - Frigelli L16P + LAC "Un rest movement", what is it I'm missing here? (Read 267 times) previous topic - next topic

ramsh

Hi,

I have a simple project using Arduino Uno, L16-P Miniature Linear Actuator with Feedback and the Firgelli Linear Actuator Control Board (LAC), I connected the Arduino to the LAC using pin -9 to "RC / Hobby Servo input signal" as in the image below:




the code is very simple:

Code: [Select]


#include <Servo.h>


#define PIN_SERVO (9)
#define START_POSITION (20)
#define END_POSITION (35)

Servo myServo;

void setup() {
   // set servo
   myServo.attach(PIN_SERVO);
   
   //open serial window for log
   Serial.begin(9600);
}

void loop()
{

SetStrokePerc(START_POSITION);
Serial.println("START_POSITION");
delay(5000);

SetStrokePerc(END_POSITION);
Serial.println("END_POSITION");
delay(5000);

}

void SetStrokePerc(float strokePercentage)
{
  if ( strokePercentage >= 1.0 && strokePercentage <= 99.0 )
  {
    int usec = 1000 + strokePercentage * ( 2000 - 1000 ) / 100.0 ;
    myServo.writeMicroseconds( usec );
  }
}



The Problem: when running the project the actuator stroke doesn't fully stop at the START/END points but keeps on moving a millimeter in and out all the time as shown in this clip 


What is it I'm missing here??

Thank you all in advance,
Best,
Ram

ramsh

for anyone else who encounters this the problem is the LAC is trying to drive the actuator to a point the actuator is not able to achieve so it is hunting back and forth, it can be eliminated by lowering the accuracy pot on the LAC just a hair and then power cycling the LAC board:



the end result.

Best,
Ram


Go Up