Hosted by OSOS , contributed by karavatosfil on 22 May 2018
A smart construction to assist you in avoiding traffic jam in Leros.
Feel
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.
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
Imagine
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 :

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
Create
Steps of the construction
- We put together the case of the arduino and we utilize it for our first tries
- 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
- 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.

- We create the appropriate code and we upload it to the arduino
- We construct a simulation of the road so as to test the function of our concept
.

- 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
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.

9. Proud in front of our final construction














