Friday, March 16, 2018

Line Followers


I'm not sure what it is about our robotics group this year, but I have never seen such a wide diversity of approaches and solutions to problems before. At BMS the teams are working on "line-follower" robots. The challenge is to create a robot and accompanying program that follows a serpentine, black line from start to finish. The fastest robot to complete the course is the winner. 
We introduced this challenge by discussing the basic algorithm for line following. This method uses Reflected Light Intensity (RLI) to follow one edge of the black line. Using the port-view utility on the EV3 brick, the sensor is held over the edge of the line, half on black, half on white. This value is the target RLI. When the reading is equal to the target, the robot goes straight. When the RLI increases, the robot turns back toward the black line, when the RLI decreases, the robot turns away from the black line. The program below, created by a 6th grader, is a simple and effective method for following the line. This student's robot was the first to finish the course.


It says that if the RLI is less than 30% (the "yes" case of the switch), then the robot will turn 40% to the left at 35% forward power. If this case is not true and the RLI is greater than 30%, the robot will turn 40% to the right at 35% power. This switch is placed in a loop, so the program will continue until it is stopped by the operator. The robot shimmies back and forth with this program, continually seeking the target RLI value and adjusting tens of times per second. 

For the first time ever, a 7th grade student decided to abandon the "move steering" block which controls two motors simultaneously with a built-in steering algorithm. Instead, he chose to create two programs in parallel, each controlling one motor. In order to do this, he used two light sensors, physically separated by the same distance as the width of the black line on the course. Each sensor is aimed just on the outer edges of the line. His program is below.

Instead of using a switch, this student is using the raw reading from each light sensor to control the power of a motor. The yellow lines are called data wires, and send numeric values from one block to another. If the sensor reads lower, then the corresponding motor moves more slowly. If the sensor reads higher, then the corresponding motor moves more quickly. He is changing the amplitude of the light sensor reading by -50% (multiplied by 0.5), so if the RLI for sensor #3 is 50%, motor B will run at 25% power. Effectively, this student has written his own steering algorithm controlled by the continually changing RLI readings of each sensor. This program is still being developed, and I suspect this student will play with the amplitude value in the red math blocks to find the ideal balance between speed and accuracy. 

The program below was created by an 8th grader, and it uses data wires, math blocks and variables. This robot also uses two light sensors that straddle the black line. Instead of using two parallel programs though, this robot uses raw RLI readings to inform the case of a switch. Then, those same raw values are used to define the values for variables which control the powers in a move-tank block controlling motors A and D. This program is working, but the robot moves quite slowly. This student may also add a math block to change the amplitude of the power output to the motors.  
It's obvious to me that these students are beginning to move beyond my level of sophistication! I plan to do some more reading and practice on my own to better understand the concepts they are exploring. It's exciting to watch their solutions unfold in ways we hadn't imagined.

Sunday, January 28, 2018

Robotics Competition, 1/25/2018

On Thursday night, January 25th, we had a great turnout for the first Robotics competition of the 2017-18 school year. Twenty-five students competed in four competitions, entering robots that were the product of imagination, innovation, and plenty of hard work.

The four competitions were "Slope Climbing Robot," "Speed Robot," "Delivery Robot," and "Table Clearing Robot." 

For the first time ever, we had two robots complete the delivery course! Iris Hennin, an 8th grader at WCS completed the course on her first try (an amazing accomplishment) with a time of 20.16 seconds. Riley Dunn and Dalton Johnstone, both 7th graders at BMS had the winning time, completing the course in 17.46 seconds. It took them five tries to finally succeed!

Three robots competed in the speed competition. Josiah Keller and Chris Swinburne, 6th and 7th graders respectively at BMS, took third place with a time of 14.55 seconds to complete the 18 foot course. Second place was Tyler McCarren, an 8th grader from WCS with a time of 7.17 seconds. The winners were Sam Taft and Alex O'Camb, both 8th graders at BMS with an extraordinarily fast time of 2.86 seconds. 



Just one robot was entered in the Slope Climbing Competition. Tyler McCarren and Eban Keach, 8th graders at WCS, built a robot that managed to climb a 55˚ slope with ease.

Finally, in the Table Clearing competition, four robots successfully completed the challenge. Riley Gale, 6th grader at WCS in 31.65 seconds, Seamus Philbrick and Sonya Viselli, 6th graders at BMS in 29.5 seconds, Lucas Martin and Nathan Goodman, 8th and 7th graders respectively at BMS in 20.96 seconds, and Cody Stewart and Severen Denyer, both 7th graders at BMS in 19.86 seconds.

Lucas Martin made two robots for the table clearing event, one that met the criterion of fitting inside a cubic foot of space, and one that fit a square foot but extended up three vertical feet. Below is a video of the "legal" robot and the "illegal" robot. We allowed Lucas to run the "illegal" 'bot as a fun demonstration. It cleared the table in just 9.8 seconds!








Congratulations to every single contestant. The spirit of friendly competition, good sportsmanship and dogged determination in the context of math, science and engineering was wonderful to see. We will be hosting the annual SUMO challenge in early May, and we hope to see you there!



Thursday, January 25, 2018

Preparing to Compete!

All the pieces are in place for another great competition tonight. Students have been working tirelessly to perfect their robots, often making big differences in performance with small tweaks to both designs and programs. An 8th grader at Woolwich made sure her delivery robot was successful in its mission fifteen times in a row before packing it up for travel to Bath Middle School.


I transported all the WCS robots over to the BMS computer lab last night where they are being charged in anticipation of the competition. Mr. Seymour and I cordoned off the area with caution tape to dissuade the curious from handling the merchandise.


Tonight promises to be a lot of fun, and we hope you can make out to support the work of our robotics students. Look for a full report on the competition coming up soon!