Video summary

Módulo 1: Arduinos e Sensores

Main summary

Key takeaways

Educational

Main ideas and lessons

  • Course kickoff + maker mindset

    • The instructor (Yor Estev Sacano Ferreira) welcomes viewers to the “Arduino e Sensores” course/module and encourages participation in the maker community.
    • The focus is practical motivation: using electronics and 3D printing to build real devices (example: a 3D-printed cup holder used on his own machine).
    • Emphasizes learning for life, not memorization.
  • What an Arduino is and why it matters

    • An Arduino is a microcontroller (a mini-computer) used in automation and robotics/home automation.
    • Example board mentioned: Arduino Mega.
    • Arduino uses pins to connect and control electronics.
    • The maker workflow integrates Arduino + sensors + 3D-printed enclosures.
  • “Shield” concept (expansion boards)

    • A shield plugs into the Arduino pins and provides pre-wired electronics for specific project types.
    • Benefits: saves space, time, and materials.
    • Mentions module vs. shield integration and gives ESP8266 as an example (including the idea of an ESP shield).
  • Tinkercad as the development/simulation environment

    • Tinkercad is used to create circuits and run simulations.
    • Encourages meaningful project naming (e.g., “maker course module 1”).
  • Arduino I/O fundamentals

    • Power pins: examples include 3.3V, 5V, GND.
    • Vin: described as an input concept (voltage entering the system).
    • Digital vs Analog
      • Digital: binary values (0/1) for on/off-like behavior.
      • Analog: sensor readings that produce numeric ranges.
    • PWM
      • A special output type using a range 0 to 255, often used for motor control/speed.
    • Serial communication ports
      • RX/TX are for data transmission/reception between devices—not typical sensor input signals.
  • Building a first LED project

    • Components:
      • an LED (any color)
      • a resistor to prevent burnout by limiting voltage/current
    • LED polarity (conceptual):
      • anode (positive) and cathode (negative)
    • Simulation behavior:
      • Turning the LED on/off correctly
      • What happens without a resistor (overcurrent leads to burning in simulation)
    • Basic programming flow:
      • beginning” and “forever” (loop concept)
      • “Hello World” in the Serial Monitor as a programming ritual
  • Timing and blinking

    • Without delays, toggling is too fast because the loop runs quickly, causing flickering.
    • Correct approach for blinking:
      • set HIGH → wait → set LOW → wait
  • Multi-LED logic + traffic light challenge

    • Build a traffic light using LEDs connected to different pins:
      • red, yellow, green
    • Timing rules:
      • 5 seconds red
      • 3 seconds green
      • 2 seconds yellow
    • Logic ensures only one LED is HIGH during each phase while others are forced LOW.
  • Sensor integration: soil moisture sensor

    • Add a soil moisture sensor and connect:
      • VCC (positive supply)
      • GND (ground)
      • signal to an analog input
    • Safety warnings:
      • Don’t assume VCC is always 5V—it may vary by sensor.
      • Avoid reversing pins (sensor can be burned).
    • Reading ranges (as observed in simulation):
      • discussed as within a range up to about 0 to ~876
    • Threshold logic using if / else if:
      • If humidity ≥ 800green LED ON
      • Else if humidity < 300red LED ON
      • Else → yellow LED ON
    • Demonstration:
      • “watering” (changing sensor value) and observing LED transitions.
  • Adding an interface: I2C LCD display

    • Add an I2C 16x2 LCD to display readings.
    • I2C wiring concept:
      • SDA and SCL, plus VCC and GND
    • LCD workflow:
      • initialize/configure LCD
      • print text (including “Hello World” as baseline)
      • use clear screen behavior to prevent overlapping text
    • Display:
      • show humidity value as sensor changes.
  • Mapping sensor values to percentages (“rule of three”)

    • Use a map operation to convert sensor readings to 0–100%.
    • Known issue:
      • observed sensor max (~876) vs expected mapping range (mentioned input range like 0–1023), so percentages may not perfectly match yet.
    • Plan to correct later.
  • User interface improvement: cursor positioning

    • Move the LCD cursor to:
      • e.g., column 0 row 0 and column 0 row 1
    • Use it to print:
      • a label like “Mini watering can”
      • humidity percentage on the second line.
  • Automation upgrade: servo motor as an irrigation valve

    • Add a servo to act like a plumbing valve.
    • Control approach:
      • based on humidity thresholds, rotate the servo to open/close
      • example: if in red zone (e.g., < 300), rotate to (open valve), then close after the watering logic/timing completes (shown in simulation)
    • End result:
      • LEDs + LCD monitoring + servo-based irrigation working together.
  • Final explanation of the “raw code” structure

    • The simplified blocks correspond to C++-style logic.
    • Libraries:
      • Arduino uses libraries for components
      • LiquidCrystal for the LCD
      • Servo for the servo motor (noting library considerations for ESP32 vs standard servo due to voltage differences)
    • Key Arduino elements mentioned:
      • #include (libraries)
      • variables/objects for LCD and servo
      • pinMode for input/output setup
      • Serial.begin(...) for Serial Monitor speed
      • output control using digitalWrite (HIGH/LOW)
      • timing using delay(milliseconds) inside the repeating forever loop.
  • Preview of next module

    • Next classes cover IoT concepts and platforms like ESP8266 and ESP32.
    • Mentions tutoring availability and a poll about tutoring timing.

Methodology / step-by-step instructions presented

A) Set up Tinkercad project and circuit

  1. Open Tinkercad.
  2. Create a new project:
    • Click Create (top-right).
  3. Choose an Arduino board (Arduino Uno used in the example).
  4. Name the project meaningfully (e.g., “maker course module 1”).
  5. Use simulation controls:
    • Start simulation
    • Stop simulation

B) Build the first LED circuit safely

  1. Add:
    • Arduino pin connection plan
    • LED (any color)
    • resistor in series with the LED
  2. Wire it:
    • LED anode → Arduino digital output (via proper connection)
    • LED cathode → GND
  3. Run the simulation and confirm LED on/off.
  4. Do not connect the LED directly without a resistor (simulation shows overcurrent burning).

C) Write first program concepts: Hello World + loop model

  1. Use Tinkercad blocks:
    • setup/beginning block (runs once)
    • forever block (repeats continuously)
  2. Print to Serial Monitor:
    • “Hello World” with a new line
  3. Start simulation and verify “Hello World” appears.

D) Implement blinking with timing (avoiding too-fast toggling)

  1. In the loop:
    • set LED HIGH
    • wait (e.g., 1 second)
    • set LED LOW
    • wait (e.g., 1 second)
  2. Result: visible blinking instead of flicker.

E) Traffic light logic (multi-LED timed sequence)

  1. Add three LEDs (red/yellow/green) and at least one resistor (reused/copied).
  2. Assign pins:
    • red → one digital pin
    • green → another digital pin
    • yellow → another digital pin
  3. Loop phases:
    • Phase 1 (red): red HIGH, green LOW, yellow LOW → wait 5 seconds
    • Phase 2 (green): green HIGH, others LOW → wait 3 seconds
    • Phase 3 (yellow): yellow HIGH, others LOW → wait 2 seconds

F) Add and use soil moisture sensor (analog input)

  1. Place a soil moisture sensor component.
  2. Connect pins:
    • VCC → appropriate supply (often 5V mentioned, but varies by sensor)
    • GND → ground
    • Signal → analog input A0
  3. Create variables (e.g., humiditySensor = 0).
  4. Read analog values from A0.
  5. Use threshold logic:
    • If humidity ≥ 800 → green LED HIGH
    • Else if humidity < 300 → red LED HIGH
    • Else → yellow LED HIGH
  6. Test by changing wet/dry in simulation and observing LED transitions.

G) Add I2C LCD (interface display)

  1. Place an I2C 16x2 LCD component.
  2. Connect I2C lines:
    • SDA → SDA
    • SCL → SCL
    • plus VCC and GND
  3. Initialize LCD in code blocks (LCD type/address options depend on the tool’s variant).
  4. Print:
    • start with a baseline “Hello World”
    • then sensor-derived values repeatedly
  5. Avoid overlap:
    • use LCD clear after delays (e.g., ~every 2 seconds).
  6. Display humidity values on screen.

H) Map sensor reading to a percentage (rule of three)

  1. Use a map block:
    • input range (e.g., 0–1023 mentioned)
    • output range 0–100%
  2. Print percentage instead of raw values.
  3. Note:
    • if the observed sensor max differs, the mapped percentage may be off (to be corrected later).

I) Improve LCD formatting with cursor position

  1. Set cursor position:
    • column 0, row 0
    • then column 0, row 1 for the second line
  2. Print:
    • a label line (e.g., “Mini watering can”)
    • humidity percentage underneath

J) Automate irrigation using a servo valve

  1. Add a servo motor.
  2. Connect:
    • GND → ground
    • VCC → servo 5V (stated)
    • servo signal/control → a digital pin (example uses pin 2 after correction)
  3. Define servo behavior:
    • if humidity indicates the red zone (e.g., < 300) → rotate to open (e.g., )
    • otherwise → keep/close valve according to the project logic
  4. Simulate and verify:
    • watering occurs when the servo opens
    • servo closes based on the logic/timing.

Speakers / sources featured (as stated or implied)

  1. Yor Estev Sacano Ferreira — instructor/host; Federal Institute of Southern Minas Gerais (Campos Machado campus); works in Information Systems.
  2. Marcos — participant feedback (name appears in subtitles).
  3. Orlando — participant thanked (subtitles).
  4. Giovan — participant referenced (subtitles).
  5. Miguel — participant referenced (subtitles).
  6. Unnamed YouTube creator — referenced as a channel owner who built a home hydroponics/micropore-style system using a Raspberry Pi-type setup (not named in subtitles).
  7. Amazon assistant (“Alexa”) reference — mentioned indirectly (via “give a signal” type wording), not as a speaker in the video.

Original video