I require your help regarding a problem I’m encountering.
Description: i wrote a code that allows me to reach a position while controlling the speed of the motor .All the servo motors works just fine except the third one. i have been encountering a problem with the third servo motor. it keeps dropping. i think the current is not enough to make the servo motor move. but i have no predefined function that allows me to control the current .What can i do ? Help !
Hardware concerned: lss servo motors , raspberry pi
@derbel199 Can you perhaps give some additional details about the setup? Perhaps even a clear photo or two?
You mention current might be an issue - what power supply are you using, and what models are the three servos? Is it possible that the power supply cannot provide enough current for all three servos at the same time? When the others are not connected, does this third servo have a different behavior?
You also mention “dropping” - does that mean it goes into error mode and goes limp? If so, it sounds like the motor simply cannot handle the torque you want it to provide. Might that be the case? If it goes limp without an error, that sounds like the CL modifier command, though you mention you are not using any current-related commands.
To confirm, you have the servo configured correctly, as in a distinct ID, the same baud rate as the others etc.?
i have a lynxmotion lss arm that contains 4 servo motors. i have a power module. it is connected to the outlet. i m using a raspberry and yes i m using the lss python library . i m using a pid regulator and i m using the command " myLSS.moveRDM()". all the other servo motors work fine but this one using my script it does not move . When i use the predefined LSS.move() the servo works fine and the current is variable and it reaches 290 but when i run my script using LSS.moveRDM(), it does not move, the current is stable and it’s 125. i think that it is not enough to move the servo motor since this one is connected to another one so the weight that he lifts is big. the problem is occurring just with for this servo motor, the other servo motors using my script work just fine and the current are stable not variable .So how should i proceed ? i tried to give a bigger pwm pulse but it does not move still .
This seems like it might be the issue. In order to help troubleshoot though, it would be good if you can answer the individual questions above. Also, can you provide any photos or videos of what’s happening?
1)i m not using a batterie . it is connected to the outlet.
2)no it does not go to an error mode . the servo does not flash any light it just doesn’t move when i give him an RDM command . i measured the current it’s receiving the same current as in the programmed move() function in the lss python library and it actually does not drop just does not move .
3) i’m using a raspberry pi and the python lss library . (i do not configure the baud rate …)
4) yes i am. i m just using the move RDM()function as a command .
5) i ll try to upload a video .
Can you indicate the voltage and maximum current of the power supply?
Can you please write the exact command you are using? You indicate “RDM” which is a Raw Duty-cycle Move command; this effectively goes straight to the motor controller to have the motor rotate at a given speed in a given direction (as opposed to move to a position). Can you confirm this is what you want? Normally that is only used in a robotic arm when you are developing your own motion controller, since otherwise the servo would effectively act as a geared DC motor.
Are you certain the RDM feature is in the Python library? If you look at the lss.py file, the list of action commands include:
Are you in fact looking to create your own motion control algorithm using the raw duty cycle command?
1)12 V and when i use the getcurrent() funtion the output of the function can go up to 270 mA .
2) def moveRDM(self, duty):
return (genericWrite(self.servoID, “RDM”, duty))
yes this is what i’m using and i’m stopping the motor when it reaches the wanted position . yes i am developing my own motion controller.
3)i added the function. it is working fine and tested on the other servo motors of the arm . it’s just the second servo motor that is not moving . i’ll upload a video.
My apologies, from the way I interpreted what you wrote, I was expecting a custom robotic arm - this seems to be the stock 4DoF (no shells installed).
To confirm, you send the command, and although the servo does not move, the current goes up to 270mA without actually resisting a load? You mention the “third servo motor” - would that be the elbow? Is the servo an ST1 or HT1?
Appreciated. To confirm this command works properly with all other servos - it’s only the elbow which is problematic?
You mentioned “third servo” but in your last reply, “second servo”? Can you or have you tested that servo without a load? Does it rotate when the command is received?
yes the current is up to 270 mA and it does not move using moveRDM() using the predefined move() it works fine and the current is 270 mA too . and yes the command works with other servos only this one is problematic.
That’s certainly bizarre. It sounds like the servo is probably OK, just misconfigured. A few things to check:
Is the ID unique and correct? You might have accidentally assigned it to a wrong ID. This can be checked many ways.
If you ever changed the baud rate, verify that it’s correct
Can you confirm it’s in serial mode (as opposed to RC mode)?
Unplug all other servos and ONLY plug that one into the LSS adapter. Try to get it working on its own in any way (start with the LSS Config software). Do a factory reset if needed (via the button menu).
I have the same problem with a 4DoF Robot type ST1,
Servo motor location : - it is the second compared to the base.
- or it is the third compared to the clamp.
The command use : PID
PID on position for each servomotor everything works well ;
(" Output = kp * position_error + ki * error_sum + kd * previous_error - previous_error ")
The problem is here PID on the speed in the servo where I explained its location at the beginning(1) ;
(“pwm_pulse = error_speed * Kp + error_speed_sum * Ki + error_speed - previous_speed_error * Kd”).
I further explain where exactly the problem is :
first we know that the angle interval of this servomotor between 0 and 1800, then the interval where it cannot move with the PID on the speed is :
between 0 to 800 or 1800 to 1000 then where it is the horizontal arm will move upwards, means where it is the arm in charge that it needs a great torque to go up.
I vary the coefficients of Kp, Ki and Kd so that it can move,
There are times it moves suddenly to the extreme on the other side without stop, on the other hand I gave it an angle between 0 and 800 and there are times it doesn’t move anymore I continue to vary the coefficients, the servomotor destroys and burns because I spent Current, stall : 300mA.
@Stea Welcome to the RobotShop Community! Are you also using Python? derbel is not really having an issue with his algorithm (or no mention of it yet), just that one servo is not responding correctly.
“Second compared to the base” - so base / shoulder / elbow / wrist / gripper ? You mention it’s an ST1, so elbow?
Quite a few people creating motion controllers (not just this thread but others here as well). Trying to find others who worked with the LSS and PID and user midou posted here:
The torque at that point is non-uniform, so you might want to start by removing that servo from the elbow so it doesn’t have any load, then start implementing values for a PID, seeing if it moves, arrives at the correct position etc. After that, add a “torque arm” and you’ll again have to adjust the values. The HS1 and ST1 servos use brushed motors which require a fairly high PWM command to begin motion (overcome static friction), which might be one of the causes of your issue.