
Ellis
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.
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.
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
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
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
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
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.
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.
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.
For a 12" stroke linear actuator:
Limit switches only:
https://www.pololu.com/product/2312 $104.95
Potentiometer & limit switches:
https://www.servocity.com/hda12-2 $129.99
Linear Servo
https://www.servocity.com/hdls-12-2-12v 299.99
for less than $25 you have a potentiometer.
maybe i'm wrong, but, it's not an easy task to add a potentiometer.
This company started the trend. Any linear actuators you see PWM at servo city or anywhere are rebranded.
https://www.firgellirobots.com
https://www.servocity.com/servos/linear-servos
I do agree, if there’s an option to purchase a correct actuator for the application... if that’s part of the plan. But, if you came across this actuator currently in your possession for much less than a new $299 purchase, it’s going to be more cost effective to retrofit.
If 1 height is all you need, be potentiometer will do that, it’ll simply need a larger diameter wheel on the end. Or, you can look into getting a multi turn potentiometer from digikey - that’s the easiest and most robust solution.
https://www.progressiveautomations.com
Use a couple of pulleys to go around corners.
They work great for position feedback.
https://youtu.be/NsgG6o2HFr4
By having a potentiometer added to the actuator, the example i provided throughout this conversation would allow a servo control actually act as a servo - not control speed.
The conversation was never about controlling speed using a servo control. The conversation was about controlling output position like a servo does.
While there's been a bunch of input, no one read my posts with the intent of understanding the content. The purpose of my contribution was to provide a very simple and elegant solution that allows a linear actuator to act as a servo with precise control of positioning.
I recommend revisiting my previous posts in this thread. If I find time, i can draw a sketch for you - because i know this approach will be beneficial to many of you who create custom robots.
For short travel actuators, connect a spring loaded lever to the pot shaft, and connect a string to the end of the actuator or part you are moving. Wire this up the same as listed above.
I have used this in the past and it does work. You will need to mess with the pot values to get it to match the travel you want.
With the actuator Will mentioned, ( @$ 67.00) you can build a low cost servo for less than $150.00 with controller.
Any help is appreciated!
- Douglas