Brain DeCoded with CodeX - Mission 5, Objective 2: Motor Neuron Signals

Mission 5 · Objective 2 Lesson Plan

Motor Neuron Signals

Students wire up a servo and a potentiometer, then build a program that shows how a motor neuron's diameter changes how fast an action potential travels.

⏱ 45-70 min 🎯 Grades 8-12+ 💻 CodeSpace 🎮 CodeX 🔌 Peripherals 🐍 Python
View Lesson Outline
📋

Overview

Objective 1 traced the signal from the brain to the muscle. This objective asks the next question: how fast does that signal actually move, and what changes the answer? The short version is diameter. A wider motor neuron carries an action potential faster than a narrow one.

Students build action_potentials, a program that turns that relationship into something they can see and hear. The potentiometer sets the value, and the 180 positional servo sweeps back and forth at the resulting speed, standing in for the muscle at the end of the line. Variables and branching do the work in the code.

This is a wiring objective, so plan for setup time. The potentiometer needs the divider board, and peripherals that are plugged in wrong simply do not work.

🎯 Project Goal: Students add code to a program that demonstrates the relationship between the diameter of a motor neuron and the action potential velocity.

🎯

Learning Targets

  • I can explain how the diameter of a motor neuron impacts the speed of action potentials.
  • I can use variables and branching in a program.
💡

Key Concepts

  • The diameter of the motor neuron impacts the speed of action potentials moving down neurons.
  • A neuron with a wider diameter increases action potential velocity.
  • Variables and branching are key components of programming.
✅

Assessment Opportunities

  • Turn in the Activity Guide.
  • Complete the program action_potentials.
☑

Success Criteria

  • Complete the CodeTrek steps
  • Program runs correctly without errors
  • Activity Guide is completed
🧰

Classroom Materials

  • ▸CodeX device and USB cable, one per student
  • ▸Laptop/computer with Chrome browser
  • ▸180 positional servo
  • ▸Potentiometer and divider
🚀

Extensions & Cross-Curricular

ExtensionFor students with programming experience, have them review the code for muscle_speed(), explain how it moves the servo back and forth, and make adjustments.
Phys ScienceThis program uses the 180 servo. Have students research the servo and how it works.
🔤

Vocabulary

▾
Variable - A name for a value that can change during the program, making it easier to work with data.
Branching - A programming structure that enables one block of code to run, based on a condition.
🐍

New Python Code

▾
def muscle_speed(delay, angle):Define a function with parameters. Parameters receive their values from a function call's arguments.
global forward, percentThe global command allows global variables to be updated, or changed, in a function.
time.sleep_ms(delay)Pause the program for "delay" milliseconds.
📐

Standards

▾

Computer Science

9-12.AP.14

Mathematics

S-ID.2
📝
Preparing for the Lesson
  • Set up and run the program yourself first, with the servo and potentiometer wired. You want to know what a working sweep looks like before twenty students ask you why theirs is still.
  • Count out the peripherals ahead of time: a 180 positional servo and a potentiometer with its divider per student or pair. The divider is the piece that gets forgotten.
  • Decide how students get the Activity Guide. You can print a copy for each student or assign it digitally. They record results in it, so they need it before they start.
  • Have the CodeX Peripherals Guide open or projected. Wiring questions come up fast, and a diagram on the board answers most of them for you.
  • Plan for setup time in the period. Wiring plus coding is the reason this objective runs long, so know where you will stop if you are splitting it across two days.

🧑‍🏫
Teacher Notes
  • The program uses the potentiometer and 180 servo as part of the simulation. Remind students to use the divider board when connecting the potentiometer.
  • Make sure the peripheral wires are connected correctly. Otherwise the peripherals will not work, and that is almost always the cause when a student's program looks right but nothing moves.
  • Students should follow the instructions on the Activity Guide and record their results.
  • The servo is the visible payoff here. Students who see a fast sweep next to a slow one understand the diameter relationship better than they will from the reading alone.
  • Extensions and cross-curricular projects are included to enhance the concepts in the objective. You can use the extensions to extend students' learning.
🗺️

Lesson Outline

🗣️Warm-up / Hook

Pick up the timing question left open at the end of Objective 1.

  • Ask: "Yesterday we followed a signal from your brain to your muscle. What do you think decides how fast it gets there?"
  • Ask: "If you had two wires, one thin and one thick, which one would you expect to move a signal faster?"
Teaching tip: Take guesses and write them on the board without saying who is right. The servo settles the argument for you in twenty minutes, and students remember an answer they predicted.
🔌Wiring Setup

Peripherals first. Nothing in this objective works until the wiring is right.

  1. Hand out the 180 positional servo and the potentiometer with its divider.
  2. Students connect the potentiometer through the divider board, then connect the servo. Check both before anyone runs code.
  3. Walk the room and confirm wire order on each setup. Reversed wires are the single most common failure here.
  4. Hand out or assign the Activity Guide.
Teaching tip: Project the Peripherals Guide wiring diagram and leave it up for the whole period. Students check it themselves instead of raising a hand, and you get through the room faster.
💻Student Work Time

Students build action_potentials and run the simulation.

  1. Students work through the CodeTrek steps, adding code to action_potentials.
  2. They use variables to hold the neuron values and branching to decide what the servo does, then pass values into muscle_speed(delay, angle).
  3. Students turn the potentiometer through its range and watch the servo sweep speed change with it.
  4. Students record their results on the Activity Guide as they go, not at the end from memory.
Teaching tip: When a program looks correct but the servo sits still, check the wiring before reading the code. That is the answer far more often than a bug is.
📊Compare Results

Turn the recorded data back into the biology.

  • Have a few students report their slowest and fastest settings and what the servo did at each.
  • Ask what that means for a real motor neuron: which one moves a signal faster, wide or narrow?
  • Connect it back to the body. Reflexes that need to be fast run on wider neurons for exactly this reason.
Teaching tip: This is the math standard in disguise. Asking students to describe the pattern in their recorded numbers is interpreting data, and it costs you five minutes.
✏️Wrap-up & Review

Close on diameter and speed.

  • Ask: "In one sentence, how does a neuron's diameter change the speed of an action potential?"
  • Quick check on the code: what did the global line let the program do that it could not do without it?
  • Collect the Activity Guides. Have students disconnect and return the servos and potentiometers.
Teaching tip: Build in a couple of minutes for teardown. Peripherals that go back sorted save you the first ten minutes of the next objective.