Skip to main content

SMART TRAFFIC LIGHT - LEROS

Hosted by OSOS , contributed by karavatosfil on 22 May 2018

A smart construction to assist you in avoiding traffic jam in Leros.

Learning Objectives
Combination of physics , electronic and digital materials and tools, programming, constructions

MPELLENEIO JUNIOR HIGH SCHOOL OF LEROS- MPOULAFENTEIO HIGH  SCHOOL OF LEROS

In many parts of our island the roads are narrow enough which results in the difficult passage of vehicles, especially when they are massive ( for instance buses, trucks etc.).For example, at Spilaia, an area near by our school, the road is so narrow that, when the school bus passes from this point for the usual every-morning route, traffic congestion is triggered. Hence, students tend to arrive late at school.

h

This phenomenon also occurs during summertime, as our island is visited by a number of tourists and the vehicles are increased. As a consequence, useless delays and irritations of the drivers as well as the neighbors are created

 

Description of the idea

A useful and innovative construction, which could put an end on this problem is the “Smart Traffic Light”. This traffic light is an installation which is able, with the use of two arduinos, to control the traffic in bidirectional streets.

The construction consists of two “stations” of manipulating traffic, each of whom being installed in one of the two directions of the street. Every vehicle is detected at first by the station of its origin and afterwards by the one of its destination.

Every station has 3 ultrasonic sensors which are installed in the appropriate height and they are capable of detecting the motion of vehicles (e.g. buses, trucks, normal cars etc.). Furthermore, each of the two stations has a system of three traffic lights ( red, orange and green) that inform the drivers who are likely to enter this part about the existence of other vehicles in it. The two stations (arduinos) communicate with each other, with the appropriate wiring, so as to be able to control the traffic in an ideal way and permitting from now on the entrance of all vehicles

Specifically, when the ultrasonic sensors of the station of origin (e.g. direction A) detect motion of big vehicle, a signal to turn on the red traffic light of the opposite direction is given (e.g. direction B), prohibiting the entrance to every kind of vehicles. When the sensors detect motion of a normal vehicle towards the narrow road, a signal to turn on the orange traffic light of the opposite direction is given, permitting the entrance only of normal vehicles from the other direction. The traffic light (either red or orange), which was turned on in the station of destination due to the pass-through from the station of origin, will be switched off as soon as the vehicle is detected by its final station, turning that way the green traffic light and allowing the free entrance of every vehicle from now on.

Our station will be like this :

2

Let’s see some further details:

Every ultrasonic sensor, with the appropriate orders provided on the program of the arduino where it is connected, is utilized in order to measure the distance from any obstacle being in front of it.

The detection of the motion of massive vehicles is undertaken by the sensors A, B, when they both simultaneously record existence of an obstacle in close distance. During the implementation of the system under real circumstances, the sensor A should be installed in a place which would be higher than any human so as erroneous detections of massive vehicles to be avoided, supposing that, for instance, a human walks in front of the sensors

The detection of the motion of normal vehicles is undertaken by the sensors B, C, when the B records obstacle and the A does not. Then, the program expects from the sensor C to detect the vehicle and, by calculating the velocity of the vehicle, it can make it clear that the obstacle has to do with a vehicle and not a passer-by. The calculation of the velocity results from the known distance (S) between the two sensors B, C and the time (t) that the vehicle needed to cover the distance from the sensor B to the sensor C, taking into account that during this small period it moves forward at a stable speed (V=S/t). The time is measured with the appropriate orders by the arduino program.

Both stations can communicate either wired or wireless. For the construction, wired communication will be preferred as the distance between the two stations is very small. The operation of the two station lights is coordinated by two soft serial ports. For wired communication we will use utp cable which has 8 wires. It will be used 4 of the 8 wires, which is a pair for each communication channel. In addition, we will use RCA audio cable terminals for the utp cable ends and the corresponding connections on the arduino boards because they link the two wires of each channel while offering ease and reliability in connection - disconnecting of each station to the road.

The materials we are about to utilize are:

  • 2 arduinos UNO
  • Special case for the arduino
  • 2 big breadboards (for the connections on the arduinos)
  • 2 small breadboards (for the connections of the traffic lights)
  • 6 ultrasonic sensors (3 per station)
  • 6 led small lamps (red, orange, green per station)
  • 2  9volt batteries (one per station)
  • 2 circuit breakers (one per station)
  • 2 waterproof electronic boxes (one per station)
  • Flexible wires for breadboards
  • UTP wire (8-clone) for connecting the two arduinos
  • Leads of RCA sound wire for the ends of the UTP wire and the equivalent connections on the arduinos.
  • Plywood for the simulation of the road
  • Wooden hand-made bases for the support and the connection of the station on the road

Steps of the construction

  1. We put together the case of the arduino and we utilize it for our first tries

ty2

  1. In the electronic box we create the ideal holes in which we attach the ultrasonic sensors in the appropriate height for the detection of diverse vehicles
  2. We install inside the box the arduino, the base of the 9V battery as well as the breadboard, on which we connect the ultrasonic sensors. The same goes for the second box

υα

 

4. We undergo the appropriate connections utilizing the ideal wires. Last but not least, we connect the RCA  nozzles of every station.

a n

222 2 2 o2 ξ

  1. We create the appropriate code and we upload it to the arduino

v g

  1. We construct a simulation of the road so as to test the function of our concept

.

aa 

  1. By utilizing small led lamps, we create the traffic lights, which are adapted on the electronic boxes. These boxes are attached on wooden bases and adapted on the road. We add the traffic lights on the boxes by connecting appropriately on the breadboards

a 3

 

     8.  We link the two RCA audio cable terminals together with an utp cable. Two channels of communication between the stations are used to coordinate the operation of the lights.

3 3

     9.  Proud in front of our final construction

a

 

 

 

Presentation on the internet

On the video above, which was shared in well-known social media, a road of our island, where the suggested construction could have prompt implementation, is presented. Moreover, a brief description of the creation of our construction is presented too. The correspondence from the relevant public was comparatively large with positive comments, from Greece as well as from abroad countries as we also added English subtitles in our video.

(https://www.youtube.com/watch?v=gFjhnkBZqWI&yt:cc=on)

Visit in the Town Hall

We paid a visit to the municipality of our island and we met the mayor and members of the municipality conference so as to present them our concept

1 

First of all, detailed information about the whole idea, the construction, and its prospects took place. We also recommended potential parts of our island where the traffic light could be installed.

They got thrilled with our idea and they found it extremely smart and useful, especially for the summertime when our island is visited by a great number of tourists. During the following conversation, they expressed their opinion about the fact that this kind of implementation would alleviate the suggested parts and delays and outranges of drivers and the residents  would be avoided

One of the basic results of the meeting was that they referred us to the responsible people of the Technical Service of Leros for the short-run shakedown practical implementation of the traffic light at Spilaia (area of our island, being presented on our video). We talked about the potential cost of its implementation and we elaborated about the way of communication between the two stations of the traffic light. As the mayor informed us, on the island of Leros,  system for providing wide-range Wi-Fi  is likely to be installed and, for this reason, he suggested that the communication would be accomplished with WI-Fi connection. We answered that this was one of our first thoughts for the implementation under real circumstances and this sort of communication can be easily incorporated on the already-existing system. It was assumed by all the attendants that the cost of real function is actually feasible and it will be one of the topics we are going to discuss with the Technical Service of our municipality.

Above you can find a video with a small extract of this meeting as well as the related announcement of the mayor: 

(https://www.youtube.com/watch?v=MljVv8QVlHI&yt:cc=on)

https://www.lerosnews.gr/1/2/ta-nea-tis-lerou/13453-leros-mathhtes-gymnasioy-elysan-to-kykloforiako-problhma-toy-nhsioy.html

The mayor’s suggestion about the implementation of the communication between the two stations with the use of Wi-Fi was something that our team had already discussed as an alternative solution of the wired communication, which was finally adopted for the creation of our construction

Above the advantages and the drawbacks of every implementation are mentioned:

Advantages of the wired communication in contrast with the wireless one:  

  1. The existence of Wi-Fi in the area where the two station function is a basic requirement
  2. Insignificant cost of function
  3. Uninterrupted communication in case of power cut in the area
  4. Ensurance  in the communication
  5. Potential interruption of the wireless  communication due to the emerge of obstacles or severe weather conditions

Drawbacks of the wired communication in contrast with the wireless one

  1. High cost of implementation (digging of the road etc.)
  2. Wearing down of the wires because of the passage of time resulting in the increased cost of preservation

Finally, in the implementation of our simulation the wired communication was adopted as it was less expensive and its demonstration could be easily undergone even in places with no Wi-Fi connection.

During the phase of the experimental function, diverse feasible solutions for the communication between the two stations can be tested and assessed