Linear servo random pulsations

Hello, I need some advice for one of my projects.

Basically I want to make a scale model o a Four Poster Test Rig which is basically a vehicle test using 4 actuators attached to the four wheels.

image below for reference

for this project I have four robotzone 4-2 linear servos, since is just a scale model i dont want to receive feedback from the servos or make them move with specifics loads, i just plan to make them move by random pulsations at a an amplitude of 4 inches probably.

Is it possible to do this with an arduino uno and its respective power supply?

thanks

Please post the datasheet for the servo units.

1 Like

Very probably. If you meant its an external power supply that handles the current needed by four actuators.

We'll see if your actuators are naked or if they have a servo controller build in.

If it's just a motor you can make go left and right controlled only by limit switches the code will be a bit more involved than just using the servo library like we see in the IDE servo sweep example.

a7

Its this servo

Yes I will be using a 12V 30A external power supply, I was planning to make the 4 servos do random movements by using a on/off switch which i think it relies more on the code but i feared i might need to buy a servo control module, something like a PCA9685

For more context this are the servos I’m using:

Spendy times four! Nice stuff.

You good:

The linear servo is designed to simply plug into a servo controller and run without any additional tuning or wiring from the end-user.

The least Arduino board can easily control four servos. It will take four output pins one each.

The code can be very simple, take a look at (and even run your linesr servos) with the sweep example from the IDE.

https://docs.arduino.cc/learn/electronics/servo-motors/

You will need a real power supply.

You might like to play with the code before you do anything more

Change the instances of 5000, which in this context means 5 seconds, to lower values to get the action going a bit faster and…

… start calling yourself a programmer!

HTH

a7

Yes.
It looks like a simple PWM signal, 0 - 255, for an UNO, will give You 256 different positions.

I believe this linear servo will act like a 360 servo and a ballscrew... your wokwi from last week seems a perfect fit... servoXYSlowFast - Wokwi ESP32, STM32, Arduino Simulator

The video shows it is a DC motor using polarity.

1 Like

I can't see any video without signing in?

I'm not sure what you mean, this actuator works on servo signals and I would guess that 0 "degrees" would be fully extended and 180 fully retracted or vice versa.

@jooffles - the servo library accepts alternate ranges for either control by angle or by pukse width in microseconds, so you can be assured that full range full control is possible.

I didn't see your 12V 30A power supply statement in my haste. If you move them all at once there will be a maximum current; you can get away supplying less if you don't move them all at once.

a7

You would send "random" servo commands to position the actuators at different extensions between fully retracted and fully extended (4" stroke). The program must take into account the time that the linear servo actuator needs to make a commanded move, and delay accordingly between commanded moves.

writeMicroseconds()

Writes a value in microseconds (us) to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft. On standard servos a parameter value of 1000 is fully counter-clockwise, 2000 is fully clockwise, and 1500 is in the middle.

The timing of the linear servo PWM pulse, corresponding to given extensions, is stated on the product page:

PWM Signal (Fully Retracted) 	1900µs
PWM Signal (Fully Extended) 	1100µs

When you attach the servo object, you can put in the optional minimum and maximum pulse width arguments

  myServo.attach(thePin, 1100, 1900);

and then xx (0 <= xx <= 180) degrees in a call like

  myServo.write(xx);

will be full range motion.

a7

so can I do the pmw signals with just de arduino or do I need to buy a servo controller like a PCA9685?

If you have a limitation and need to save pins, use the PCA9685.

a7

I will say: No. This is not a real servo. It's a DC motor controlled device. Let be there is internal logic that translates the PWM to positions for the motor.

No. As I read in the datasheet it's a DC motor controlled by some builtin logic, but PWM is stated as the control method.

I can't tell if you are brewing agreeing or disagreeing. From the product page for the " Heavy-Duty Linear Servo" @jooffles linked to:

While a linear servo may appear similar to a linear actuator, it functions quite differently. A linear servo responds to a PWM signal - to achieve the same results, a linear actuator would require a motor controller with a feedback loop capable of responding to a PWM signal. The linear servo is designed to simply plug into a servo controller and run without any additional tuning or wiring from the end-user.

a7

It is a "real servo", and performs exactly as expected for a standard hobby servo, except that instead of shaft rotation, it does shaft extension.

Similar devices have been on the market for many years, at much lower cost than this particular heavy duty model.

Yes.

I thought this was for a scale model, which might have meant less extension than 4" and less mass capability and way less expensive.

a7

Yes, and no. It acts like a servo but it's not controlled the way common servos are controlled, as I read the datasheet.
The PWM from an UNO runs at ca 490 Hz, or the double, depending on pins, at standard setting.
Standard servo runs at a lower frequency, as I've experienced. 1.5 ms to 2.5 ms pulse width for 0 to max can't work at 980 Hz, in my opinion.

Please quote the data sheet specification that gave you that impression.

The PWM from an UNO runs at ca 490 Hz, or the double

That is for analogWrite(), which has nothing to do with servos.

My understanding is that the Arduino servo library outputs pulses of the designated width at the standard 50 Hz servo frequency (updates every 20 ms).