Script (EEPROM) Write cycles / Linear move robot arm


Does the EEPROM of the Mini controller allow frequent write cycles?
Or is there another possibility to enable the Maestro to perform specific PWM sequences?

The background:
I would like to implement a linear move for a robot arm so the hand moves directly from source to target.
(Maestro Mini connected to a PC (C#+Usc library))

Just synchronizing the speeds of the servos would result in a non-linear path for the hand.

One approach is to calculate the required path, upload it to the Maestro as a script and run it.
Main advantage is that the Maestro takes care during the movement.
But in my case, a new script has to be uploaded for every movement, resulting in a lot of write-cycles.

Of course it would also be possible to implement a timer event on the PC and send the PWM updates directly. But as Windows is not a real-time OS and the benefit having a separate servo controller is exactly that you can outsource time critical tasks to a separate processor, I would strongly prefer a Maestro based solution.


Hello, Ralf.

You might try storing multiple movements as different subroutines in your script, then use the restartScriptAtSubroutine function (or restartScriptAtSubroutineWithParameter) in the Pololu USB SDK to start the script at a specific subroutine that executes the desired movement. The Maestro’s script is stored in the Maestro’s flash memory, which is only rated for 10,000 write cycles. The Maestro has limited memory, so depending on how complex the movement sequences are for your robot arm, you might not have enough space to store all of the movements.

By the way, you can use the setSpeed function in the SDK to set the speed for any servo channel via USB without writing to the Maestro’s EEPROM or flash.

- Amanda

Hi Amanda,

thanks for your response.
Unfortunately using the subroutines is not useful. To achieve a smooth movements it takes quite a lot of steps to be stored for every movement. Also the movements are dynamically so storing them permanently is also no option.

With setSpeed I can set a fixed speed for the whole movement. But for a linear move of the hand, the servo speeds have to vary along the movement path. So setSpeed is also no solution.

Any other ideas?
Do you have an overview about the required processor time for mathematical operations implemented in the script? If the performance is good enough it might be possible to implement the algorithm in the script, but this might be a small challenge.


To get a better overview of your project, how many servos are you trying to control, and how many are you trying to move at the same time?

One idea would be to use a Wixel to control the servos instead of the Maestro. It is a programmable microcontroller module with integrated USB and a 2.4 GHz radio, and we provide a servo library for it that can control up to 6 servos. The Wixel’s servo library comes with the Wixel SDK, and we provide documentation for it.

Another idea would be to break the entire movement into smaller chunks and set each servo channel’s speed and acceleration in between each finite movement such that you are able to regulate smoother, coordinated motions through the entire movement.

You might also consider to try turning off the speed and acceleration limits on the Maestro, and then make a tight loop in your computer program that constantly checks the system time, calculates the correct positions of the servos, and then sends Set Target commands over USB for each relevant servo in the movement you are trying to perform. However, if the latency induced by the operating system affects the process of creating smooth, coordinated movements, then you probably would need to port the code over to a microcontroller, such as an A-Star 32U4 Prime, and control the Maestro via its TTL serial interface. (If you decide to use microcontroller that is an A-Star or an Arduino, you can use our Maestro Servo Controller library for Arduino, which makes it easier to interface with the Maestro.)

As for your second question about the Maestro’s processing time for mathematical operations, you can run this script as a quick way to estimate how fast your script runs:


Every time the value on the bottom of the stack increases by one, it means that the Maestro executed three script instructions.

- Amanda

Hi Amanda,

thanks for the hint with Wixel and A-Star. I was not aware that the Wixel features 6 PWM signals.
That would be enough for my project, so I will have a look.
Unfortunately it seems that both do not provide ready to use pinheads to connect to the servos. As I plan a small series I would strongly prefer hardware ready to use and without soldering.

The second idea using the PC for triggering the time critical events, it’s thee same I mentioned at the beginning, is not optimal. The jitter is too high.

Sure, that’s the bare foot route to find out the duration. But as the Maestro will probably need different CPU time for different types of operation I would need to run through all different instructions.
So I hoped, you could provide an overview or at least an indication. Especially if there is additional overhead translating the script commands in low-level commands or if the compiler generates already low-level code. If so I could also check the datasheet of the processor.