The area of the WSB Academy in particular reserved for pedestrians is relatively safe, but the shortcomings of certain solutions make it impossible to walk on the roadway in complete safety as a pedestrian or as a driver in a vehicle. The lack of a two-way roadway near the student parking lot, the lack of lights at the pedestrian crossing for the youngest by the elementary school creates a partial danger especially for children, but also for students crossing the roadway, which is not lit. The parking lot, as experience shows, is dangerous and makes it difficult to identify the cause of a hypothetical accident. The lack of cameras in the parking lot makes it difficult to verify testimony and identify the perpetrator, the second currently one-way in part reserved for cyclists makes it extremely difficult to move a car. The main goals of the "Safe pedestrian crossing" project are to create a simpler and automatic alternative to pedestrian crossing lights based on distance sensors operating on an Arduino system, to eliminate the road for cyclists and swap the free space to expand the roadway as a two-way road, and to control monitoring by IP cameras based on three strategic points (parking lot, elementary school, academy), which would automatically provide additional WiFi. Ensuring the safety of the youngest is a priority as much as balancing needs against means, hence the design of alternative less costly and more efficient pedestrian safety lights guided by newly adopted legal amendments putting pedestrians first. The modifications implemented in the area near WSB Academy are divided into the following segments:
-
• Introducing cameras at pedestrian crossings and in the student parking lot. The cameras are divided into two types:
-
• IP camera connected wirelessly to a WiFi network via a router, and the router to a separate server at the point. Standard cameras will be used as a complement for monitoring in blind spots.
-
• IP 360 camera connected wirelessly to the WiFi network through the router, and the router with a separate server at the point. The 360 cameras will prevent deciding who the perpetrator of a hypothetical traffic accident was, as happened quite recently in the WSB Academy parking lot, where only testimony could be used to clarify the situation because there were no cameras.
-
• Sensors that measure the distance of pedestrians and communicate with light panels the entry of a pedestrian into the lanes, and sensors that measure the distance of a car coming under the pedestrian crossing.
-
• The light lanes are designed to prevent lack of visibility resulting in increased light space.
-
• Connecting to the servers of the facilities (WSB Academy and elementary school), and thus creating a facility in an abandoned building in the parking lot and placing servers and CCTV monitoring there.
-
• Eliminating the bike path, which is very inconvenient for drivers and many complain about it. This will widen the free space and expand it with another lane and create a two-way roadway.
The solution is cheaper than a standard light system and works automatically with the sole purpose of warning both sides (pedestrians, drivers). It is in addition to a standard pedestrian crossing, and 360 cameras along with standard complementary ones secure hypothetical evidence.
Scanners with showed area
Scanners without showed area
IOT Distance Sensors based on 4 Ultrasonic Distance Sensors
int cm_1_internal_ped = 0;
int cm_2_internal_car = 0;
int cm_1_external_ped = 0;
int cm_2_external_car = 0;
//Read from sensor on DIGITAL INPUT
long readUltrasonicDistance(int triggerPin, int echoPin)
{
pinMode(triggerPin, OUTPUT);
digitalWrite(triggerPin, LOW);
delayMicroseconds(2);
digitalWrite(triggerPin, HIGH);
delayMicroseconds(10);
digitalWrite(triggerPin, LOW);
pinMode(echoPin, INPUT);
return pulseIn(echoPin, HIGH);
}
void setup()
{
Serial.begin(9600);
//Internal Cars
//Red light
pinMode(12, OUTPUT);
//Green light
pinMode(13, OUTPUT);
//Internal Pedestrians
//Red light
pinMode(2, OUTPUT);
//Green light
pinMode(4, OUTPUT);
//External Cars
//Red light
pinMode(9, OUTPUT);
//Green light
pinMode(6, OUTPUT);
//External Pedestrians
//Red light
pinMode(3, OUTPUT);
//Green light
pinMode(5, OUTPUT);
}
void loop()
{
//Measure the ping time in cm
cm_1_internal_ped = 0.01723 * readUltrasonicDistance(7, 7);//Internal pedestrians
cm_2_internal_car = 0.01723 * readUltrasonicDistance(8, 8);//Internal cars
cm_1_external_ped = 0.01723 * readUltrasonicDistance(11, 11);//External pedestrians
cm_2_external_car = 0.01723 * readUltrasonicDistance(10, 10);//External car
//Switch on LED lights - pedastrians logic
if (cm_1_internal_ped <= 75 || cm_1_external_ped <= 75)//750
{
digitalWrite(2, LOW);
digitalWrite(4, HIGH);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
digitalWrite(9, LOW);
digitalWrite(6, LOW);
digitalWrite(3, LOW);
digitalWrite(5, HIGH);
}
else if (cm_1_internal_ped > 75 || cm_1_external_ped > 75)//750
{
digitalWrite(2, HIGH);
digitalWrite(4, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
digitalWrite(9, LOW);
digitalWrite(6, HIGH);
digitalWrite(3, LOW);
digitalWrite(5, LOW);
}
else if (cm_1_internal_ped > 75 || cm_1_external_ped > 75 && cm_2_internal_car > 11 || cm_2_external_car > 11)//1100
{
digitalWrite(2, HIGH);
digitalWrite(4, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
digitalWrite(9, LOW);
digitalWrite(6, HIGH);
digitalWrite(3, LOW);
digitalWrite(5, LOW);
}
//Print values
Serial.print("INT PEDEST:");
Serial.print(cm_1_internal_ped);
Serial.print("cm | INT CAR:");
Serial.print(cm_2_internal_car);
Serial.print("cm || ");
Serial.print("EXT PEDEST:");
Serial.print(cm_1_external_ped);
Serial.print("cm | EXT CAR:");
Serial.print(cm_2_external_car);
Serial.println("cm");
//Wait for 100 millisecond(s)
delay(1000);
}
IOT Distance Sensors based on 1 HC-SR04 Distance Sensor
#include <LiquidCrystal.h>
int inches = 0;
int cm = 0;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
pinMode(8, OUTPUT);
pinMode(7, INPUT);
}
void loop()
{
lcd.clear();
cm = readUltrasonicDistance(8, 7)*0.034/2;
inches = readUltrasonicDistance(8, 7)*0.0133/2;
lcd.setCursor(0, 0);
lcd.print("cm: ");
lcd.setCursor(4,0);
lcd.print(cm);
lcd.setCursor(0,1);
lcd.print("inch: ");
lcd.setCursor(6,1);
lcd.print(inches);
delay(100);
}
long readUltrasonicDistance(int trigPin, int echoPin)
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
return pulseIn(echoPin, HIGH);
}
IOT Distance Sensors based on 1 Ultrasonic Distance Sensor
#include <LiquidCrystal.h>
int inches = 0;
int cm = 0;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
pinMode(8, OUTPUT);
pinMode(7, INPUT);
}
void loop()
{
lcd.clear();
cm = readUltrasonicDistance(8, 7)*0.034/2;
inches = readUltrasonicDistance(8, 7)*0.0133/2;
lcd.setCursor(0, 0);
lcd.print("cm: ");
lcd.setCursor(4,0);
lcd.print(cm);
lcd.setCursor(0,1);
lcd.print("inch: ");
lcd.setCursor(6,1);
lcd.print(inches);
delay(100);
}
long readUltrasonicDistance(int trigPin, int echoPin)
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
return pulseIn(echoPin, HIGH);
}