ELIJAH'S AUTOMATED DICE ROLLER

ELIJAH'S AUTOMATED DICE ROLLER

OVERVIEW

This entry-level lesson introduces 6-8th grade students to the Smart Servo platform through a human-centered design project addressing the needs of Elijah, a 12-year-old with juvenile arthritis. Students will design and build an automated dice roller that allows Elijah to enjoy tabletop games without the pain and difficulty of manually rolling dice. Through this authentic problem-solving experience, students will learn basic programming concepts, mechanical design principles, and develop empathy for individuals with physical disabilities. The lesson follows the 5E instructional model (Engage, Explore, Explain, Elaborate, Evaluate) and integrates STEL standards, CAD competencies, and Human-Centered Design skills.

Client Profile

Name About Me My Challenge
Elijah, Age 12 I'm a middle school student who loves tabletop games and hanging out with my friends. I was diagnosed with juvenile arthritis last year, which affects the joints in my hands and wrists. Rolling dice for board games and tabletop RPGs causes pain in my hands and wrists. Sometimes the dice don't roll properly because I can't flick my wrist with enough force. I'd like a way to roll dice that doesn't require gripping or flicking my wrist so I can play games without pain.

Learning Objectives

MATERIALS NEEDED

1. ENGAGE

How might we design technology to help people overcome physical barriers to activities they enjoy?

Activity: "Walking in Elijah's Shoes"

  1. Introduction to Elijah:
    • Share Elijah's profile with students
    • Show a short video clip of people playing tabletop games that require dice rolling
    • Ask students to brainstorm: "What physical actions are required to roll dice in a game?"
  2. Simulation Experience:
    • Provide students with dice and ask them to roll normally
    • Then have students simulate Elijah's experience by:
      • Wearing winter gloves to simulate limited dexterity
      • Taping popsicle sticks to their wrists to limit flexibility
      • Trying to roll dice with these limitations
    • Discuss as a class: "How did this change your experience? What was challenging?"
  3. Problem Definition:
    • Guide students to articulate Elijah's specific needs:
      • Must roll dice without requiring grip strength
      • Must roll dice without painful wrist movement
      • Must provide adequate randomization of dice
      • Must work with different sized dice for various games
    • Introduce the Smart Servo as a potential solution component

Simple Servo Example

# Show this simple code example to introduce the concept
import time
import board
import pwmio
import servo

# Create a PWMOut object on Pin A2
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)

# Create a servo object
my_servo = servo.Servo(pwm)

# Move servo back and forth
while True:
    my_servo.angle = 0
    time.sleep(1)
    my_servo.angle = 180
    time.sleep(1)

Checkpoints & Assessment

Technical Checkpoints:

Understanding Checkpoints:

Connections

Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 1J: Develop innovative products and systems that solve problems based on individual needs and wants CAD 1.1: Technical Vocabulary - Understanding design terminology HCD Skill #1: Problem Framing - Analyzing situations from multiple perspectives
STEL 4K: Examine positive and negative effects of technology CAD 2.1: Freehand Sketching - Quick visualization of ideas HCD Skill #6: Stakeholder Dialogue - Gathering requirements

2. EXPLORE

How can we control a Smart Servo to create the motion needed for rolling dice?

Activity: "Servo Motion Discovery"

  1. Setup:
    • Distribute Smart Servo units to student pairs
    • Guide students through connecting the servo to a computer
    • Show students how to load and run example code
  2. Exploring Servo Movement:
    • Have students load and run the "Servo Range" example
    • Ask students to observe and document different servo positions (0°, 45°, 90°, 135°, 180°)
    • Have students experiment with the "Servo Sweep" example that creates continuous back-and-forth motion
  3. Button Control Introduction:
    • Guide students through connecting a button to the Smart Servo
    • Have students load and run the "Toggle Button" example
    • Challenge students to modify the code to move the servo to different positions

Toggle Button Example

# Toggle Button Example
import time
import board
from digitalio import DigitalInOut, Direction, Pull
button = DigitalInOut(board.D2)
button.direction = Direction.INPUT
button.pull = Pull.UP
import pwmio
import servo
pwm = pwmio.PWMOut(board.A2, duty_cycle=2 ** 15, frequency=50)
my_servo = servo.Servo(pwm)
toggle = 0
while True:
    if button.value == 0 and toggle == 0:
        my_servo.angle = 0
        time.sleep(1)
        toggle = 1
    elif button.value == 0 and toggle == 1:
        my_servo.angle = 180
        time.sleep(1)
        toggle = 0
  1. Dice Rolling Experiments:
    • Provide students with foam dice and basic materials (cardboard, cups, etc.)
    • Challenge them to create a simple dice-rolling mechanism using the servo
    • Have students test different servo angles and speeds to determine what creates the best roll

Checkpoints & Assessment

Technical Checkpoints:

Understanding Checkpoints:

Connections

Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 2M: Differentiate between inputs, processes, outputs, and feedback in technological systems CAD 3.1: CAD Fundamentals - Interface navigation and basic modeling HCD Tool 3.1: Sketching - Generating and visualizing diverse solutions
STEL 8I: Use tools, materials, and machines to safely diagnose, adjust, and repair systems CAD 4.1: Manufacturing Awareness - Understanding processes and limitations HCD Tool 5.1: Experiment - Designing and conducting controlled tests

3. EXPLAIN

What principles of motion and programming are necessary to create an effective dice roller?

Key Concepts

Servo Motion Principles

Programming Concepts

Mechanical Design Principles

Activity: "Dice Roller Design Workshop"

  1. Dice Physics Discussion:
    • Discuss with students the physics of dice rolling: randomization, tumbling, surfaces
    • Analyze what makes a "fair" roll vs. an unfair one
    • Consider how different dice (4-sided, 6-sided, 20-sided) behave differently
  2. Programming Workshop:
    • Guide students in creating a custom program that:
      • Detects a button press
      • Activates the servo in a pattern that would effectively roll dice
      • Returns to a "ready" position for the next roll

Dice Roller Program

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

# Setup button input
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)
my_servo = servo.Servo(pwm)

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

# Set initial position
my_servo.angle = 45  # Starting "ready" position
pixel.fill((0, 255, 0))  # Green means ready

# Main loop
while True:
    # Check for button press
    if button.value == 0:  # Button pressed
        pixel.fill((255, 0, 0))  # Red during roll
        
        # Dice rolling movement pattern
        my_servo.angle = 120  # Pull back
        time.sleep(0.3)
        my_servo.angle = 10   # Snap forward
        time.sleep(0.1)
        
        # Short delay before returning to ready position
        time.sleep(1)
        my_servo.angle = 45   # Return to ready
        pixel.fill((0, 255, 0))  # Green means ready
        
        # Debounce delay
        time.sleep(0.5)
  1. Concept Sketching:
    • Have students create sketches of their dice roller designs
    • Encourage them to include:
      • Where the servo will be mounted
      • How the dice will be held and released
      • What type of container or surface will catch the dice
      • How the button will be positioned for Elijah's easy access

Technical Checkpoints:

  • Students can write and explain a program that creates appropriate dice-rolling motion
  • Students can incorporate visual feedback using the Neopixel LED
  • Students can sketch a functional dice roller design

Understanding Checkpoints:

  • Students can explain how their design addresses Elijah's specific needs
  • Students can describe why certain servo movements are better for rolling dice
  • Students understand the importance of randomization in dice rolling
Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 2S: Defend decisions related to design problems CAD 2.2: Technical Drawing - Creating and interpreting orthographic and isometric views HCD Tool 2.1: Criteria & Constraints - Breaking down problems into prioritized components
STEL 7Q: Apply the technology and engineering design process CAD 1.3: Documentation - Creating and maintaining technical documentation HCD Skill #3: Innovation Process - Using divergent thinking for idea generation

4. ELABORATE

How can we optimize our dice roller design to best meet Elijah's specific needs?

Extension Activity: "Design Optimization"

  1. CAD Design Introduction:
    • Introduce students to OnShape CAD software
    • Demonstrate how to create simple 3D models for their dice roller components
    • Focus on designing:
      • A servo mount
      • A dice holding mechanism
      • A button holder optimized for Elijah's abilities
  2. Prototype Construction:
    • Guide students in building functional prototypes using:
      • 3D printed parts they've designed
      • LocLine flexible connectors for adjustability
      • 10mm framing pieces for structure
    • Ensure designs consider:
      • Stability during operation
      • Accessibility of the button for Elijah
      • Containment of dice after rolling
      • Visibility of dice results
  3. Code Refinement:
    • Challenge students to improve their code by adding:
      • Different rolling patterns for different types of dice
      • Visual feedback showing when the device is ready to roll
      • Customizable roll strength based on dice size

Enhanced Dice Roller with Multiple Roll Patterns

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

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

# Setup toggle switch for dice selection
switch = DigitalInOut(board.D0)
switch.direction = Direction.INPUT
switch.pull = Pull.UP

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

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

# Set initial position
my_servo.angle = 45  # Starting "ready" position
pixel.fill((0, 255, 0))  # Green means ready

# Main loop
while True:
    # Check switch position for dice type
    if switch.value:  # Switch ON - small dice (d6)
        dice_type = "small"
        pixel.fill((0, 0, 255))  # Blue for small dice mode
    else:  # Switch OFF - large dice (d20)
        dice_type = "large"
        pixel.fill((255, 0, 255))  # Purple for large dice mode
    
    # Wait a moment to show the color
    time.sleep(0.5)
    pixel.fill((0, 255, 0))  # Back to green (ready)
    
    # Check for button press
    if button.value == 0:  # Button pressed
        pixel.fill((255, 0, 0))  # Red during roll
        
        # Different roll patterns based on dice type
        if dice_type == "small":
            # Gentle roll for small dice
            my_servo.angle = 100  # Pull back less
            time.sleep(0.2)
            my_servo.angle = 20   # Snap forward
            time.sleep(0.1)
        else:
            # Stronger roll for large dice
            my_servo.angle = 135  # Pull back more
            time.sleep(0.3)
            my_servo.angle = 5    # Snap forward more
            time.sleep(0.2)
        
        # Return to ready position
        time.sleep(1)
        my_servo.angle = 45
        pixel.fill((0, 255, 0))  # Green means ready
        
        # Debounce delay
        time.sleep(0.5)

Technical Checkpoints:

  • Students can create basic 3D models in OnShape
  • Students can build a functional prototype using provided materials
  • Students can enhance their code to include multiple rolling patterns

Application Checkpoints:

  • Students can explain how their design choices address Elijah's specific needs
  • Students can identify and describe trade-offs in their design decisions
  • Students can articulate how their design could be improved in future iterations
Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 7R: Refine design solutions for criteria and constraints CAD 3.2: Parametric Modeling - Creating feature-based models with relationships HCD Tool 4.2: Technical Drawings - Creating precise CAD representations
STEL 7S: Create solutions by applying human factors in design CAD 4.2: 3D Printing - Preparing models for additive manufacturing HCD Skill #8: Iteration Cycles - Testing, evaluating, and modifying designs

5. EVALUATE

How well does our solution meet Elijah's needs, and what have we learned about designing assistive technology?

Assessment Criteria

Students will demonstrate their understanding and application of the design process, programming concepts, and human-centered design principles through:

  1. Prototype Demonstration: A working dice roller that meets Elijah's needs
  2. Design Documentation: Technical drawings, code, and explanation of design choices
  3. Reflection: Analysis of strengths, weaknesses, and future improvements
  4. Presentation: Clear communication of the problem, process, and solution

Assessment Rubric

Criteria Level 1 Level 2 Level 3 Level 4
Understanding of Client Needs Limited understanding of Elijah's challenges with minimal consideration in design Basic understanding of Elijah's challenges with some features addressing needs Clear understanding of Elijah's challenges with most design features addressing specific needs Comprehensive understanding of Elijah's challenges with all design features directly addressing specific needs
Smart Servo Programming Basic program with minimal functionality; copied directly from examples Functional program with some customization; adapted from examples Well-structured program with multiple features addressing specific needs Advanced program with optimized code, multiple modes, and thoughtful user feedback
Mechanical Design Simple design with limited functionality; may be unstable or unreliable Functional design that works consistently but with limited consideration of ergonomics Well-designed solution with good stability, reliability, and consideration of user needs Innovative design with excellent stability, reliability, and thoughtful integration of user-centered features
Human-Centered Design Process Limited evidence of following the design process; minimal iteration Basic application of design process with some evidence of testing and refinement Clear application of design process with multiple iterations based on testing Exemplary application of design process with thorough documentation of testing, user feedback, and design evolution
Documentation & Communication Basic documentation with limited explanation of design choices Adequate documentation with explanations of key design choices Comprehensive documentation with clear explanations of all major design decisions Exceptional documentation with detailed explanations, process photos, and reflective analysis

Final Reflection Activity

Guide students through a structured reflection using these prompts:

1. Design Process

2. Technical Learning

3. Empathy Development

Extension Opportunities

For students who complete the project early or want additional challenges:

Connections to Standards Connections to CAD Skills Connections to HCD Skills
STEL 7R: Refine design solutions for criteria and constraints CAD 3.2: Parametric Modeling - Creating feature-based models with relationships HCD Tool 4.2: Technical Drawings - Creating precise CAD representations
STEL 7S: Create solutions by applying human factors in design CAD 4.2: 3D Printing - Preparing models for additive manufacturing HCD Skill #8: Iteration Cycles - Testing, evaluating, and modifying designs