Basic functionality question - micro Maestro

Hi, I’m trying to figure out if I need additional supporting hardware beyond a Maestro. I have 8 different sets of preprogrammed motions and want to trigger one of these via a manual input. Would this need additional hardware like an arduino in front of the Maestro? I’m thinking of using a 10 key pad to select one of the scripts(?). Just looking for general approach before purchasing unnecessary things.

Hello.

Could you clarify what kind of keypad you’re wanting to use (preferably with a link to a datasheet or product page)?

Brandon

I could use a 3x4, 7 wire, and i believe that would require supporting circuitry to scan and decode, but if supported I could also use 9 discrete pushbutton switches which could be used with digital inputs (on higher channel count models). I don’t know if the controller supports these as triggers for scripts or sequences.

As you mentioned, for that many buttons even using a matrix would require at least 7 pins, and the Micro Maestro only has 6 channels. So, to do something like that, you would need one of the Mini Maestros.

If you used a Maestro with enough channels, you could handle all of that on the Maestro by having your preprogrammed motions in separate subroutines of your script and writing a main portion of the script to process your button inputs and call the desired subroutine based on which key is pressed.

Processing a keypad matrix with the Maestro scripting language could be pretty tricky, especially if you are unfamiliar with it. So, you might find it easier to use discrete buttons. You can find information about connecting buttons in the “Attaching Servos and Peripherals” section of the Maestro user’s guide. You can read an input channel by using the “Get Position” script command, and you can find some more comprehensive examples for using buttons in the “Example Scripts” section of the user’s guide, in particular the “Using multiple buttons or switches to control servos” would be a good starting point for what you described.

If you find it easier (or if you already have a Micro Maestro and an Arduino), you could use an Arduino to process the keypad input and use that to trigger subroutines in your Maestro script. You can do this through the TTL serial interface with the “Restart Script at Subroutine” command, which you can find more information about in the “Serial Script Commands” section of the Maestro user’s guide. You might also find our Arduino library for the Maestro helpful for handling that communication.

Brandon

Thank you, that helps make things a lot more clear. Last questions about using mechanical switches:

I am aware of the need for pull up or down resistors but do we need to debounce/condition the switch signal for reliable operation?

And can an analog input be used as essentially a digital input with a switch? Or is it recommended to use digital inputs to trigger things?

Hello.

Whether or not you need to worry about debouncing depends on your switch and your application. Generally, for an application where you just want to start a sequence of motions from a button press (as shown in the “Using multiple buttons or switches to control servos” example I referred to in my previous post), you don’t need to debounce since a quick double-press of the switch isn’t going to matter. However, if you need to do some debouncing, you can refer to the “Using a button or switch to control servos” example (also found in the “Example Scripts” section of the Maestro user’s guide.

You can use any of the Maestro channels to read digital inputs from a button/switch (including the analog input channels).

Brandon