Print

Creating a Button Sensor for Hummingbird

Learn how to make a button sensor for the Hummingbird.

Creating a Button Sensor for Hummingbird

Created By

Karen Polstra of Christ Church Episcopal School

Programming Language

Any language supported by Hummingbird Duo

Objective & Learning Goals

Wish your Hummingbird kit came with a button or switch sensor? We’re working on that, but until they do, check out this awesome video by Karen Polstra of Christ Church Episcopal School where she shows how to make a home-made button.

Standards

COMPUTER SCIENCE TEACHERS’ ASSOCIATION (CSTA)

CSTA Standards are split into different grade levels: 3-5, 6-8, and 9-10. Working with the Hummingbird Robotics Kit meets multiple standards across these grade-level delegations.
Visit this page for a more detailed explanation of how working with the Hummingbird Robotics Kit applies to meeting CSTA Standards.

Wish your Hummingbird kit came with a button or switch sensor? We’re working on that, but until they do, check out this awesome video by Karen Polstra of Christ Church Episcopal School where she shows how to make a home-made button.

Technical Details

The button in Karen’s example is wired with the help of a pull-down resistor. This is a resistor wired from the ‘S’ terminal to the ‘-‘ terminal. This resistor keeps the sensor value low by providing a high-resistance connection to electrical ground (the ‘-‘ port). Any resistor from 100 ohms to 50 kilo-ohms should do the trick here.

The button itself is made of two wires: one to the ‘S’ terminal and another to the ‘+’ terminal. In the example, these are also ingeniously connected to two pennies so that when the pennies touch, they make a circuit that connects S and + together, causing the ‘S’ terminal to be raised to the voltage of ‘+’ (5 volts). When the pennies aren’t touching, the pull-down resistor will cause the voltage on ‘S’ to sink back down to close to 0 volts.

What Not To Do

Do not connect together the ‘+’ and ‘-‘ terminals through a switch or any other method. This causes a short circuit (like connecting both ends of a battery together). Your computer has built-in current limiters that will probably prevent major damage, but the Hummingbird will be ejected from the computer and will no longer be recognized as a USB device (until you unplug it and plug it back in).