SE1 WORKSHEET - GRADE 8
LESSON- 1
Introduction to STEM Master Kit
The STEM Master Kit is an educational resource designed to introduce students to the
fundamental concepts of Science, Technology, Engineering, and Mathematics (STEM). It
includes various hands-on materials and tools that allow learners to engage in interactive
experiments and projects. The kit aims to foster curiosity, creativity, and problem-solving
skills by providing practical experiences in different STEM areas.
Components:
Microcontroller - ESP32
DC Motors
Servo Motor
Motor Driver
Bluetooth Module (HC-05)
Sensors:
Buzzer (Actuator)
Limit Switch (Actuator)
LED (Actuator)
Ultrasonic Sensor
IR Sensor
Sound Sensor
Light Sensor
Soil Moisture Sensor
Temperature/Humidity Sensor
Tilt Sensor
Motion Sensor
COMPONENTS:
1. Microcontroller (ESP32):
The ESP32 is a small, affordable microcontroller.
It's popular for making smart devices and gadgets because it has a lot of useful features.
The ESP32 is a microcontroller that can connect to Wi-Fi and Bluetooth, making it great for
building smart devices.
Page | 1
Applications:
The ESP32 is widely used in various applications, including:
Home automation
Wearable electronics
Wireless sensors
Robotics
Smart appliances
2. DC Motor:
The DC motor is an electric motor that runs on direct current (DC) electricity. It converts
electrical energy into mechanical energy, causing the motor to spin.
DC motor is a component that rotates 360 degrees.
3. Servo Motor:
A Servo motor is a component that can rotate its handle (between 0 degree to 180 degree).
It used to control the angular position of the object.
Servo motor can be used in Automated door lock - an automated door lock system where a
servo motor controls the locking mechanism, allowing you to lock and unlock doors remotely.
4. Motor Driver:
A motor driver sends the right amount of current and voltage to the motor to move the
motor shaft at the desired speed and in the desired direction.
📌 Important Note: Always remember, when using a DC motor in your model, a motor
driver is essential to integrate the motor with the microcontroller.
Page | 2
ACTUATORS:
An actuator is a device that converts energy (electric, hydraulic, or pneumatic) into
mechanical motion. It is used to control or move systems like motors, valves, or robotic arms.
1. Buzzer:
A buzzer is an audio signal device, often used to indicate an alarm, alert, or other notification.
It produces a sound, which can vary in tone, volume, and duration depending on its design.
2. Limit Switch:
A limit switch detects the position of a moving part and triggers actions like stopping or
reversing when it reaches a predefined limit.
3. LED (Light Emitting Diode):
An LED (Light Emitting Diode) is a semiconductor device that emits light when an electric
current flows through it.
SENSORS:
Sensors are used to detect environmental conditions or changes in the system, such as
movement, temperature, or light. They provide feedback to the robot, allowing it to make
decisions or adjustments based on the collected data, thus enabling automation.
1. Ultrasonic Sensor:
An ultrasonic sensor is used to measure the distance to an object by emitting ultrasonic
waves and measuring the time it takes for the waves to return.
The maximum measurable distance for this sensor is 255 cm.
2. IR Sensor:
An IR (Infrared) sensor detects infrared light to sense motion or proximity.
It is commonly used in applications like motion detection, obstacle avoidance, and remote
controls.
3. Sound Sensor:
The sound sensor is capable of detecting the presence of sound in the surrounding.
It can be used sound –reactive project, such as clap activated light.
Page | 3
4. Light Sensor:
A light sensor detects and measures light intensity, converting it into an electrical signal to
adjust lighting, trigger alarms, or perform other actions.
It is commonly used in devices like smartphones, streetlights, and automatic brightness
controls.
5. Soil Moisture Sensor:
A soil moisture sensor is a device that measures the water content in soil.
It helps determine whether the soil is too dry, adequately moist, or too wet.
This information is often used in agriculture and gardening to optimize irrigation, ensuring
that plants receive the right amount of water.
6. Temperature Sensor/Humidity Sensor:
A temperature sensor is a device that measures temperature and converts the data into a
readable form, often an electrical signal.
These sensors can be used to monitor and control the temperature in various applications,
such as household appliances, industrial processes, HVAC systems, and electronic devices.
7. Tilt Sensor:
A tilt sensor is a device that detects the angle of tilt or inclination of an object relative to a
level surface.
Tilt sensors are commonly used in devices like smartphones, gaming controllers, and
machinery to detect orientation changes, trigger actions, or provide feedback.
8. Motion Sensor:
A motion sensor is a device that detects movement within a certain range.
It can sense the presence or movement of people, animals, or objects and typically triggers a
response, such as turning on lights, sounding an alarm, or activating a camera.
Motion sensors are commonly used in security systems, automated lighting, and smart home
devices.
Page | 4
LESSON- 2
Introduction to ArduBlock Software
Boffin ESP32 ArduBlock Software is a graphical programming tool designed
specifically for the ESP32 microcontroller. It provides a drag-and-drop interface to create
Arduino-based programs without requiring text based coding knowledge. Users can visually
create logic flows and functionalities by arranging blocks. This makes it an easy-to-use tool
for beginners and students, allowing them to quickly design projects, such as controlling
motors and sensors, without the need to learn complex coding.
📌 Important Note:
Before starting programming in the Boffin ESP32 ArduBlock software, make sure to choose
the correct board, as shown at the top in the figure above. From the "Board" menu at the
top, change the default setting to Boffin ESP32. This step is important to upload the code
correctly to your model.
Features of Boffin ESP32 ArduBlock Software:
1. Block-Based Programming
Allows users to program the ESP32 using drag-and-drop blocks (e.g., loops,
conditional statements, input/output), eliminating the need for complex coding.
2. Beginner-Friendly
Designed for students and beginners to easily create projects without prior
programming experience.
3. ESP32 Compatibility
Fully supports the ESP32 microcontroller, enabling seamless integration with its
features and peripherals.
4. Arduino-Compatible: It generates Arduino code in the background, which can be
uploaded directly to an Arduino-Compatible Arduino board.
5. Hardware Control
Simplifies the process of controlling motors, sensors, LEDs, and other hardware
components.
6. Interactive Logic Building
Enables users to visually construct logic flows and functionalities for their projects.
Page | 5
7. Quick Prototyping
Speeds up the development process, making it ideal for educational and prototype
projects.
8. Error-Free Programming
Reduces common syntax and coding errors through its graphical interface.
9. Customizable Blocks
Offers pre-built blocks for common functions and allows advanced users to extend
functionality.
10. STEM Education: Widely used in schools and workshops to teach programming
concepts in a hands-on way.
Overview of the ArduBlock software:
Boffin is an organization focused on creating educational tools for STEM learning,
specializing in robotics, electronics, and IoT. They customized ArduBlock to support their
hardware, such as Boffin ESP and Nano boards, by adding specialized block categories like
ESP_Server, WEB, and Flash Memory. These changes include pre-loaded libraries, improved
UI for beginners, and optimized code uploading for ESP32 boards, enabling easy use of
advanced features like Wi-Fi and Bluetooth.
The software offers multiple board categories, including Arduino Nano, Boffin Nano, Boffin
ESP, Arduino Nano (old), and ESP32. In general, we will be using the only Boffin ESP as the
microcontroller.
Boffin ESP likely refers to a specific software or hardware platform designed for working with
ESP microcontrollers, such as the ESP8266 or ESP32. Boffin ESP is aimed at developers with
ESP-based systems, possibly integrating sensors, actuators, and pre-built functionalities.
Reference to the visual layout of software.
Page | 6
Explanation of Each Block
1.Boffin Block: It refers to the blocks or modules in this platform that represent different
functions or commands, like controlling sensors, motors, or other components in a project.
2.Sensors Block: The Sensors Block in Boffin ESP is primarily used to read the input from
various sensors connected to the ESP32. It simplifies the process of gathering data from
sensors and using it in a project.
3.Actuators Block: An Actuator takes an input signal (like a sensor reading or a command)
and uses it to create a physical output (such as movement, light, or sound).
4.Logic Block: The Logic Block in Boffin ESP is used to implement conditional operations and
decision-making in projects. It allows users to create if/else statements, comparisons (e.g.,
greater than, equal to), and use logical operators (AND, OR, NOT) to control actions based on
sensor inputs. Key uses include:
Page | 7
If/Else Blocks: To perform actions based on conditions (e.g., turn on a fan if the
temperature is above 30°C).
Comparison Blocks: To compare sensor values (e.g., check if temperature > 25°C).
Logical Operators: Combine multiple conditions (e.g., both temperature and humidity
must be high to activate the cooling system).
Loops: Repeat actions until a condition is met
5.Loops Block: They are the following comments in loops:
1. Repeat Until: Repeats actions until a condition is true (e.g., "Repeat until temperature
> 30°C").
2. Repeat for: Repeats actions a fixed number of times (e.g., "Repeat 5 times with a 1-
second delay").
3. Forever: Repeats actions indefinitely (e.g., "Repeat turning on LED forever").
4. Repeat While: Repeats actions while a condition is true (e.g., "Repeat while
temperature > 25°C").
5. Break: Exits the loop before completing all iterations.
6. Continue: Skips to the next iteration.
Page | 8
6.Math Block: Here’s a quick explanation of the blocks:
1. Numbers: Basic inputs like 0, 90°.
2. Arithmetic: Perform operations like R + 1 (addition, subtraction, etc.).
3. Random Integers: Generate random numbers within a range (0 to 100).
4. Mapping: Scale values (R from 0-1023 to 0-255).
5. Conversion: Convert R to a specific data type (e.g., byte).
6. Even/Odd Check: Verify if a number is even or odd.
7. Modulo: Get the remainder of X ÷ Y.
8. Limit Values: Restrict R to a range (10 to 20).
9. Square Root: Calculate the square root of a number.
10. π (Pi): Use the constant π for geometry or trigonometry
7.Text Block: This section handles text in ArduBlock. You can create text, combine it, convert
variables (like numbers) to text, find text length, and check if specific text exists in a variable.
Page | 9
8.Time Block: This section in ArduBlock manages delays, timers, durations, and pin states.
9.Structure Block: The primary structure consists of two main blocks:
1. Setup Block:
o Runs once at the start of the program.
o Used to initialize pins, variables, or settings.
2. Loop Block:
o Runs continuously after the setup block finishes.
o This is where the repetitive actions (like reading sensors or controlling outputs)
are placed.
3. Background: The Background Block provides a way to manage tasks in parallel,
making program more efficient and responsive.
10.Variable Block: This block is used to create a variable on its own for user purpose.
Page | 10
11.Array Block: The Array Block in Ardublock is used to create and manage arrays, which
store multiple values in a single variable. This are the uses:
Creating Arrays: You can define an array with a specific size and set initial values.
Accessing Elements: You access array elements using their index (e.g., array[0] for the
first element).
Modifying Values: You can change values in the array or use loops to work with all
elements.
13. Function Block: The Function Block in Ardublock is used to create custom functions for
reusable code. It allows you to group tasks into a function and call it multiple times, making
your program cleaner and more organized. Functions can also accept input parameters to
perform specific actions.
14.Serial Block: The Serial Block in Ardublock is used to send and receive data over the Serial
Port, allowing communication between the Arduino board and a computer or other devices.
It is commonly used for debugging, displaying information, or sending/receiving data. It is also
used to read, access and print the values. Most common used baud rate in serial monitoring
is 9600.
Page | 11
Baud Rate: Baud rate is the speed at which data is transmitted over a communication
channel, measured in bits per second (bps).
Page | 12
LESSON-3
Base model - Move Forward and Backward
Objectives:
A base model is a basic robot that uses the Boffin ESP32 microcontroller, along with 2
DC motors and motor drivers, to perform simple movements like moving forward, backward,
and turning.
Model:
Block Program:
“Setup”: Here set up is used to define all the components which
are attached to the controller, their port and their mode of
operation which is input or output.
“loop”: We add the instructions which we want to get executed in
the loop.
The code alternates the direction of the two DC motors every 3 seconds, with M1 and
M2 spinning in opposite directions to each other at any given time.
Page | 13
Explanation:
Setup
1. Connect DC motor tagged M1 to Port 1:
The code is initializing or setting up a DC motor labeled as M1. This motor is
physically connected to Port 1 on the motor driver or microcontroller.
2. Connect DC motor tagged M2 to Port 2:
Similarly, a second DC motor labeled as M2 is connected to Port 2.
Loop (Repeats the actions indefinitely)
3. Set DC motor M1 to speed 100% in clockwise & M2 to 100% in counter-clockwise
(for 3 seconds):
The first block in the loop runs for 3 seconds:
M1 runs at full speed (100%) in the clockwise direction.
M2 runs at full speed (100%) in the counter-clockwise direction.
4. Set DC motor M1 to speed 100% in counter-clockwise & M2 to 100% in clockwise
(for 3 seconds):
The next block in the loop also runs for 3 seconds:
M1 is now set to run at full speed (100%) but in the opposite (counter-
clockwise) direction.
M2 is now set to run at full speed (100%) in the opposite (clockwise)
direction.
Page | 14
Lesson-4
LED Blink and Interfacing LED with the Limit Switch
Objectives:
As the name suggests, this project is designed where LED will blink continuously.
Traffic Signals, Alarm Systems & Electronic devices use blinking LED as indicators to pass some
necessary information. In the second project, the limit switch functions as a control button;
pressing it toggles the LED's blinking on or off using the Boffin ESP32 microcontroller.
LED Blink
Block Program:
This block-based code is designed to make an LED blink continuously, with each state
lasting for 1 second.
Page | 15
Explanation:
Setup
1. Connect LED tagged myVar to Port 3:
o The code initializes an LED, labeled with the variable myVar, and connects it to
Port 3 on the microcontroller or board.
Loop (Repeats the actions indefinitely)
2. Set digital output on myVar to LOW:
o This sets the output on the LED (connected to myVar) to LOW, turning the LED
off.
3. Delay for 1 second:
o After turning the LED off, the code waits for 1 second.
4. Set digital output on myVar to HIGH:
o This sets the output on the LED to HIGH, turning the LED on.
5. Delay for 1 second:
o After turning the LED on, the code waits for another 1 second.
Interfacing LED with the Limit Switch
Block Program:
"If & Else block" - Conditional Statements
"if" and "else" are like the road signs of programming, guiding our code on
which path to take, based on certain conditions.
Imagine you're driving a car, and you approach a tunnel. Now, this tunnel has a
height limit, and there's a sign that reads, "If your car is taller than 7 feet, do
NOT enter. Else, proceed safely."
This block-based code controls an LED using a limit switch, where the LED turns on or
off based on the state of the switch. Here's how it works.
Page | 16
Explanation:
Setup
1. Connect LED tagged LED1 to Port 1:
o An LED is initialized and connected to Port 1 on the microcontroller or board.
The LED is referenced as LED1.
2. Connect Limit Switch sensor tagged LS1 to Port 2:
o A limit switch is initialized and connected to Port 2 on the microcontroller. The
limit switch is referenced as LS1.
Loop (Repeats the actions indefinitely)
3. If LS1 is pressed (reads a Digital Input value):
o The code checks the state of the limit switch LS1. This is a digital input, meaning
it will either be HIGH (pressed) or LOW (not pressed).
4. Then (if the switch is pressed):
o If the limit switch LS1 is pressed (digital input is HIGH), the code sets the digital
output on LED1 to HIGH, turning the LED on.
5. Else (if the switch is not pressed):
o If the limit switch LS1 is not pressed (digital input is LOW), the code sets the
digital output on LED1 to LOW, turning the LED off.
Page | 17
Lesson-5
Giant Wheel Using Limit Switch
Objectives:
A giant wheel is a large, rotating amusement ride with passenger cabins. This model
is using a limit switch for controlled operation and focusing a gear mechanism for smooth
rotation, while ensuring the stability of the cabins during movement.
Model:
Block Program:
This block-based code controls a DC motor using a limit switch, running the motor at
50% speed when the switch is pressed and stopping it when released.
Page | 18
Explanation:
Setup
1. Connect DC Motor (M1) to Port 1:
o A DC motor, tagged as M1, is initialized and connected to Port 1 on the
microcontroller or controller board.
2. Connect Limit Switch (LS1) to Port 2:
o A limit switch, tagged as LS1, is initialized and connected to Port 2 on the
controller. The limit switch acts as a digital input sensor, providing either
HIGH (1) when pressed or LOW (0) when not pressed.
Loop (Repeats the actions indefinitely)
3. If LS1 is pressed (reads a Digital Input value):
The code continuously checks the digital input state of the limit switch (LS1). It
evaluates whether LS1 is HIGH (pressed) or LOW (not pressed).
4. Then (if the switch is pressed):
o If LS1 is pressed (digital input is HIGH), the code sets the DC motor (M1) to
run at 50% speed in a clockwise direction.
5. Else (if the switch is not pressed):
o If LS1 is not pressed (digital input is LOW), the code sets the DC motor (M1)
speed to 0%, effectively stopping the motor.
Page | 19
Lesson-6
Obstacle Avoider using Ultrasonic Sensor
Objectives:
An obstacle avoider is an autonomous system designed to detect and avoid obstacles
using sensors such as ultrasonic sensors. This model analyzes data from the ultrasonic sensor
for distance measurement and implements programming steps to enable autonomous
obstacle avoidance.
Model:
Block Program:
This program uses an ultrasonic sensor to measure distance and controls a DC motor's
direction and speed based on the distance to nearby objects.
Page | 20
Explanation:
Setup Section
1. Connect DC Motor (M1) to Port 1:
o This block initializes a DC motor tagged as "M1" and connects it to Port 1,
enabling the program to control the motor’s speed and direction.
2. Connect Ultrasonic Sensor (US1) to Port 2:
o This block sets up an ultrasonic sensor labeled "US1" and connects it to Port
2. The ultrasonic sensor measures the distance to nearby objects, and the
program uses this data to make decisions.
Loop Section (Repeats continuously)
3. Read Distance and If Statement:
The program reads the distance from the ultrasonic sensor "US1."
It checks if the distance is greater than 10 units (likely centimeters).
If True (distance > 10 units): The motor "M1" is set to spin clockwise at 100% speed.
If False (distance ≤ 10 units): The motor "M1" is set to spin counter-clockwise at 90%
speed.
4. Delay:
o After setting the motor speed and direction, the program waits for 1 second
before repeating the loop.
Page | 21