Difference between revisions of "Basketball"

From Mech
Jump to navigationJump to search
Line 12: Line 12:


A throwing arm propelled by a Pittman motor is mounted on a turntable and throws the ball into the "hoop." The hoop is wrapped in reflective tape and an IR emitter, receiver pair is used to sense where the IR is reflected most (the hoop with highly reflective tape). An ultrasonic sensor then pings the hoop for the distance of the hoop. With this information, the arm is able to "make a basket."
A throwing arm propelled by a Pittman motor is mounted on a turntable and throws the ball into the "hoop." The hoop is wrapped in reflective tape and an IR emitter, receiver pair is used to sense where the IR is reflected most (the hoop with highly reflective tape). An ultrasonic sensor then pings the hoop for the distance of the hoop. With this information, the arm is able to "make a basket."
[[Image:Mechatronics2009Bball|Entire System|left|thumb|200px]][[Image:mech2009bballcloseup|Close up|left|thumb|200px]][[Image:mech2009bballcloseupalternate|Alternate close up|left|thumb|350px]]
[[Image:Mechatronics2009Bball|Entire System|left|thumb|200px]][[Image:mech2009bballcloseup|Front View|left|thumb|200px]][[Image:mech2009bballcloseupalternate|Close up|left|thumb|350px]]
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>



Revision as of 18:26, 19 March 2009

Mechatronics2009Bball

<br=clear all>

Team Members

Team Members from right to left: John, Alex, and Meredith
  • John Rula (Mechanical Engineering, Class of 2009)
  • Alex Wojcicki (Mechanical Engineering, Class of 2009)
  • Meredith Chow (Electrical Engineering, Class of 2010)














Introduction

A throwing arm propelled by a Pittman motor is mounted on a turntable and throws the ball into the "hoop." The hoop is wrapped in reflective tape and an IR emitter, receiver pair is used to sense where the IR is reflected most (the hoop with highly reflective tape). An ultrasonic sensor then pings the hoop for the distance of the hoop. With this information, the arm is able to "make a basket."

Entire System
Front View
Close up



















Mechanical Design

CAD Assembly

The major mechanical components were machined out of clear acrylic using the laser cutter in the machine shop. Holes were machined and threaded as required. The base is a square (12" x 12") with threaded holes for attachment to the purchased turntable bearing. The turntable has threaded holes for attachment to the turntable bearing as well. Large holes were added to the turntable for screw access during assembly because once one of the parts is attached to the turntable, the screws would otherwise not be able to be tightened. The turntable features a rectangular cutout for the servo motor and threaded holes for mounting. There are additional through holes for mounting the sensor bracket and the motor supports.

Two motor supports were designed to accept the Pittman motor and hold it six inches above the turntable surface. Fasteners are inserted from below the turntable into threaded holes in the motor supports. Clamps were designed to thread onto the supports and secure the motor in place. The sensors (IR emitter/receiver pair and ultrasonic sensor) are mounted on a machined acrylic bracket that which is attached to the turntable again through fasteners inserted underneath the turntable.

The arm is also made of laser cut acrylic. It was designed with a close fit on the flat of the motor shaft and with a clamp for tightening using a threaded fastener. For manufacturing reasons, the ball holding portion of the arm was cut out of a separate piece of acrylic and secured to the end of the throwing arm.

The hoop can be anything with the highly reflective tape around it. It is suggested to have a circular profile for ease of detecting its center using the IR emitter/receiver.

Throwing Arm Attachment Close up


Mechanical Components

PartPart No.QtyVendorPrice (Total)
Pittman Motor GM87121Lab-
RC Servo Motor - Futaba S30041Lab-
Acrylic .25" Thick, 24"X 24"8560K3571McMaster$39.63
Corrosion-Resistant Turntable6031K171McMaster$2.42
Fasteners-24Shop supply-
Rubber Feet-4Lab-


Electrical Design

The IR pair, ultrasonic, and servo have a relatively simple circuit. In the diagram below, the IR pair, ultrasonic, and servo are controlled by the program on PIC1. The IR pair and ultrasonic sensor are stacked vertically and inserted into the fitted holes on the laser cut acrylic. Because of the close proximity of the IR pair, to prevent saturation of the IR receiver, the emitter was wrapped in electrical tape. This allowed for the detection of reflected IR rather than from the emitter right below the detector. The RC servo goes through a sweep looking for the hoop. It finds the hoop by storing the location of the highest IR detection. The reflective tape used in Design Challenge 2008 and 2009 was used to wrap the hoop and is used to assist in the finding of the hoop as it reflects more IR radiation than most common objects. After making its sweep, the servo returns to the position where the most IR was detected. The ultrasonic sensor will then ping the hoop to find the distance of the hoop.

The Pittman motor, H-Bridge, and encoder chip circuit is more complex. This circuit is run by PIC2. The information collected about the hoop location is communicated from PIC1 to PIC2. The Pittman is used to launch the ball. After the hoop is found, the arm attached to the Pittman launches the ball into the hoop. The shaft rotates forward and then reverses to its previous position. The device is then ready to find the hoop and launch the ball again.

The two pics communicated with a common ground and wire connecting RC6 and RC7 as shown in the diagram. The power supply was two 12 volt power supplies connected in series to give a total of 24 volts.

Electrical Components

PartPart No.QtyVendorPrice (Total)
PICsPIC18F46202Lab-
EncoderLS70831Lab-
H-BridgeL298N1Lab-
Ping Ultrasonic Sensor280151Lab 5 supply-
IR EmitterQED1231Lab-
IR PhototransistorLTR-4206E1Lab-
Diodes1N41484Lab-
Resistors47.5/150K2Lab-


Circuit Diagram

Circuit diagram of how the the pics, sensors, and motor components are connected.
How the the pics, sensors, and motor components are connected.























Code

Results

In the end, the project ultimately succeeded -- baskets could be made. However, better tuning for the motor control and needs to be developed for more consistent results.

LINK TO VIDEO HERE

Problems Encountered

  • Attempting to integrate multiple pics and circuits onto one circuit board did not give good results. Ultimately, we had to use separate boards for each pic. We are not sure what the cause of this is -- perhaps it is noise.
  • Motor control was an intense programming effort -- almost a project in its own right. Trying to combine the motor control and distance variation was difficult. Fly back diodes were implemented however, we still went through quite a few H-bridges.
  • Many components burned out. Encoder chips also burned out. The PING sensor burned out as well. We are not sure of the cause.
  • The length of wires for the Encoder A and B should be limited. A longer wire seems to result in loss since the signal is oscillating at such a fast speed, there is loss of the wire is too long.

Notes

A few things we might change if we did it again:

  • Try another actuator that requires less intense motor control.
  • Test different wires for length and diameter for optimal performance for the Encoder A and B connections
  • Figure out why the PICs could not be combined onto a single board.
  • Introduce feedback control once the motor is tuned. Sense the distance the ball travels and adjust accordingly if the shot misses.