beautypg.com

Button or switch, Potentiometer – Pololu Maestro User Manual

Page 67

background image

Diagram for connecting a button or

switch to the Micro Maestro Servo

Controller.

Diagram for connecting a

potentiometer to the Micro Maestro

servo controller.

Button or switch

To connect a button or switch to the Maestro, you must first decide which
channel you would like to use. In the Maestro Control Center, under the
Channel Settings tab, change that channel to Input mode and click
“Apply Settings”. Next, wire a pull-up resistor (1–100 kilo-ohms)
between the signal line of that channel and 5 V so that the input is high
(5 V) when the switch is open. Wire the button or switch between the
signal line and GND (0 V) so that when the button/switch is active the
input will fall to 0 V. The picture to the right shows how to connect a
button or switch to channel 0 on the Micro Maestro 6-channel servo
controller.

Note: An external pull-up resistor is not needed if you use channel 18, 19,
or 20 on the Mini Maestro 24-channel servo controller and enable its internal pull-up resistor in Channel Settings tab
of the Maestro Control Center.

You can test your input by toggling the button/switch and verifying that the “Position” variable as shown in the Status
tab of the Maestro Control Center reflects the state of your button/switch: it should be close to 255.75 when the
button/switch is inactive and close to 0 when it is active. Now you can read the state of the button/switch in your
script using the GET_POSITION command or over serial using the “Get Position” command. These commands will
return values that are close to 1023 when the button/switch is inactive and close to 0 when it is active.

Potentiometer

To connect a potentiometer to the Maestro, you must first decide which
channel you would like to use. If you have the Mini Maestro 18- or
24-channel servo controller, be sure to pick one of the analog input
capable channels (channels 0–11). In the Maestro Control Center, under
the Channel Settings tab, change that channel to Input mode and click
“Apply Settings”. Next, connect the potentiometer to the Maestro so that
the two ends go to GND and 5 V, and the wiper connects to the signal line
of the channel. The picture to the right shows how to connect a
potentiometer to channel 0 on the Micro Maestro 6-channel servo
controller. The potentiometer should have a resistance of at least 1 kilo-
ohm so that it does not draw too much current from the 5V line.

You can test your input by rotating the potentiometer and verifying that the “Position” variable as shown in the Status
tab of the Maestro Control Center reflects the position of the potentiometer: it should vary between approximately
255.75 and 0. Now you can read the position of the potentiometer in your script using the GET_POSITION command
or over serial using the “Get Position” command. These commands will return values between approximately 1023
and 0.

Pololu Maestro Servo Controller User's Guide

© 2001–2014 Pololu Corporation

7. Wiring Examples

Page 67 of 73