2x HiTec 322HD servos
1x 2.5x5.5mm barrel jack
1x 2x10 0.100" through hole male pin header
4x #8-32 x 1-1/2 inch machine screws
6x ~2.5 inch lengths of 0.100" diameter wire
6x pieces of electrically non-conducive heatshrink
Needle-nose pliersDrill press
Drill bits of various sizes
Phillips head screwdriver
Heat gun (in a pinch, a hair dryer and a funnel)
The method for modifying the marble maze can be broken down into a series of relatively simple steps. The control knobs will be removed from each axis, rotated around so that the flat side of the knob is facing away from the maze, the small wheel arm will be attached to the flat side of the control knob, and the servo will be attached to the box. For the wiring, a 2x3 header is used. On one side, the 3 pin connector from the servos will be attached. On the other, wires will be soldered to connect power and ground to the DC power barrel jack, and power, ground, and pwm control signals to the Launchpad. Step by step instructions for this process are as follows:
- Remove the control knobs from each rod: Start with the knob on the x-axis. Rotate the y-axis such that the edge of the maze nearest to the knob on the x-axis is tilted down as far as it can go. Use the needle-nose pliers to stabilize the shaft and pull on the x-axis control knob. The control knob is only secured to the shaft by friction, so it should pull off pretty easily. The y-axis control knob is a bit harder to remove, as you can't tilt the board in such a fashion as to make an opening wide enough to get access to the shaft with the pliers. If your pliers are small enough, you can use hole 34 or 36 to get access to the shaft. Again, stabilize the shaft with the pliers and pull off the control knob
- Extend the mounting hole on the control knob: Unfortunately, I didn't record what size drill bit was necessary for this step, but it is easy to determine. Insert a drill bit that looks to be about the right size into the hole that rod used to occupy. When you get to one that fits, use that drill bit on the drill press to extend the hole all the way through the control knob.
- Secure the small wheel arm to the control knob: Use a 1/16" drill bit and the drill press to expand two of the holes that already exist on the small wheel arm. Place the small wheel arm on the flat side of the control knob and use a pencil to mark the location of the expanded holes. Use a drill press and the 1/16" drill bit to drill all the way through the control knob. Use two of the servo mounting screws that came with the 322HD to secure the small wheel arm to the control knob. Be careful with this step, as it is very easy to strip the heads of the servo mounting screws.
- Reattach the control knob to the marble maze: Again starting with the x-axis, use the pliers to stabilize the rod and push the control knob onto the rod with the flat side (which now has the small wheel arm attached) facing outward. Note that there is a flange on the rod that keeps the rod from extending too far outside of the marble maze housing. Use the pliers to make sure this flange is snug against the wall of the maze. Repeat this process for the y-axis, again using hole 34 or 36 to get access to the rod on the y-axis.
- Secure the servo to the marble maze: The small karbonite gear on the HD322 should easily click into the small wheel arm that is now connected to the control knob. Rotate the servo such that the wiring coming out of it is pointed towards the ball return of the marble maze. Attach the 1/16" drill bit to the power drill. Make sure the servo is level, and use one of the four mounting brackets on the servo as a guide to drill a hole into the side of the marble maze, making sure to drill all the way through the wall. This will create a hole that is slightly smaller in width than the #8-32 machine screws. Line the servo up with the hole, then use a hand screwdriver to screw one of the #8-32 machine screws into the hole. It is important to use a 1-1/2" screw here, as you need to get the head of the screw flush with the mounting hole of the servo, but if the screw extends past the wall on the interior of the marble maze, it will limit the range of motion on that axis. Now that the servo is held in place with one screw, use mounting bracket as a guide again and drill a second hole into the box, then a second #8-32 machine screw to affix the servo to the side of the box. Repeat this process for the second servo.
- Wire the servo to the Launchpad and barrel jack: Snip off a 2x3 section of the 0.100" pitch male pin header block. Solder a wire to electrically short the two columns of the first row. This will be used to create a four point node for connecting ground from the DC barrel jack to the launchpad and servos. Solder a wire to electrically short the two columns of the second row. This will be used to create a four point node for connecting 5V from the DC barrel jack to the launchpad and servos. Solder a wire to connect ground from the barrel jack to the column one, row one of the header. Solder a wire with a 0.100" pitch to column two, row one of the header. Solder a wire to connect the tip of the barrel jack (5V) to column one, row two of the header. Solder a wire with a 0.100" pitch to column two, row two of the header. Solder a wire with a 0.100" pitch to column one, row three of the header. Solder a wire with a 0.100" pitch to column two, row three of the header. If possible, use an electrically non-conductive heat shrink on each solder joint to ensure that you don't accidentally short 5V to ground, the two PWM signals to each other, or the PWM signals to 5V. Connect the wire at column two, row one of the header to either pin 1 of J2 or pin 2 of J3 on the bottom (female portion) of the launchpad XL header (GND). Conenct the wire at column two, row two of the header to pin 1 of J3 on the bottom (female portion) of the launchpad XL header (VBUS, which is 5V). Connect the wire at column one, row three of the header to pin 3 of J3 on the bottom of the launchpad (PD0, pwm for y-axis). Connect the wire at column two, row three of the header to pin 4 of J3 on the bottom of the launchpad (PD1, pwm for x-axis). Connect the three pin connector from the servo on the y-axis to column one of the header such that the black wire is on row one, the red wire is on row two, and the yellow wire is on row three. Connect the three pin connector from the servo on the x-axis to column two of the header such that the black wire is on row one, the red wire is on row two, and the yellow wire is on row three.
- Calibrate the servo: Unscrew the machine screws and detach the servo from both control knobs. Plug in the launchpad (and program it if you have not already done so). On startup, the launchpad will set the servo to its 90 degree position. Manually move the control knob for each axis so that the marble maze is level. With the launchpad still on (which will hold the servo at 90 degrees), reattach the karbonite gear of the servo to the control knob, taking care to keep the maze level while doing so. Reattach the servo to the maze using the machine screws. The 90 degree position of the servos should now correlate to a position in which the marble maze is level on each axis.
You now have a fully functional, launchpad and servo controlled marble maze!