Project showcase
Architectural Model of a Bus Stop with Automatic Sunshade

Architectural Model of a Bus Stop with Automatic Sunshade © GPL3+

Architectural model of a bus stop with automatic sunshade according to the position of the sun. It is also sensitive to rain.

  • 11,874 views
  • 25 comments
  • 46 respects

Components and supplies

Ard nano
Arduino Nano R3
Because we are creating an Architectural model, we needed something small, easy to hide.
×1
Sg90 servo motor 180 degrees sg90 micro
SG90 Micro-servo motor
For controlling the expansion / contraction of the sunshade
×1
Adafruit industries ada161 image 75px
Photo resistor
One would be facing East, and the other, West.
×2
Rain Sensor
×1
4734056
High Brightness LED, White
×6
4415447 jg5sklyzsj
Resistor 220 ohm
×2
4415447
Through Hole Resistor, 10 ohm
×1
12002 04
Breadboard (generic)
×1
Male/Male Jumper Wires
×27

Apps and online services

Autodesk Tinkercad
Used to design the circuit and simulate its operation
Ide web
Arduino IDE
Used for fine tuning the code

About this project

One of my daughters, who is studying architecture, had to make a model of a bus stop. Her idea was to add a sunshade to the bus stop for the convenience of bus users, so I told her, let's Arduinit.

The final idea was:

a) that the sunshade will be controlled by a servo, it will contract/expand the sunshade according to the position of the sun;

b) add a rain sensor so that the sunshade expands when it rains;

c) use photoresistors to calculate the position of the sun as well as to turn on the bus stop lighting and street lighting.

By the way. I am an Arduino fan. A couple of months ago, I started to learn Arduino along with my 8 years old daughter and my 6 year old son.

Here are som photos:

You can check the new version of the proyect at: New Version

Code

Architectural model of a bus stop with automatic sunshadeC/C++
Architectural model of a bus stop with automatic sunshade according to the position of the sun. It is also sensitive to ra
#include <Servo.h>

int easternLight = 0;
int westernLight = 0;
int rainSensed = 0;
int sunshadePosition = 0;
int rainRhreshold = 512;
int sunshadeExpanded = 120;
int sunshadeContracted = 60;
int ambientLighting = 0;
int turnOnLightsOn = 150;
int ledIntensity = 0;
int ledPower = 0;
Servo servo;

void setup()
{
  pinMode(A4, OUTPUT); // Interior lighting of the bus stop
  pinMode(A5, OUTPUT); // Street light
  pinMode(A1, INPUT); // Western light
  pinMode(A2, INPUT); // Eastern light
  pinMode(A3, INPUT); // Rain sensor analog
  pinMode(2, INPUT); // Rain sensor digital
  servo.attach(A0); // Servo
  servo.write(sunshadeContracted);
}

void loop()
{
  // Get sensor values
  easternLight = analogRead(A2);
  westernLight = analogRead(A1);
  rainSensed = analogRead(A3);
  sunshadePosition = servo.read();
  ambientLighting = ((easternLight + westernLight) / 2); // Average the brightness of the east and west
  // Find out if it is raining?
  if (rainSensed < rainRhreshold) {
    // It is raining
    if (sunshadePosition != sunshadeExpanded) {
      servo.write(sunshadeExpanded);
    }
  } else {
    // It is not raining
    if (ambientLighting <= turnOnLightsOn) {
      // It's getting dark, turn on the lights
      ledPower = ((turnOnLightsOn - ambientLighting) * 4);
      analogWrite(A5, ledPower);
      analogWrite(A4, ledPower);
    } else {
      // There is a lot of sun light
      analogWrite(A5, 0);
      analogWrite(A4, 0);
      if (easternLight <= westernLight) {
        // It's sunset
        if (sunshadePosition != sunshadeExpanded) {
          servo.write(sunshadeExpanded);
        }
      }
      if (easternLight > westernLight) {
        // It's down
        if (sunshadePosition != sunshadeContracted) {
          servo.write(sunshadeContracted);
        }
      }
    }
  }
  delay(100);
}

Schematics

Architectural model of a bus stop with automatic sunshade
Architectural model of a bus stop with automatic sunshade
Michmaquetav2 bb zwmy5fhror

Comments

Similar projects you might like

Architectural Model of a Bus Stop with Automatic Sunshade V2

Project tutorial by addicttux

  • 7,323 views
  • 9 comments
  • 29 respects

Automatic Soap Dispenser with 20 second hand washing LED

Project tutorial by Athanasios Dimopoulos

  • 7,771 views
  • 4 comments
  • 10 respects

Social Distancing with Automatic Door Control System

Project tutorial by Rucksikaa Raajkumar

  • 6,249 views
  • 0 comments
  • 16 respects

RFID Based Automatic Door System

Project showcase by Robodia Technology

  • 80,533 views
  • 33 comments
  • 168 respects

Automatic Hand Sanitizer

Project tutorial by Nikolaos Babetas

  • 35,784 views
  • 14 comments
  • 37 respects

CAN Bus Using Arduino

Project showcase by Maurizfa (13216008) / Arthur Jogy (13216037) / Agha Maretha (13216095)

  • 34,551 views
  • 0 comments
  • 10 respects
Add projectSign up / Login