G7 - Unit 8 - Robotics and Animation
G7 - Unit 8 - Robotics and Animation
G7 - Unit 8 - Robotics and Animation
Learning Objectives
Learners will learn to:
identify the components of Tinkercad circuits
Pictoblox
Vocabulary
Arduino
circuit assemblies
micro bit
microcontroller
breadboard
LED
Let Us Start
1
Get, Set, Go
8.1 Using Tinkercad Circuits
Tinkercad allows us to create virtual electronic circuits and test them. This is called
simulation. It allows you to create simple to complex circuits and test them before
Step 3: Select the Circuit option. The Tinkercad Circuits workspace appears as shown.
2
8.2 Components of Tinkercad Circuits
The Circuits workspace in Tinkercad is similar to that of 3D design workspace.
In addition to the regular options, it contains tools for creating and testing
circuits. These are listed below.
Workspace
It is the area where the electronic components and 3D objects are placed.
Rotate
It is used to rotate the selected component placed on the workspace.
Wire color
It is used to change the colour of the wires used to connect the components in
a circuit.
Wire type
It is used to select the type of wire used to connect the different components
in a circuit.
Start/Stop Simulation
It is a toggle button that is used to test the working of circuits and
components.
3
8.3 Electronic components
An electronic circuit is built using different components.
Basic Components
Breadboard
The electronic components are assembled using a breadboard. A breadboard is a
piece of plastic that has several holes. These holes are used to hold different
electronic components. The main area of the breadboard has a grid of 30x10 holes.
Rows are numbered from 1 to 30 while columns are labelled from ‘a’ to ‘j’. Columns
labelled ‘a’ to ‘e’ are separated from the columns labelled ‘f’ to ‘j’ by an area without
holes. The edges of the board contain two columns that are labelled as ‘+’ and ‘-‘and
also contain the same number of rows. These columns and rows are used for power
supply. The components in the main area of the board will be joined into these
Battery
A battery is used to supply power to the components in an electronic
and 9V. A coin cell battery of 3V is also available. The battery is labelled
with its voltage (V). A higher voltage will result in more current as V= I x R.
4
LED
A Light Emitting Diode (LED) is an electronic device that emits light when an electric
current passes through it. An LED has two leads, the shorter straight lead is called a
Cathode and the longer, bent lead is called Anode. The anode must be connected to
the positive end of the battery. The cathode is connected to the negative end of the
battery in a circuit.
Circuit Assemblies
Circuit assemblies are simple, pre‐made circuits that can be incorporated into
3D designs. Some available circuit assemblies are the glow circuit, move circuit
and spin circuit.
Arduino
Arduino is an open‐source platform that helps to build electronic projects. It
consists of both hardware and software. The Arduino hardware is a
programmable circuit board called a microcontroller. You can tell the board
what to do by sending a set of instructions through code to the
microcontroller. Arduino software is an IDE (integrated development
environment) through which developers write and upload the code to the
5
microcontroller. The Arduino boards can read inputs such as a light on a
sensor, a finger on a button, or a Twitter message and turn them into outputs
such as activating a motor, turning on an LED, publishing something online, etc.
Micro Bit
6
Step 6: Click the negative terminal of the battery. A green wire appears.
Connect it to the negative rail on the breadboard. Similarly, connect the
positive battery terminal to the positive rail of the breadboard.
Step 7: Using the wire color tool, change the colour of the wires, black for
negative and red for positive.
Step 8: Place the resistor on the breadboard. Set the resistance value to 1
Ohm.
Step 9: Rotate the resistor such that one end connects to the positive rail of
the breadboard.
Step 10: Connect the other end of the resistor to the breadboard using a black
jumper wire.
7
Step 11: Place the LED above the resistor so that the Anode of the LED is in the
same row as the resistor.
Step 12: Use a red wire to connect the resistor and the anode of the LED. Use a
black wire to connect the cathode
of the LED to the negative rail.
Components
1. A laptop or a computer
2. Camera/Webcam
5. Micro: bit
6. USB cable
8
Using PictoBlox
PictoBlox is a programming software based on Scratch 3.0; hence,
Machine learning.
Download PictoBlox
Use the link https://thestempedia.com/product/pictoblox/download-pictoblox/ and
choose the appropriate Operating System (Windows, macOS, Linux) to download it.
9
Steps to create face-recognition-based attendance system
Setting up the project
Step 1: Open Pictoblox and log in to the app.
button and choose Data Logger from the list. This extension
lets you generate a CSV file and store data according to your
requirements.
Step 1: Connect your micro: bit to the laptop using the USB cable.
Step 2: Install the Scratch link to use the microbit with the help of the given link.
https://scratch.mit.edu/microbit
Step 3: Select the Board. Click the Connect button and select the appropriate device.
10
Setting up the stage
Step 1: Click the Choose a backdrop button and select the blue sky backdrop.
Step 2: When pressing the green flag, the default backdrop, which is the Blue sky
backdrop, should come. Thus, place the ‘when flag clicked’ block from the Events
palette and place the switch backdrop to block below it. Make sure that Blue Sky is
Step 3: The camera needs to be turned OFF. Thus, from the Face detection palette,
use the turn-on video on stage with a 0% transparency block and choose OFF from
Step 4: Place a say block from the Looks palette. To mark the attendance, the user
must press the Button A on the micro: bit. Thus, write “Please press Button A to mark
Step 5: Duplicate the say block and write “Please press Button B to mark the
Step 6: To create a new file to store the attendance data, from the logger palette,
choose a ‘create block ‘we will give it the name “Attendance 2020”.
11
Step 2: To analyze the images from the camera, we need the camera to be ON. From
the face detection palette, place a turn on video on stage with 0% transparency
block.
Step 3: Place a say block from the Looks palette to say, “Feeding the Face”.
Step 4: From the micro: bit palette, place the display text block and write “Feeding…”
in it.
Step 5: To store the user's images in memory, click the Face detection palette and
place add class 1 as a stage block. Select 1 from the first drop-down and stage from
the second. To identify the user as his/her name, write the user name into the space
given.
Step 6: Once the face is added into the memory, make the sprite say “Face Added
into the Database” using the say block from the Looks palette.
Step 7: To turn OFF the camera and come back to the default backdrop, from the
face detection palette, place a turn on video on stage with 0% transparency block
Step 8: Finally, to come back to the default backdrop, place switch backdrop to
block from the Looks palette and choose Blue Sky from the drop-down.
12
Marking the attendance using the Micro: bit’s button
Step 1: To execute the program, whenever Button A is pressed on the micro: bit, from
the micro: bit palette, drag and drop ‘when A button pressed’ block.
Step 2: As we want to verify the image from the camera feed, we will ensure the
Step 3: Add a delay of 3 seconds using the wait block from the controls palette.
Step 4: Now, to store the data, we will add blocks from the data logger extension. To
store the timestamp, place a set the data 1 to block and drag and drop the current
timestamp block into the space given. The get current timestamp block contains all
Step 5: Now, in the second data, we will store the class of recognized face which
contains the name of a person whose face is recognized. We need to use the save
Step 6: If the faces are matched, we need to print the user's name on the LED matrix.
Thus, place the display text block from the micro: bit palette and drop the get class
Step 7: We need to match the faces on the stage thus, drag and drop the do Face
Step 8: Also, we would like sprite to inform the user that the attendance is marked
and greetings. Thus, place a say block from the Looks palette and write Attendance
Step 9: To greet the user, we want sprite to say welcome along with the user’s name.
Thus, from the Operators palette, place a join block, write “Welcome “ in the space in
the first join block, drag and drop another join block into the second input. Place get
class of face detected in the first input of the second join block and write “ !” in the
Step 10: Switch the backdrop to the default. Thus, place the switch backdrop to and
13
Assembling components
Step 1: Connect the Microbit controller to the computer using USB cable.
Step 3: Scan a face using button A. Once the system matches the face detected with
the sample image, it will display the name of that person on micro:bit’s LED matrix
sheet.
14
Resources
https://ai.thestempedia.com/docs/pictoblox/pictoblox-tutorials/getting-started-with-pictoblox/
Reference Material
https://www.youtube.com/watch?v=hWEKOch666s&t=37s
15