Hands-on Activity: That's Hot! Robot Brain Programming

Contributed by: GK-12 Program, Computational Neurobiology Center, College of Engineering, University of Missouri

Photo shows three teens using sticks to roast hot dogs over the flames of a campfire by a lake. A blue x-ray-like image shows the shoulders, spinal cord and brain in a skull.
The "stimulus-sensor-coordinator-effector-response" framework explains how you jerk back your hand when you touch something hot. Can you program a robot to mimic this process?
Copyright © (left) 2004 Microsoft Corporation, One Microsoft Way, Redmond, WA 98052-6399 USA. All rights reserved. (right) AZ Dept. of Health Services Director's Blog http://directorsblog.health.azdhs.gov/wp-content/uploads/2013/02/MP900438746.jpg


With the challenge to program computers to mimic the human reaction after touching a hot object, students program LEGO® robots to "react" and move back quickly once their touch sensors bump into something. By relating human senses to electronic sensors used in robots, students see the similarities between the human brain and its engineering counterpart, the computer, and come to better understand the functioning of sensors in both applications. They apply an understanding of the human "stimulus-sensor-coordinator-effector-response" framework to logically understand human and robot actions.
This engineering curriculum meets Next Generation Science Standards (NGSS).

Engineering Connection

Biological engineers and neuroscientists perceive the human body as a functioning, controlled system, similar to a robot. Engineers who design robots apply mathematical principles similar to those used in human brains and systems to the creation of smarter computers and sensors. Some engineers study how pressure sensors in human fingers help you pick up a glass without breaking it, and use that information to design better touch sensors for robots so that they can pick up objects in a similar manner. Other engineers research how the human eye works so that they can design cameras with higher performance and speed.

Pre-Req Knowledge

  • We suggest students complete the previous unit in the series, Humans Are Like Robots, prior to starting this activity.
  • Ability to operate a personal computer and a LEGO MINDSTORMS EV3 robot.
  • Familiarity with graphical programming on the LEGO MINDSTOMRS EV3 TaskBot

Learning Objectives

After this activity, students should be able to:

  • Explain how human senses and the brain interact to accomplish a task.
  • Describe how electronic sensors interact with a robot to accomplish a task.

More Curriculum Like This

Brain is a Computer

Students learn about the similarities between the human brain and its engineering counterpart, the computer. Since students work with computers routinely, this comparison strengthens their understanding of both how the brain works and how it parallels that of a computer.

Middle School Lesson
Reflecting on Human Reflexes

Students learn about human reflexes, how our bodies react to stimuli and how some body reactions and movements are controlled automatically, without thinking consciously about the movement or responses. In the associated activity, students explore how reflexes work in the human body by observing an ...

Middle School Lesson
What Is a Sensor?

Students gain a rigorous background in the primary human "sensors," as preparation for comparing them to some electronic equivalents in the associated activity. Students learn the concept of "stimulus-sensor-coordinator-effector-response" to describe the human and electronic sensory processes.

Elementary Lesson
How Does a Touch Sensor Work?

Students learn about how touch sensors work, while reinforcing their similarities to the human sense of touch. They look at human senses and their electronic imitators, with special focus on the nervous system, skin and touch sensors.

Educational Standards

Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.

All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).

In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

  • Gather and synthesize information that sensory receptors respond to stimuli by sending messages to the brain for immediate behavior or storage as memories. (Grades 6 - 8) Details... View more aligned curriculum... Do you agree with this alignment?
  • Evaluate competing design solutions using a systematic process to determine how well they meet the criteria and constraints of the problem. (Grades 6 - 8) Details... View more aligned curriculum... Do you agree with this alignment?
  • Develop a model to generate data for iterative testing and modification of a proposed object, tool, or process such that an optimal design can be achieved. (Grades 6 - 8) Details... View more aligned curriculum... Do you agree with this alignment?
  • Knowledge gained from other fields of study has a direct effect on the development of technological products and systems. (Grades 6 - 8) Details... View more aligned curriculum... Do you agree with this alignment?
  • Describe how new technologies have helped scientists make better observations and measurements for investigations (e.g., telescopes, electronic balances, electronic microscopes, x-ray technology, computers, ultrasounds, computer probes such as thermometers) (Grade 5) Details... View more aligned curriculum... Do you agree with this alignment?
  • Explain the interactions between the nervous and muscular systems when an organism responds to a stimulus (Grade 8) Details... View more aligned curriculum... Do you agree with this alignment?
Suggest an alignment not listed above

Materials List

Each group needs:

To share with the entire class:

Note: This activity can also be conducted with the older (and no longer sold) LEGO MINDSTORMS NXT set instead of EV3; see below for those supplies:

  • LEGO MINDSTORMS NXT robot, such as the NXT Base Set
  • computer, loaded with NXT 2.1 software


Your brain is like a computer that controls lots of your body functions such as walking and talking—and so much more! And, your brain works fast! What happens if you get too close to a hot burner or a hot fire? (Listen to student responses.) That's right; your quick reaction is to pull back your hand. What goes on in the human body to create that response? (See if students remember what they learned in the associated lesson.)

Moving our hands away from hot objects can be understood through a framework we call the "stimulus-sensor-coordinator-effector-response." Thinking of these steps, what happens when you touch something hot? (Listen to student answers.) The stimulus is touch, the sensor is the temperature/pain receptor on your finger that senses it and relays it to the nervous system (spinal cord and brain), which is the coordinator. The coordinator makes the decision of how to react, and then commands the hand muscles (acting as the effector) to jerk back quickly. The framework takes us through the entire process, from stimulus (touch) to response (hand movement).

If brains are like computers, do you think a computer, maybe a robot, could mimic this human response? In today's activity you will find out. Your engineering challenge is to program a LEGO EV3 robot with a touch sensor to "move back quickly"—a reflex action—when the touch sensor "bumps" into something in front of the robot. Let's get started.


brain: An organ of the central nervous system located in the head, consisting of soft, lumpy gray matter and serving to control and coordinate the body's mental and physical actions.

computer: A human-created electronic device that processes data, performs mathematical and logical calculations, displays graphics, and helps you connect to the internet.

robot: A mechanical device that sometimes resembles a human and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.

sensor: A device that converts one type of signal to another. For instance, a tachometer displays the speed that your car is traveling.

stimulus: Something that causes a response.


Before the Activity

With the Students

  1. Divide the class into groups of two or three students each.
  2. Have each group assemble with a LEGO EV3 robot, sensors and computer.
  3. Introduce the engineering challenge (see slide 2): Program your TaskBot to mimic the human reaction when touching a hot object. So, program your TaskBot using a touch sensor so that it withdraws quickly when the sensor touches something in front of it.
  4. What happens when you touch something hot? Let's apply what we know about how the human brain/nervous system/senses work to help us think through the logic of the programming (see slide 3). Suggest that students begin the challenge by writing down the actions of the robot using the stimulus-to-response framework. Then they should plan out how to structure the program.
  5. Show student the rubric that will be used to evaluate each group's achievement (slide 4).
  6. When teams are done programming, testing and revising for improvement, have each demonstrate its programming in front of the rest of the class, grading to the rubric criteria.
  7. Conclude with a class discussion to share what students learned about programming principles, and their experiences, especially any difficulties encountered.



Embedded Assessment: Expect students to be able to come up with the logic for a program to mimic the reflex action of a hand when it touches a hot object, and then assemble the program as shown in the solution slides. A team meets the challenge if it is able to show that its robot is able to "move back quickly" when it bumps into something as the robot moves forward. Use the following rubric to evaluate each team's construction and programming accomplishments [maximum 40 points; see slide 4]:

  1. The touch sensor was correctly assembled on the robot (using instructions) [max 5 points]
  2. The computer program makes the robot move forward [max 15 points]
  3. The touch sensor work as planned, that is, made the robot move back quickly upon being activated by an obstacle (for example, a wall in front) [max 20 points]

Closing Discussion: Ask students to share what they learned about programming principles and their experiences, especially any difficulties encountered.

Additional Multimedia Support

EV3 robots and sensors: https://www.lego.com/en-us/mindstorms/?domainredir=mindstorms.lego.com


Sachin Nair, Charlie Franklin, Satish Nair


© 2013 by Regents of the University of Colorado; original © 2012 Curators of the University of Missouri

Supporting Program

GK-12 Program, Computational Neurobiology Center, College of Engineering, University of Missouri


This curriculum was developed under National Science Foundation GK-12 grant no. DGE 0440524. However, these contents do not necessarily represent the policies of the National Science Foundation, and you should not assume endorsement by the federal government.

Last modified: January 26, 2018