32U4 Simple Question About Speed Control

Hello there. I have a a star 32U4 and a maestro microcontroller running very simple set up where it will speed up a 360 rotating servo and then slow it down over a given period of time. The problem is the transition between the speed changes is immediate instead of gradual. Meaning that I would like for the speed to slowly increase up to a certain rpm and then slowly decrease down to a certain RPM. Can someone please tell me what that code looks like? Right now it’s running from 1500 to 1400 to 1300 to 1400 to 1500. The transition is very choppy and it’s hard on the servos. I know you can use the maestro micro servo controller program to slow that transition down, but I want this to be a standalone unit. I want that transition code to be stored on the a star without having to be plugged into the computer

Hello.

It sounds like you are using a continuous rotation servo. If that is the case, you could ramp up the speed smoothly by sending multiple Set Target commands to ultimately reach your final target speed. Alternatively, you could set speed and acceleration limits for the servo channel you are using, which would essentially configure the Maestro to do the same thing. If you want the Arduino to handle it (or want to change acceleration differently for each movement), you can use the setSpeed() and setAcceleration() commands from the Maestro Arduino library to specify the those limits. Otherwise, you can configure them in the “Channel Settings” tab of the Maestro Control Center for the channel you are using. Please note that these settings will only need to be configured once; the Maestro will automatically apply them every time it is powered up, but you can still overwrite it on the fly with the serial command mentioned above.

Brandon

I guess that’s why am a little confused as every time I plug the master win all of those limits go back to zero. Meaning that each time I plug the maestro in and use the command center, they always go back to zero. So what happens is the Estar starts running the program in the maestro doesn’t have any of the acceleration limits set. How do I make those exhilaration limits and set points per minute? Seems like every time I plug it into goes back to zero

Maestro. Not master

There are two places within the Maestro Control Center where the speed and acceleration settings can be changed, and each functions slightly differently. In the “Channel Settings” tab, you can set the speed and acceleration values (as well as a few other configuration settings) for each channel. The settings configured in this tab will be saved on the Maestro’s EEPROM and be applied each time the Maestro is reset or power cycled. In the “Status” tab, when the speed or acceleration is changed, it will only affect the current session; once the Maestro is reset or power cycled, the settings will be reverted to those configured in the “Channel Settings” tab. If your settings are reverting to zero, it sounds like you are either not clicking the “Apply Settings” button or you are changing the settings in the “Status” tab instead of the “Channel Settings” tab.

Please note that the speed and acceleration limits are not able to be used on the first Set Target command after a Maestro first starts up, since the Maestro has no way of determining what position a servo is in (and this is needed to calculate the next position). More information about this can be found in the last question under the “FAQs” tab of the Maestro product page.

It is very difficult to understand what you are asking. Can you try rephrasing your question?

Brandon