Asked — Edited

Linear Actuator Ezb Script

I have looked on the community and don't seem to be able to find a simple answer on how to control a Linear actuator.

What I am doing is making my Tin Man robot upper body rise up or down on command. I have a 12" actuator. It has two wires. To change directions you reverse the two wires. I would like to use one half of a Hbridge motor control. The motor control I have is a two in one Hbridge. I thought of using a movement control but I already have one controlling the wheels.

The linear actuator is moved by a 12v dc motor. I will power the actuator with 12v from my two twelve volt lead acid batteries. Do I just control the Hbridge with servo code. My linear actuator has limits up and down.


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

PRO
Synthiam
#1  

A servo is not a motor. A servo consists of a motor, gears, circuit board with intelligent logic AND a positioning sensor.

An hbridge merely moves a motor in one of two directions with stop

Find out more about a servo here, in ezrobot’s fantastic learn section: https://synthiam.com/Tutorials/Lesson/48?courseId=4

Once you’ve become knowledgeable about what components make up a servo, and why’re they’re necessary for positioning, you can begin to understand how to apply that to your custom linear motor actuator. Compare a servo’s features to your linear actuator to understand what is missing...

What your application is missing are:

  • an hbridge to move the motor
  • a feedback system to know the position

Perhaps look into one of two solutions:

  1. use the pcb of a servo and it’s potentiometer mounted on the actuator to control an hbridge that moves the motor
  2. use a solution provided by dimension engineering which combines their sabertooth hbridge with kangaroo positioning
#2  

Thanks DJ. I have an hbridge I do understand the difference and how a servo works. I do not really need a feedback system as I will probably send an up command or a down command and let the limit switch on the actuator stop the motor.

I know this sounds crazy but I am trying to make this easy. If I connect one side of my Hbridge with two servo ports and connect the two wires from my actuator to motor one output what code would I need. Is it possible to use the limit switches to stop motor or will I have to add a potentiometer to make it work.

What would the script look like.

#3  

Script would just be digital on and off commands. See this excellent tutorial by @Rich for how to wire and control an H-Bridge. You could just use half of it for one motor/actuator. https://synthiam.com/Tutorials/UserTutorials/130/1

You can certainly use the limit switches, but you will also want timers in your script to turn off the digital port some time after the movement stops if you are not going to provide position feedback.

Alan

PRO
Synthiam
#4  

Would it be difficult to add positioning feedback to the mechanism - since you're considering adding TWO limit switches?

Because what I recommend is taking the guts out of a servo and use its potentiometer and electronics connected to your HBridge - then you can use it as a servo.

See, if you take a servo apart and look at the PCB, it'll have two wires going to the motor. If you connect those two wires to an HBridge input with the potentiometer connected to the actuator, you just made a servo:D

Seriously - it'll be WAY easier and more robust to do it that way. The servo electronics are real tiny and won't occupy much space. The whole contraption will plug directly into the EZ-B and be controlled the same way a servo is.

An HBridge takes the logic voltage of two input pins to determine what direction to spin the motor - including braking. So, if you connect the two motor wires from a servo PCB to the HBridge inputs, the servo PCB can now control a motor based on the HBridge's power specifications.

As TechGuru said, if you depend on limit switches, you'll need a timer running. If you were to perform a swat analysis on these two scenarios, the servo PCB would win by a landslide.

So, if you're going through the effort of installing TWO (2) limit switches, that's twice the amount of work than installing a single potentiometer. servo method is half the work:D

And think of the dances and animations that you will have control of by using a servo control in ARC! Really bring your tin man to life

#5  

Sorry DJ. I must not have said that the Linear actuator that I purchased has already two limit switches. I like your idea about the servo mod.

Let me get this straight. The Ezb controller would send digital signals to the modified servo with the servo motor wires running to the servo motor and to the digital ports on the Hbridge in parallel. That would work? How will the dc output of the modified servo work through the Hbridge. If this will work it is a great idea. This would give a lot of control for the linear actuator.

Brilliant.

PRO
Synthiam
#6  

Not a modified servo, a real Servo. A standard servo.

A modified servo does not have a positioning.

By adding the positioning potentiometer to your actuator, you can use the hbridge and servo pcb as a real regular servo in ARC.

#7  

Do you know about servo City linear actuators with PWM command ? They can be operated directly by EZB digital ports. They're real Servos. They're costly, but solve all problems.

#8  

I guess I used the wrong word. I meant the servo that I am going to hack the servo motor output. I called it modified as I modified it. Also I was have another question. Will the potentiometer be run long enough to allow the 1’ rise of my actuator. Actuators are run somewhat long to reach their height.

I also thought about coding the time the motor runs to adjust height. Would that be accurate enough. I imagine that the time wouldn’t be consistent and I would loose indexing.

Thanks for the heads up on the servo City actuator. I don’t know if they mill meet my needed specifications. I also know they are around 2 1/2 more expensive. I will check. Thanks Leonardo.