Automatic Street Light System
HCI Architecture & System Documentation
This project optimizes infrastructure energy consumption through responsive ambient environment sensory scanning. Using an analog Light Dependent Resistor (LDR) sensor grid, real-time light thresholds automatically determine high-efficiency power output to the street lighting arrays while routing critical metrics to a centralized 16x2 I2C LCD character visualization module.
Procure the following components to execute the core prototyping phase layout configurations:
| Target Component Label | Structural Allocation Quantity | Functional Deployment Purpose |
|---|---|---|
| Arduino UNO R3 Processing Core | 1 Unit | Central processing execution loop matrix. |
| LDR Sensor Transducer Module | 1 Unit | Real-time light intensity observation. |
| High-Efficiency LED Array | 1 Unit | Simulated smart municipal light element. |
| 220Ω Current Limiting Resistor | 1 Unit | Protective LED inline current barrier. |
| 16x2 Character I2C LCD Display | 1 Unit | HCI visualization terminal for metrics tracking. |
| Solderless Prototyping Breadboard | 1 Unit | Temporary component interface matrix platform. |
Wire the physical subsystem communication buses in accordance with the following structured bus reference maps:
| Sensor Transducer Node Pin | Arduino Host Mapping Node Pin |
|---|---|
| VCC (+5V Power Rail) | 5V Power Output Bus Pin |
| GND (Ground Return Plane) | GND Common Ground Pin Reference |
| AO (Analog Signal Output Bus) | A0 Analog Input Intercept Node |
| Character Display I2C Board Node | Arduino Master Mapping Pin Interface |
|---|---|
| VCC (Module Power) | 5V Shared Positive Voltage Rail |
| GND (Module Ground) | GND Shared Reference Ground Plane |
| SDA (I2C Serial Data Line) | A4 Hardware Dedicated Communication Node |
| SCL (I2C Serial Clock Line) | A5 Hardware Dedicated Communication Node |
Route the physical Anode (+) lead pin structural channel into Arduino digital node pin D9 through an inline protective 220Ω resistor. Wire the remaining Cathode (-) structural return path directly back into the GND Common Ground terminal node.
Copy and integrate this production-ready code directly into your local desktop Arduino IDE environment:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Initialize character I2C interface address matrix channel profile
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int ldrPin = A0; // Signal interface line capture channel map
const int ledPin = 9; // Output system actuation driver route channel
int ldrValue = 0; // Register placeholder to collect execution metrics
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Setup physical system serial debug stream loop
// Initialize display window matrix layers
lcd.init();
lcd.backlight();
// Output responsive HCI splash panel confirmation array
lcd.setCursor(0, 0);
lcd.print("Street Light");
lcd.setCursor(0, 1);
lcd.print("System Ready");
delay(2000);
lcd.clear();
}
void loop() {
// Capture instantaneous telemetry dataset profile
ldrValue = analogRead(ldrPin);
// Push telemetry tracking dataset down the active console pipe
Serial.print("LDR Value: ");
Serial.println(ldrValue);
// Dynamic panel refresh cycle to eliminate character ghosting
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("LDR:");
lcd.print(ldrValue);
lcd.setCursor(0, 1);
// Threshold comparator decision matrix logic block
if (ldrValue > 500) {
digitalWrite(ledPin, HIGH); // Activate lighting load
lcd.print("Light: ON ");
}
else {
digitalWrite(ledPin, LOW); // Disable lighting load
lcd.print("Light: OFF");
}
delay(500); // 500ms stabilization interval between scan cycles
}
if (ldrValue > 500) value conditional barrier limit setting to tweak system light sensitivity to match structural expectations.
0 Comments