Guide Book
Guide Book
Sponsors:
Venue Sponsor:
Supported by:
Thunkable is a web-based programming system developed by Rappidly Inc. that transforms the complex language of
text-based coding into visual, puzzle piece-shaped building blocks. It is provided free of charge.
Arduino is an open-sourced electronics prototyping platform with easy to use hardware and software suitable for makers
and tinkerers of all ages. The Arduino name and logo are trademarks of Arduino. Circuits shown in this manual is
produced with TinkerCAD, an open-sourced circuit simulator provided by Autodesk. The TinkerCAD name and logo are
trademarks of Autodesk.
The information in this manual has been obtained from sources believed to be reliable at the time of publication. The
author does not guarantee the accuracy and the completeness of information presented herein, and shall not be
responsible for any errors, omissins or damages as a result of the use of this information. No part of this manual may be
reproduced, copied, or distributed in any form or by any means without the express written permission from the author.
Hi! Congratulations for being one of the many young engineers selected to
participate in this year’s IET Faraday Challenge Malaysia!
This handout contains all the information you need to prepare for the big
day! If you’ve already had a MakerUno kit from Cytron, great! Or else, you
can choose to purchase one here: https://www.cytron.io/p-maker-uno-edu-
kit-arduino-compatible . Either way, the MakerUno kits will be provided
by the IET during the competition day, so it is not compulsory to purchase
one.
The second part of the training manual will focus on Thunkable, a block-
based mobile app development software, which allows you to run and build
Android or iOS apps right from your browser. Do remember to seek
permission from your school teachers before bringing your phone to school!
During the competition day, our super helpful technical managers will be on
site to provide help! We will also teach you how to connect your apps and
the Arduino through Bluetooth.
As computers become more common in our everyday lives engineers are using coding more
frequently to solve everyday problems. Today your challenge is to create a solution for real life
problems. You will work in teams of engineers to solve a problem or to change or improve people’s
experience in an area of our everyday lives. You will experience what engineers do as they work
together to develop a new product. You will need to use all your STEM skills as well as skills in
teamwork, perseverance, creativity and innovation.
You will be given “Faradays” a virtual currency to be used to buy extra sensors and help from our
technical managers. Each team will be provided with a MakerUno. The other items from the Maker
Uno Kit will be removed.
A “Shop” will be set up in a corner of the competition hall, where you may send a representative to
buy extra sensors needed for your project using “Faradays”. You will need to conduct a cost analysis
to ensure that your project can be done within the allocated “budget”. This is to simulate the real-
world environment, where engineers have to solve problems within a certain amount of budget
allocated to them.
Nearing the end of the competition, your team should prepare for a quick 3 minute pitch, which
consists of: (1) Your problem statement, (2) Your solution, (3) costing and budget. The 3 minute pitch
will be followed by a 2 minutes quick demo of your project.
The projects proposed must have useful real-life applications. Your team must show teamwork,
engineering skills, problem solving, creativity and innovation during the course of the competition.
Criteria Marks
Planning and research 10 marks
Development of product 20 marks
Use of budget 8 marks
Functionality of coding 14 marks
Functionality of product 22 marks
The pitch 16 marks
Teamwork 10 marks
Total 100 marks
Objective:
- Familiarise students with TinkerCAD’s
interface
- To get students comfortable in running
electronic simulations before building
circuits.
TinkerCAD allows you to run Arduino codes on a simulator, even if you do not own an Arduino, hence
it is the perfect too to start your preparation for the competition!
• Go to https://www.tinkercad.com
• Click on “Join now” if you wish to create an Autodesk account. Alternatively, you can click
on “Sign in”, and select “Sign in using social providers” to login with your
Facebook/Google/Microsoft accounts.
Circuit name
Control toolbar
Component library
Work Area
If there’s a programmable element in the circuit (i.e. Arduino), pressing the “Code” button will toggle
the coding area. Clicking “Block” in the coding area will allow you to switch between block based
programming and code based programming.
Clicking “Components” in the component library will allow you to
switch between standard basic electronic components and Arduino
based circuits.
The sample circuits shown here are preloaded with sample codes. For
this tutorial, let’s drag the “Button” demo into the main work area.
After dragging the circuit into the work area, click on the “Code” button and observe the codes
for this demo:
Ignore the gray “Comment” blocks
When the simulation is started, the USB cable will be connected to the Arduino. If everything
works well, the LED on board will light up when you click on the button.
If you have an Arduino, you can download the codes by clicking on the download button. The
downloaded code will be in the form of an “.ino” file, which is compatible with the Arduino IDE.
For more information on how to flash the code to an actual Arduino, refer to:
https://www.arduino.cc/en/main/howto
Objective:
- To complete a simple project from scratch
- Introduce the concept of digital IO and delay
function
Start a new circuit project in TinkerCAD and create the circuit shown:
When this is done, change the value of the resistance to 220 Ohm, by clicking on the
resistor and changing the “resistance” value. This will prevent the LEDs from
burning out.
Extra Info: Why do we use 220 Ohm? Read this forum to find out more: https://forum.arduino.cc/index.php?topic=121606.0
Click on codes and make the following program:
1 second
2 second Hint:
You only need to do some
minor change to the code
blocks!
Now, add a button to the circuit
A B A
What’s the difference between digital Now modify the code so that
pins (0-13) and analog pins (A0-A5)? the LED toggles each time the
button is being pressed.
Digital pins can only read binary values. Which means they can
only be switched ON (5 V) or OFF (0 V). Hint: You will need to use
Analog pins can read voltage range between 0 V and 5 V. Due some blocks which are not
to the configuration of the Arduino’s ADC (analog to digital mentioned in this tutorial.
converter), The Arduino reads 5 V as 1023, and 0 V as 0. Hence,
any values in between can be mapped linearly between 0 and
1023. Try playing around with the
different logic functions.
Objective:
- To complete a simple project from scratch
- To introduce the concept of PWM and servo control.
- To introduce simple concepts of ADC
Start a new circuit project in TinkerCAD drag the Arduino servo project
For this example, the code is telling the servo to rotate to 90 degrees if the
switch is switched to 5V, and rotate to 0 degrees if the switch is switched to
ground. Note that there’s always a delay after asking servo to move. This is
because the servo will take time to move from one position to another.
Hence, a suitable delay must be given to allow the servo to move before a
next instruction is given.
Now, let’s learn how to control a servo using a potentiometer
Here, we will learn how to control the servo using a potentiometer (Variable
resistor).
The analog pins of the Arduino reads the input voltage between 0v to 5v and maps
it to a analog-digital conversion (ADC) value between 0 and 1023. To map this
value to the 0-180 degrees input of the servo, we will need to use the following
formula:
𝑀𝑎𝑥𝐷𝑒𝑔𝑟𝑒𝑒
𝐶𝑢𝑟𝑟𝑒𝑛𝑡𝐷𝑒𝑔𝑟𝑒𝑒 = 𝐴𝐷𝐶𝑅𝑒𝑎𝑑𝑖𝑛𝑔 ×
𝑀𝑎𝑥𝐴𝐷𝐶 + 1
In our case, since the maximum angle is 180, and the maximum ADC value is 1023,
So the conversion becomes:
180𝑜
𝐶𝑢𝑟𝑟𝑒𝑛𝑡𝐷𝑒𝑔𝑟𝑒𝑒 = 𝐴𝐷𝐶𝑅𝑒𝑎𝑑𝑖𝑛𝑔 × 1024
Which is why there is a constant of 0.176 defined in the code. If you wish the
servo to rotate between 0 degree and 90 degree, simply replace MaxDegree
with 90 instead of 180. Try it out and see for yourself!
Objective:
- To reinforce the concept of ADC
- To introduce simple sensors, and sensor integration.
- To introduce the concept of Serial communication and data visualization
- To familiarize students with breadboard prototyping.
Start a new circuit project in TinkerCAD, and create the circuits shown below
In a breadboard, the holes are connected as shown in the diagram above.
In our case, the photo resistor is 20 Ohm when bright, and 175 kOhm when dark.
Hence, we selected a 10 kOhm reference resistor. Remember to change the value of
the resistor in your circuit to 10 kOhm.
Write the code as shown:
Remember, blue blocks can be found in Output, while purple blocks can
be found in input.
Press simulate, and activate the serial monitor to see the output.
You should be able to see the output as shown. Click on the graph symbol to
display a graphical view of the input.
Click on the light dependent resistor (LDR) an slide the bar to simulate
different light intensity. Observe what happens on the graph.
Objective:
- To reinforce the concept of ADC
- To introduce the concept of analogWrite() and PWM.
- To familiarize students with breadboard prototyping.
Modify the circuit to include an LED. Don’t forget to include a 220 Ohm
current limiting resistor to avoid burning the LED!
The map function automatically maps the value of the ADC (0-1023) to
the value of the PWM (0 – 255).
Simulate!
Notice that when the LDR detects dark environment, the LED will light
up! And when the LDR detects a bright environment, the LED dims! Now,
modify the code so that the LED turns on completely when it is dark
enough, and turns of completely if it is bright enough using what
you’ve learned earlier!
Objective:
- Let students explore the Thunkable app creator
- Let students build their first Android/iOS mobile app and test it.
• Go to https://thunkable.com
• Click on “Get started”
• Select “Cross Platform”
Click on “Create new app”
Follow the getting started guide to install the Thunkable companion app on your Android/iOS devices
Alternatively, you may scan the code below to download the apps:
Objective:
- Let students create their first Android app
- Teaches the concept of block based programming
Go to http://bit.ly/thunktutorial
If you prefer, you can activate the in-platform tutorial platform and walk through the tutorial one by one
The tutorials here are interactive. Follow the tutorial step by step in order to learn the basics of
Thunkable.