How to control actuator speed and direction using potentiometer

Hello everyone,
First of all I wanna say I'm new to this and don't have much knowledge about electronics.
I took over a project for a flight simulator and the group before me bought 3 actuators
K2g05-24v-BR-18 and a power supply s-500-24. What I'm trying to figure out is how to control these actuator using a potentiometer. They don't all run at the same time, so as long as I know how to control one I can control the rest.
I need to be able to control speed and direction where when I move the potentiometer to the right it would go down and when I move it to the left it would go up. Please guys let me know what I need to buy? How would I connect it? And what's the code that I need to write in order for this to work.

Thanks

Where's the datasheets ?
All I could find was this catalog (attached)

P-1789-WLlores.pdf (1.58 MB)

First of all I wanna say I'm new to this and don't have much knowledge about electronics.
I took over a project for a flight simulator and the group before me bought 3 actuators
K2g05-24v-BR-18 and a power supply s-500-24. What I'm trying to figure out is how to control these actuator using a potentiometer. They don't all run at the same time, so as long as I know how to control one I can control the rest.
I need to be able to control speed and direction where when I move the potentiometer to the right it would go down and when I move it to the left it would go up. Please guys let me know what I need to buy? How would I connect it? And what's the code that I need to write in order for this to work.

There's nothing in your post mentioning any particular arduino or uC. Please specifically what h/w you have (uC) . You might be on the wrong forum. You haven't supplied a datasheet. We're going to need more informaition about your actuator. Have you called Warner Electric to request a datasheet ? Also, I think there is something missing from your part number. We need a photograph (cell phone ok) of the actuator that shows the S/N plate with the model number with good detail. We also need one or two more photos of the actuator from different angles so we can see everything. If you have any documentation we need that. You stated you are new to electronics bu did not state your experience programming. We need to know that in order to communicate with you otherwise it is possible we could tell you exactly what to do and you wouldn't understand a word of it.

Hi.

Last December you already asked about this and got some correct answers.
Why don't you pick up that thread and go on over there ?
Did you actually do anything with the information over there ?
You should have been able to control those actuators by now, three full months should be enough to know how to read a potentiometer and to find out how to use that information to your actuator(s).
Hardest thing is to provide enough current.

here is the data sheet
http://www.warnerelectric-eu.com/pdf/catalogs/warner/electric_linear_actuators_and_controls_full_en.pdf
its a b track.
last time I posted this I didn't get information. and yes im new to programing also.
this might be easy for some people but not for me im more of a mechanical guy. I know how a potentiometer works and I know how this actuator works, I read so much.... however I still don't know what I need to buy? or whats the code that I need? and how I would hook up potentiometer to this actuators. or what other components I would need
please if you can help me send me what I need to do.

thank you again

We need photos of the actuator connectors.
Do you have mating connectors for the actuator since you apparently don't have the 24V dc power supply shown in the catalog ?

Also, I wouldn't recommend using that switching power supply without an AC variac to control the output voltage. You haven't even connected the actuator since December. You should have had enough information to connect it by now. What have you done in the way of obtaining mating connectors for it so you can hook it up ? Can you borrow a variable 24V dc supply from the school?
If not, that is the first thing you should get is a 24V dc adjustable current variable supply so you can test the actuator with no load at lower voltages and ramp up the voltage gradually.

I have a 24v power supply and I tested it and it worked
the power supply that I have is s-500-24
when I connect it, it goes up and when I reverse it, it goes down. and yes the actuators come with mating connectors
here is a pic of what I have

photo 1.JPG

here is one more

photo 2.JPG

photo 3.JPG

So your actuator doesn't have the pot built-in?

You need a Mosfet H-Bridge for Bi- directional control with a input circuit to read the pot and the uC in between.

If you don't know electronics and you don't know programming, do you mind if I ask why you took on this project ? How are you planning to complete it ? Are you expecting us to design and program it for you ? Is that your plan ? Don't you have anyone on your team who knows electronics or programming ?

JimboZA gave you this link back in DEC 2013.
http://www.ecs.umass.edu/ece/m5/tutorials/H-Bridge_tutorial.html

Why haven't you used it ? You question has already been answered 4 months ago
and you have not done anything with the information you were given then. Why should we spend any more time on this ?

No it don't have a pot built in. My plan was not for you to build and and program it.
When I took over this project I was told I'm only going to do the mechanical part and after everything was done the professor wanted more and more......I'm doing what I can I've been researching for ever trying to find a solution...the other people in my group don't do a thing........trust me if I new how to do something I won't ask... The way I'm writing it sounds like I'm lazy and I don't want to do a thing but that's not the case at all. So I don't mean to be rude but please don't give me crap I have a lot of my own if this easy for you then help me and if not then thanks for trying. And again my question was not answered before

ok . So if I understand you correctly, after 3 months , and reading everything on this post, you do not know what you need ?
(in general, I mean. If you were to order a "black box" that does everything you have asked for so far, which is drive the actuator
in one direction or the other based on a pot position) what would that black box be called (on the internet, or in a google search as far as the rest of the world is concerned) ? The question is based on the assumption that you have read everything posted on this post) . Can you answer that question ? (I'll post the links to the answer after you post your answer.)

I don't know what your talking about

I haven't been reading whats on this post
ive only been searching online

Then we've been wasting our time. You asked for our help and you won't even take the time to read what we post.
Until you have read this entire post I am not wasting any more of my time. I was going to post the links for you but not until you have read this post. There's nothing difficult about what you want to do. The hardware is availabble off the shelf capable of doing exactly what you described.

Using a [blankety –blank] circuit, the solid-state design of this motor speed controller does not use any mechanical switches and allows the control of both speed and direction through a single potentiometer. At its center position, the motor will be forced to stop (i.e. it brakes). Turning the potentiometer clockwise will cause the motor to start spinning slowly in the positive direction, with increasing speed up to the maximum supply voltage at it’s maximum position. Turning the potentiometer in the counter-clockwise direction will cause the motor to spin in the reverse direction, again starting slowly up to a maximum negative supply voltage. Note that in it’s center position, the motor will actually brake (motor terminals will be grounded) forcing the motor to stop rather than be in a “floating” or coasting position.

h bridge

FULL H-BRIDGE.
Do you know what the current rating is for your actuator ?

I need to be able to control speed and direction where when I move the potentiometer to the right it would go down and when I move it to the left it would go up.

If you have a pot, you can start experimenting with code that maps a variable from the pot 0 to 1023 output to a variable 0 to 255. Then use that variable in an analog write to PWM the LED on pin 13. Once you can brighten/dim the LED using the pot, then expand that code to forward/reverse an h-bridge that will actually control the actuator. Note that you did not request any absolute positioning of the actuator based on the pot position. This would require some type of feedback mechanism to be added.

He's a mechanical person. He doesn't know programming.
http://www.arduino.cc/en/Reference/Map

I need to be able to control speed and direction where when I move the potentiometer to the right it would go down and when I move it to the left it would go up. Please guys let me know what I need to buy?

The attached program does this. You have not explained what happens when the actuator reaches the limit at one end or the other but this program monitors the potentiometer. It prints the Direction and Speed. It continues to drive in that direction as long as the pot input is not at zero. (middle of the pot) . It drive in FORWARD direction for any count above 512 at a speed based on the Map function. It drives in the opposite direction for any count less than 513 at a speed based on the MAP FUNCTION. it continues to loop setting the direction at the beginning. In the middle of the pot, it will apply a low voltage in the 100mV range so the motor will barely move.. The motor driver is a DK Electronics Motor Shield which is a Full H-Bridge L293 based driver. There are numerous high current bidirectional Full H-bridge digital PWM motor drivers available on the net but you need to make sure you get one that has the "DIR" input pin and the "PWM" input pin . If it has those it will also have an ENable pin. Some of them are dual drivers for driving two motors. There are quite a few that have a potentiometer mounted to the PCB. Some of them use the pot as a speed control and some are set up like this program where the middle of the pot defines ZERO (no direction/no speed) and as the pot is turned in the positive direction the speed is set to forward and the speed is dependent on the position of the pot between midpoint and maximum positive endpoint. The reverse is true for the negative direction.If the pot is moved below the midpoint the direction is set to reverse and speed is a function of the wiper position between midpoint and maximum NEGATIVE endpoint. In the middle the motor is stopped. some of them have a "brake" function that shorts the motor leads if the wiper is in the middle region.within 50 or so counts of the midpoint. In the case of a flight simulator , this braking function would be desirable to prevent the weight of the simulator from moving the motor. I am not aware of any Motor Stop function (You can enable the Motor Release statement I commented out) in the Adafruit Motor Library so if anyone knows how to do that please jump in. Also, you may need to make a few changes to the code to work with the driver you select. If you get the ones that are already set up for bidirectional control via a pot then you won't have any input pins to use for uC control. Read the datasheets before you buy and make sure it is rated for enough current. You have not told us what the current (in Amps) rating is for your actuator and have not replied to that questions so that ball is in your court.

http://www.aliexpress.com/store/product/Free-shipping-New-0-24V-Dual-30A-H-Bridge-DC-Motor-Driver-Peak-60A-for-Robot/710410_634914339.html

 // Adafruit Motor shield library
// copyright Adafruit Industries LLC, 2009
// this code is public domain, enjoy!

#include <AFMotor.h>
int STATE =0;
int val=0;
AF_DCMotor motor(1);
int  pot =A0;
int  pot1 =A1;
int  pot2 =A2;
int  pot3 =A3;
int  pot4 =A4;
int  pot5 =A5;
void setup()
{
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Motor test!");
  pinMode(pot,INPUT);
  // turn on motor
  motor.setSpeed(200);
 
  motor.run(RELEASE);
}

void loop()
{
  // uint8_t i;
  
  
  
   int val = analogRead(pot);
   Serial.print("pot= ");
   Serial.println(val);
   if (val>512)
       STATE =1;
   if (val<513)
       STATE =2;
     
  
   switch (STATE) 
  {
    case 1:
      //do something when var equals 1
          Serial.println("FORWARD");
          motor.run(FORWARD);
          val = map(val,513, 1023, 0, 255);
           Serial.print("val= ");
           Serial.println(val);
          motor.setSpeed(val);  
          delay(1000);
          
      break;
    case 2:
      //do something when var equals 2
           Serial.println("REVERSE"); 
          motor.run(BACKWARD);
          val = map(val, 512, 0, 0, 255);
          Serial.print("val= ");
           Serial.println(val);
          motor.setSpeed(val);  
          delay(1000);
      break;
    default: 
      // if nothing else matches, do the default
      // default is optional
      delay(10);
  }
    
 
  Serial.println("tech");
  //motor.run(RELEASE);
  delay(1000);
}

ACTUATOR_no_delay.ino (1.46 KB)