📝
ArkyEdu TIC
RO Solve Interactive
Grade 8 · Project & Rubric · 30 min · 100p (10p ex officio)

Grade 8 Smart City Project Sheet: Arduino Uno, PIR/HC-SR04/MQ-2 Sensors, Ohm’s Law & `millis()`

Quick Summary & Key Points:

Hands-on Grade 8 IoT rubric (100 pts): Arduino Uno PWM `~` pins (`3,5,6,9,10,11`), 10-bit ADC (`0–1023`), HC-SR04 distance math (`duration * 0.034 / 2`), PIR motion & MQ-2 gas sensing, 220 Ω LED current limiting, and `millis()` multitasking.

Theory Snapshot: Arduino Uno PWM pins (`~`): `3, 5, 6, 9, 10, 11` (`0..255`). Analog inputs `A0–A5` return `0..1023`. HC-SR04 distance: `duration * 0.034 / 2`. Always wire a ~220 Ω resistor in series with LEDs.

Solve & Auto-Grade (1–10)
1. Part I · 1 (18p)

Which Smart City sensor measures distance to an approaching vehicle using high-frequency sound waves?

Answer & Explanation: B) HC-SR04 Ultrasonic Sensor — HC-SR04 fires an ultrasonic pulse on TRIG and measures echo return time on ECHO (`dist = duration * 0.034 / 2`).

2. Part I · 2 (18p)

Why must a resistor (typically 220 Ω – 330 Ω) be wired in series with an LED on an Arduino Uno 5V pin?

Answer & Explanation: A) To limit current via Ohm’s Law (I = V / R) so neither the LED nor the pin burns out — Without a current-limiting resistor, excess current immediately damages the LED and Arduino output driver.

3. Part II · 1 (18p)

On Arduino Uno, `analogRead(A0)` uses a 10-bit ADC. What is the MAXIMUM integer returned by `analogRead` (at 5V)?

Answer & Explanation: 1023 — A 10-bit ADC provides `2^10 = 1024` steps ranging from `0` (0V) to `1023` (5V).

4. Part II · 2 (18p)

True or False: Unlike `delay(5000)`, which freezes the Arduino CPU for 5 seconds, non-blocking `millis()` timing lets gas and gate sensors keep updating concurrently.

Answer & Explanation: A) True — True! `millis()` tracks elapsed milliseconds without stalling `loop()`, critical for real-time IoT alerts.

5. Part III (18p)

An `HC-SR04` echo pulse lasts `1000` microseconds. Using `duration * 0.034 / 2`, what distance in centimeters is measured?

Answer & Explanation: B) 17 cm — `1000 * 0.034 = 34 cm` round-trip; divided by `2` yields `17 cm` one-way distance.

Official 100-Point Grading Rubric (Grade 1–10)

Section Evaluated Competency Points
Part I (2 × 18 pts) HC-SR04 ultrasonic sensing & Ohm’s Law LED protection 36p
Part II (2 × 18 pts) 10-bit ADC range (0–1023) & non-blocking `millis()` 36p
Part III (18 pts) Ultrasonic distance formula (`duration * 0.034 / 2`) 18p
Ex officio Baseline points 10p
TOTAL (Grade = Score / 10) 100p

More Worksheets & Related Links