Smart City of Vukovar - Our View of Smart Living

5,809

38

2

Introduction: Smart City of Vukovar - Our View of Smart Living

This magnificent prototype of a smart city offers a solution in reducing the traffic jams on the road and around the parking lots, greater electricity savings and better use of a solar Sun power panels.

It represents a prototype of the real projection (look) of one part of the main road in Vukovar, Croatia leading toward another city in our region as well as the beautiful promenade along the bank of the river of Danube. It demonstrates of what a technological future should look like. By using all the sensors, IoT and high technology electronic boards, we are able to collect the information in real time, which allows us to more efficiently plan and implement utilization of the urban infrastructure as being the foundation of every “Smart city”.

My motto is: “We provide a solution for less pollution”

Supplies

MATERIALS USED IN THIS PROJECT:

Housing for the smart parking servo (it was made manually according to the dimensions of the 4 mm plywood)

Housing for the smart parking LCD display (it was made manually according to 4 mm plywood dimensions)

Smart parking fence (made from 10 x 10 mm fly wood)

Solar lighting (made from spare parts)

Decorative granulate 2-3 mm Wedding Decor Vase Candle Decoration Floral

Lawn Artificial Grass Carpet Home Garden Floor Dollhouse Moss Decoration HY

Wooden box 11 x 10 x 21 cm used for skyscraper

Solar panels (used from the spare parts as the skyscraper roof)

5.5V 100MA Micro Mini Power Solar Cells Panel Board CL Toy 84.5*55.5mm Set R2Q7

Housing of the solar Sun tracker (it is made manually from fly wood)

Traffic lights (3D printed)

LED lighting pole for city lights (made out of the pen housing)

Small benches by the Danube promenade (Lego bricks)

Wood steps towards the Danube (made manually from wood fly wood)

Lego bricks (used from own home toys)

Metal Die Cast Kids Cars

Mini chest of drawers, birch plywood, 16 ½x7x12 5/8 " (42x18x32 cm)

Genuine Arduino Uno R3 (1x)

Arduino ABX00011 MKR1000 WiFi Enabled IoT Board 3.3V(3x)

SG-90 SG90 9g Micro Gear Servos Motor Car Plane Boat Raspberry Pi(2x)

Obstacle Avoidance IR Sensor Infrared Photoelectric Module Arduino Raspberry PI (9X)

Photoresistor LDR CDS 5mm Resistor Sensor Light-Dependent GL5516 Arduino (3x)

5 mm Ultra Bright Round Water Clear LED Bulb 3V Light Emitting Diode(5x)

2.54mm 1-Pin Jumper Male to Female with wire for Arduino Breadboard

1/4W 0.25W Carbon Film Resistor ±5% 1K Ohm to 4.7M Ohm (10x)

Hub With Power Supply 5v Vertical 7-Port USB 2.0 High-Speed Divisor Kit

1m A Male to MICRO USB 2.0 Charge Cable Phone Charger Lead Data (3x)

USB Cable 52cm Blue for Arduino UNO 2560 R3 Printer Scanner (1x)

Soldering iron

Soldering wire

Arduino IDE

Optional:

Fritzing

Step 1: Step 1: Getting the Material, Cutting and Gluing

The basis for the model design is a 4 mm thick plywood with its flyers to achieve a better and more solid structure. Connecting of all parts of the model will be achieved by using the wood glue.

The model is made from two parts. The basis of the model dimensions 750 x 720 mm will feature a promenade along the Danube River for which I used the Arduino Uno board, a photo resistor, infrared sensors and LED lighting. At the position of the upper surface of the load bearing part of the model, I created the basis for the main part of the model according to instructions. The main part of the model (detachable) will be 750 x 500 mm in size and will present the prototype the county main road in Vukovar. The cutting of plywood according to dimensions is done by an angle grinder. In the step 1, after measuring, cutting and connecting all the cut parts on the lower bearing structure, a 2 cm styrofoam is placed with a net in the Danube riverbed, which is strengthened and crossed by flexible tile glue, while in the main part of the model there is an artificial grass on the slope facing the promenade. Artificial grass is attached to the slope using the transparent silicone.

At the same time as the entire model is built, a solar tracker construction is made from wooden flyers. During the production of all wooden parts, all defects are removed, correction and adjustment is done.

In the 1 st step, after all modelling work, the design of the model is followed by painting according to the actual appearance of the road and the promenade in Vukovar.

These surfaces are first painted with the core colour, followed by synthetic enamel paint for the final appearance and strength. All the painting is done manually by brush or with a paint roller. After two final color layers, a decorative granulate is applied in the place where the solar Sun tracker will be attached to the main surface. For strengthening the granulate I used the super glue.

Step 2: Step 2: Programming

In the 2 nd step, Arduino codes are being programmed for smart lighting, smart parking, smart traffic lights and a solar Sun tracker. In addition to programming, drawings are made on the 3D printer, brackets and traffic lights are printed for the intersection on the main road. Except programming, all other necessary parking spaces and accompanying facilities on the main road are made.

Step 3: Step 3: Finishing and Final Touches

The 3 rd step includes the installation the installation of the Arduino boards and all other electronic components for the final appearance of smart city model.

Step 4: The Code: Smart City Lights

SMART CITY LIGHTS along the river of Danube which use the photo resistor, infrared sensors, led lights, and Genuine Arduino UNO board. The main principle is that the LED lights are on with a reduced brightness, but as the person approaches every light, the infrared sensor activates the program which turns on the light much brighter. As you leave, it comes back to reduced brightness. At this point of our Humanity, in the 21st Century, we have to look for a new ways and solutions on how the save more energy to avoid power outages and to bring electricity to rural areas on this Planet. Our smart city lights offer tremendous savings in electricity consumption.

Smart city lights

#include<FadeLed.h>//It adds library for LED diode management.
FadeLed leds[5] = {3, 5, 6, 9, 10}; //It adds LED pins to the "leds" object.
unsignedlong millisLast; //variable millisLast
int resPin = A1; //It defines photoresistor pin.
int resValue = 0; //A variable for storing the value of photoresistors.
int sensPin1 = 2; //It defines infrared sensor pins.
int sensPin2 = 4;
int sensPin3 = 7;
int sensPin4 = 8;
int sensPin5 = 12;
voidsetup() { //The initial set up for loop.
pinMode(sensPin1, INPUT); //It defines pins of infrared sensors as input.
pinMode(sensPin2, INPUT);
pinMode(sensPin3, INPUT);
pinMode(sensPin4, INPUT);
pinMode(sensPin5, INPUT);
leds[0].setTime(2000); //It sets the time to change the intensity of light
leds[1].setTime(2000); //from 0% to 100% for 2 seconds (relatively fast!).
leds[2].setTime(2000);
leds[3].setTime(2000);
leds[4].setTime(2000);
}
voidprog1() { //The first loop program.
if (digitalRead(sensPin1) == LOW) { //It checks if the sensor is electromagnetically stimulated.
leds[0].set(100); //It gradually sets the LEDs intensity at 100%.
} else { //function "else"
leds[0].set(10); //It gradually sets the LEDs intensity at 10%.
}
}
voidprog2() { //The second loop program. All loops are the same, but they are defining other sensors and LEDs.
if (digitalRead(sensPin2) == LOW) {
leds[1].set(100);
} else {
leds[1].set(10);
}
}
voidprog3() { //The third loop.
if (digitalRead(sensPin3) == LOW) {
leds[2].set(100);
} else {
leds[2].set(10);
}
}
voidprog4() { //The fourth loop.
if (digitalRead(sensPin4) == LOW) {
leds[3].set(100);
} else {
leds[3].set(10);
}
}
voidprog5() { //The fifth loop.
if (digitalRead(sensPin5) == LOW) {
leds[4].set(100);
} else {
leds[4].set(10);
}
}
voidloop() { //The main loop.
FadeLed::update(); //It refreshes the state of the LEDs.
resValue = analogRead(resPin); //It defines the variable as the value of the photoresistor.
if (resValue < 50) { //It checks whether it is day or night.
prog1(); //If detects the night, calls for other loops.
prog2();
prog3();
prog4();
prog5();
} else { //function "else"
leds[0].set(0); //If detects the daylight, the LEDs remain turned off.
leds[1].set(0);
leds[2].set(0);
leds[3].set(0);
leds[4].set(0);
}
} //that is it!!!

Step 5: The Code: Smart Traffic Lights

SMART TRAFFIC LIGHTS are very adaptive to the current traffic. By using the infrared sensor placed in the asphalt before the traffic light, it senses the movement, and according to the current situation regulates the traffic. Smart traffic lights let us avoid situations where the driver would have to sit in the car and wait for a green light to come up when there is no one around at the intersection. By using this type of the traffic lights, we can drastically reduce traffic jams. For this project I used Genuine Arduino MKR 1000 board.

Smart traffic lights

int crvenoGlavna = 2;
int zutoGlavna = 1;
int zelenoGlavna = 0;
int crvenoSporedna = 5;
int zutoSporedna = 4;
int zelenoSporedna = 3;
int senzor1 = 6;
int senzor2 = 7;
voidsetup() {
pinMode(crvenoGlavna, OUTPUT);
pinMode(zutoGlavna, OUTPUT);
pinMode(zelenoGlavna, OUTPUT);
pinMode(crvenoSporedna, OUTPUT);
pinMode(zutoSporedna, OUTPUT);
pinMode(zelenoSporedna, OUTPUT);
pinMode(senzor1, INPUT);
pinMode(senzor2, INPUT);
digitalWrite(zelenoGlavna, HIGH); //All states must be turned on, because the LEDs are connected to
digitalWrite(crvenoGlavna, HIGH); //the common anode and then LEDs are turned off.
digitalWrite(zutoGlavna, HIGH); //The state of the program is different from that of the LEDs.
digitalWrite(zelenoSporedna, HIGH);
digitalWrite(crvenoSporedna, HIGH);
digitalWrite(zutoSporedna, HIGH);
}
voidloop() {
if (digitalRead(senzor1) == LOW) {
delay(500);
semaforGlavna(); //It initiates the traffic light loop.
} elseif (digitalRead(senzor2) == LOW) {
delay(500);
semaforGlavna(); //It initiate the traffic light loop.
} elseif ((digitalRead(senzor1) && digitalRead(senzor2)) == HIGH) {
digitalWrite(zelenoGlavna, LOW); //While there's no traffic on the side road, the traffic light
digitalWrite(crvenoSporedna, LOW); //is constantly on to the benefit of the main road.
digitalWrite(crvenoGlavna, HIGH);
digitalWrite(zelenoGlavna, HIGH);
digitalWrite(zutoGlavna, HIGH);
digitalWrite(zutoSporedna, HIGH);
}
}
voidsemaforGlavna() { //Traffic light loop.
digitalWrite(crvenoGlavna, HIGH);
digitalWrite(zutoGlavna, HIGH);
digitalWrite(zelenoGlavna, HIGH);
delay(1000);
digitalWrite(zelenoGlavna, LOW);
delay(1000);
digitalWrite(zelenoGlavna, HIGH);
delay(1000);
digitalWrite(zelenoGlavna, LOW);
delay(1000);
digitalWrite(zelenoGlavna, HIGH);
digitalWrite(zutoGlavna, LOW);
delay(2000);
digitalWrite(zutoGlavna, HIGH);
digitalWrite(crvenoGlavna, LOW);
delay(1000);
digitalWrite(zutoSporedna, LOW);
delay(3000);
digitalWrite(zutoSporedna, HIGH);
digitalWrite(zelenoSporedna, LOW);
digitalWrite(crvenoSporedna, HIGH);
delay(5000);
digitalWrite(zelenoSporedna, HIGH);
delay(1000);
digitalWrite(zelenoSporedna, LOW);
delay(1000);
digitalWrite(zelenoSporedna, HIGH);
digitalWrite(zutoSporedna, LOW);
delay(3000);
digitalWrite(zutoSporedna, HIGH);
digitalWrite(crvenoSporedna, LOW);
delay(1000);
digitalWrite(zutoGlavna, LOW);
delay(3000);
digitalWrite(zutoGlavna, HIGH);
}

Step 6: The Code: Smart Parking

SMART PARKING uses an infrared sensor to determine whether here is an empty parking space available and how many are left at the parking lot. As the vehicle approaches the parking, the sensor gets activated showing available spaces on the LCD display, opens the ramp and enables the entrance into the parking lot. As soon as the vehicle enters the ramp goes down to its normal position. The same procedure is when vehicles leave the parking lot. For this project I used Genuine Arduino MKR 1000 board.

Smart parking

#include<Servo.h>//It adds the library to the program.
#include<LiquidCrystal.h>
Servo rampa; //It creates a servo object that manages the servo.
int izlaz = 0; //Pin attached to the sensor at the exit.
int ulaz = 1; //Pin attached to the sensor at the entrance.
int spusteno = 177; //Position of the ramp down.
int dignuto = 90; //Position of the ramp up.
int kapacitet = 6; //The capacity of the parking.
int slobodnaMjesta = 6; //The number of vacancies (the parking lot is initially empty).
constint rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2; //It initializes the library by adding required pins for LCD
LiquidCrystal lcd(rs, en, d4, d5, d6, d7); //to the pin to which Arduino is connected.
byte znak[8] = { //It creates the data for a character that is printed on
B11011, //LCD, but it is not a standard alphanumeric (Z)
B01110, //necessary to print the message “Unfortunately, there are no vacancies”.
B00000,
B11111,
B00110,
B01100,
B11111,
};
voidsetup() {
rampa.attach(9); //It connects the servo.
pinMode(izlaz, INPUT); //It sets the pins' of the sensors for entrance and exit as input.
pinMode(ulaz, INPUT);
rampa.write(spusteno); //It sets the ramp to the down position.
lcd.begin(16, 2); //It sets the number of characters and rows on the LCD.
lcd.setCursor(2, 0);
lcd.print("Super Mega"); //It prints the message on the LCD.
lcd.setCursor(4, 1);
lcd.print("PARKING");
delay(2000);
lcd.clear();
lcd.createChar(0, znak);
lcd.begin(16, 2);
}
voidloop() {
if (digitalRead(ulaz) == 0)
{
if (slobodnaMjesta != 0) {
delay(500);
slobodnaMjesta--;
rampa.write(dignuto);
lcd.print("Slobodna mjesta:");
lcd.setCursor(5, 1);
lcd.print(slobodnaMjesta);
delay(3000);
rampa.write(spusteno);
} else {
delay(500);
lcd.print("Na");
lcd.write(byte(0));
lcd.print("alost, nema");
lcd.setCursor(0, 1);
lcd.print("slobodnih mjesta");
delay(2000);
}
}
if (digitalRead(izlaz) == 0)
{
if (slobodnaMjesta != kapacitet) {
delay(500);
slobodnaMjesta++;
rampa.write(dignuto);
lcd.print("Slobodna mjesta:");
lcd.setCursor(5, 1);
lcd.print(slobodnaMjesta);
delay(3000);
rampa.write(spusteno);
}
}
lcd.clear();
}

Step 7: The Code: Solar Sun Tracker

SOLAR SUN TRACKER uses a photo resistor to adjust the angle of the solar panels according to the strongest source of the Sun light. This way of tracking the Sun light gives us the opportunity to increase the percentage of using the Sun energy which is stored in a power bank for later use and distribution of electricity to the city lights. For this project I used Genuine Arduino MKR 1000 board.

Solar Sun tracker

#include<Servo.h>
Servo tragac; //It creates a servo object that manages the servo.
int istokPin = 1; //It adds analog pins connected to the light sensor
int zapadPin = 2;
int istokVal = 0; //It creates variables that store sensor values.
int zapadVal = 0;
int greska = 0;
int kalibracija = 204; //Calibration shift that sets the error to zero when both sensors receive the same amount of light.
int tragacPoz = 90; //It creates a variable that stores the positioning of the servo.
voidsetup()
{
tragac.attach(11); //It adds an object to the servo connected to pin 11.
}
voidloop()
{
istokVal = kalibracija + analogRead(istokPin); //It reads the values of the east and west sensors.
zapadVal = analogRead(zapadPin);
if(istokVal<350 && zapadVal<350) //It checks if both sensors receive a little light, it's dark!
{
while(tragacPoz<=160) //It moves the tracker to the far Eastern position to greet the dawn.
{
tragacPoz++;
tragac.write(tragacPoz);
delay(100);
}
}
greska = istokVal - zapadVal; //It determines the difference between two sensors.
if(greska>15) //If the error is positive and bigger than 15, it moves the tracker to the East.
{
if(tragacPoz<=160) //It confirms that the tracker is not in the far East position.
{
tragacPoz++;
tragac.write(tragacPoz); //It moves the tracker to the East.
}
}
elseif(greska<-15) //If the error is negative and lower than -15, it moves the tracker to the West.
{
if(tragacPoz>20) //It confirms that the tracker is not in the far West position.
{
tragacPoz--;
tragac.write(tragacPoz); //It moves the tracker to the West.
}
}
delay(100);
}

Step 8: Schematics

Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share

    Recommendations

    • Big and Small Contest

      Big and Small Contest
    • Make It Bridge

      Make It Bridge
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge

    2 Comments

    0
    RandomDev
    RandomDev

    2 years ago

    What an awesome model! Do you think that you can add a simulation website of the Smart City of Vukovar? You might want to add another instructable for that. :)

    0
    dsijanovic
    dsijanovic

    Reply 2 years ago

    Hello,
    Thank you for such a positive comment. I haven't thought about it, but it sounds great. I might get into it this summer. My hometown municipality officials implemented the smart parking in downtown Vukovar as a result of this project in the beginning of this year. Have a nice day.
    Sincerely,
    Davor