Brain DeCoded with CodeX - Mission 5, Objective 4: Muscle Response
Muscle Response
Students build a chewing simulation to see how the Central Pattern Generator keeps a rhythm going, and what happens when a reflex interrupts it.
Overview
Objective 3 showed neurons taking turns to make a rhythm. This objective names the thing that runs it. The Central Pattern Generator, or CPG, sets the rhythm of a motion and keeps it going without the brain having to issue every single order. There is also a theory here worth arguing about: that rhythmic movement could be generated by reflexes.
Students build chewing_sim, which puts a CPG on the hardware. The 180 positional servo works the jaw, the potentiometer feeds the simulation, and the screen changes color as the state changes. The interesting part is the interruption. A reflex can break a rhythm when something goes wrong, which is what happens when you bite your tongue and your jaw stops without you deciding to stop it.
This objective wires up the same peripherals as Objective 2, so setup should go faster the second time.
🎯 Project Goal: Students add code to a program that simulates the Central Pattern Generator.
Learning Targets
- I can explain the theory that rhythmic movements could be generated by reflexes.
- I can explain how the CPG sets a rhythm in motion.
Key Concepts
- The Central Pattern Generator sets the rhythm of a motion.
- A reflex can interrupt a rhythm if a problem occurs.
Assessment Opportunities
- Exit ticket: give an example of a motion that is set by the CPG.
- Turn in the Activity Guide.
- Complete the program chewing_sim.
Success Criteria
- Complete the CodeTrek steps
- Program runs correctly without errors
- Activity Guide is completed
Digital Resources
Classroom Materials
- ▸CodeX device and USB cable, one per student
- ▸Laptop/computer with Chrome browser
- ▸180 positional servo
- ▸Potentiometer and divider
Extensions & Cross-Curricular
muscle_open() and muscle_close(). How are they alike, and how are they different? Then try writing a single function instead of two.
🔤
Vocabulary
▾
🐍
New Python Code
▾
📐
Standards
▾
Science & Engineering Practices
Crosscutting Concepts
- Pull the peripherals back out: a 180 positional servo and a potentiometer with its divider per student or pair. Same setup as Objective 2, so students who kept their wiring notes will move fast.
- Run the program yourself first. You want to know what a normal chewing cycle looks like before you can tell which student servos are misbehaving.
- 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 hand it out before they start.
- Have the CodeX Peripherals Guide open or projected for the wiring questions.
- Have your own CPG example and interruption ready for discussion. Chewing and biting your tongue is the obvious pair, so pick a second one if you want students to reach past the program.
- The program uses the potentiometer and 180 servo. Remind students to use the divider board with the potentiometer, and to check that the wires are connected correctly.
- Students should follow the instructions on the Activity Guide and record their results.
- The CPG is easiest to explain as the part that keeps going on its own. Students often assume the brain sends a separate order for every chew, and the whole point is that it does not have to.
- The theory that rhythmic movement comes from reflexes is a theory, and the standards here are about arguing from evidence. It is worth letting students push on it rather than presenting it as settled.
- 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
Start with a rhythm nobody is thinking about.
- Ask: "When you chew, are you deciding to make each individual chew? Then who is?"
- Ask: "What happens the instant you bite your tongue, and how much of that did you choose?"
Same peripherals as Objective 2. Get them right before any code runs.
- Hand out the 180 positional servo and the potentiometer with its divider.
- Students connect the potentiometer through the divider board, then connect the servo.
- Check wire order on each setup. Reversed wires are still the most common reason nothing moves.
- Hand out or assign the Activity Guide.
Students build chewing_sim and run the CPG.
- Students work through the CodeTrek steps, adding code to chewing_sim.
-
The servo works the jaw through its open and close cycle, and
display.fill()changes the screen color as the state changes. - Students run the simulation and watch the rhythm hold steady on its own.
- Students trigger the interruption and watch the reflex break the rhythm, then see how it resumes.
- Students record their results on the Activity Guide as they go.
Short discussion, and where the science practice standard gets earned.
- Put the theory on the table: rhythmic movements could be generated by reflexes.
- Ask students what in their simulation supports that idea, and what does not.
- Ask what evidence they would want from a real body to decide. Let the question stay open.
Close on rhythms the body runs without asking.
- Exit ticket: each student names a motion that is set by the CPG.
- For a few of them, ask what could interrupt that rhythm and what would let it resume.
- Collect the Activity Guides and have students return the servos and potentiometers.