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.

  • 2,855 views
  • 16 comments
  • 33 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

  • 1,400 views
  • 7 comments
  • 14 respects

RFID Based Automatic Door System

Project showcase by Robodia Technology

  • 52,737 views
  • 24 comments
  • 133 respects

Advance Automatic Railway Crossing System

Project showcase by Pawan singh and Akansh Saxena

  • 5,619 views
  • 2 comments
  • 16 respects

Automatic Gate with FSM and ISR

Project showcase by AndreNeves and Nuno Miguel Guerreiro Carvalho Martins

  • 1,599 views
  • 0 comments
  • 2 respects

Rail Road Model IR Remote Control (REMOTINO NANO)

Project showcase by pautax

  • 1,280 views
  • 0 comments
  • 5 respects

Touchless Automatic Motion Sensor Trash Can

Project showcase by Will Su

  • 38,884 views
  • 31 comments
  • 65 respects
Add projectSign up / Login