






























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The details of a defensive robot control system, including the block diagram, c-program function definitions, and scilab simulation program. It covers the position control of a robot using a pid controller, motor velocity, and ball trajectory.
Typology: Study Guides, Projects, Research
1 / 70
This page cannot be seen from the preview
Don't miss anything!
Executive Summary The requirement of this design project was to build both offensive and defensive robots which would compete against an opposing team on a designated playing field by scoring in one of three goals. The robots were to operate autonomously and use ultrasonic distance sensors to determine the position of the other team’s robots. The offensive robot used compressed air to “fire” plastic golf balls into the opposing team’s goal. The defensive robot was designed to mirror the motion of the competition’s offensive robot. Both robots were constructed and then subjected to mechanical testing. The robots were then electrically wired and a series of control tests were performed to ensure the proper connections were made. The C programs were refined and the robots competed in the final competition where they received an overall score. The score encompassed many aspects of the project such as goals scored, goals blocked, quality of build, total cost, overall weight, and theory quality.
5.2 Ball Trajectory 17 5.3 SciLab Simulation of Response 18
1. Project Objective: The objective of this project was to design and build a pair of autonomous robots to compete against another pair of robots in a soccer-like game. The pair of robots would consist of an offensive robot designed to fire plastic golf balls into the opposing team’s goal while the other robot would act as a defender guarding our team’s goal. Based on competition scoring, the robots were designed to be lightweight, cost effective, and an emphasis on performance. 2. Design: Rules stated that the robot must contain all electronics and components except for the supplied power source. The following constraints/guidelines also needed to be followed while designing our robotic device: The largest dimension on the device must be less than 12 inches. The device should be less than 8 inches wide. The equipment cost should not exceed $200. The devices should weigh less than 1.3kg and 1kg for the offensive and defensive robots, respectively. With these restrictions in mind, the initial design process for the Robotic World Cup yielded three sets of conceptual designs, each set consisting of an offensive and defensive robot. To determine which set of concepts was best suited for competition, a decision matrix was used.
Minimal Cost 0.30 20.30 = 0.60 10.30 = 0.30 30.30 = 0. Reliability 0.15 20.15 = 0.30 10.15 = 0.15 30.15 = 0. Ease of Programmability
Total 1.00 1.90 1.00 2.
each respective category. Therefore, the design with the lowest overall score is the best design available. Thus, it can be seen from Table 1 that the set of design concepts to be pursued are that of Design 2. Shown in Figures 1 and 2 are isometric models of the offensive and defensive robots respectively, with prints for individual components, along with exploded view given in Appendix I. Figure 1: Isometric Drawing of Offensive Robot with key Components Arrowed ATMega Controller Breadboard with L293D Chip Motor Firing Barrel Air Fitting for Firing Ball
Table 2 indicates the cost and weight for each robot. The complete bill of materials set is shown in Appendix I. Table 2: Cost and Weight for Each Robot Robot Total Mass (kg) Total Cost Offensive 0.730 $66. Defensive 0.726 $60. Total 3.204 $126.
3. Test Results: During the build stage, testing was performed to both prevent and repair design flaws. The results were as follows: Mechanical test 1 : The objective of this test was to determine/ensure that the robot could manually move freely on the playing surface. Due to an unexpected delay, we were unable to test on the scheduled day but the following day validated our robot’s ability to fit on the playing field where we could physically move it on the provided track with relative ease. Mechanical test 2: The objective of this test was to determine/ensure that the robot could move on the playing surface powered by our motor. The results were positive as the robot moved back and forth as we changed the polarity of the voltage supplied to the motor. Controlled test 1: The objective of this test was to determine/ensure that we could move the robot with a C program through EVBU. Test results were positive. Controlled test 2: The objective of this test was to determine/ensure that our robot could act completely autonomously. Results were positive as our defensive robot mirrored the opposing offensive robot perfectly.
EGR 345 Competition: The EGR 345 competition was the final test before the Robotic World Cup in which our robot participated in four matches to work out any remaining issues. Overall, the results of the competition revealed that improvements were needed if our robot was to be a contender in the final competition. The biggest issue that arose was that our robots were too slow to keep up with our opponents, and as a result, it was difficult for us to both score and block the opponents’ shots. To correct this, the gear ratio between the motor and the axle was changed to increase the speed of our robots. Another issue was the ability for our robot to get proper traction with the playing surface. To correct for this, weight was added to the robots to balance their overall weight.
4. Block Diagrams and Schematics This section outlines the control and functionality of both the offensive and defensive robots through block diagrams and schematics. The flow diagram from which the C – program used to control the defensive robot was derived from is shown as Figure 3. Through an interrupt routine, the program receives as an input the position of the opposing offensive robot as well as its own and compares the two. Based on the magnitude of the error, a gain is applied to the pulse width output to the motor (i.e. the larger the error, the larger the gain, thus the robot accelerates quicker). Based on the sign of the error, the robot will either move to the left or right as needed. This system architecture is further illustrated in Figure 4, while the wiring schematic that was used to build the control system is shown as Figure 5.
PWM Where: Vd = desired position voltage (from sensor) Pd = desired position (hex) Va = actual position voltage (from distance sensor) Pa = actual position (hex) Pe = position error K = controller gain motor velocity Vo = output voltage (to motor) A/D = analog to digital convertor A/D Vd
Pd Pe Pa A/D K*Pe K Control System Va Vo Motor Figure 4: Defensive Robot Control System Block Diagram
Rob ot Pos ition PA Pin 5 PC PC Vs IN OUT GND GND OUT IN EN1, VSS IN OUT GND GND OUT IN EN3, 12V DC Motor L293D PD Pin 3 Pin 1 Pin 2 PC LM 5V DC 24V DC Start PB PC3 PC Pin 17 Pin 16 Pin 12 Pin 11 Pin 13 Pin 15 Pin 7 Pin 8 Pin 10 Pin 6 PB PB PB Atmega Processor PA1 PA2PA^ Rob ot Positio n Rob ot Positio n Rob ot Pos ition Competition Controls DB-25 Connector Figure 5: Defensive Robot Control Systems Wiring Schematic
if == 0 Where: Pd = desired position from controller (hex) Va = actual position voltage (from distance sensor) Pa = actual position (hex) Pe = position error Vr1 = position voltage of robot 1 Pr1 = position of robot 1 (hex) PWM
Pd Pe
Pr A/D + Control System Pd
Competition Controls DB-25 Connector PC PA Rob ot Positio n Pin 8 L293D VSS IN OUT GND GND OUT IN EN3, 12V DC Motor Vs IN OUT GND GND OUT IN EN1, PD5 (^) PC4 PC Atmega PC1 Processor PC 24V DC LM 5V DC Rob ot Positio n Robo t Positio n PA0 PA1PA Rob ot Positio n Pin 1 Pin 2 Pin 3 Pin 5 Pin 7 Pin 6 PB PB PB PB AirR etrac t Start Rob ot3 Fire Rob ot1 Fire Rob ot2 Fire Robot4 Fire AirA dvan ce Pin 15 Pin 10 Pin 11 Pin 12 Pin 13 Pin 17 Pin 16 Figure 8: Offensive Robot Controls Wiring Schematic
5. Equations of Motion In order to ensure successful completion of the project, it was necessary to first determine the amount of torque needed to move the robots, allowing appropriate motors to be selected. In order to determine the amount of torque required by the motor, it was necessary to first determine the required acceleration of the robot and then the torque required was calculated. Shown below are the steps performed to determine the torque required by the motor.
5.3 SciLab Simulation of Motor Response Given in Figure 10 is the motor’s response to a supplied voltage, illustrating both the position of the robot in meters (black line), as well as the velocity of the robot in meters/second (red line). It can be seen that as time increases, the acceleration of the robot decreases until speed of the robot reaches a maximum. Furthermore, as time increases the position of the robot against time becomes linear due to the deceasing acceleration. Given in Appendix II are the calculations performed to arrive at the final state equations used to simulate the robots, which are given in Equations 3 and 4. Furthermore, the Scilab program used to perform the simulation is given in Appendix IV. position velocity 0 1 2 3 4 5 6 7 8 9 10 0 5 10 15 20 25 30 35 40 45
Figure 10: Motor Response Diagram Displaying Robot Position and Velocity versus Time
2 2 2 2
w w w w
7. Scoring Calculation The scoring formula, as shown in Equation 1, is based on 6 different parameters. Table 3 displays both our projected and actual score. The projected scores our based on our design estimates while the actual scores were obtained from judges during competition. Table 3: Projected Versus Actual Competition Scores Parameter Projected Value Match 1 Match 2 S - Points Blocked in 2 min (qty) 10 8 6 H - Points Scored in 2 min (qty) 5 3 3 C - Total Cost (USD) 126.58 126.58 126. B - Build Quality Score (0-1) 0.7 0.85 0. T - Theory Quality Score (0-1) 0.7 0.85 0. M - Mass of Apparatus (kg) 1.456 1.456 1. Score 921.5 820.2 461. Let it first be noted that our final scores are based on an assumed value for the build quality score because at the conclusion of the competition, these values were still not available. In match 1, our robots competed as predicted, however in match 2, our performance was much lower than predicted. The outcome of match 2 is much lower than predicted because our robots were competing against human controlled robots, and as the competition progressed, the operators were able to compensate for our strategies, making their victory imminent. However, overall we are very pleased with the final performance of our robots.