Table of Contents

Play Video

ROAD BARRIER GENERATING ELECTRICITY

Road barrier converts vehicle weight into electricity using piezoelectric sensors and Arduino, powering LEDs for energy efficiency.

This project uses a road barrier that generates electricity when vehicles drive over it. It works by using piezoelectric sensors that convert the weight of passing cars into electrical energy. An Arduino controls this process and powers LEDs to indicate when electricity is being generated. It’s a clever way to capture energy from traffic and use it to power lights or other devices, promoting eco-friendly infrastructure.

Components Required

  1. Arduino Board (e.g., Arduino Uno) – 1
  2. Piezoelectric Sensor – 1
  3. LED – 1
  4. Resistor (220Ω) – 1
  5. Connecting Wires– 4-5(M-M)

Connections

  1. Piezoelectric Sensor
    • Positive Terminal: Connect to an analog input pin on the Arduino pin A3.
    • Negative Terminal: Connect to Arduino GND.
  2. Arduino
    • Vin or VCC: Not used since the Arduino is powered via USB or a separate power supply.
    • GND: Connect to the negative terminal of the piezo sensor.
    • Analog Pin A3: Connect to the positive terminal of the piezo sensor.
    • Digital Pin for LED: Connect to the anode of the LED with a in series and then connect the second end of the resistor in the digital pin D0.
  3. LED
    • Anode: Connect to Arduino digital pin D0 through a current-limiting resistor (220Ω).
    • Cathode: Connect to Arduino GND.
const int piezoPin = A3;  // Piezoelectric sensor input pin
const int ledPin = 0;    // LED output pin

int threshold = 50;       // Threshold value to detect vehicle weight
int piezoValue = 0;       // Variable to store piezoelectric sensor value

void setup() {
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  piezoValue = analogRead(piezoPin);  // Read piezoelectric sensor value
  
  if (piezoValue > threshold) {
    digitalWrite(ledPin, HIGH);  // Turn on LED if vehicle weight detected
    delay(1000);  // Simulate energy generation period
    digitalWrite(ledPin, LOW);   // Turn off LED after generating energy
  }
  
  delay(100);  // Delay for stability
}
Scroll to Top