You are on page 1of 49

CIS5002 Physical Computing

Studio 1 – Introduction

Shadan Khan Khattak


Learning Objectives
By the end of this lecture, you will know:
1. What is Physical Computing?
2. What are the learning outcomes of this module?
3. What is our module delivery plan?
4. What is our attendance policy?
5. What is our module assessment plan?
6. Where to find module learning materials?
7. How to prepare for your workshop sessions this week?
Your Teaching Team
• Dr. Shadan Khan Khattak
• Email: skhattak@cardiffmet.ac.uk
• Studios
• Workshops (Groups C, D)

• Dr. Ahmed Khalifa


• Email: akhalifa@cardiffmet.ac.uk
• Workshops (Groups A, B)
1. What is Physical Computing?
1. What is Physical Computing?
1. What is Physical Computing?
• What do you think are the key components used in these
technologies?
• Provide your answers here: https://www.menti.com/tjrkkabygd
• Use code: 8223 4075
1. What is Physical Computing?
• Your Answers:
https://www.mentimeter.com/s/f25b8d93dad3993bce11e0280c6e
5bfc/6e45c70d47fb
1. What is Physical Computing?
• In a nutshell
Convert changes in energy given off by our
bodies (e.g. sound, light, motion etc.) into
changing electronic signals

Sensors
(e.g. sound, light, temperature etc.)

Interactive System Real World


(typically microcontroller based e.g. Arduino) Actuators
(e.g. LEDs, servos, speakers etc.)

Convert electrical signals into physical


events (e.g. motion, heat etc.)
1. What is Physical Computing?
• “Physical computing covers the design and realization of
interactive objects and installations and allows students to
develop concrete, tangible products of the real world, which
arise from the learners’ imagination.” (Przybylla, 2014)
1. What is Physical Computing?
• Design and Realization
• Process of understanding, planning, and implementing projects
• Practice design skills and turn designs into products
• Physical computing describes the whole process – not just electronics
and programming
1. What is Physical Computing?
• Interactive Objects and Installations
• Users can interact with and get feedback from your creation
• e.g., LEDs can light up, robotic arms can move etc.
1. What is Physical Computing?
• Concrete Tangible Products of the Real World
• Opportunities for you to create digital solutions
• Devices are driven by real-world needs and solve real-world problems
1. What is Physical Computing?
• Learner’s Imagination
• The projects you create will come from your imagination
• Use computing as an artistic medium of self-expression
2. Learning Outcomes
1. Demonstrate appreciation and understanding of the fundamental building blocks
and architecture of embedded systems
2. Design, develop, test and debug embedded systems using appropriate language,
environment, development tool and hardware
3. Demonstrate an ability to write non-trivial interactive programs, taking input from
various sensors and controlling a variety of physical outputs.
4. Explain the key issues in programming and designing software for embedded systems
in real-world applications.
• We will build Arduino-based
circuits here

3. Module Delivery Plan • We will use C++ based code


for programming

• We will use Roboscratch, blockly,


and EZ-script for programming

STUDIO ON-CAMPUS WORKSHOP ONLINE WORKSHOP


(via Microsoft Teams) (Room A0.11) (via Microsoft Teams)
(Based on a Physical Robot - the EZ JD (Based on a simulator -
PART 1 PART 2
Robot) Tinkercad) 
Week 1 Introduction Introduction to Arduino Familiarization with EZ JD robot Introduction to Tinkercad
         
Microprocessors,
Week 2 Variables, datatypes Sensors, movements, controls Worksheet 1
micocontrollers
Sequence, Selection,
  Sensors, movement    
Iteration
Playing music using
Week 3 Vision and Speech recognition speakers Animation, color, mobile app Worksheet 2
Push Buttons, Serial
       
Monitor
Week 4 Cognition and Emotions Ultrasonic sensors Microsoft Cognitive emotion and vision Worksheet 3
       
Week 5 History of Humanoid Robots Project Preparation Project Preparation Project Preparation
         
Social and Ethical
Week 6 Project Preparation Project Preparation Project Preparation
Considerations
4. Attendance Policy
• Studio
• Recorded via Teams
• Workshop
• On-campus (recorded via a Digital Register)
• Online (recorded via Teams)

• The expectation is for a 100% attendance.


5. Module Assessment Plan
• Part 1 – Developing a Robotic Program (Group) – 70%
• Using the EZ JD Humanoid Robot
• Group Size: 4 – 5 students
• Select a Project Topic
• Select a group leader
• Identify responsibilities of each team member
• Discuss your progress weekly with your instructor
• Deliverables:
1. A video presentation (20%)
2. A working robotic program (20%)
3. A poster explaining your project (30%)
5. Module Assessment Plan
• Part 1 – Developing a Robotic Program (Group) – 70%
• Penalty for lack of participation
Final Part 1 Marks
Part 1 marks will be adjusted based on the contribution level of each group member. The following penalty
scheme will be applied:

Final Part 1 Marks = Original Group Mark * Contribution Factor

 The Contribution Factor is defined as follows:

Aggregated Contribution Score Contribution Factor


5 100
4 95
3 90
2 75
1 60
0 0
5. Module Assessment Plan
• Part 2 – Completing the Worksheet Portfolio (Individual) – 30%
• Simulation of Arduino-based circuits
• Simulation Tool: Tinkercad
• Deliverables:
• Worksheet 1
• Worksheet 2
6. Learning Materials
• All online (studio and workshop) sessions will be recorded via
MS Teams.
• CIS5002 Moodle page will contain:
• Video recordings of all online sessions
• Studio slides
• Workshop slides
• Any worksheets
• Recommended readings
7. This Week’s Workshop Sessions
A. On-campus workshop – The EZ JD Robot
B. Online workshop – Arduino using Tinkercad
7A. On-campus workshop – The EZ JD Robot
7A. On-campus workshop – The EZ JD Robot
7A. On-campus workshop – The EZ JD Robot
• EZ Bits
• The EZ JD Robot has Clip’n’Play parts called EZ Bits.
• There are EZ-Bits for Joints, Body, Feet, Heads and more.
• Each EZ-Bit will attach to the body
• the orientation of each EZ-Bit
• With EZ-Bits, you can build a wide assortment of robots. The
only limit to EZ-Robotics is your imagination!
EZ-robot family – creativity without limit

7A. On-campus workshop – The EZ JD Robot


7A. On-campus workshop – The EZ JD Robot
• JD Robot Care:
1. Charge Before First Use and Disconnect After Charged
1. Keeping a battery connected to the charger after it has fully charged may drain
the battery.
2. The robot will become non-operational while the EZ-B v4 battery monitor is verbally
warning and must be shut off immediately.
2. *Warning: Do not run/use/power-on your robot while the battery charger
is connected to the battery - doing so may cause the battery to overheat
and explode.
3. Cool Down
1. For optimal battery performance, provide a 30 minute minimum cool-down period
after use before recharging batteries.
2. Cool the battery and robot away from direct sunlight before charging. Batteries may be
recharged many times per day when 30 minute cool down period is provided.
7A. On-campus workshop – The EZ JD Robot

27
7A. On-campus workshop – The EZ JD Robot
• Watch introductory videos:
1. Watch Module Essential video 1 - JD Box Introduction
2. Watch Module Essential video 2 - Battery Care & Charging (till 2:40 only)

• Remember to bring your phone / laptop and a headset to


listen to the video guides in the On-campus workshop!
7A. On-campus workshop – The EZ JD Robot
• Before your on-campus workshop,
• please install the Synthiam ARC (Teams) software on your laptops:
ARC - Products – Synthiam
• Please install the ARC mobile app which is available for both Android
and iOS (ARC Mobile - Apps on Google Play)
7. This Week’s Workshop Sessions
7B. Online workshop – Arduino-based circuits using Tinkercad
7. Arduino Fundamentals
• At the heard of typical physical computing
devices is a microcontroller.
• Microcontrollers
• are integrated circuits that are basically tiny
computers
• can run simple, small software programs
• low-powered, so can be powered by battery for days
• fast enough to process data faster than humans
can think
• designed to take input from the physical world and
control output devices in the physical world
7. Arduino Fundamentals
• Arduino
• A company in Italy that designs and sells circuit boards that make
microcontrollers easy to use
• These circuit boards are called Arduinos.
7. Arduino Fundamentals
• Arduino
• Types of Arduinos
• Simple Arduino boards e.g., Arduino Uno
• Cheap and good for most projects
• Control motors, lighting, cameras, or build a small robot
7. Arduino Fundamentals
• Arduino
• Types of Arduinos
• More advanced Arduinos with more powerful processors which have wifi,
ethernet etc.
• e.g., Arduino TIAN, Arduino Ethernet etc.
7. Arduino Fundamentals
• Arduino
• Arduino hardware designs are open-source
• Many different 3rd party companies make their own variants.
• Can’t call them Arduinos but essentially the same thing.
7. Arduino Fundamentals
• Arduino
• Arduino shields – add-ons
• plug into your main Arduino circuit board and let you do more stuff.
• e.g., Adafruit makes shields that let you control motors and servos without having
to design motor control circuitry.
• Sparkfun have shields that let you turn your Arduino into a simple cell phone or
an mp3 player.

Arduino Uno + Voice Box Shield + WiFly Shield = WiFi Talking Stephen Hawking (TM)
7. Arduino Fundamentals
The Arduino Uno Board
• Main microcontroller:
• commonly uses ATMEGA AVRs (made by Atmel)
• Crystal resonator:
• controls how fast the microcontroller is running.
• Another microcontroller:
• to upload the program to the main
microcontroller, there is another microcontroller.
• lets you connect your USB cable to the Arduino
board and communicate via USB.
• lets you upload your programs onto the main
microcontroller.
• allows you to send messages back and forth
between your computer and your Arduino.
• extremely important for debugging.
7. Arduino Fundamentals
The Arduino Uno Board
• USB port:
• To power the board.
• Barrel jack
• To disconnect from PC and use own
power.
• Connect external 9V DC power source
• Voltage regulator
• Reduce the voltage to 5V
• Reset button
• To reboot Arduino program
Arduino Fundamentals
Arduino Uno Pin Configuration
Image Source: diyi0t.com
• Power pins:
• To power other circuitries with 5V or 3.3V
• Make sure whatever you power doesn’t
draw more than a few miliamperes.
• A few LEDs is fine; large motors, not.
• Vin:
• Input voltage pin of the Arduino board used to
provide input supply from an external power
source.
• 5V:
• Used as a regulated power supply voltage
• Used to give supply to the board as well as
onboard components.
• 3.3V:
• Used to provide a supply of 3.3V which is
generated from a voltage regulator on the
board
• GND:
• Used to ground the Arduino board.
Arduino Fundamentals
Arduino Uno Pin Image Source: diyi0t.com

Configuration
• Tx/Rx:
• Sending and receiving serial
data e.g., from GPS module,
Bluetooth module, Wi-Fi
module etc.
• Also known as UART pins.
• Used for communication
between the Arduino board and
a computer or other devices.
• TX0: transmit data
• RX0: receive data
Arduino Fundamentals
Arduino Uno Pin Image Source: diyi0t.com

Configuration
• Digital Pins (0 - 13):
• digital inputs and outputs
• normally pins receive 5v
as 1 and 0V as 0
• With most microcontroller
pins, you can configure a
third state i.e. set a
particular voltage to be
perceived as a 1 or 0 –
tristate logic
Arduino Fundamentals
Arduino Uno Pin Image Source: diyi0t.com

Configuration
• Tilde~ pins:
• Used to convert the digital
signal into an analog by
varying the width of the
Pulse.
• The pin numbers 3, 5, 6, 9,
10, and 11 are used as
PWM pins.
• Can be used to output pulse
width modulated square
waves.
Arduino Fundamentals
Arduino Uno Pin Image Source: diyi0t.com

Configuration
• Analog Pins (A0 – A5):
• Measure continuous
voltages from 0 – 5V.
7. Arduino Fundamentals
• The Arduino Program – Sketch
• The Arduino software is open-source
• An Arduino program is called a ‘sketch’.
• All sketches have
• A structure
• Values (variables and constants)
• Functions
7. Arduino Fundamentals
• The Arduino Program – Sketch
• The Arduino software is open-source
• An Arduino program is called a ‘sketch’.
• All sketches have
• A structure
• Consists of two main functions
1. Setup() function
• called when a sketch starts.
• used to initialize the variables, pin modes etc.
• only runs once, after each power up or reset of the Arduino board.
7. Arduino Fundamentals
• The Arduino Program – Sketch
• The Arduino software is open-source
• An Arduino program is called a ‘sketch’.
• All sketches have
• A structure
• Consists of two main functions
2. Loop() function
• loops consecutively, allowing your program to change and respond.
• used to actively control the Arduino board
7. Arduino Fundamentals
• A sample sketch

void setup() {
pinMode(10, OUTPUT);
}

void loop() {
digitalWrite(10, HIGH);
delay(1000);
digitalWrite(10, LOW);
delay(1000);
}
7. Arduino Fundamentals
• Tinkercad – a tool to simulate Arduino based circuits
• Free
• Online (https://www.tinkercad.com/)
• Before, this week’s workshop, create an account on
www.tinkercard.com
References
• https://www.ez-robot.com/Tutorials/Lesson/61?courseId=1
• https://www.arduino.cc/en/Tutorial/HomePage
• https://www.futurelearn.com/courses/physical-computing-raspberry-pi-python

• Chua, X.N. & Chew. E. (2015). The Next Wave of Learning with Humanoid Robot: Learning Innovation Design starts with "Hello
NAO". In T. Reiners, B.R. von Konsky, D. Gibson, V. Chang, L. Irving, & K. Clarke (Eds.), Globally connected, digitally enabled.
Proceedings Ascilite 2015 in Perth (pp. CP:52- CP:56).

49

You might also like