Hi there, I have a Mini Maestro working very well with few servos. I needs to add add a “slave” servo mirrored to a “master” servo. They are rotating in opposite direction. I am trying to find a way to do this, preferably with no programming involved.
Can this be done on Mini Maestro or add another board?
Thank You in advance!
Hello.
There is no built-in option to link two servo channels together like that. Depending on how you are using the Maestro, one option could be to write a short script that maps the position of one servo to another; for example:
begin
0 get_position #read the position of channel 0
6000 minus #subtract 6000 to zero it out
negate #invert the leftover value
6000 plus #add 6000 back
1 servo #update channel 1
repeat
Please note that this example script mirrors the position of channel 0 about the neutral position of 1500μs (6000 quarter-microseconds in the script) and then applies that newly calculated position to servo channel 1.
Brandon
Hi Brandon, thank you very much for your answer. The script worked as intended. However for some reasons I did burn out a servo. Not sure why, probably I have clicked on “Run script on startup” and something else changed.
In your example you used neutral position of 1.5 ms equivalent of 6000 quarter-microseconds. I have a 270 degree servos which correspond to 2.5ms. That does mean that in my script I have to use 10,000 quarter-microseconds?
I have decided to use current sensors to cut off the servo when the current passes a certain value. I will connect them to Maestro analog inputs and try to program them. Before I buy them, there is a feature in the Maestro that monitors the current on each channel?
Thank You!
Hello, @Cristian1.
Yes, though a hobby servo with a neutral position of 2.5 ms (even considering the greater rotation range) would be pretty unusual, so I would recommend verifying the actual range for that servo (and perhaps any of your other servos) by testing it through with the “Status” and “Channel Settings” tab of the Maestro Control Center software before programming it into your script. To avoid damaging your servo, follow the suggestions on the Maestro product page under the “How do I use my Maestro servo controller to get the maximum possible range of motion from my servo?” FAQ.
As for using current sensors with the Maestro, if you are considering something that outputs an analog voltage signal proportional to the current, like one of our in-line Hall effect current sensors, then it is possible to configure Maestro pins (pins 0-11) to read analog signals like that. However, the Maestro does not have a special/specific feature for using a signal like that as a servo kill switch, so you would have to program that behavior yourself. Keep in mind that performing simultaneous operations (e.g. commanding servos to positions and monitoring analog signals from current sensors) can quickly become complicated in the Maestro scripting language depending on the details of what you are trying to do.
Also, while you can command the Maestro to stop sending signals to the servo, which will cause many servos to essentially shut down, some digital servos respond to that condition by continuing to try and hold the last position they were commanded to. With that in mind, you might want to check how your servos behave before deciding how you want your program to respond to an overcurrent condition.
- Patrick
Hi Patrick, thank you for your answer. The 2.5ms correspond to 270deg, not to the neutral position.
I did some more trials and I did not burn a motor yet, however I am still not sure what is actually happening at startup. The Maestro board does not get a feedback from the motor. Does it mean that it at startup it send a signal to the motor to move to the position recorded in the settings (ie: neutral position)? If the motor is not in the neutral position then what? If I have a script running at startup, does it mean that the script takes over the start up?
Thank you,
Cristian
How your servo behaves at power-up may depend on your servo as well as how the Maestro is configured. As you mentioned, the Maestro can only send signals to a servo and cannot get information back from it (at least, not with typical RC hobby servos).
What signals your Maestro immediately sends to the servo will depend on the “On startup or error” setting under the “Channel Settings” tab of the Maestro Control Center. However, if you have a script running on startup, the Maestro will execute the script right away, which can overwrite the “On startup or error” before the servo can react to it (depending on how your script is written).
Even if your Maestro does not have a script and is configured to not send any signals to your servo when it powers up, your servo has its own electronics that might cause it to go to a particular position (though that is not very common) or at least shift or twitch a little (which is more common) when power is first applied.
If you are still confused by what your Maestro and servo are doing, we might be able to help if you post the following:
- Your Maestro settings file, which you can save a copy of your settings file from the “File” drop-down menu of the Maestro Control Center software while the controller is connected.
- A video showing the servo’s behavior. The forum does not allow users to post very large videos, but it does work well with videos linked from other sites (like YouTube or Vimeo).
- Patrick