SlideShare une entreprise Scribd logo
1  sur  107
Télécharger pour lire hors ligne
Cassiopeia Ltd 2016
Electronics workshop
Junior Makers at DimSumLabs
2015-2016
Cassiopeia Ltd 2016
Robots!
smart and interactive machines: input and output
inputs = sensors
● button, switch
● light sensor
● distance sensor
● microphone
● keyboard, mouse
● ...
outputs
● lights, screens
● sound
● motors
● ...
Cassiopeia Ltd 2016
Arduino = brain
inputs outputs
Cassiopeia Ltd 2016
Electricity = flow
red = positive (+)
black = negative (-) = ground
Cassiopeia Ltd 2016
Breadboard = connections
Cassiopeia Ltd 2016
LED = light emitting diode
Cassiopeia Ltd 2016
Push button with LED
Cassiopeia Ltd 2016
7 segment display
Cassiopeia Ltd 2016
hit minus game
● connect the 2 LEDs and resistors
● connect the potentiometer
● connect the buzzer
● connect the button
● connect the 7 segment display
power from a USB powerbank
or
put your battery wires into the breadboard
Cassiopeia Ltd 2016
hit minus game
D4 means
digital pin 4 on Arduino
A0 means
analog input 0 on Arduino
GND is ground = 0V
Cassiopeia Ltd 2016
RGB colours
mixing paint
subtractive colours
mixing light
additive colours
Cassiopeia Ltd 2016
colours are waves
Cassiopeia Ltd 2016
colours of the sun
Cassiopeia Ltd 2016
RGB colour LED
Cassiopeia Ltd 2016
Sound waves
Cassiopeia Ltd 2016
Speed of sound
Speed of sound =
343 meter per second (m/s)
through air
Speed of light =
300,000,000 m/s
1 million times faster than sound
Cassiopeia Ltd 2016
Ultrasound distance sensor
● send out ultrasound pulse 40,000 Hertz
● measure time it takes for reflection to arrive back (echo)
● calculate distance from this time measurement (speed of sound)
Cassiopeia Ltd 2016
OLED screen
each pixel = LED
128 x 64 pixels
fragile!
colour screen =
each pixel is 3 LEDs (RGB)
Cassiopeia Ltd 2016
servo
slow strong motor to move things:
● open/close
● left/right
● half a circle (0->180 degrees)
Cassiopeia Ltd 2016
simple robot:
ultrasound distance
and servo
Cassiopeia Ltd 2016
potentiometer = variable resistor
create analog value: between 0 and 5V
3 legs:
0 and 5V on outside legs
variable voltage on middle leg
Cassiopeia Ltd 2016
joystick = 2 potentiometers
joystick is 2 potentiometers on 1 stick:
horizontal and vertical, x and y
2 variable voltages, VRx and VRy
Cassiopeia Ltd 2016
pong game 1972!
Cassiopeia Ltd 2016
colours are waves, heat is also waves
Cassiopeia Ltd 2016
every object is a source of (mostly invisible) heat radiation
special camera
thermal imaging
Cassiopeia Ltd 2016
Infrared motion sensor (PIR)
● looking for infrared waves = heat
● needs a few seconds to ‘warm up’
● when it detects a change in infrared radiation > signal ON
Cassiopeia Ltd 2016
Infrared motion sensor (PIR)
simple test with battery, LED and resistor
Cassiopeia Ltd 2016
Santa Catcher
PIR motion sensor
servo to open the window
2 blinking LEDs
RGB LED inside
buzzer tune
Cassiopeia Ltd 2016
Santa Catcher
Cassiopeia Ltd 2016
Long distance communication
radio
c 1900
on/off switch
Cassiopeia Ltd 2016
Long distance communication - Morse code
Cassiopeia Ltd 2016
Radio module
nRF24 = 2.4GHz transceiver
T = transmit
R = receive
Crystal
Antenna
Cassiopeia Ltd 2016
Aviation navigation with Morse radio beacons
Radio towers at known locations send out Morse signals
Non-Directional Beacons (NDB) 190-1750 kHz
Cassiopeia Ltd 2016
Morse decoder with radio
Connect the 7 wires on the radio to the Arduino
Be careful to use 3.3V, not 5V!
R= receive
T = transmit
Cassiopeia Ltd 2016
Scratch for Arduino s4a.cat
control the Arduino from
Scratch
note: special program
needs to be uploaded to
the Arduino to make this
work
Cassiopeia Ltd 2016
Scratch for Arduino - blink (digital output)
LED and resistor
connected to
GND and D10
Cassiopeia Ltd 2016
Scratch for Arduino - traffic light
3x LED and resistor
red: D10
yellow: D11
green: D12
now try this:
Cassiopeia Ltd 2016
Scratch for Arduino - joystick plotter
POSITION = joystick:
5V, GND, A0, A1
PEN SIZE & COLOUR =
2x potentiometer:
5V, GND, middle: A2 and A3
CLEAR = button:
5V and D2
Cassiopeia Ltd 2016
Scratch for Arduino - joystick plotter
POSITION = joystick:
5V, GND, A0, A1
PEN SIZE & COLOUR =
2x potentiometer:
5V, GND, middle: A2 and A3
CLEAR = button:
5V and D2 with pull-down
resistor
Cassiopeia Ltd 2016
Scratch for Arduino - joystick position (analog input)
POSITION = joystick:
5V, GND, A0, A1
Arduino analog range (blue)
0 to 1023
Scratch screen range:
X = -250 to 250
Y = -200 to 200
Y
X
Cassiopeia Ltd 2016
Scratch for Arduino - analog ranges
Arduino analog signal: always 0 to 1023
Scratch screen:
X = -250 to 250 (analog / 2) - 250
Y = -200 to 200 (analog / 3) - 170
Pen colour: 0 to 200 analog / 5
Pen size: 0 to 255 analog / 4 (but divide by 20 otherwise too thick)
Cassiopeia Ltd 2016
Scratch for Arduino - digital input to Arduino (motion)
digital =
ON or OFF
1 or 0
true or false
PIR motion sensor on D2
5V and GND
LED with resistor on D10
Cassiopeia Ltd 2016
Scratch for Arduino - digital input to Arduino (button)
button for D3 and 5V
ON or OFF, true or false
connect D3 also to resistor to GND
otherwise we cannot be sure what
happens when button is not pressed
= PULL DOWN RESISTOR
Cassiopeia Ltd 2016
Scratch for Arduino - analog output on Arduino (LED)
digital = ON or OFF, 1 or 0
analog = a RANGE of values
LED with resistor on D9
for Arduino analog out = 0 to 255
0 = no power
255 = full power
Cassiopeia Ltd 2016
Scratch for Arduino - analog output on Arduino (servo)
analog = a RANGE of values
SERVO on D8 (orange)
5V (red) and GND (brown)
position from 0 to 180 degrees
Cassiopeia Ltd 2016
Scratch for Arduino - Monkey Catcher
● monkey is hiding
○ when motion detected, monkey appears on the screen
○ switch LED on
○ monkey says hello
■ change monkey’s colour with LDR sensor
■ change monkey’s size with potentiometer
■ push button to let the monkey go and hide again
○ monkey says bye
○ switch LED off
○ back to start
Cassiopeia Ltd 2016
S4A- Monkey Catcher
● PIR motion on D2
with 5V and GND
● button on D3 (with pull-down
resistor)
● LED + resistor on D10
● LDR + resistor on A0
● potentiometer on A1
start
loop
Cassiopeia Ltd 2016
Infrared LED and infrared detector
Infrared LED = emitter (white colour, L1) as with all LED’s, long leg = positive
Infrared detector (black colour, T1) ATTENTION: long leg goes to negative!
220Ω
10kΩ
5V
A0white
black
Cassiopeia Ltd 2016
Infrared detector = voltage divider
220Ω
10kΩ
5V
A0
5V
GND = 0V
0 to 5V analog input 0 to 1023
1023
0
white
black
Cassiopeia Ltd 2016
S4A - analog input to Arduino (IR emitter + detector)
0-5V signal between detector and resistor
to AO
220Ω
10kΩ
5V
A0
white
black
Cassiopeia Ltd 2016
S4A - analog input to Arduino (IR emitter + detector)
ball bounces around
when IR is blocked,
the ball stops and
drum is played
Cassiopeia Ltd 2016
S4A - analog input to Arduino (IR distance)
IR distance sensor
ball moves according to
IR reflection
Cassiopeia Ltd 2016
S4A - analog input to Arduino (IR distance game)
ball moves horizontally
according to IR reflection,
avoid the bee!
keep ball code
add sprite for bee
Cassiopeia Ltd 2016
S4A - pong game: overview
use potentiometer to control the
paddle position
ball bounces around
points increase with each hit
change the speed with a second
potentiometer
start again with button press
Cassiopeia Ltd 2016
S4A - pong game: step 1
connect potentiometer on breadboard:
outside legs to 5V and GND, middle to A0
check changing value
rename the sprite to ‘paddle’
paint a new costume for the paddle
Cassiopeia Ltd 2016
S4A - pong game: step 2
write script for paddle
and test
Cassiopeia Ltd 2016
S4A - pong game: step 3
add a new sprite of arduino type
call it ball
change costume to a ball
write script for ball
move and bounce on edge
if touch paddle, bounce back
Cassiopeia Ltd 2016
S4A - pong game: step 4
edit stage: add red line
add check to ball script
add button on breadboard:
one side 5V
one side D2 and resistor to GND
Cassiopeia Ltd 2016
S4A - pong game: step 5
add variable ‘points’
to count the hits
set points=0 at start
add 1 point when hit
set points=0 when start again
Cassiopeia Ltd 2016
S4A - pong game: step 6
add a potentiometer to control the speed
outside legs to 5V and GND, inside A1
add variable ‘speed’
set speed to analog reading of A1
use this variable the ‘move’
speed can vary from 0 to 20:
A1 (0 to 1023) divided by 50
Cassiopeia Ltd 2016
Mobile phone communication
Cassiopeia Ltd 2016
Mobile phone technology
voice
sound wave
mic
electricity
SIM
radio wave
radio wave electricity
SIM speaker ear
sound wave
phone
phone
micSIM
Cassiopeia Ltd 2016
Arduino phone with SIM800 module
Insert SIM card correctly!
(contacts facing the board)
Green LED = network status
Red LED = call status
Press button to call number 1 or 2
Press any button to hang up
Press any button to pick up a call
Cassiopeia Ltd 2016
Arduino phone with SIM800 module
Cassiopeia Ltd 2016
Radio technology
radio wave electronic
signal
SIM speaker ear
sound wave
phone
Cassiopeia Ltd 2016
Arduino FM radio with SIM800 module
Cassiopeia Ltd 2016
Amplifier: increase amplitude = volume
Multiplicator = GAIN
Cassiopeia Ltd 2016
Audio amplifier
Amplified signal
= louder!
SIM800
speaker
signal
Cassiopeia Ltd 2016
Cassiopeia Ltd 2016
Sound waves: frequency (= pitch)
Frequency unit: HERTZ (Hz) = cycles per second
Cassiopeia Ltd 2016
Sound waves: amplitude (= volume)
Amplitude is the power of the wave = volume
Cassiopeia Ltd 2016
Sound waves: shape (= timbre)
Pure wave: SINE
Only 1 frequency
Other shapes make different sounds
Check http://onlinetonegenerator.com/
Only sine is a pure single frequency sound,
other shapes add frequencies
Cassiopeia Ltd 2016
Sound waves: shape
Pure wave: SINE
Only 1 frequency
Different instruments produce their own wave
shape, also human voices
Same basic note (frequency), but other
frequencies come up too
Cassiopeia Ltd 2016
Sound waves: shape and spectrum
Almost pure SINE wave:
1 strong frequency
Different instruments produce their own wave
shape
Same basic note (frequency), but other
frequencies come up too = ‘harmonics’
SPECTRUM shows us the frequencies
Cassiopeia Ltd 2016
Arduino SPECTRUM Analyser
Microphone with amplifier
RGB LED reacts to different
frequencies: colour depends
on dominant frequency
OLED shows the spectrum
with 6 bars: 400/800/1600/
3000/6000/12000 Hz
Cassiopeia Ltd 2016
Test spectrum analyser
You can find a lot of test frequencies on
Youtube..
Cassiopeia Ltd 2016
Arduino wire loop game
Go from Start to Finish without touching the
wire while the time is counting..
The handle is connected to GND, and the wire
is connected to D7 as input.
Also 2 inputs for Start and Finish.
Cassiopeia Ltd 2016
Arduino wire loop game
Cassiopeia Ltd 2016
DSL laser cutter: how it works
CO2 laser:
Infrared light = invisible!
Cassiopeia Ltd 2016
DSL laser cutter: cutting and engraving
CO2 laser:
Infrared light = invisible!
CUTTING:
a line going through the
material
ENGRAVING:
an image/letters on the
surface
Cassiopeia Ltd 2016
Arduino servo insect
Servo has 3 wires:
● 5V
● GND
● Signal (position)
Cassiopeia Ltd 2016
Arduino servo insect - connections
Servo has 3 wires:
● 5V
● GND
● Signal (position)
Servo signals on D8 and D9
Large capacitor between 5V and GND
Potentiometer to A0: pace=time
Potentiometer to A1: span=max angle
Cassiopeia Ltd 2016
WIFI project: web server
Information is stored on
SERVERS:
● Websites
● Files such as music, video
We use the INTERNET to connect
to the servers
Cassiopeia Ltd 2016
WIFI project: web server
We connect to the INTERNET
over WIFI = wireless
(or by cable = ethernet)
We connect to a Wireless Router
or ACCESS POINT (hotspot)
The router is connected to the
internet via cables
INTERNET (ADSL, fiber optic..)
Cassiopeia Ltd 2016
WIFI project: web server
We create a WIFI ACCESS
POINT
We use a client (laptop, phone,
tablet) to connect to this WIFI
network
We visit webpages stored on the
server
http://esp
Local network only, not connected
to INTERNET
Our project =
WIFI access
point + server
INTERNET
Cassiopeia Ltd 2016
WIFI project: ESP8266 microcontroller
ESP8266-01 (ESP)
vs Arduino UNO
Cassiopeia Ltd 2016
WIFI project:
RGB control
and DHT sensor
Arduino only used for power
supply (3.3V and 5V)
Cassiopeia Ltd 2016
Low power I/O Directly to pin: very low power
Pin + GND
5V power (5V + GND) and data pin(s)
Data pin = very low power
I/O
input/output
Cassiopeia Ltd 2016
High power switching
output
Low power High power
5V DC 220V AC
RELAY
Cassiopeia Ltd 2016
Relay NC COM NO
DC+=5V DC-=GND IN=data
HIGH
power
LOW
power
Cassiopeia Ltd 2016
Relay to switch socket
Cassiopeia Ltd 2016
Motor control with H bridge
DC motor (direct current)
Magnetic power
2 wires
How to change direction?
Cassiopeia Ltd 2016
Motor control with H bridge
Cassiopeia Ltd 2016
Motor control with H bridge: L293D
Motor driver IC
2x H-bridge = 2 motors
2 pins for switches, 1 pin for power control
1 pin for external power
Cassiopeia Ltd 2016
WiFi lantern with Neopixel RGB strip
Cassiopeia Ltd 2016
WiFi lantern: components
5V 3.3V
Cassiopeia Ltd 2016
WiFi lantern: soldering
Cassiopeia Ltd 2016
Auduino 4 step sequencer
Auduino =
an Arduino based synthesizer
A sequencer =
a device to generate a sequence of notes
Cassiopeia Ltd 2016
Auduino 4 step sequencer:
breadboard version
Cassiopeia Ltd 2016
Auduino
4 step
sequencer
in box:
front panel
Cassiopeia Ltd 2016
Auduino 4 step sequencer: PCB soldering
Cassiopeia Ltd 2016
Auduino 4 step sequencer: PCB wiring and amp
Cassiopeia Ltd 2016
Gyroscope and accelerometer sensor
How does a phone know how we
are holding it? (orientation)
● Gyro
● Accelerometer
Cassiopeia Ltd 2016
Sensors in mobile phone
What other sensors does a phone have?
● Gyro
● Accelerometer
● Compass
● GPS
● Barometer
● Fingerprint sensor
● Proximity sensor
● Light sensor
● Thermometer
● Pedometer
● Heart rate monitor
Cassiopeia Ltd 2016
Position: roll, pitch, yaw
Cassiopeia Ltd 2016
Arduino and gyro module
GY-512 (IMU - 6DOF)
Gyroscope + accelerometer
Cassiopeia Ltd 2016
Arduino gyro game
● tilt the sensor to move the ball
around
● do not touch the borders
● try to catch as many squares as
possible within 1 minute

Contenu connexe

Tendances

Tendances (20)

IOTC08 The Arduino Platform
IOTC08 The Arduino PlatformIOTC08 The Arduino Platform
IOTC08 The Arduino Platform
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Apostila arduino
Apostila arduinoApostila arduino
Apostila arduino
 
How to measure frequency and duty cycle using arduino
How to measure frequency and duty cycle using  arduinoHow to measure frequency and duty cycle using  arduino
How to measure frequency and duty cycle using arduino
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
 
Arduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of MoratuwaArduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of Moratuwa
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics lab
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Arduino Introduction by coopermaa
Arduino Introduction by coopermaaArduino Introduction by coopermaa
Arduino Introduction by coopermaa
 
Arduino Programming
Arduino ProgrammingArduino Programming
Arduino Programming
 
Arduino Robotics workshop Day1
Arduino Robotics workshop Day1Arduino Robotics workshop Day1
Arduino Robotics workshop Day1
 
arduino
arduinoarduino
arduino
 
Presentation S4A
Presentation S4A Presentation S4A
Presentation S4A
 
Ardublock tutorial
Ardublock tutorialArdublock tutorial
Ardublock tutorial
 
Getting started with arduino workshop
Getting started with arduino workshopGetting started with arduino workshop
Getting started with arduino workshop
 
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
 
Intro to Hardware Programming with the Arduino Uno
Intro to Hardware Programming with the Arduino UnoIntro to Hardware Programming with the Arduino Uno
Intro to Hardware Programming with the Arduino Uno
 
Advanced view of atmega microcontroller projects list 1649 at mega32 avr
Advanced view of atmega microcontroller projects list 1649  at mega32 avrAdvanced view of atmega microcontroller projects list 1649  at mega32 avr
Advanced view of atmega microcontroller projects list 1649 at mega32 avr
 

Similaire à DSL Junior Makers - electronics workshop

Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 
Electronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdfElectronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdf
vikknaguem
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
DIPAN GHOSH
 

Similaire à DSL Junior Makers - electronics workshop (20)

POWERPOINT PRESENTATION ABOUT THE PARTS OF ARDUINO UNO
POWERPOINT PRESENTATION ABOUT THE PARTS OF ARDUINO UNOPOWERPOINT PRESENTATION ABOUT THE PARTS OF ARDUINO UNO
POWERPOINT PRESENTATION ABOUT THE PARTS OF ARDUINO UNO
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
Smart home arduino
Smart home   arduinoSmart home   arduino
Smart home arduino
 
Electronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdfElectronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdf
 
Simply arduino
Simply arduinoSimply arduino
Simply arduino
 
Smart Safety Door based on Arduino Uno R3
Smart Safety Door based on Arduino Uno R3Smart Safety Door based on Arduino Uno R3
Smart Safety Door based on Arduino Uno R3
 
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors B...
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors  B...Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors  B...
Smart Safety Door with Servo Motors as Actuators, Passcode and DHT Sensors B...
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3
 
Smart Blind stick by using arduino uno and sensor
 Smart Blind stick  by using arduino  uno  and sensor Smart Blind stick  by using arduino  uno  and sensor
Smart Blind stick by using arduino uno and sensor
 
Arduino UNO R3 Projects - Robomart
Arduino UNO R3 Projects - RobomartArduino UNO R3 Projects - Robomart
Arduino UNO R3 Projects - Robomart
 
Arduino
ArduinoArduino
Arduino
 
Session3
Session3Session3
Session3
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
 
Build cool stuff with arduino for sci camp 16 dec13
Build cool stuff with arduino for sci camp 16 dec13Build cool stuff with arduino for sci camp 16 dec13
Build cool stuff with arduino for sci camp 16 dec13
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
 
Arduino projects & tutorials
Arduino projects & tutorialsArduino projects & tutorials
Arduino projects & tutorials
 
arduino uno
arduino unoarduino uno
arduino uno
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
iTronics - Tech Session - Genuino Day 2016
iTronics - Tech Session - Genuino Day 2016iTronics - Tech Session - Genuino Day 2016
iTronics - Tech Session - Genuino Day 2016
 
How to make an interactive light display that showts how a robot is feeling
How to make an interactive light display that showts how a robot is feelingHow to make an interactive light display that showts how a robot is feeling
How to make an interactive light display that showts how a robot is feeling
 

Dernier

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Dernier (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

DSL Junior Makers - electronics workshop

  • 1. Cassiopeia Ltd 2016 Electronics workshop Junior Makers at DimSumLabs 2015-2016
  • 2. Cassiopeia Ltd 2016 Robots! smart and interactive machines: input and output inputs = sensors ● button, switch ● light sensor ● distance sensor ● microphone ● keyboard, mouse ● ... outputs ● lights, screens ● sound ● motors ● ...
  • 3. Cassiopeia Ltd 2016 Arduino = brain inputs outputs
  • 4. Cassiopeia Ltd 2016 Electricity = flow red = positive (+) black = negative (-) = ground
  • 6. Cassiopeia Ltd 2016 LED = light emitting diode
  • 7. Cassiopeia Ltd 2016 Push button with LED
  • 8. Cassiopeia Ltd 2016 7 segment display
  • 9. Cassiopeia Ltd 2016 hit minus game ● connect the 2 LEDs and resistors ● connect the potentiometer ● connect the buzzer ● connect the button ● connect the 7 segment display power from a USB powerbank or put your battery wires into the breadboard
  • 10. Cassiopeia Ltd 2016 hit minus game D4 means digital pin 4 on Arduino A0 means analog input 0 on Arduino GND is ground = 0V
  • 11. Cassiopeia Ltd 2016 RGB colours mixing paint subtractive colours mixing light additive colours
  • 16. Cassiopeia Ltd 2016 Speed of sound Speed of sound = 343 meter per second (m/s) through air Speed of light = 300,000,000 m/s 1 million times faster than sound
  • 17. Cassiopeia Ltd 2016 Ultrasound distance sensor ● send out ultrasound pulse 40,000 Hertz ● measure time it takes for reflection to arrive back (echo) ● calculate distance from this time measurement (speed of sound)
  • 18. Cassiopeia Ltd 2016 OLED screen each pixel = LED 128 x 64 pixels fragile! colour screen = each pixel is 3 LEDs (RGB)
  • 19. Cassiopeia Ltd 2016 servo slow strong motor to move things: ● open/close ● left/right ● half a circle (0->180 degrees)
  • 20. Cassiopeia Ltd 2016 simple robot: ultrasound distance and servo
  • 21. Cassiopeia Ltd 2016 potentiometer = variable resistor create analog value: between 0 and 5V 3 legs: 0 and 5V on outside legs variable voltage on middle leg
  • 22. Cassiopeia Ltd 2016 joystick = 2 potentiometers joystick is 2 potentiometers on 1 stick: horizontal and vertical, x and y 2 variable voltages, VRx and VRy
  • 24. Cassiopeia Ltd 2016 colours are waves, heat is also waves
  • 25. Cassiopeia Ltd 2016 every object is a source of (mostly invisible) heat radiation special camera thermal imaging
  • 26. Cassiopeia Ltd 2016 Infrared motion sensor (PIR) ● looking for infrared waves = heat ● needs a few seconds to ‘warm up’ ● when it detects a change in infrared radiation > signal ON
  • 27. Cassiopeia Ltd 2016 Infrared motion sensor (PIR) simple test with battery, LED and resistor
  • 28. Cassiopeia Ltd 2016 Santa Catcher PIR motion sensor servo to open the window 2 blinking LEDs RGB LED inside buzzer tune
  • 30. Cassiopeia Ltd 2016 Long distance communication radio c 1900 on/off switch
  • 31. Cassiopeia Ltd 2016 Long distance communication - Morse code
  • 32. Cassiopeia Ltd 2016 Radio module nRF24 = 2.4GHz transceiver T = transmit R = receive Crystal Antenna
  • 33. Cassiopeia Ltd 2016 Aviation navigation with Morse radio beacons Radio towers at known locations send out Morse signals Non-Directional Beacons (NDB) 190-1750 kHz
  • 34. Cassiopeia Ltd 2016 Morse decoder with radio Connect the 7 wires on the radio to the Arduino Be careful to use 3.3V, not 5V! R= receive T = transmit
  • 35. Cassiopeia Ltd 2016 Scratch for Arduino s4a.cat control the Arduino from Scratch note: special program needs to be uploaded to the Arduino to make this work
  • 36. Cassiopeia Ltd 2016 Scratch for Arduino - blink (digital output) LED and resistor connected to GND and D10
  • 37. Cassiopeia Ltd 2016 Scratch for Arduino - traffic light 3x LED and resistor red: D10 yellow: D11 green: D12 now try this:
  • 38. Cassiopeia Ltd 2016 Scratch for Arduino - joystick plotter POSITION = joystick: 5V, GND, A0, A1 PEN SIZE & COLOUR = 2x potentiometer: 5V, GND, middle: A2 and A3 CLEAR = button: 5V and D2
  • 39. Cassiopeia Ltd 2016 Scratch for Arduino - joystick plotter POSITION = joystick: 5V, GND, A0, A1 PEN SIZE & COLOUR = 2x potentiometer: 5V, GND, middle: A2 and A3 CLEAR = button: 5V and D2 with pull-down resistor
  • 40. Cassiopeia Ltd 2016 Scratch for Arduino - joystick position (analog input) POSITION = joystick: 5V, GND, A0, A1 Arduino analog range (blue) 0 to 1023 Scratch screen range: X = -250 to 250 Y = -200 to 200 Y X
  • 41. Cassiopeia Ltd 2016 Scratch for Arduino - analog ranges Arduino analog signal: always 0 to 1023 Scratch screen: X = -250 to 250 (analog / 2) - 250 Y = -200 to 200 (analog / 3) - 170 Pen colour: 0 to 200 analog / 5 Pen size: 0 to 255 analog / 4 (but divide by 20 otherwise too thick)
  • 42. Cassiopeia Ltd 2016 Scratch for Arduino - digital input to Arduino (motion) digital = ON or OFF 1 or 0 true or false PIR motion sensor on D2 5V and GND LED with resistor on D10
  • 43. Cassiopeia Ltd 2016 Scratch for Arduino - digital input to Arduino (button) button for D3 and 5V ON or OFF, true or false connect D3 also to resistor to GND otherwise we cannot be sure what happens when button is not pressed = PULL DOWN RESISTOR
  • 44. Cassiopeia Ltd 2016 Scratch for Arduino - analog output on Arduino (LED) digital = ON or OFF, 1 or 0 analog = a RANGE of values LED with resistor on D9 for Arduino analog out = 0 to 255 0 = no power 255 = full power
  • 45. Cassiopeia Ltd 2016 Scratch for Arduino - analog output on Arduino (servo) analog = a RANGE of values SERVO on D8 (orange) 5V (red) and GND (brown) position from 0 to 180 degrees
  • 46. Cassiopeia Ltd 2016 Scratch for Arduino - Monkey Catcher ● monkey is hiding ○ when motion detected, monkey appears on the screen ○ switch LED on ○ monkey says hello ■ change monkey’s colour with LDR sensor ■ change monkey’s size with potentiometer ■ push button to let the monkey go and hide again ○ monkey says bye ○ switch LED off ○ back to start
  • 47. Cassiopeia Ltd 2016 S4A- Monkey Catcher ● PIR motion on D2 with 5V and GND ● button on D3 (with pull-down resistor) ● LED + resistor on D10 ● LDR + resistor on A0 ● potentiometer on A1 start loop
  • 48. Cassiopeia Ltd 2016 Infrared LED and infrared detector Infrared LED = emitter (white colour, L1) as with all LED’s, long leg = positive Infrared detector (black colour, T1) ATTENTION: long leg goes to negative! 220Ω 10kΩ 5V A0white black
  • 49. Cassiopeia Ltd 2016 Infrared detector = voltage divider 220Ω 10kΩ 5V A0 5V GND = 0V 0 to 5V analog input 0 to 1023 1023 0 white black
  • 50. Cassiopeia Ltd 2016 S4A - analog input to Arduino (IR emitter + detector) 0-5V signal between detector and resistor to AO 220Ω 10kΩ 5V A0 white black
  • 51. Cassiopeia Ltd 2016 S4A - analog input to Arduino (IR emitter + detector) ball bounces around when IR is blocked, the ball stops and drum is played
  • 52. Cassiopeia Ltd 2016 S4A - analog input to Arduino (IR distance) IR distance sensor ball moves according to IR reflection
  • 53. Cassiopeia Ltd 2016 S4A - analog input to Arduino (IR distance game) ball moves horizontally according to IR reflection, avoid the bee! keep ball code add sprite for bee
  • 54. Cassiopeia Ltd 2016 S4A - pong game: overview use potentiometer to control the paddle position ball bounces around points increase with each hit change the speed with a second potentiometer start again with button press
  • 55. Cassiopeia Ltd 2016 S4A - pong game: step 1 connect potentiometer on breadboard: outside legs to 5V and GND, middle to A0 check changing value rename the sprite to ‘paddle’ paint a new costume for the paddle
  • 56. Cassiopeia Ltd 2016 S4A - pong game: step 2 write script for paddle and test
  • 57. Cassiopeia Ltd 2016 S4A - pong game: step 3 add a new sprite of arduino type call it ball change costume to a ball write script for ball move and bounce on edge if touch paddle, bounce back
  • 58. Cassiopeia Ltd 2016 S4A - pong game: step 4 edit stage: add red line add check to ball script add button on breadboard: one side 5V one side D2 and resistor to GND
  • 59. Cassiopeia Ltd 2016 S4A - pong game: step 5 add variable ‘points’ to count the hits set points=0 at start add 1 point when hit set points=0 when start again
  • 60. Cassiopeia Ltd 2016 S4A - pong game: step 6 add a potentiometer to control the speed outside legs to 5V and GND, inside A1 add variable ‘speed’ set speed to analog reading of A1 use this variable the ‘move’ speed can vary from 0 to 20: A1 (0 to 1023) divided by 50
  • 61. Cassiopeia Ltd 2016 Mobile phone communication
  • 62. Cassiopeia Ltd 2016 Mobile phone technology voice sound wave mic electricity SIM radio wave radio wave electricity SIM speaker ear sound wave phone phone micSIM
  • 63. Cassiopeia Ltd 2016 Arduino phone with SIM800 module Insert SIM card correctly! (contacts facing the board) Green LED = network status Red LED = call status Press button to call number 1 or 2 Press any button to hang up Press any button to pick up a call
  • 64. Cassiopeia Ltd 2016 Arduino phone with SIM800 module
  • 65. Cassiopeia Ltd 2016 Radio technology radio wave electronic signal SIM speaker ear sound wave phone
  • 66. Cassiopeia Ltd 2016 Arduino FM radio with SIM800 module
  • 67. Cassiopeia Ltd 2016 Amplifier: increase amplitude = volume Multiplicator = GAIN
  • 68. Cassiopeia Ltd 2016 Audio amplifier Amplified signal = louder! SIM800 speaker signal
  • 70. Cassiopeia Ltd 2016 Sound waves: frequency (= pitch) Frequency unit: HERTZ (Hz) = cycles per second
  • 71. Cassiopeia Ltd 2016 Sound waves: amplitude (= volume) Amplitude is the power of the wave = volume
  • 72. Cassiopeia Ltd 2016 Sound waves: shape (= timbre) Pure wave: SINE Only 1 frequency Other shapes make different sounds Check http://onlinetonegenerator.com/ Only sine is a pure single frequency sound, other shapes add frequencies
  • 73. Cassiopeia Ltd 2016 Sound waves: shape Pure wave: SINE Only 1 frequency Different instruments produce their own wave shape, also human voices Same basic note (frequency), but other frequencies come up too
  • 74. Cassiopeia Ltd 2016 Sound waves: shape and spectrum Almost pure SINE wave: 1 strong frequency Different instruments produce their own wave shape Same basic note (frequency), but other frequencies come up too = ‘harmonics’ SPECTRUM shows us the frequencies
  • 75. Cassiopeia Ltd 2016 Arduino SPECTRUM Analyser Microphone with amplifier RGB LED reacts to different frequencies: colour depends on dominant frequency OLED shows the spectrum with 6 bars: 400/800/1600/ 3000/6000/12000 Hz
  • 76. Cassiopeia Ltd 2016 Test spectrum analyser You can find a lot of test frequencies on Youtube..
  • 77. Cassiopeia Ltd 2016 Arduino wire loop game Go from Start to Finish without touching the wire while the time is counting.. The handle is connected to GND, and the wire is connected to D7 as input. Also 2 inputs for Start and Finish.
  • 78. Cassiopeia Ltd 2016 Arduino wire loop game
  • 79. Cassiopeia Ltd 2016 DSL laser cutter: how it works CO2 laser: Infrared light = invisible!
  • 80. Cassiopeia Ltd 2016 DSL laser cutter: cutting and engraving CO2 laser: Infrared light = invisible! CUTTING: a line going through the material ENGRAVING: an image/letters on the surface
  • 81. Cassiopeia Ltd 2016 Arduino servo insect Servo has 3 wires: ● 5V ● GND ● Signal (position)
  • 82. Cassiopeia Ltd 2016 Arduino servo insect - connections Servo has 3 wires: ● 5V ● GND ● Signal (position) Servo signals on D8 and D9 Large capacitor between 5V and GND Potentiometer to A0: pace=time Potentiometer to A1: span=max angle
  • 83. Cassiopeia Ltd 2016 WIFI project: web server Information is stored on SERVERS: ● Websites ● Files such as music, video We use the INTERNET to connect to the servers
  • 84. Cassiopeia Ltd 2016 WIFI project: web server We connect to the INTERNET over WIFI = wireless (or by cable = ethernet) We connect to a Wireless Router or ACCESS POINT (hotspot) The router is connected to the internet via cables INTERNET (ADSL, fiber optic..)
  • 85. Cassiopeia Ltd 2016 WIFI project: web server We create a WIFI ACCESS POINT We use a client (laptop, phone, tablet) to connect to this WIFI network We visit webpages stored on the server http://esp Local network only, not connected to INTERNET Our project = WIFI access point + server INTERNET
  • 86. Cassiopeia Ltd 2016 WIFI project: ESP8266 microcontroller ESP8266-01 (ESP) vs Arduino UNO
  • 87. Cassiopeia Ltd 2016 WIFI project: RGB control and DHT sensor Arduino only used for power supply (3.3V and 5V)
  • 88. Cassiopeia Ltd 2016 Low power I/O Directly to pin: very low power Pin + GND 5V power (5V + GND) and data pin(s) Data pin = very low power I/O input/output
  • 89. Cassiopeia Ltd 2016 High power switching output Low power High power 5V DC 220V AC RELAY
  • 90. Cassiopeia Ltd 2016 Relay NC COM NO DC+=5V DC-=GND IN=data HIGH power LOW power
  • 91. Cassiopeia Ltd 2016 Relay to switch socket
  • 92. Cassiopeia Ltd 2016 Motor control with H bridge DC motor (direct current) Magnetic power 2 wires How to change direction?
  • 93. Cassiopeia Ltd 2016 Motor control with H bridge
  • 94. Cassiopeia Ltd 2016 Motor control with H bridge: L293D Motor driver IC 2x H-bridge = 2 motors 2 pins for switches, 1 pin for power control 1 pin for external power
  • 95. Cassiopeia Ltd 2016 WiFi lantern with Neopixel RGB strip
  • 96. Cassiopeia Ltd 2016 WiFi lantern: components 5V 3.3V
  • 97. Cassiopeia Ltd 2016 WiFi lantern: soldering
  • 98. Cassiopeia Ltd 2016 Auduino 4 step sequencer Auduino = an Arduino based synthesizer A sequencer = a device to generate a sequence of notes
  • 99. Cassiopeia Ltd 2016 Auduino 4 step sequencer: breadboard version
  • 100. Cassiopeia Ltd 2016 Auduino 4 step sequencer in box: front panel
  • 101. Cassiopeia Ltd 2016 Auduino 4 step sequencer: PCB soldering
  • 102. Cassiopeia Ltd 2016 Auduino 4 step sequencer: PCB wiring and amp
  • 103. Cassiopeia Ltd 2016 Gyroscope and accelerometer sensor How does a phone know how we are holding it? (orientation) ● Gyro ● Accelerometer
  • 104. Cassiopeia Ltd 2016 Sensors in mobile phone What other sensors does a phone have? ● Gyro ● Accelerometer ● Compass ● GPS ● Barometer ● Fingerprint sensor ● Proximity sensor ● Light sensor ● Thermometer ● Pedometer ● Heart rate monitor
  • 105. Cassiopeia Ltd 2016 Position: roll, pitch, yaw
  • 106. Cassiopeia Ltd 2016 Arduino and gyro module GY-512 (IMU - 6DOF) Gyroscope + accelerometer
  • 107. Cassiopeia Ltd 2016 Arduino gyro game ● tilt the sensor to move the ball around ● do not touch the borders ● try to catch as many squares as possible within 1 minute