We got to see other people's wheelchair's and defenders today. While all seemed to mostly work, some were more impressive than others. Specifically the only group that decided to brave the ramp did as good a job as possible with the not-so-accurate light sensors. The main reason I mention them is because our defender was able to stop them on the ramp with the reaching arm. Of course, the defender required a bit of modifying (wheel counter-balances removed and used as stilts, and the tread removed), but it worked in stopping them.
All in all our robots were successful. The code posted below is not the final code, as we made a few tweaks to the navigating code and the steering check code, but it shows the direction that we were going. The final code is stuck on the engineering computer which we were unable to get to. The code posted below also did not parse well since blogger uses HTML code to enter the posts, so some of it got parsed. Most of it is there though.
It was sad to see our robot go, but we'll have a video up of it navigating the course soon enough.
Here's to a great year in Engineering 100.
(P.S. We'd like to give a special thanks to Snapple!)
Friday, June 5, 2009
Wednesday, June 3, 2009
Robot Competition
Well we completed the competition today. Our robot navigated the course with ease until it reached the defenders which snagged our robot both times. Overall I'd call it a success though since I didn't see any other group get past the defenders. The program worked exactly like it was supposed to, and was even off a little bit from where it should have been but still managed to navigate the course. This shows the robustness of the robot.
The steering calibration worked perfectly and there were no problems with getting stuck (steering or wheels).
We also got to test our car which, as I would've imagined (because the program was so simple), worked fine and didn't stop on the crosswalk. We didn't have a chance to test our defender because everyone kept needing to replace their batteries so we ran out of time, but we'll do that tomorrow.
The steering calibration worked perfectly and there were no problems with getting stuck (steering or wheels).
We also got to test our car which, as I would've imagined (because the program was so simple), worked fine and didn't stop on the crosswalk. We didn't have a chance to test our defender because everyone kept needing to replace their batteries so we ran out of time, but we'll do that tomorrow.
Monday, June 1, 2009
Robot programs
Here is the wheelchair program, complete with steering check...
It goes with this robot
Wheelchair Robot Program, controls above pictured robot Copyright (C) 2009 Jordan Lange This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see
#define engine_main OUT_A;#define engine_steer OUT_B;#define sensor_left SENSOR_1;#define sensor_right SENSOR_3;#define sensor_steering SENSOR_2;
int turning = 0;
task main() { SetSensor(SENSOR_1, SENSOR_TOUCH); SetSensor(SENSOR_2, SENSOR_TOUCH); SetSensor(SENSOR_3, SENSOR_TOUCH); SetSensorMode(SENSOR_1, SENSOR_MODE_RAW); SetSensorMode(SENSOR_2, SENSOR_MODE_RAW); SetSensorMode(SENSOR_3, SENSOR_MODE_RAW); SetPower(OUT_A, 99); // Main power at max SetPower(OUT_C, 99); // Main power at max SetPower(OUT_B, 3); // Steering power at 3
OnFwd(OUT_A); // Turn on engines OnFwd(OUT_C); // Check for bumping into the walls... start steering_check; // Navigate the course start navigate_course;}
task steering_check() { while (true) { if (turning != 1) { // Make sure the steering is straight if (SENSOR_2 > 45) { // Turn power off while correcting the steering int x = OutputStatus(0); int y = OutputStatus(2); if (x > 0) { Off(OUT_A); Off(OUT_C); } // Steering is off, set it all the way to the left SetPower(OUT_B, 7); OnRev(OUT_B); Wait(20); Off(OUT_B); SetPower(OUT_B, 3); // Bring the steering back to center int timeout = Timer(0); int timeoutCounter = 0; int power = 3; while (true) { if (Timer(0) > timeout + 30) { // Try again... // set steering all the way to the left again SetPower(OUT_B, 7); OnRev(OUT_B); Wait(20); Off(OUT_B); if (timeoutCounter > 4) { // Failsafe, wheels are STUCK power++; } SetPower(OUT_B, power); // Reset timeout timeout = Timer(0); timeoutCounter++; }
if (SENSOR_2 <> break; OnFwd(OUT_B); Wait(1); Off(OUT_B); } // Turn the power back on if (x > 0) { OnFwd(OUT_A); OnFwd(OUT_C); } // Steering is aligned, yay! repeat (5) { PlaySound(SOUND_CLICK); } } } }}
task navigate_course() { OnFwd(OUT_A); OnFwd(OUT_C); Wait(1150); Off(OUT_A); Off(OUT_C); repeat(10) { SendMessage(1); } ClearMessage(); until (Message() == 2); OnFwd(OUT_A); OnFwd(OUT_C); // start banking to the right a little bit so it hits the walls turning = 1; turn(5); Wait(500); turn(-4); until (SENSOR_1 <= 150 && SENSOR_3 <= 150); // Hit the far wall, reverse and then turn left OnRev(OUT_A); OnRev(OUT_C); Wait(700); OnFwd(OUT_A); OnFwd(OUT_C); // hard left to cross stairs turn(-12); Wait(720); turn(8); // straighten steering up a bit Wait(100); turning = 0; // The first wall it hits, turn to the left // Should be in a position where that's useful until (SENSOR_1 <= 150 || SENSOR_3 <= 150); reverse_turn(13, 180); repeat (5) { PlaySound(SOUND_CLICK); } // Defender mode (default mode) while (true) { if (SENSOR_1 <= 200) { reverse_turn(-13, 180); } if (SENSOR_3 <= 200) { reverse_turn(13, 180); } }}
void turn(int time) {
if (time <> OnFwd(OUT_B); Wait(-1 * time); Off(OUT_B); } else if (time > 0) { OnRev(OUT_B); Wait(time); Off(OUT_B); }}void reverse_turn(int time, int back_delay) { turning = 1;
if (time <> OnRev(OUT_A); OnRev(OUT_C); OnFwd(OUT_B); Wait(-1 * time); Off(OUT_B); Wait(back_delay); Off(OUT_A); Off(OUT_C); } else if (time > 0) { OnRev(OUT_A); OnRev(OUT_C); OnRev(OUT_B); Wait(time); Off(OUT_B); Wait(back_delay); Off(OUT_A); Off(OUT_C); } OnFwd(OUT_A); OnFwd(OUT_C); turning = 0; // Let the steering check take care of setting the steering back to straight}
Next up is the Car program...
It is this robot, but the extending arm will be removed and the brick turned to the side to allow the wheelchair coming over the ramp to communicate with it
Car Robot Program, controls above pictured robot Copyright (C) 2009 Jordan Lange This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see
task main() { SetPower(OUT_A, 7); SetSensor(SENSOR_3, SENSOR_LIGHT); ClearMessage(); while (Message() != 1) { OnFwd(OUT_A); Wait(500); OnRev(OUT_A); Wait(500); } if (SENSOR_3 <= 38) { Toggle(OUT_A); until (SENSOR_3 >= 45); Wait(200); Off(OUT_A); } Off(OUT_A);}
And last is our defender program...
Defender Robot Program, controls car robot pictured above, but with a different purpose Copyright (C) 2009 Jordan Lange This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see
task main() { SetPower(OUT_A, 7); OnRev(OUT_A); Wait(500); Off(OUT_A); SetPower(OUT_C, 5); OnFwd(OUT_C); Wait(200); Off(OUT_C);}
This program extends this arm (not Chun's arm):
Tuesday, May 26, 2009
Main Robot - Day 3 1/2
We worked on getting the steering system to stop at center using a touch sensor. The steering now stops at the center. We also added supports to the RCX brick so that it stays on better. Now that the final design is mainly done, we can start programming for the track.
(Touch sensor design)
(Brick supports)
(Touch sensor design)
(Brick supports)
Wednesday, May 20, 2009
Main Robot - Day 2
We adjusted the rear drive train a lot today. We first tried the TORSEN differential, but there was too much torque on the differential when the locking system (the part that makes both wheels spin equally when one has been spinning faster than the other) engaged, and the differential started flying apart. So we (Paul) built a limited slip differential that doesn't have quite as much torque on it when the locking mechanism engages. It works perfectly, but the drivetrain is geared down a lot so it doesn't move very quickly, but it seems pretty strong. It doesn't make its way up the stairs yet, but a bit of tweaking will change that.
Aside from that, we built a front bumper system that has two independent sensors that trigger when something bumps into either side of the car. It's programmed to reverse and change direction when it hits something then move forward agan in an attempt to avoid the obstace. It's pretty crude, but seems to work.
(TORSEN differential w/ "motor box" powering it)
(Limited slip differential)
(Limited slip w/ "motor box" attached)
(Car now)
(Another shot of the car now)
The bumper system is up front.
Aside from that, we built a front bumper system that has two independent sensors that trigger when something bumps into either side of the car. It's programmed to reverse and change direction when it hits something then move forward agan in an attempt to avoid the obstace. It's pretty crude, but seems to work.
(TORSEN differential w/ "motor box" powering it)
(Limited slip differential)
(Limited slip w/ "motor box" attached)
(Car now)
(Another shot of the car now)
The bumper system is up front.
Monday, May 18, 2009
Main Robot - Day 1
Today we started building the robot that would navigate the final course. It consists of a front steering system (Figure 1) with rear wheel drive. The drivetrain consists of three engines, driving one single drive shaft (Figure 2) that gears into an open differential (Figure 3) which allows each wheel to spin independently for better turning.
Figure 1
Since the open differential is bad if the wheels start to slip (like on the sand) we might switch to a TORSEN differential system which has the good properties of an open differential (better turning) along with the fact that it is a completely mechanical system and transfers torque to the non-slipping wheel if one wheel starts slipping (property of a locking differential). The amount of torque transferred is a function of the torque bias ratio (TBR). A TBR of 3:1, for example, would mean that one side of the differential could handle 75% of the torque, while the other side only needed to handle 25% of the torque.
From wikipedia: "When the traction difference exceeds the TBR, the slower output side of the differential receives the tractive torque of the faster wheel multiplied by the TBR; any extra torque remaining from applied torque contributes to the angular acceleration of the faster output side of the differential."
Figure 1
Since the open differential is bad if the wheels start to slip (like on the sand) we might switch to a TORSEN differential system which has the good properties of an open differential (better turning) along with the fact that it is a completely mechanical system and transfers torque to the non-slipping wheel if one wheel starts slipping (property of a locking differential). The amount of torque transferred is a function of the torque bias ratio (TBR). A TBR of 3:1, for example, would mean that one side of the differential could handle 75% of the torque, while the other side only needed to handle 25% of the torque.
From wikipedia: "When the traction difference exceeds the TBR, the slower output side of the differential receives the tractive torque of the faster wheel multiplied by the TBR; any extra torque remaining from applied torque contributes to the angular acceleration of the faster output side of the differential."
Friday, May 15, 2009
Pathfinder Robot
We completed our pathfinder robot today. It is a powerful robot with one engine per wheel in the back, and two engines powering the single front wheel. Designed this way, the robot can easily climb over the stairs. The robot is as shown below (Snapple not included).
We (Paul) also completed a VERY COMPLEX AND AMAZING steering system that will be used on our final navigator robot. The single motor powers the steering mechanism, which will turn the wheels that will be added later.
We (Paul) also completed a VERY COMPLEX AND AMAZING steering system that will be used on our final navigator robot. The single motor powers the steering mechanism, which will turn the wheels that will be added later.
Wednesday, May 13, 2009
Starting robot building
Today we began designing and programming our robot. There are no pictures because we played more with the programming language (NQC) than with the robot. More to come tomorrow...
Monday, May 11, 2009
NQC + Mindstorms
We got introduced to the Mindstorms legos today. We started getting set up to transfer programs to the robot by connecting the USB tower to the robot over IR. It took a bit of finessing, but we were able to get the brick to connect to the USB tower and transfer the firmware to the brick so we could start transferring programs. We compiled and transferred a simple program that made a few simple things happen on the robot.
Monday, April 27, 2009
Bridge Project - Test Day
The final test day for the bridge project was today. We came in first! Our bridge held a maximum of 721.57 lbs and weighed only 240 grams. The main part that failed first was the supports that the bridge rests on when sitting in the metal test box, as seen in the following picture:
This is our test data. The second peak of the graph is when the bottom part of the bridge hit a small ridge on the box and was re-supported.
This is the aftermath:
This is our test data. The second peak of the graph is when the bottom part of the bridge hit a small ridge on the box and was re-supported.
This is the aftermath:
Friday, April 24, 2009
Bridge Project - Day 8
Wednesday, April 22, 2009
Bridge Project - Day 7
Monday, April 20, 2009
Bridge Project - Day 6
We reinforced our prototype and conducted more stress tests to see which components would fail first so we could strengthen the weaknesses in our bridge. After, we began constructing the components of our final bridge using wood glue.
Friday, April 17, 2009
Bridge Project - Prototype Testing
Wednesday, April 15, 2009
Monday, April 13, 2009
Friday, April 10, 2009
Bridge Project - Day 3
Wednesday, April 8, 2009
Bridge Project - Day 2
Monday, April 6, 2009
Bridge Project - Day 1
Today we started on our bridge project. We ran compression and buckle tests on our components. The tests we ran focused on measuring the compression and tension strengths of the hot glue joints connecting two tongue depressors. We found that the compression strength is weaker than the tension strength for the joints. However, the measurements might not be correct due to uneven gluing. After we were finished with the measurements, we began designing our bridge and proceeded to make a simple prototype (shown).
Thursday, April 2, 2009
Even Better Spaghetti Water Tower
Although it was very hard to do, we somehow managed to make an even better water tower. It's made out of corn spaghetti (which is much weaker than normal spaghetti) and uses duct tape to hold the joints together. Also, the water tower holds a fair amount of water. Amazingly, even more than our original tower.
Wednesday, April 1, 2009
Spaghetti Water Tower
Our spaghetti water tower project was a resounding success. It exceeded our expectations by holding more than twice the required weight of 2.5 ounces. Our design consisted of 4 bundles of spaghetti. Each bundle was created by taping 5 strands of spaghetti together at the two ends and middle.
Subscribe to:
Posts (Atom)