Problems with Speed Control

Hi, I have a 6-channel micro maestro. On channel 2 I have a servo connected to a couple of gears. I have not changed any of the advanced settings stored in the Maestro.

Using the Maestro control center software I can set the speed to 20 and vary the target value and it works fine.

In my application if I leave the speed at the default of zero then the servo moves in both directions, but it is too quick. If I set the speed to 20 in my code then the servo moves too quickly in one direction and very slowly or not at all in the other direction.

Here is what I am sending:

I guess I am missing a configuration step. Any ideas?

Thanks, Andy

I’ve tried the following speeds: 8, 20, 100, 200, 500 and they all give the same result - the servo moves at full speed in one direction and very slowly or not at all in the other.

I’ve also tried the compact protocol and it didn’t help.

Andy

Hello, Andy.

If everything works as intended when using the Maestro Control Center software to change the speed setting, then it is likely the command you are sending that is causing the odd behavior. Could you post the simplest complete code that demonstrates the issue, along with what you expect it to do and what it actually does?

-Brandon

Hi,

Here is my Maestro interface code:

https://github.com/ajayre/JacktheRipperBot/blob/master/Software/BotServer/BotServer/ServoController.cs

Now look at line 37 here:

https://github.com/ajayre/JacktheRipperBot/blob/master/Software/BotServer/BotServer/Bot.cs

Currently this sets the “toolhead” speed to zero. Calling GrabDisc and ReleaseDisc in Bot.cs works fine. The servo moves at full speed in both directions - clockwise and anticlockwise.

However, if I change line 37 to set the speed to any non-zero value, as described before, then calling GrabDisc is still at full speed and calling ReleaseDisc is either very slow or no movement.

If I fake the slow movement in my code by using a for loop and setting the servo to intermediate positions with a delay, then it works fine. I think this proves it’s not a mechanical issue.

Setting the speed on channel 0 (“Pivot” in my code) seems to work fine. So perhaps it is an issue with channel 2.

Andy

It looks like you are turning off the servo on channel 2 (Toolhead) after calling your ReleaseDisc command. That will cause problems with the speed setting since the Maestro stops sending pulses and loses track of the servo’s position. The last FAQ on the Maestro’s product page has more information about this. You should be able to work around it by setting a starting position for the servo at the beginning of GrabDisc. This might fix your problem of the servo moving at full speed when GrabDisc is called.

To help find the ReleaseDisc problem, I would suggest simplifying your code to narrow down where the issue is.

-Brandon

Thanks for the hint. I was turning it off because in that position the servo is stalled.

Andy