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 (RFI) 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 RFI. When the reading is equal to the target, the robot goes straight. When the RFI increases, the robot turns back toward the black line, when the RFI 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 RFI 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 RFI 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 RFI 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 RFI 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 RFI 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 RFI 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!

Tuesday, December 5, 2017


Join us for our Robotics Competition on January 25th from 6:00 PM to 8:00 PM in the Bath Middle School Cafeteria. 

Students will compete in:





This will be a fun night of friendly competition showcasing the imagination and ingenuity of the robotics students. We hope you can join us!

Sunday, October 29, 2017

Desktop Programming vs. Chromebook Programming

I was so excited to learn that LEGO had created a cloud-based programming environment for EV3 Mindstorms Robots. Every student in our district has a ChromeBook assigned to them in grades 3-12, so I imagined a lot of opportunity for kids to experiment with programming, even when we weren't meeting for robotics.

But not so fast...

Some of the exciting functionality of the desktop programming environment doesn't seem to exist in the ChromeBook version. Data wires, sensor blocks and math blocks are not part of the suite. What this means is the inability for students to experience concepts like amplitude, randomization and exponential changes in motor speed. It will also be difficult (impossible?) for students to conduct experiments since there are no sensor blocks.

So, while it's convenient to have the ability to program on the ChromeBooks in a pinch, we will be sticking to the desktop version for now.

Sunday, October 15, 2017

Welcome to Robotics for the 2017-18 School Year!

The "brain" and "heart" of the LEGO Mindstorms Robot is the EV3 Programmable Brick. It's a combination of a small computer, control center, data manager and power output. The EV3 runs in the Linux programming environment, and has some amazing functions.

One of the first steps at the beginning of the year is to guide students as they explore the landscape of the EV3. There are four main tabs, and under each of these categories is a variety of functions. 

By navigating through the tabs it is possible to view, log and graph data input (like distance, light intensity, changes in position, etc.), control motors manually, save and organize files, connect to computers via bluetooth, and even write simple programs.

The import and output ports on the EV3 brick are differentiated by letters and numbers. Numbered ports are inputs for data from sensors. Lettered ports are outputs for energizing motors. 

You can learn a great deal about the EV3 Programmable Brick from the EV3 Manual. 

As we progress through the year, and the challenges get more complex, it will be important to have a firm understanding of the way this brick works.

Monday, May 15, 2017

The Results Are In!

This was the first year for the maze and line follower competitions, and they were both challenging, engaging, and exciting. The kids dug deep into their creativity and perseverance when presented with these tough tasks. I'm impressed by each and every one of them --those that solved the challenges as well as those who did not.  The final results for each of the competitions are below:


  3. HI BYE 67.52 SECONDS
  5. BOB 70.92 SECONDS
  7. MEH 89.73 SECONDS
  8. TEST 96.98 SECONDS
  9. ATLAS 183.58 SECONDS
  10. BRICKY 188.89 SECONDS


  4. DR. DAB-RAH 55.21 SECONDS
  5. CORNY 61.15 SECONDS