Step 8: Setup

The machine needs to be positioned on level ground, with all four legs solidly on the ground. I found that if one leg was slightly off the ground, the whole system would go unstable and the board would start shaking.

Test the electricals
It is possible that the wiring of the accelerometers and the motors results in the motors turning in the opposite direction to what they should when the controller is tilted. This is best tested without the strings connecting the motor shafts to the board.

1. Hold the board as close to horizontal as possible, and tilt the controller until the motors stop. If the controller is not horizontal then you should adjust the flat accelerometer values in the Arduino code.
2. Tilt the controller slightly in just the X or Y plane and the corresponding motor should start turning. Tilt the board in the same direction and the motor should slow down and stop when the board is at about the same tilt as the controller. If the motor actually speeds up, then you need to swap the values of the variables tableXmin, tableXmax or tableYmin, tableYmax.
3. Repeat in the other direction
4. With the board and the controller horizontal so the motors aren’t turning, tilt the controller in one direction and watch the spin direction of the shaft that will be pulling the string. If the string was being wound onto the underside of the shaft, would it be pulling the board in the correct direction? If not, reverse the wire connections on either the motor or the motor driver board.
5. Repeat in the other direction

Attach the string
1. Tie a hook to one end of the string.
2. Attach it to the loop on the underside of one edge of the board.
3. Thread it under the pulley and then around the shaft in the motor housing. The string should feed onto the shaft from the underside of the shaft.
4. Wind three loops around the shaft and then out to the pulley at the other side.
5. Hold the board level and position the three loops around the shaft so that they are in the middle of the length of the shaft. This will avoid the string getting jammed at one end of the shaft when the board reaches full tilt.
6. Tilt the board to add tension to end of the string already attached to the board.
7. Pull the string with similar tension at the other end, and attach a hook at a suitable place on the string to keep a solid tension.
8. Attach the second hook to the loop on the underside of the board.
9. Manually tilt the board up and down to check that the tension is enough to move the motor shaft without slipping, but not too tight.
10. Repeat with the other string.

Adjust PID factors
Now, connect the battery and test the responsiveness of the system. The board should follow the movement of the controller with minimal lag or overshoot. To speed up the movement of the board, increase the Kp (proportional) factors in the Arduino code. If Kp is too high, the board will start to oscillate. The increase in speed will result in some overshoot on rapid movements. This can be reduced by increasing the Kd (differential) factors. If Kd is too high, the board will oscillate wildly. You’ll probably need to experiment with Kp and Kd factors for a while to get the optimal performance. The Ki (integral) factors are not needed in this case since they are more for helping to achieve exact absolute positioning. Since the board is always moving, we can ignore these so they are set to zero.

Setup the body controller
The rangefinders should be attached to stands at between 900mm and 1200mm (3 to 4 feet) off the ground. One is positioned on the other side of the board from where the operator will be standing. The other is about 900mm (3 feet) off to one side of the operator, orthogonal to the first.
Press the Mode switch to change to body controller mode, and adjust either the position of the rangefinders, or the distanceXflat, distanceYflat variables in the Arduino code until the board is flat when the operator is standing in a central position.
There are a separate set of PID variables in the Arduino code that will need to be adjusted for optimal performance.

Setup the Android controller
There is another set of PID variables in the Arduino code associated with the movement of the Android controller. These will need to be adjusted for optimal performance.
<p>Great instructable and looks fun to play! I<br> was missing some pictures/schematics on how to fix the string to the <br>mechanical mechanism, then I had a look at your website and found one: <a href="http://www.origamata.com/projects/bigballmaze/images/driveShaft_600px.jpg">http://www.origamata.com/projects/bigballmaze/imag... </a></p>
<p>Hi David, I don't have the skills to create this but I'd love to add it to a game room I'm adding. Any ideas on where to hire someone that can build one for me? Thanks!</p>
Great project! Had a blast playing this at Design night!
Thanks Tim.
@ zimbra your project is awesome..I really want to try making your project but I definitely don't understand how to construct the board labeled (&quot;hand-held controller board with 2 or 3 axis accelerometer&quot;) and what do you mean by (&quot;5v and ground rails on stripped board or proto shield &quot;)how to do that,,,the axis accelerometer is very hard to buy in the PHILIPPINES, is their any substitute?? do you have another version that using only a gamepad or xbox controller or any brand, kind of joystick? I'm looking forward for your kindest reply... thank you very much..
Hello. If you open the attached BigBallMaze.fzz in Fritzing, you can trace the connections of the controller board to see what should connect to what. Let me know of the specific problems you're having. The 5V and Ground rails are just where all the wires can be connected together - commonly on the edges of prototype boards. These wires could also be just soldered together. <br> <br>You would be able to use accelerometers from other devices, but would take a bit of work to extract and determine their characteristics. I don't have any experience of doing so. If you have access to Amazon or Ebay there are some &quot;accelerometer modules&quot; to choose from. I've also attached an Android app that can control it without needing to buy an accelerometer, if you happen to have an Android device.
Stole the balls from McDonalds?
Yeah, I've been waiting for the takedown notice :)
Awesome project!<br>Can you describe rangefinders system? it isn't clear to me where to mount it and how it works?
Thanks very much.<br>I've just added a photo that shows where to place the rangefinders. One points straight down the front-back axis, and the other points parallel to the left-right axis.<br>Each rangefinder detects how far the player is from it, and sends the distance reading to the Arduino. The system is calibrated with a particular distance from each rangefinder that will result in the platform being flat. Any distance readings on either side of these 'flat' readings will result in the platform tilting proportionately.<br>I hope this helps, but let me know if you'd like more info.<br>Cheers, David.
Thanks a lot, David. Now its clear!<br>I think about height. Usualy, when playing, kids waving their hands, so it seems to me better place ragefinders on head level. What do you think? How it works for you?<br>
With the sensors I used, you can't get too specific with what parts of the body are detected. I set them at a height so that they detect movement from the hips to the shoulders. To be honest, most kids who try it find the body-controller too difficult. Having said that, I haven't tried it at head level, so it's worth a try.
I'll try as soon as i'll get the sensors. Thanks for a great instructuble!
Thanks everyone for the encouraging comments. Much appreciated.
Looks like a lot of fun, I'll have to try this one out.
This is great! <br>I'd love to try it.
Very cool. Thanks for sharing!
WOW! What a good work! Congratulations!
That looks like a finely made toy!
Worst coffee table I ever seen, it's all crooked. ;) Great build though, I wanna play with it.
This thing uses sonar to calculate how far a person is from it!? That's friggn' awesome!! Not something you see in everyday DIY projects.. Nice job.
Awesome first project - well done!

About This Instructable




Bio: My name is David. I like machines.
More by zimbra:Big Ball Maze Game 
Add instructable to: