Tag Archives: mindstorms

Sensors First - A Changed Approach

I presented to some FIRST LEGO League teachers on the programming software for the LEGO Mindstorms EV3 last week. My goal was to present the basics of programming in the system so that these teachers could coach their students through the process of building a program.

The majority of programs that students create are the end product of a lot of iteration. Students generally go through this process to build a program to do a given task:

  1. Make an estimate (or measurement) of how far the motors must rotate in order to move the robot to a given location.
  2. Program the motors to run for this distance.
  3. Run the program to see how close the robot gets to the desired location.
  4. Adjust the number in Step 1. Repeat until the robot ends up in the right location.

Once the program gets the robot to the right location, this process is repeated for the next task that the robot must perform. I've also occasionally suggested a mathematical approach to calculate these distances, but the reality is that students would rather just try again and again until the robot program works. It's a great way to introduce students to the idea of programming as a sequence of instructions, as well as familiarity with the idea that getting a program right on the first try is a rarity. It's how I've instructed students for years - a low bar for entry given that this requires a simple program, and a high ceiling since the rest of programming instructions are extensions of this concept.

I now believe, however, that another common complaint that coaches (including me) have had about student programs is a direct consequence of this approach. Most programs (excluding those students with a lot of experience) require the robot to be aimed correctly at the beginning of the program. As a result, students spend substantial time aiming their robot, believing that this effort will result in a successful run. While repeatability is something that we emphasize with students (I have a five in a row success rule before calling a mission program completed) it's the method that is more at fault here.

The usual approach in this situation is to suggest that students use sensors in the program to help with repeatability. The reason they don't do so isn't that they don't know how to use sensors. It is that the aim and shoot method is, or seems, good enough. It is so much easier in the student's mind to continue the simpler approach than invest in a new method. It's like when I've asked my math students to add the numbers from 1 to 30, for example. Despite the fact that they have learned how to quickly calculate arithmetic series before, many of them pick up their calculators and enter the numbers into a sum, one at a time, and then hit enter. The human tendency is to stick to those patterns and ideas that are familiar until there is truly a need to expand beyond them. We stick with what works for us.

One of my main points to the teachers in my presentation was that I'm making a subtle change to how I coach my students through this process. I'm calling it 'sensors first'.

The tasks I give my students in the beginning to learn programming are going to require sensors in order to complete. Instead of telling students to program their robot to drive a given distance and stop, I'll ask them to drive their robot forward until a sensor on their robot sees a red line. I'll also require that I start the robot anywhere I want in the test of their program.

It's a subtle difference, and requires no difference in the programming. In the EV3 software, here's what it looks like in both cases, using wheels to control the distance, and a sensor:
Screen Shot 2014-09-21 at 1.29.24 PM

What am I hoping will be different?

  • Students will look to the challenges I give them with the design requirement built in that aim-and-shoot isn't an option that will result in success. If they start off thinking that way, they might always think how a sensor could be used to make the initial position of the robot irrelevant. FLL games always have a number of printed features on the mat that can be used to help with this sort of task.
  • When I do give tasks where the students can start the robot wherever they choose, students will (hopefully) think first whether or not the starting position should matter or not. In cases where it doesn't, then they might decide to still use a sensor to guide them (hopefully for a reason), or drop down to a distance based approach when it makes sense to do so. This means students will be routinely thinking what tool will best do the job, rather than trying to use one tool to do everything.
  • This philosophy might even prompt a more general need for ways to reduce the uncertainty and compound error effect associated with an aim and shoot approach. Using the side of the table as a way to guide straight line driving is a common and simple approach.

These sorts of problem solving approaches are exactly the way successful engineering design cycle works. Solutions should be found that maximize the effectiveness of a design while minimizing costs. I'm hoping this small change to the way I teach my students this year gets them spending more time using the tools built into the robot well, rather than trying to make a robot with high variability (caster wheels, anyone?) do the same thing two times in a row.

Tea with Lee Magpili and the LEGO Mindstorms EV3

Though my schedule being back in the US this summer has been busy, when I learned that Lee Magpili was going to be in town, I cleared my schedule. I first met Lee when I was working with the Bronx FIRST LEGO League initiative several years ago. He was a quiet presence in comparison to the energetic middle school students that attended our workshops to play with LEGO robots, but I quickly learned of his prowess with building with LEGO elements. His rovers navigated the FLL field with ease and used mechanisms that balanced simplicity with effectiveness. Eventually he mentored an FLL team to do exceptionally well. Like all great FLL coaches, however, he insisted on the students doing the work. In our conversations at that time, I quickly understood that Lee believed (and continues to believe) that LEGO is an amazing platform upon which to learn an enormous range of useful skills. Robotics, in particular, capitalizes on the unique blend of play and learning through LEGO to get students to understand the engineering design process. Lee is a believer in the potential for students to be quickly engaged and motivated to work hard when the right tools are around.

It was consequently no surprise when I learned Lee had been selected for a job with LEGO education in Denmark a couple of years ago. He and I wrote back and forth periodically about the position and what it entailed, but for a while our conversations turned noticeably away from the details of his work. I figured this was just a consequence of the distance and I left it at that.

This ended last January with the announcement of the LEGO Mindstorms EV3. When Lee posted a link to the announcement on Facebook, I suddenly understood. It made me realize that like any good designer, he kept his ideas secret until they were ready to share with the world. (I assume a pretty airtight NDA was also involved.)

Lee sat down with me at Saints Alp Teahouse in New York for some bubble tea, snacks, and conversation about the EV3. What struck me was that Lee's enthusiasm for using LEGO as a learning tool hasn't just been maintained, it has grown considerably since becoming part of the EV3 team. As you might also expect, he was excited to show me the bits and pieces of the kit that will be coming out in August.

20130627-075548.jpg

From a LEGO designer's perspective, the attention to detail in acknowledging the desires of the LEGO fan community and the limitations of the NXT set will most definitely be appreciated. There are some subtle changes that made me excited given my own experiences building with the curves of the NXT and its parts.

For example, a reshaping of the motor has made it much easier to attach pins and secure it to designs:

20130627-075218.jpg

Sensors can be attached using a single pin if needed:

20130627-075029.jpg

I also suspect that many people will discover ways that alignment between different components will be much easier with the new set:

20130627-075319.jpg

Lee also spoke a lot about the care that he and the team have taken to make the bar for entry with the kit low, and the ceiling high. The education kit will include instructions for building modules that can be used in different designs. A conveyor belt doubles as a set of tracks. A motor-wheel module can be built that is sturdy but easy to build upon. This will help students (and teachers) minimize the frustration that inevitably occurs when straying from build instructions to pursue an idea for a new design. The strengths associated with building with Technics parts will be a lot more intuitive to newcomers that may have only worked with bricks.

I am excited to get my hands on one of these kits. In my robotics class this year, students grew considerably in their ability to conjure up a design and make it happen with the bricks. Students often got frustrated by the curves of the NXT motors getting in the way of their designs. The ease of attaching motors directly to the programmable brick of the EV3 will make it even easier to get students learning programming techniques. The on brick features for prototyping and programming will make things much easier for trying out quick ideas, especially on an FLL field.

It was good catching up with Lee - he is a person to watch in the world of LEGO Education. He was at the FIRST World Festival to demonstrate the EV3 to FIRST LEGO League teams, not to mention members of the Board of Directors at the LEGO group. He told me that his plans include photographing Gyro Boy in Times Square and Washington Square Park. Though he assures me that the robot named 'Evan' that has been touring the world to demonstrate the EV3 is not named after me, I'm going to continue to assume that it is.