Go Down

Topic: Controlling a Firgelli linear actuator with Arduino Mega (Read 153 times) previous topic - next topic

firebirds11

Mar 19, 2017, 06:40 pm Last Edit: Mar 19, 2017, 06:52 pm by firebirds11
Hello,

I am trying to use a 6" Stroke Firgelli Linear Actuator with my Arduino MEGA. From what I understand, the actuator has limits of 1000 us and 2000 us. When I write myServo.writeMicroseconds(1000), the actuator is decreased all the way in. When I write myServo.writeMicroseconds(2000), the actuator is increased all the way out. However, I would expect myServo.writeMicroseconds(1500) to make the actuator go out about half way. However, when running the below code, the actuator does not move at all. Basically, I can't get the actuator to stop anywhere inbetween the limits.

Code: [Select]
#include <Servo.h>
  
Servo myServo;
#define PIN_SERVO (45)
 
void setup()
{
  Serial.begin(19200);
  Serial.println("Begin");

  myServo.attach(PIN_SERVO);
}
  
 
void loop()
{
  
   myServo.writeMicroseconds(1500);

}


The datasheet for the actuator is found here:

http://www.robotshop.com/uk/6-stroke-firgelli-automation-12vdc--35lb-force-linear-actuators-w--pot-feedback.html

The red and black wires are connected to the sabretooth that we are using for a motor controller. There are 3 wires for feedback, but we are not using those right now.

Thanks so much for any help! Also, I realize this was probably the wrong forum for it, and I apologize.

jremington

The actuator is just a motor with some gearing and a position feedback potentiometer. You misunderstand how to use it.

Post a link to the product page for the "sabretooth" and post your wiring diagram (not Fritzing, please).  If the sabretooth is a servo-type driver, it will not work without proper position feedback.

ardy_guy

Afaik, only the -R Firgellis operate like servos.

[irishAccent]Have you tried turning it off and on again?[/irishAccent]

firebirds11

#3
Mar 19, 2017, 07:39 pm Last Edit: Mar 19, 2017, 07:51 pm by firebirds11
The actuator is just a motor with some gearing and a position feedback potentiometer. You misunderstand how to use it.

Post a link to the product page for the "sabretooth" and post your wiring diagram (not Fritzing, please).  If the sabretooth is a servo-type driver, it will not work without proper position feedback.
Thank you for the help. Here is the diagram. Hopefully this is sufficient. The white wire next to the red is technically black for the power wires. Also, S2 is also being used with M1A and M1B to power another motor.

 

Here is the datasheet for the sabretooth:

https://www.dimensionengineering.com/datasheets/Sabertooth2x25.pdf

Product page:

https://www.amazon.com/Sabertooth-Dual-25A-Motor-Driver/dp/B008OMQUXC

Thanks again.


 

Konkon

If you want to position the actuator at a certain position you will have to use the 3 feedback wires (white, yellow, blue) of the actuator. You connect the white wire to +5V, blue to GND and the yellow to any of the analog pins of Arduino, lets say A3.  You can then fully retract the actuator (manually or through your program) and read the value on A3, by using analogread() function and see the value (it will be between 0 and 1023) and then you can fully extend the actuator and read the value on A3.

Alternatively, you can write the program such that as you extend/retract the actuator the program reads the value from A3 and keeps printing it on the serial monitor.

This will give you a map of the actuator's internal potentiometer value with respect to its arm position. Lets say when fully retracted the value you get on A3 is 200 and when fully extended the value is 800 then you know the total range of values is 600 (800 minus 200). Since the total stroke of the actuator is 6 inches, it means 100 point value per inch.

This mapping will also tell you the current position of the arm when you read the value on A3. Lets say you read the value on A3 and it comes out to be 300, it means that the arm is extended 1 inch (200 + 100). Lets say you want to extend the arm out an additional 1 inch. From your program will give the command to extend the arm while you read the value from A3, all this in a program loop. When the A3 value reaches 300 you stop.

Go Up