A variety of intriguing creations were on display at Ottawa Christian School’s (OCS) Grade 7 Inventor’s Open House last Tuesday—like lego hands that open and close on command, Morse code generators, user controlled traffic lights, and diodes that flash to the beat of a song. All of the the inventions had one thing in common: they were made using a credit card sized computer called the Raspberry Pi.
Since its introduction in 2012, the Raspberry Pi computer has served as a helpful tool for educators interested in teaching basic computer science in schools. Laurence Stassen, Grade 7 teacher at OCS, saw great potential for creativity in the pocket sized devices, thanks to their GPIOs (General Purpose Input/output pins) which can control small voltages.
“The idea is that you can use a Python programming language to send a voltage to these pins or detect voltages being sent to the pins,” he says. That feature of the Raspberry Pi computer gave his students the ability to manipulate diodes, stepper motors and other things in very subtle ways.
Stassen put a message out to the community and received several old TV’s that could serve as monitors for his students, as well as old keyboards and mice to run the Raspberry Pi computers.
After becoming familiar with Python programming language and some basic circuitry, students in his class were divided into groups based on their areas of interest. From there, they got to work building their circuits and writing the codes that would control those circuits.
Nathan, a Grade 7 student at OCS was part of a group that chose to create a Morse code generator. “We had a breadboard with diodes in a case, with all the wires connected to the Raspberry PI TV” he explains, “so when the project open house was taking place, we had a line to the key board so that whatever four letter word the user typed in would flash in and be translated”. Nathan describes the project as “a good way to learn about programming” and says that writing the code from scratch was the most interesting aspect of the assignment.
Another group of students in his class built a clock that relies on stepper motors to control the dials used for seconds, minutes, and hours. “We thought it was a really interesting idea” says Mary, who helped design the clock. Although the programming involved was difficult at first, it got easier after a while, she says.
The process was quite complex: Stepper motors have four coils inside them that need to be energized one at a time in sequence. Every time that happens, a step moves. Mary and her partner had to pause in between each one, so that the motor would turn at exactly the rate of second. Figuring out how to attach two stepper motors to the Raspberry Pi computer was the trickiest part of designing the clock, she says. Because the small computers can’t take large amounts of power, she and her partner had to delve into a bit of circuitry to find out how to attach the stepper motors properly.
Eric, another student in Stassen’s class, worked with his partner Jason to create a robotic hand that can open and close. The hand can hold objects too, so long as they are the right size and not too heavy or slippery.
Writing the code for the project “was actually pretty fun” Eric says. “It isn’t as hard as some people think”. As for computers, “you can do anything with them” he adds.
That “anything” could even result in the creation of a fun math game—something that one student in Stassen’s class made all on his own by writing some very complex code. His program randomly selects a mathematical sequence out of a bank of examples stored in the computer’s memory. A stepper motor then points a spinner to each number in the sequence, prompting the user to guess what the next number will be. After that, the spinner points to the correct answer so that the console can award points accordingly to the user.
Initially, students were a bit anxious about having their finished inventions “do this or that” for community members. “I think for a lot of them there was kind of this doubt that they could do it” says Stassen. “But once the circuits were built and the code was starting to get the circuits what they needed to do, the enjoyment level went up. There was a real sense of accomplishment.”
Stassen has asked each group to consider what the next steps might be if they were to take their ideas a little further. For those who’d like to continue tinkering with their creations, February’s Inventor’s Open House might only be the beginning!