Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

DSL Junior Makers - electronics workshop

3,183 views

Published on

slides for kids electronics workshops with Arduino, at DimSumLabs Hong Kong

Published in: Education
  • How can I improve my memory book? How can I improve my memory recall? visit to learn...▲▲▲ https://bit.ly/2GEWG9T
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

DSL Junior Makers - electronics workshop

  1. 1. Cassiopeia Ltd 2016 Electronics workshop Junior Makers at DimSumLabs 2015-2016
  2. 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. 3. Cassiopeia Ltd 2016 Arduino = brain inputs outputs
  4. 4. Cassiopeia Ltd 2016 Electricity = flow red = positive (+) black = negative (-) = ground
  5. 5. Cassiopeia Ltd 2016 Breadboard = connections
  6. 6. Cassiopeia Ltd 2016 LED = light emitting diode
  7. 7. Cassiopeia Ltd 2016 Push button with LED
  8. 8. Cassiopeia Ltd 2016 7 segment display
  9. 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. 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. 11. Cassiopeia Ltd 2016 RGB colours mixing paint subtractive colours mixing light additive colours
  12. 12. Cassiopeia Ltd 2016 colours are waves
  13. 13. Cassiopeia Ltd 2016 colours of the sun
  14. 14. Cassiopeia Ltd 2016 RGB colour LED
  15. 15. Cassiopeia Ltd 2016 Sound waves
  16. 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. 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. 18. Cassiopeia Ltd 2016 OLED screen each pixel = LED 128 x 64 pixels fragile! colour screen = each pixel is 3 LEDs (RGB)
  19. 19. Cassiopeia Ltd 2016 servo slow strong motor to move things: ● open/close ● left/right ● half a circle (0->180 degrees)
  20. 20. Cassiopeia Ltd 2016 simple robot: ultrasound distance and servo
  21. 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. 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
  23. 23. Cassiopeia Ltd 2016 pong game 1972!
  24. 24. Cassiopeia Ltd 2016 colours are waves, heat is also waves
  25. 25. Cassiopeia Ltd 2016 every object is a source of (mostly invisible) heat radiation special camera thermal imaging
  26. 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. 27. Cassiopeia Ltd 2016 Infrared motion sensor (PIR) simple test with battery, LED and resistor
  28. 28. Cassiopeia Ltd 2016 Santa Catcher PIR motion sensor servo to open the window 2 blinking LEDs RGB LED inside buzzer tune
  29. 29. Cassiopeia Ltd 2016 Santa Catcher
  30. 30. Cassiopeia Ltd 2016 Long distance communication radio c 1900 on/off switch
  31. 31. Cassiopeia Ltd 2016 Long distance communication - Morse code
  32. 32. Cassiopeia Ltd 2016 Radio module nRF24 = 2.4GHz transceiver T = transmit R = receive Crystal Antenna
  33. 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. 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. 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. 36. Cassiopeia Ltd 2016 Scratch for Arduino - blink (digital output) LED and resistor connected to GND and D10
  37. 37. Cassiopeia Ltd 2016 Scratch for Arduino - traffic light 3x LED and resistor red: D10 yellow: D11 green: D12 now try this:
  38. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 52. Cassiopeia Ltd 2016 S4A - analog input to Arduino (IR distance) IR distance sensor ball moves according to IR reflection
  53. 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. 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. 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. 56. Cassiopeia Ltd 2016 S4A - pong game: step 2 write script for paddle and test
  57. 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. 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. 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. 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. 61. Cassiopeia Ltd 2016 Mobile phone communication
  62. 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. 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. 64. Cassiopeia Ltd 2016 Arduino phone with SIM800 module
  65. 65. Cassiopeia Ltd 2016 Radio technology radio wave electronic signal SIM speaker ear sound wave phone
  66. 66. Cassiopeia Ltd 2016 Arduino FM radio with SIM800 module
  67. 67. Cassiopeia Ltd 2016 Amplifier: increase amplitude = volume Multiplicator = GAIN
  68. 68. Cassiopeia Ltd 2016 Audio amplifier Amplified signal = louder! SIM800 speaker signal
  69. 69. Cassiopeia Ltd 2016
  70. 70. Cassiopeia Ltd 2016 Sound waves: frequency (= pitch) Frequency unit: HERTZ (Hz) = cycles per second
  71. 71. Cassiopeia Ltd 2016 Sound waves: amplitude (= volume) Amplitude is the power of the wave = volume
  72. 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. 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. 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. 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. 76. Cassiopeia Ltd 2016 Test spectrum analyser You can find a lot of test frequencies on Youtube..
  77. 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. 78. Cassiopeia Ltd 2016 Arduino wire loop game
  79. 79. Cassiopeia Ltd 2016 DSL laser cutter: how it works CO2 laser: Infrared light = invisible!
  80. 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. 81. Cassiopeia Ltd 2016 Arduino servo insect Servo has 3 wires: ● 5V ● GND ● Signal (position)
  82. 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. 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. 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. 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. 86. Cassiopeia Ltd 2016 WIFI project: ESP8266 microcontroller ESP8266-01 (ESP) vs Arduino UNO
  87. 87. Cassiopeia Ltd 2016 WIFI project: RGB control and DHT sensor Arduino only used for power supply (3.3V and 5V)
  88. 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. 89. Cassiopeia Ltd 2016 High power switching output Low power High power 5V DC 220V AC RELAY
  90. 90. Cassiopeia Ltd 2016 Relay NC COM NO DC+=5V DC-=GND IN=data HIGH power LOW power
  91. 91. Cassiopeia Ltd 2016 Relay to switch socket
  92. 92. Cassiopeia Ltd 2016 Motor control with H bridge DC motor (direct current) Magnetic power 2 wires How to change direction?
  93. 93. Cassiopeia Ltd 2016 Motor control with H bridge
  94. 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. 95. Cassiopeia Ltd 2016 WiFi lantern with Neopixel RGB strip
  96. 96. Cassiopeia Ltd 2016 WiFi lantern: components 5V 3.3V
  97. 97. Cassiopeia Ltd 2016 WiFi lantern: soldering
  98. 98. Cassiopeia Ltd 2016 Auduino 4 step sequencer Auduino = an Arduino based synthesizer A sequencer = a device to generate a sequence of notes
  99. 99. Cassiopeia Ltd 2016 Auduino 4 step sequencer: breadboard version
  100. 100. Cassiopeia Ltd 2016 Auduino 4 step sequencer in box: front panel
  101. 101. Cassiopeia Ltd 2016 Auduino 4 step sequencer: PCB soldering
  102. 102. Cassiopeia Ltd 2016 Auduino 4 step sequencer: PCB wiring and amp
  103. 103. Cassiopeia Ltd 2016 Gyroscope and accelerometer sensor How does a phone know how we are holding it? (orientation) ● Gyro ● Accelerometer
  104. 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. 105. Cassiopeia Ltd 2016 Position: roll, pitch, yaw
  106. 106. Cassiopeia Ltd 2016 Arduino and gyro module GY-512 (IMU - 6DOF) Gyroscope + accelerometer
  107. 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

×