2.5 Implementation

Fabrication and Assembly:

In order to fabricate and assemble our prototype and final design, we primarily used laser cutting and 3D printing tools. The primary reason for using these tools specifically was so that we could quickly and easily iterate on any design changes that we felt we had to make. This allowed us to quickly prototype and test, giving us the ability to change our designs on the fly rather than wait on lead times for more intricate fabrication techniques. The linkages were laser cut from acrylic to provide more durability than wood while also being lightweight, reducing the load on our motor. The court and launcher mount were also laser cut but from wood, seeing as they did not need to be as durable as our linkages and needed to be attached using glue. The basketball goal, ball, ball holder, motor mount,  standing feet, and shaft collars for our joints were all 3D printed. For our joints, 8 mm shafts were used to connect linkages. All shafts were assembled with bearings that smoothed the rotational motion as the links went around. Spacers were also included between linkages in tandem with bearings and shafts. The spacers, along with the 3D-printed shaft collars, securely fastened the linkages at their joints while also minimizing play between our joints. Minimizing play between linkages was key for generating an accurate shot. If the links are not assembled properly the mechanism will not be able to aim straight due to unnecessary movement in the horizontal direction and will lead to inaccurate shots. 

First, we needed to figure out how we wanted to attach the motor to link 2. The motor mount, shown in Figure 1, allows the motor driver to be screwed directly into the mount using heat inserts on the side face. The other holes allow it to be screwed into the base plate. The design also includes through slots to allow zip ties to be attached to the motor for extra security.  We then went through a few different iterations of press-fits to securely mount the ground link of the launcher to the basketball court. Once we found a good press fit we attached the ground link to the base plate using wood glue, shown in Figure 2, to ensure it stayed in stay in place with the vibrations of the robot. Additionally, we had to iterate on the design for the ball holder to hold the ball as snugly as possible so that it could launch properly.

After all the dimensions were settled on we were finally able to laser cut our links out of acrylic and press our 8 mm bearings into the links. We then cut down our 8 mm shaft into two 1-inch pieces and one 1.5-inch piece, using the machine shop. After we got our desired lengths for the shaft we filed them down and pressed them into our bearings. To ensure there was no play between the linkages, spacers, and the shafts we 3D printed lock collars, shown in Figure 3. When attaching the lock collars we used clamps that were placed around the linkages to help create a tight fit and help minimize any play that would occur before we screwed the lock collars into place around the shafts After the linkages were assembled we attached them to the ground link and screwed in the motor and motor mount. After this process was done we attached our 2-inch 3D printed feet to elevate the court off the ground, which allowed the electronics to be mounted to the bottom. 

After all the assembly was done we were finally able to test our code. We added velcro strips to mark the location where the basketball hoop needed to be placed for each cycle shot, however, the strips also helped with shock absorption. After getting all the right RPM of the motors and timing right on the code we decided to make our robot more aesthetic. The first step in this process was adding a button cover, shown in Figure 4 below, that hides the breadboard while easily guiding the user on how to make a shot. We then laser cut jerseys with our team members' names which were attached to 3D-printed game pieces to stand on the basketball court like a five-person basketball team, with the fifth member being our robot. 


Figure 1: Motor mount with attachments for motor driver


Figure 2: Ground link attached to the base plate using wood glue


Figure 3: Lock Collars


Figure 4: Cover for breadboard to ease user input


 

Figure 5: Laser cut basketball jerseys


Electronics: 

Figure 6: Diagram of electronics system 

The above Figure shows a diagram of our electronics system. Black indicates ground wires, red indicates 12V or 5V power, and blue indicates a signal line interacting with the Arduino. For simplicity's sake, the signals are not depicted individually and are covered in the software section. In order to mount our electronics we attached them to the bottom of the robot base to allow for a focus on the mechanism and to remove a majority of the electronics from sight. The Arduino was placed in a way where the USB port was easily accessible for updates to the code. The breadboard that the buttons were mounted on was also covered up to allow for better aesthetics.

Software:

The software controlling this robot was done using an Arduino to implement the desired controls. The program was relatively straightforward and implemented two button inputs. The first would cycle through various PWM signals to select how far the ball would be shot. The second would turn the motor on at that PWM value for a certain time associated with it and perform approximately one full revolution on the input link. Below are excerpts from the code that were determined to be important to highlight.


Pin Assignments:

#define ENA 5    // Enable pin for motor
#define IN1 6    // Input 1 pin for motor
#define IN2 7    // Input 2 pin for motor
#define BUTTON_PIN_1 2 // Pin for the first button
#define BUTTON_PIN_2 3 // Pin for the second button


PWM and Timing Arrays:

int pwmValues[] = {210, 230, 243, 255};
int durations[] = {700, 650, 600, 500}; // in milliseconds


Cycling through PWM:

if (buttonState2 == LOW) {
    currentPwmIndex = (currentPwmIndex + 1) % (sizeof(pwmValues) / sizeof(pwmValues[0]));
    Serial.print("PWM value changed to: ");
    Serial.println(pwmValues[currentPwmIndex]);
    delay(500); // Debouncing delay
  }


Bill of Materials:

Electronic Components:

  • 100 RPM 12V Motor
  • Arduino
  • L298N Motor Driver
  • 12V Power Supply
  • Jumper Wires
  • Buttons

Laser Cut Components:

  • 4 Linkages
  • Base Plane
  • Spacers
  • Basketball Court

3D-Printed Components:

  • Basketball
  • Net
  • Shaft collars
  • Motor mount
  • Standing feet
  • Button covers
  • Button housing

Stock Components:

  • Bearings
  • Axles
  • Nuts
  • Bolts
  • Washers
  • Heat Inserts