Materials required
- Lesson slidesÂ
- Otto Starter robotsÂ
- Microphone sensor from Sense ExpansionÂ
- ScrewdriverÂ
- Computers with internet and Bluetooth connectionÂ
Optional materials
- Lesson worksheetsÂ
Learning Objectives
- Identify environmental sensors (temperature, humidity, light) and/or interactive sensors (microphone, tilt) and their roles in robotics.Â
- Explain how sensors enable robots to perceive and respond to their environment or user actions.Â
- Recognize real-world applications of sensors in robotics (e.g., smart devices, environmental monitoring, assistive technologies).Â
- Write and upload programs to read data from environmental and/or interactive sensors.Â
- Use conditional logic to trigger robot behaviors based on sensor thresholds. Create interactive behaviors that respond to sound (microphone) and/or movement (tilt) inputs.Â
- Debug programs to resolve sensor inaccuracies or unexpected behaviors.Â
- Refine robot responses through testing and user feedback.Â
Teamwork approach
To ensure a smoother lesson and prevent overlapping noises, consider organizing students into small groups. This will help minimize sound interference, as each group can take turns testing their code and producing sounds like claps or voice commands. Working in groups also encourages collaboration, allowing students to discuss their approach and support each other in troubleshooting. This setup will make it easier for everyone to accurately observe the sensor’s response and ensure a successful learning experience.
Introduction to Sound Sensors
Begin the lesson by discussing how humans use their ears to hear and how robots use microphone sensors to “listen” to sound. Talk about real-life examples like voice-activated devices (smart assistants) and how robots can respond to noise, making their behaviors more interactive (slide #3).
Ask students to brainstorm how sound-triggered robots might be useful in everyday life (e.g., toys, alarms, or home automation). Encourage them to think creatively about how a robot might move or change based on different sounds.
Humans use their ears to hear sounds around them, from voices to music to alarms. Our ears detect sound waves, which travel into our inner ear and send signals to the brain, helping us understand what we’re hearing. Robots, on the other hand, use microphone sensors to “listen” to sound. These sensors pick up sound waves and convert them into electronic signals that the robot’s circuit board can interpret. For example, voice-activated devices like smart assistants use microphone sensors to respond to commands, like “play music” or “what’s the weather today?” Robots with microphones can also respond to noises, making them interactive and responsive; for instance, a robot might turn toward a loud sound or start moving when it detects clapping, creating engaging experiences for users.
Understanding the Microphone Sensor
⚠️Important: the blocks to use the Sense Expansion are not added by default to Word Blocks app, you must add them by:
- Click the configuration icon
- Click the option: 🤖 select Otto kit
- Click the option: Expansion sense
The app will reload and there will be new blocks added to the Sensing section in the software.
Explain how the microphone sensor works (slide #4).
Short explanations
Sound intensity: The microphone sensor measures the strength of sound waves. When a loud sound (like a clap) occurs, the robot can detect this and respond accordingly.
Our microphone sensor can read both analog signals (in a range from 0 to 100) and digital signals (which change from 0 to 100 when detecting sound). As you may have noticed on the sensor hardware, there are two connectors: one for analog signals and the other for digital signals.
Sound waves: these are vibrations that travel through a medium (such as air, water, or solids) as a result of particle oscillations, creating areas of compression and rarefaction. These waves carry energy, which our ears detect and our brain interprets as sound. Sound waves are longitudinal, meaning the particles move in the same direction as the wave’s travel.
Activity: Connecting and exploring the microphone sensor
Guide students to connect the microphone sensor to connector 6 as a digital input; it is not necessary to attach it to the 3D-printed top yet. Once it’s connected, turn on the robot and observe that one or two red lights on the sensor may turn on. (Slide #5)
What are those lights?
The light labeled “VON” (voltage on) indicates when the sensor is powered on; it will stay on as long as the sensor is receiving voltage, helping the user confirm that the sensor is properly connected and powered. The light labeled “DON” (digital on) will turn on when the sensor detects noise at a certain frequency.
Experiment: Ask students if the “DON” light is off on their sensors. For any sensor where it is off, invite students to blow on the sensor; this should create a noise that activates the light.
At which frequency does the sensor activate the “DON” light?
You can adjust this yourself by turning the potentiometer on the sensor. Use the screwdriver available in the kit box to turn it clockwise or counterclockwise. Adjusting the potentiometer changes the threshold for the sensor, allowing it to activate the digital output (“DON” light) in response to lower or higher levels of noise.
Allow students to experiment changing the potentiometer value to see the changes. Students will notice that, after a certain value, the “DON” light keeps on or off; this is a normal and expected behaviour when the value is too low or too high.
Activity: Visualizing the sensor values
After observing a physical indicator that the sensor is working, let’s use code to actually see what the sensor is reading (slide #6). To do this, we can create a simple program like the one shown to continuously display the sensor values in the serial monitor:
Â
This code continuously displays microphone sensor readings in the serial monitor. It prints a divider line for easy reading, followed by the label “Microphone value:” and the current reading from the microphone sensor connected to port 6. The program waits 0.1 seconds between each reading, allowing students to see real-time updates on the sensor’s response to different noise levels. This helps visualize how the sensor detects sound by showing the changing values in the serial monitor.
Expected behavior:
Since the sensor is currently connected as a digital input, students will notice only two possible values when running this program: 0 and 100, depending on whether noise is detected. They may also observe that the sensor does not detect changes in voice but only louder sounds like blows.
To change this, invite students to connect the sensor as an analog input and test the code again. They should now see a wider range of values from 0 to 100, allowing for more detailed detection of different sound levels.
Activity: Programming Sound-Triggered Actions
Introduce how Otto can use sound to trigger actions. For example, a clap could make the robot move forward, or a loud voice could make it spin around (slide #7).
Encourage students to solve this activity on their own. Start with a brief brainstorming session to help them figure out the best approach. The steps should look something like this:
- Step 1: Take note of the values measured by the sensor in a regular environment.
- Step 2: Take note of the values when the desired noise is produced (for example, when someone claps close to the sensor).
- Step 3: Use a forever loop and a conditional block to continuously monitor the sensor values. When the sensor reaches the expected value, trigger the corresponding action.
A possible solution for the challenge could be this (the value could be different in some cases):
Activity: Combining Sound and Visual Effects
Next, have students integrate the color light and buzzer into their code to add a visual and auditory response when sound is detected.
Step 1: Ask students to choose different colors for the lights based on the intensity of the sound or trigger a melody with the buzzer if the sound exceeds a higher threshold.
Step 2: Students will test their robots, combining movement with visual and sound feedback. They can compare how their robots behave based on different sound levels.
Set a time limit (recommended: 15 minutes) for this activity. Once the time is up, allow students to share their results with the class. Encourage them to explain their approach, any challenges they faced, and how they determined the sensor values to trigger specific actions. This sharing session will help reinforce learning and allow students to compare different solutions.
Discussion: Real-World Applications
After activities, discuss how sound sensors are used in real-world devices. Examples include smart speakers, home security alarms, and voice-controlled robots. Ask students how their code could be applied to practical scenarios (e.g., a robot responding to a loud noise in a security system or a toy that reacts to a child’s voice).
Lesson Evaluation
- Students actively engage in discussions about the role of sound in robot interaction and share creative ideas for using sound-triggered behaviors.
- Students successfully connect and program the microphone sensor to detect sound and trigger movement.
- Students demonstrate their ability to code sound-triggered movements using the microphone sensor and add additional interactive responses such as lights and sounds.
- Students adjust the sound threshold and troubleshoot issues (e.g., environmental noise, incorrect detection) during the activities.
- Students experiment with different sound thresholds and integrate multi-sensor responses to make their robot react more dynamically to external sound.
Lorem ipsum
The duration of this lesson is approximately one hour. You can find the definition of learning objectives at the bottom of this guide to align with your curriculum requirements.
Materials required
- Lesson slides
- Lesson worksheets
- TV, projector, or big screen to display the class videos
- Big paper or cardboard (white)
- Tape (black)
- Scissors
Computers, tablets or smartphones are optional, they can be used as digital tools for students to do further research and take additional notes.
Connect
The class begins by displaying the first slide and asking the students “What do you see here?’“
[Pause and wait for students to provide answers, which may include mentions of a robot arm and two wheeled robots moving boxes].
The teacher will then guide the class in a conversation about the nature of robots, exploring questions such as: ‘What is a robot?’ ‘When does something turn into a robot and when is it just a machine?’
Moving on to the second slide, the teacher will introduce the topic of the usefulness of robots to humans. Students should share their ideas about how robots can be useful.
[This conversation is expected to last approximately 4-5 minutes]
Afterwards, on the third slide, the students will watch a video that explains the concept of what a robot is. Following the video, they will have the opportunity to share their personal experiences with robots. The teacher can guide the conversation by asking specific questions, such as: ‘Have you ever played with a robot or built one?’ ‘Do you have any robotic devices at home, like a vacuum cleaner, that you consider to be a robot?’
[The video has a duration of 4 minutes, and the discussion about personal experiences is expected to take an additional 3-5 minutes]
On the next slide, the teacher will organize small groups consisting of 2-3 students. Each group will be assigned a specific robot to investigate. The students can conduct their investigation by using the internet or through provided materials, either digital or physical. Some popular real-life robots for the students to explore are:
As a teacher, feel free to research other robots to add to the list. By the time you teach this lesson, there could be some new and popular robots.
During this activity, students will gather information about their assigned robot and gain knowledge about how robots are being utilized in daily life. At the end of the investigation, each group will give a brief presentation about the robot they investigated.
Here the students will use the first worksheet
[This activity is expected to take approximately 10-15 minutes in total, allowing sufficient time for research and presentations]
Make
On the fifth slide, the teacher will introduce the HP Otto robot by showing a video about its features and capabilities. After watching the video, the teacher will demonstrate a built robot to the students, showcasing its physical components and explaining how they contribute to its functionality.
[To further engage the students, the teacher can connect the robot to the Otto web control app, demonstrating how to operate and control the robot using the app’s interface.]
On the next slide, a diagram displaying the internal connections of the robot will be shown. Using the web control app, the teacher will demonstrate how each component of the robot works.
To engage the students, the teacher can actively involve them in the activity. For example:
- Buzzer: The teacher can play various sounds available on the app and ask students to suggest or choose which sound they would like to hear.
- LED ring: The teacher can ask students (up to a maximum of 12) about their favorite colors and display them on the LED ring.
- Ultrasonic sensor: The teacher can activate the avoidance function and make the robot move around the classroom. Students can participate by intercepting the robot’s path with their hands, observing how the robot changes its direction in response.
- Line sensors: Although the line tracking activity will be conducted later, the teacher can explain how the infrared sensors work at this stage.
In the next activity, the entire group will work together to define a racing track circuit for the robot to navigate. The teacher will guide the students in this process, but it is important to allow the students to make the decisions in order to foster their creativity and engagement. The goal is to define a circuit that includes specific landmarks or areas within the classroom for the robot to move around.
For example, the students may decide to start the circuit in front of the teacher’s desk, then describe a square around James’ seat, move in a zigzag pattern between Eva and Raidy’s seats, and finally return to the teacher’s desk. [To maintain efficiency, the teacher should encourage the students to make quick decisions, aiming to complete the circuit definition within 1-2 minutes]
[Optional]: As an additional challenge, the teacher can allow students to take turns controlling the robot and measure their individual completion times. This can add an element of friendly competition among the students.
The next activity is similar to the previous one, but this time the students will create a line track using ‘tape’ on a large white piece of paper or cardboard.
Lorem ipsum
Lorem ipsum
