Date 10/14

Topic: Digital Fabrication 2 (Arduino and other basic components)

Contents

Pre-class

  • Introducing the Breadboard
    • Go to TinkerCAD learn website and find the Breadboard demonstration page
    • Follow the instruction and complete the RGB LED circuit.
    • After completing this circuit, you should see the LED light turned on when you press each of push buttons.
    • If something looks wrong, please double check below.
      • Make sure that you correctly locate the required components with correct directions.
      • The resister used above example was 450 Ω.
      • Check you correctly locate the direction of push buttons. (90 º rotated)
      • Use the rotation button on the top-left corner to place LED and push button.
    • Your pre-class tasks
      • Understand how the circuit of breadboard is designed internally.
      • Why did you use 450 ohm register?

In-class:

    • Ohms’ Law

      1. UNO Elegoo LED Datasheets.
      2. Download (PDF, 1.1MB)

      3. In your pre-class module, you used 450 ohms. Why did  you use 450 ohms?
      4. V = I x R
        • Battery = 9 v
        • Recommended LED current = 0.02A
        • Required resister?
      5. In Arduino circuits
        • Arduino I/O voltage = 5 v
        • LED recommended current = 0.02A
        • Required resister, R = V / I = 5V / 0.02A = 250

 


    • Programming with LED

      1. Build below circuit on TinkerCAD
        • Use 220 ohms resisters
      2. Write program shown below
      3. Change the rate of animation to 0.1 seconds
      4. Change the order of blinking LEDs in Green, Yellow, and RED.

    • Digital Input

      1. Build below circuit using your Arduino (NOT on TinkerCAD).
      2. Required Components
        1. 220 ohms
        2. 10k ohms
        3. LED
        4. push button
      3. Program codes shown below
      4. Run the codes and see what happens when you press the push button.
      5. Your reflections
        1. How can Arduino get input?
        2. Why did the code use digital input?

    • Learning sensor – Photoresistor

      1. Build a physical circuit below
      2. Write the codes on Arduino
      3. Upload and test it
      4. Change the amount of light goes to Photoresistor and see what happens.
      5. Open Serial Monitor on Arduino [Tools] – [Serial Monitor]
      6. Your reflections
        1. In Arduino programming, how can you trace data flow while running it?
        2. How did this example get input signal? Analog? Why?

    • An application of Photoresistor, Light Detector

      1. Built the circuit below by modifying previous circuit.
      2. Write codes below (ignore the commented lines “// this is a comment line”)
      3. Run your Arduino and see what happens
      4. Your reflections
        1. Explain the codes you used.
        2. If you want to change the sensitivity of the photo sensor, what parts of the codes do you need to change?
        3. How can you apply this technique into real-world problem-solving?

Post-Class

  • Weekly Reflection
    • What did you learn?
    • How will you use the concepts you learned?
    • What do you want to learn more?
  • Open portfolio
    • Review your Open Portfolio.
    • Instructor will review and grade your Open Portfolio this Friday.
  • Next week
    • Oct 19th
    • Digital fabrication 3, focused on motors and sensors.
    • Design and build an automatic hand-sanitizer dispenser