OLIVIA'S PIANO PEDAL ASSISTANT

OLIVIA'S PIANO PEDAL ASSISTANT

OVERVIEW

This challenging-level STEM camp lesson guides middle school students through designing and building a piano pedal assistant for Olivia, a 13-year-old student with a limb difference. Over five one-hour sessions, students will apply human-centered design principles and engineering skills to create a Smart Servo-powered device that enables Olivia to use piano pedals despite her physical limitations. Students will engage in empathetic design, problem definition, ideation, prototyping, and testing while developing technical skills in programming, mechanical design, and assistive technology creation.

Client Profile

Name About Me My Challenge
Olivia, 13 I'm a passionate young musician who loves playing piano. I was born with a partial right leg and use a prosthetic for mobility. I'm involved in my school's music program and dream of performing in recitals. I cannot effectively use the sustain pedal on pianos due to my prosthetic leg's limited range of motion and difficulties with precise pedal control. This prevents me from playing many pieces that require pedaling, which is limiting my musical development.

Learning Objectives

MATERIALS NEEDED

1. ENGAGE

How do musicians with physical differences overcome barriers to performance?

Activity: "Musical Barriers Exploration"

  1. Video Introduction:
    • Watch short video clips of musicians with various physical differences who have found ways to overcome barriers
    • Introduce Olivia's specific challenge with piano pedal control
  2. Physical Simulation:
    • Have students experience piano pedal usage with simulated physical constraints
    • Students document observations about the mechanical forces, timing, and precision required
  3. Smart Servo Introduction:
    • Demonstrate basic Smart Servo operation with the LED blinking code
    • Show servo movement capabilities with the Servo Sweep example

Basic LED Control

import time
import board
from digitalio import DigitalInOut, Direction, Pull
led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT
while True:
    led.value = 1
    time.sleep(1)
    led.value = 0
    time.sleep(.5)
            

Servo Sweep Example

import time
import board
import pwmio
import servo
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
servo = servo.Servo(pwm)
while True:
    for angle in range(0, 180, 5):  # 0 to 180 degrees, 5 degrees at a time
        servo.angle = angle
        time.sleep(0.05)
    for angle in range(180, 0, -5): # 180 to 0 degrees, 5 degrees at a time
        servo.angle = angle
        time.sleep(0.05)
            

Technical Checkpoints:

Understanding Checkpoints:

Connections

Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 4N: Analyze how technologies change human interaction and communication CAD 2.1: Freehand Sketching for quick visualization of ideas HCD Skill #1: Problem Framing - analyzing situations from multiple perspectives
STEL 7R: Refine design solutions for criteria and constraints CAD 1.2: Following structured design processes HCD Skill #6: Stakeholder Dialogue - gathering requirements

2. EXPLORE

What are the mechanical and programming requirements for effective piano pedal control?

Activity: "Pedal Mechanics Investigation"

  1. Piano Pedal Analysis:
    • Examine the mechanics of piano pedals (force required, range of motion, timing needs)
    • Measure and document critical dimensions and mechanical characteristics
    • Create detailed sketches of pedal mechanisms
  2. Smart Servo Capabilities Testing:
    • Experiment with servo movement range and precision
    • Test servo torque capabilities with different loads
    • Explore button input options for triggering pedal actions

Button Input and Servo Position Control

import time
import board
from digitalio import DigitalInOut, Direction, Pull
import pwmio
import servo

# Setup button
button = DigitalInOut(board.D2)
button.direction = Direction.INPUT
button.pull = Pull.UP

# Setup servo
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
myservo = servo.Servo(pwm)

# Initialize servo position
myservo.angle = 0

# LED for visual feedback
led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT

while True:
    # Check if button is pressed (button.value is False when pressed)
    if button.value == False:
        # Move servo to depress pedal
        led.value = True
        myservo.angle = 90
        time.sleep(0.5)
    else:
        # Return servo to rest position
        led.value = False
        myservo.angle = 0
        time.sleep(0.1)
            

Technical Checkpoints:

Exploration Checkpoints:

3. EXPLAIN

How can we transform servo motion into effective piano pedal control?

Key Concepts

In this phase, students will explore the principles of mechanical advantage, force transmission, and human-device interfaces that are essential for the piano pedal assistant. The key challenge is creating a system that:

  1. Translates the rotary motion of the servo into appropriate linear motion for the pedal
  2. Provides sufficient force multiplication to depress the pedal with the servo's available torque
  3. Creates a control interface that matches Olivia's physical capabilities
  4. Ensures consistent and reliable operation with appropriate timing

Activity: "Mechanical Design Workshop"

  1. Force Translation Systems:
    • Introduce mechanical concepts for converting rotary to linear motion
    • Demonstrate leverage principles for force multiplication
    • Guide students in calculating required mechanical advantage
  2. Interface Design Planning:
    • Analyze input device options for Olivia's specific capabilities
    • Design user interface with appropriate visual feedback using Neopixel
    • Create state diagrams for pedal control sequences
  3. Design Sketching:
    • Students create detailed sketches of their proposed solutions
    • Technical drawings showing mechanical components and linkages
    • Preliminary CAD models of critical components

Advanced Pedal Control with LED Feedback

import time
import board
import neopixel
import pwmio
import servo
from digitalio import DigitalInOut, Direction, Pull

# Setup NeoPixel
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.3)

# Setup button
button = DigitalInOut(board.D2)
button.direction = Direction.INPUT
button.pull = Pull.UP

# Setup servo
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
pedal_servo = servo.Servo(pwm)
pedal_servo.angle = 0

# Pedal states
PEDAL_UP = 0
PEDAL_DOWN = 1
pedal_state = PEDAL_UP

# Color feedback
READY_COLOR = (0, 10, 0)    # Dim green when ready
ACTIVE_COLOR = (0, 100, 0)  # Bright green when pedal is down

pixel.fill(READY_COLOR)

while True:
    # Check for button press (button.value is False when pressed)
    if button.value == False and pedal_state == PEDAL_UP:
        # Depress pedal
        pedal_servo.angle = 90
        pixel.fill(ACTIVE_COLOR)
        pedal_state = PEDAL_DOWN
        time.sleep(0.3)  # Debounce delay
        
    elif button.value == False and pedal_state == PEDAL_DOWN:
        # Release pedal
        pedal_servo.angle = 0
        pixel.fill(READY_COLOR)
        pedal_state = PEDAL_UP
        time.sleep(0.3)  # Debounce delay

Technical Checkpoints:

  • Students implement state management in their servo control code
  • Students incorporate LED feedback for different pedal states
  • Students create clear mechanical design drawings

Understanding Checkpoints:

  • Students can explain how their system converts servo motion to appropriate pedal action
  • Students demonstrate understanding of the timing requirements for musical applications

4. ELABORATE

How can we refine our design to accommodate different pianos and playing styles?

Extension Activity: "Adaptive Design Enhancements"

  1. Adjustable Mounting System:
    • Design a universal mounting system that works with different piano models
    • Create adjustable components for variable pedal positions
    • Implement quick-release mechanisms for easy installation and removal
  2. Advanced Programming Features:
    • Add multiple control modes to accommodate different musical needs
    • Implement timing variations for different playing styles
    • Create presets for common pedaling patterns
  3. Fabrication and Assembly:
    • 3D print designed components
    • Assemble mechanical linkages using LocLine and structural components
    • Integrate Smart Servo with mechanical systems

Multi-Mode Pedal Control System

import time
import board
import neopixel
import pwmio
import servo
from digitalio import DigitalInOut, Direction, Pull

# Setup NeoPixel
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.3)

# Setup buttons
mode_button = DigitalInOut(board.D2)
mode_button.direction = Direction.INPUT
mode_button.pull = Pull.UP

action_button = DigitalInOut(board.D3)
action_button.direction = Direction.INPUT
action_button.pull = Pull.UP

# Setup servo
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
pedal_servo = servo.Servo(pwm)
pedal_servo.angle = 0

# System modes
MODE_TOGGLE = 0      # Press once to engage, again to release
MODE_MOMENTARY = 1   # Hold to engage, release to disengage
MODE_AUTO = 2        # Automatic timed patterns
current_mode = MODE_TOGGLE

# Mode colors
MODE_COLORS = [
    (0, 0, 100),     # Blue for toggle mode
    (100, 0, 100),   # Purple for momentary mode
    (100, 50, 0)     # Orange for auto mode
]

# Pedal state
pedal_engaged = False
last_button_state = True  # Pulled up when not pressed

# Auto mode variables
auto_pattern = [1, 0, 1, 0, 1, 1, 0]  # Example pattern (1=down, 0=up)
pattern_index = 0
last_pattern_time = 0
pattern_interval = 0.8  # seconds between pattern steps

# Update the pixel to show current mode
pixel.fill(MODE_COLORS[current_mode])

def toggle_mode():
    global current_mode
    current_mode = (current_mode + 1) % 3
    pixel.fill(MODE_COLORS[current_mode])
    return

while True:
    # Check for mode button press
    if mode_button.value == False:
        toggle_mode()
        time.sleep(0.3)  # Debounce
    
    # Handle pedal control based on current mode
    if current_mode == MODE_TOGGLE:
        # Toggle mode - press once to engage, again to disengage
        if action_button.value == False and last_button_state == True:
            pedal_engaged = not pedal_engaged
            pedal_servo.angle = 90 if pedal_engaged else 0
        last_button_state = action_button.value
            
    elif current_mode == MODE_MOMENTARY:
        # Momentary mode - hold to engage, release to disengage
        if action_button.value == False:
            pedal_servo.angle = 90
            pedal_engaged = True
        else:
            pedal_servo.angle = 0
            pedal_engaged = False
            
    elif current_mode == MODE_AUTO:
        # Auto pattern mode - follow preprogrammed pattern
        current_time = time.monotonic()
        if current_time - last_pattern_time >= pattern_interval:
            # Time to move to next step in pattern
            pedal_engaged = bool(auto_pattern[pattern_index])
            pedal_servo.angle = 90 if pedal_engaged else 0
            pattern_index = (pattern_index + 1) % len(auto_pattern)
            last_pattern_time = current_time
    
    # Brief pause in loop
    time.sleep(0.05)

Technical Checkpoints:

  • Students successfully implement multi-mode control system
  • Students design and fabricate adaptable mounting components
  • Students test their system with various input devices

Application Checkpoints:

  • Students document adjustments made based on testing with different piano types
  • Students demonstrate how their solution addresses Olivia's specific needs
  • Students evaluate the durability and reliability of their design
Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 4N: Analyze how technologies change human interaction and communication CAD 2.1: Freehand Sketching for quick visualization of ideas HCD Skill #1: Problem Framing - analyzing situations from multiple perspectives
STEL 7R: Refine design solutions for criteria and constraints CAD 1.2: Following structured design processes HCD Skill #6: Stakeholder Dialogue - gathering requirements

5. EVALUATE

How well does our final solution meet Olivia's needs and what impact might it have on her musical experience?

Assessment Criteria

Students will evaluate their piano pedal assistant designs based on:

  1. Functionality: Does the device reliably control the piano pedal with appropriate timing and pressure?
  2. Usability: Is the solution easy for Olivia to use given her specific capabilities?
  3. Versatility: Can the solution adapt to different pianos and playing conditions?
  4. Durability: Will the solution withstand regular use in musical settings?
  5. Aesthetics: Is the design visually appropriate for use in performance settings?

Activity: "Performance Evaluation"

  1. User Testing Simulation:
    • Test the pedal assistant with sample musical pieces requiring different pedaling techniques
    • Evaluate consistency of operation across multiple trials
    • Collect data on timing accuracy and reliability
  2. Peer Review:
    • Teams present their solutions to other groups
    • Structured feedback session with evaluation rubric
    • Identify strengths and opportunities for improvement
  3. Reflection and Documentation:
    • Students document their design process in digital portfolios
    • Create user manuals for their piano pedal assistants
    • Record video demonstrations showing their solution in action

Assessment Rubric

Criteria Level 1 Level 2 Level 3 Level 4
Mechanical Design Basic design with limited functionality Functional design but lacks adaptability Well-designed system with good adaptability Innovative design with excellent adaptability and efficiency
Programming Basic servo control with minimal features Functional programming with basic feedback Well-structured code with multiple modes Advanced programming with exceptional error handling and user feedback
Human-Centered Design Minimal consideration of user needs Basic accommodation of user requirements Thoughtful design addressing multiple user needs Exceptional attention to user experience with innovative accommodations
Documentation Basic documentation of process Complete documentation with some reflection Comprehensive documentation with thoughtful reflection Exceptional documentation with deep insights and learning transfer
Technical Execution Partially functional prototype Functional prototype with minor issues Well-executed prototype with consistent performance Exceptional execution with professional-quality results

Technical Checkpoints:

  • Students successfully implement multi-mode control system
  • Students design and fabricate adaptable mounting components
  • Students test their system with various input devices

Application Checkpoints:

  • Students document adjustments made based on testing with different piano types
  • Students demonstrate how their solution addresses Olivia's specific needs
  • Students evaluate the durability and reliability of their design