Mini Basketball Court




Introduction: Mini Basketball Court

This Instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida ( This project will show a step by step process to construct and program the Mini Basketball Court. The goal of this instructable is to provide other Makers with the ability to recreate the project I created.

The project contains a stepper motor, an Arduino Uno, wires, a touch sensor, 3D printed basketball, a basketball hoop, and the black box. Also, hot glue or gorilla glue makes the process much easier.

The finished product is a Mini Basketball Court that I created for my Makecourse at USF, and is actually pretty cool, hope you enjoy!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 3D Print the Basketball

In order to 3D print the basketball, you must first create a 3D model of it. I used Autodesk Inventor but that part of the process is up to you. The way I made the ball is that I began with a sphere. I then embossed the design of the seams of the ball. And to create a area for the motor to spin the ball I extruded a hole in the ball. Once this 3D model is finished you're ready for printing. The final ball in my project was painted, but this is up to your digression as well. You could always 3D print the ball orange and not have to paint it. This is the first part towards creating the project.

Step 2: Program the Control System

The program in the project sets it up so that when touched, the touch pad activates the stepper motor, which begins to spin. Attached to the motor is the basketball. You can set this up however you like, personally, I used a lollipop stick. I'm sure a toothpick, or basically anything skinny enough would of been able to connect the motor and the basketball.

The code for the control system is shown in the Image above as well as typed below:

Mini Basketball Court Program for Makecourse at USF 4/1/15 by Dominic Apugliese *****************************/

#define interruptNumber 0 //letting the arduino know the touchpad is on pin 1

#include //including the library with the Stepper Motor commands

#define TouchPadPin 2 volatile byte TouchPadEventFlag;

const int stepsPerRevolution = 200; //telling the arduino how many steps the stepper has per revolution

Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); //the stepper motor is hooked up to pins 8,9,10, and 11

void setup() { int flag = 0;

myStepper.setSpeed(60); //setting the stepper motor speed at 60

Serial.begin(9600); {

pinMode(TouchPadPin, INPUT); //informing the arduino that the input will be the touch pad


void loop() {

if(digitalRead(TouchPadPin)==LOW) //when the touch pad is touched, the stepper will rotate

{ myStepper.step(stepsPerRevolution); //this is from the Stepper library included in the header }

if(digitalRead(TouchPadPin)==HIGH) //when there is no touch, the stepper motor will stop rotating


myStepper.step(0); //also another part of the stepper library, but when there is no touch there is 0 steps per revolution }


Step 3: Put the Project Together

To put the project together, I had to cut a hole for the stick of the lollipop to go through for the ball to be on the outside and the motor on the inside of the box. Use a screwdriver or a drill to go through the box. Also, I glued the stepper motor to the bottom of the box on the inside in order to make the motor more steady. The basketball hoop was glued on the top of the box in for decoration basically. Originally I wanted to make the hoop spin or put a shot clock on it, so keep those thoughts in mind for your possibilities.

Glue the ball to the lollipop stick or toothpick and glue the other end of the stick to the motor. This may be difficult so if you can find a simple way use it. I used gorilla glue to glue it, so I supported it for a couple seconds until it was basically dry. The explanation of the wiring is found in the explanation of the control system, but basically wire the motor and touch pad to the Arduino. I did not glue the Arduino down in hopes of using it for different projects later on.

One last part I had to do was sand down a part under the lid for the touch sensor to go. It only has to be enough room for the touch sensor to fit under the lid of the box to close comfortably. I'm sure there's an easier way than sanding it down, but that was the method I chose.

Step 4: Find an External Power Source

For the project I used a cord that came with the Arduino to power the project. It came with a wire that hooked up to a 9 V battery, so I purchased one to power the project. There are many different ways to power the Arduino so pick one that fits your project.

Step 5: Recommendations

My project had plenty of room for improvement. It was just my first arduino project I've ever done. If I did the project again I would find a different power source. The batter died after being hooked up 2 hours to the arduino. Using a electrical outlet would probably be the ideal source in my opinion, though being hooked up to a USB port would work fine as well. If using a battery though, a battery could be glued to the side of the box, instead of the inside so that it could be easily unplugged when not in use, as compared to being inside the box screwed shut. This would in turn save power.

Also, I used mostly gorilla glue, but I would use hot glue next time. Gorilla glue was frustrating to use, the lollipop stick glued to the stepper motor would not stay, and I felt that hot glue would of helped.

Finally, I did not have the skill to program this yet, but instead of spinning the basketball, maybe it could be a game and you could program something to pop the ball up, mimicking a shot. That way it would be a game and fun to try to shoot the ball into the hoop.

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020