Loading...
Hackathon Spain 2023

A smart enlighted bridge for Sevilla

Project Info

Project Description
In response to the current challenge of an unlit bridge pathway that risks compromising safety and disturbing the natural habitat of the water below, we have embarked on a transformative project. Our objective is to brilliantly illuminate the bridge pathway, while simultaneously minimizing energy consumption, light pollution, and environmental impact. Through this project, we aim to create a safer and more sustainable bridge pathway that harmonizes with the surrounding ecosystem, benefiting the community and the environment alike.

Current State
The pathway on the bringe is unilluminated.

Problem
We are currently grappling with a conflict between our park’s nighttime walkers and the aquatic animals inhabiting the lake. Walkers require adequate lighting for safe navigation, but traditional lighting solutions often disturb the aquatic wildlife. To address this issue, we plan to illuminate the bridge pathway while ensuring that no light spills onto the water, thus preserving the habitat of the aquatic creatures.

Target State
To address the issue of an unlit bridge pathway while preventing light spillage into the water, our target state involves implementing a combination of solutions. We will install specialized lighting systems, like light strips and spotlights, designed to exclusively illuminate the bridge pathway.

Precise lighting control will be a key feature, ensuring that the intensity and direction of the light are adjusted to prevent any spillage. We’ll also integrate technology to change the light color based on temperature, enhancing both safety and aesthetics.

Motion-activated lighting will play a crucial role, with calibrated detectors activating the lights when someone is approaching or using the bridge. This not only enhances safety but also conserves energy and extends bulb life.

Smart brightness control will further reduce energy waste by having lights turn on only in darkness, minimizing light pollution.

To enhance path visibility and safety, reflective strips or suitable materials will be added.

In summary, our target state includes an illuminated, safe bridge pathway, with energy conservation and minimized light pollution, while respecting the natural environment below

Brainstoming

Persona

The 5 W’s

  • Who is affected?
    • Everyone who wants to cross the bridge
      • Teenagers
      • Students
      • Elderly People
      • People interested in nature
      • People taking a walk
      • Small animals living there
  • 9What is the problem?
    • The bridge is not lighted
    • The light affects the nature life
  • When is it a problem?
    • At night, at low lightning, rainy days
  • Why does it matter?
    • People might fall/slip, dont see where they step, can’t enjoy the time on the bridge.
    • The Smalls animals are disturbed
  • Where does it happen?
    • On the way onto the bridge, on the bridge, on the way off the bridge

First To-Do List (Kanban)


First prototype

What do you need

  1. Arduino uno
  2. Wires
  3. DHT11
  4. RGB diode and resistors
  5. Photo resistor and resistor
  6. Motion sensor
  7. Breadboard

Code Prototype RGB Diode

#include <DHT11.h>
#include <DHT.h>
#include <Wire.h>

#define DHTPIN 2 
#define MOTION_SENSOR_PIN 7
#define LIGHT_SENSOR_PIN A1
#define RED_PIN 9
#define GREEN_PIN 10
#define BLUE_PIN 11

DHT dht(DHTPIN, DHT11);
unsigned long lastMotionTime = 0;
int lightDuration = 10000; 

void setup() {

pinMode(MOTION_SENSOR_PIN, INPUT);
pinMode(LIGHT_SENSOR_PIN, INPUT);
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
Serial.begin(9600);
dht.begin();}

void loop() {

float temperature = dht.readTemperature();
float humidity = dht.readHumidity();

int motionValue = digitalRead(MOTION_SENSOR_PIN);

int lightValue = analogRead(LIGHT_SENSOR_PIN);

lightValue = map(lightValue, 0, 1023, 0, 255);

Serial.print(“Temperatur: “);
Serial.print(temperature);
Serial.print(” °C, Luftfeuchtigkeit: “);
Serial.print(humidity);
Serial.print(” %, Bewegung: “);
Serial.print(motionValue);
Serial.print(“, Helligkeit: “);
Serial.println(lightValue);

if(motionValue == HIGH && lightValue > 100){

setRGBColorBasedOnTemperature(temperature);

analogWrite(RED_PIN, (temperature < 21) ? 255 : 0);
analogWrite(GREEN_PIN, 0);
analogWrite(BLUE_PIN, (temperature >= 21) ? 255 : 0);

lastMotionTime = millis();
}

if(millis() – lastMotionTime >= lightDuration){
digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
}

delay(1000); 
}

void setRGBColorBasedOnTemperature(float temperature) {
if(temperature < 21){

analogWrite(RED_PIN, 255);
analogWrite(GREEN_PIN, 0);
analogWrite(BLUE_PIN, 0);
}else{

analogWrite(RED_PIN, 255);
analogWrite(GREEN_PIN, 0);
analogWrite(BLUE_PIN, 0);
}
}

Monitor

 

Prototype DMX LED

Code

#include <SoftwareSerial.h>
#include <DmxSimple.h>
#include <DHT.h>
#include <Wire.h>

#define DHTPIN 2
#define MOTION_SENSOR_PIN 7
#define LIGHT_SENSOR_PIN A1
#define DMX_RX_PIN 3
#define DMX_TX_PIN 4
#define DMX_RED_CHANNEL 1
#define DMX_GREEN_CHANNEL 2
#define DMX_BLUE_CHANNEL 3
#define lightDuration 5000

DHT dht(DHTPIN, DHT11);
SoftwareSerial dmxSerial(DMX_RX_PIN, DMX_TX_PIN);

unsigned long lastMotionTime = 0;
int mappedRed, mappedGreen, mappedBlue;

void setup()

{

pinMode(MOTION_SENSOR_PIN, INPUT);
pinMode(LIGHT_SENSOR_PIN, INPUT);
dmxSerial.begin(250000);
DmxSimple.usePin(DMX_RX_PIN);
Serial.begin(9600);
dht.begin();

}

void loop()

{

float temperature = dht.readTemperature();
float humidity = dht.readHumidity();
int motionValue = digitalRead(MOTION_SENSOR_PIN);
int lightValue = analogRead(LIGHT_SENSOR_PIN);
lightValue = map(lightValue, 0, 1023, 0, 255);

Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" °C, Humidity: ");
Serial.print(humidity);
Serial.print(" %, Motion: ");
Serial.print(motionValue);
Serial.print(", Brightness: ");
Serial.println(lightValue);
if(motionValue == HIGH && lightValue > 100)

{

setRGBColorBasedOnTemperature(temperature);

DmxSimple.write(DMX_RED_CHANNEL, mappedRed);
DmxSimple.write(DMX_GREEN_CHANNEL, mappedGreen);
DmxSimple.write(DMX_BLUE_CHANNEL, mappedBlue);

Serial.print("Color Right Now: R: ");
Serial.print(mappedRed);
Serial.print(", G: ");
Serial.print(mappedGreen);
Serial.print(", B: ");
Serial.println(mappedBlue);
lastMotionTime = millis();

}

if(millis() - lastMotionTime >= lightDuration)

{

DmxSimple.write(DMX_RED_CHANNEL, 0);
DmxSimple.write(DMX_GREEN_CHANNEL, 0);
DmxSimple.write(DMX_BLUE_CHANNEL, 0);

}

delay(3000);

}

void setRGBColorBasedOnTemperature(float temperature)

{

int redValue, greenValue, blueValue;

if(temperature <= 22)
{
redValue = 255;
greenValue = 80;
blueValue = 0;

}

else
{

redValue = 0;
greenValue = 180;
blueValue = 255;

}

mappedRed = map(redValue, 0, 255, 0, 255);
mappedGreen = map(greenValue, 0, 255, 0, 255);
mappedBlue = map(blueValue, 0, 255, 0, 255);

}