Go Down

Topic: Servo not working with library. (Read 1 time) previous topic - next topic

jfourie

Hi all. I got this high torque servo to open and close a vent.

https://www.robotics.org.za/index.php?route=product/product&path=297&product_id=648

Only problem is the servo is all over the place, It does not only have jitters but it will jump from one place to the net all the time or be stilll at random. So it seems the servo library does not work with this servo. What can I do to get it working, what do I need ? I assume I will have to modify the servo library.

JimboZA

I've never used a digital servo so I might be wrong, but from what I've read here in the forum they are controlled the same as analog servos and the library should work. But don't quote me; wait to see if someone like zoomkat answers; he's a bit of a servo guru.

This might be a power problem: even unloaded it may be drawing significant current, but alas your vendor doesn't say what it draws. Are you providing it a good 6-7V with enough current? Can you post a schematic and the Arduino sketch?

Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

jfourie

#2
Feb 16, 2016, 05:23 am Last Edit: Feb 16, 2016, 05:29 am by jfourie
Hi. Thanks for the reply.

Here is a video of what is happening with the big servo. I also feel that the wires are getting hot if it jitters like that all the time. I first thought it was the servo and took it back to the store I got it from and we tested it on their Arduino and it did the same. So then they got another one and it also did this so its the type of servo.They told me its something with the PWM settings in the servo library.

I am using the example Knob sketch .

https://www.youtube.com/watch?v=zZrC_ZxYK5k


jremington

If you are trying to power the servo with the Arduino, don't.
Use a separate power supply and connect the grounds together.

JimboZA

#4
Feb 16, 2016, 05:32 am Last Edit: Feb 16, 2016, 05:40 am by JimboZA
In the video you indicated there's an external power supply, which is good, presumably it's of 6-7 Volts? What current can it supply? Might be a plan to measure the current drawn, even under no load, and to see if the measured voltage stays up.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

JimboZA

If you are trying to power the servo with the Arduino, don't.
Use a separate power supply and connect the grounds together.
He's not: in the video he points to the external supply. Can't see the ground though, although an analog servo works ok so grounds probably good.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

JimboZA

For the record, let's see the circuit schmatic Jaco
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

jfourie

Hi. For the record both the servos you see in the video are digital servos, the one works and the other not.

Here is the way it is wired up. The battery in the diagram is the stepdown 5v 2.5a power supply.

https://www.pololu.com/product/2850

Dude at the shop said this step down will work with this servo. But I see its wants 7.2 volts and this is 5 volts. Will the 2.5 volts cause this problem ?






Robin2

Do you have another more basic servo that you could try?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

JimboZA

Dude at the shop said this step down will work with this servo. But I see its wants 7.2 volts and this is 5 volts. Will the 2.5 volts cause this problem ?
Well, let's put it this way.... almost all servo related problems on this forum are power related, so it's definitely worth eliminating it as a possibility. Get your hands on some AA batteries and cobble together 7 or so volts and see.

It's not impossible though that the servo requires some unusual commanding, but as I said I've never used a digital servo before. Since the other one works though, my advice is to try 7 odd volts and see what happens.

I'm very inclined to measure the current too and make sure you have enough.....

Dude at the shop said ......
Henning might not have specific knowledge of that servo: he may not have noticed it requires 6-7 volts not the more common 4.8-6.





Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

jfourie

#10
Feb 16, 2016, 03:11 pm Last Edit: Feb 16, 2016, 03:34 pm by jfourie
OK so I did add a 9v battery and it does even less then.

https://www.youtube.com/watch?v=i_i5V4g5q68

I did tell Henning that it was a 5 volt and not a 7.5 volt and he told me it should work, the problem is with the servo library. So now I am not sure what to do.


Here you can see the amps going to the servo.

https://www.youtube.com/watch?v=9lM1Zatc9PY

This servo will have the power to do what I need it to do but it is very frustrating that it is jerking and jumping around like this.



JimboZA

Did I see 2.5A or so there? That's hefty.... and under no load! What power supply was that with?- was that the 5V one from earlier? I couldn't make out what you said.

9V batteries are crap, they can't provide any current to speak of.

Have you tried a 7-odd volt supply with decent current ability?

If that servo's drawing up in the 2+ amps unladen you're going to need a monster when its laden. But that makes sense.... do the numbers from the torque and time (the spec will tell you how long it takes to turn 60 degrees, that's near as dammit a radian) to get the power requirement and that will get you the current from the volts. Add in some margin...

Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

jfourie

Yes its with the step down 5v 2.5 amp power supply. So you would suggest that I ask Micro Robotics to give me a bigger power supply ?

JimboZA

#13
Feb 16, 2016, 03:38 pm Last Edit: Feb 16, 2016, 03:43 pm by JimboZA
I'd certainly try it with a decent 7V one, since your 9v test with a poep radio battery didn't really prove anything.

But do some calcs and see what power it's likely to need as well.

edit.... P=Tw where P=power in Watts, T=torque in Nm, w= angular velocity in rad/sec
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

JimboZA

Here's my take on the numbers...

40kg.cm is 4Nm.

0.2 seconds/60 degrees is near as dammit 0.2 seconds/radian so 5 radian/sec

Power =4x5 =20W

20W at 6V is over 3A, at 7V just under 3A.

Assuming it runs with 5V, you're up in the 4A territory.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

Go Up