Smart Traffic Light Controller System
Smart Traffic Light Controller System
Abstract—The constant increase in the number of vehicles, the In addition to IoT devices uses, another key agent for
lack of road traffic management and the technological limitations making smart cities smart is the use of associated technolo-
of traffic light control devices, contribute to increasing congestion, gies with physical, electrical and communication technologies
environmental and noise pollution. The applications involving
the Internet of Things (IoT) concept have been growing around information (ICT) [9], [11], [12].
the world. Concerning the problems found in cities with large Congestion is one of the main agents responsible for urban
populations, the IoT applications aim technological solutions disorder. According to D. Schrank et al, in 2014 the congestion
that improve the population living conditions. Most traffic light caused the north americans about 6.9 billion hours of extra
controller systems are locally programmed. In this case, to control travel, consuming around 3.1 billion gallons of extra fuel,
all traffic lights in a city, besides to be a slow task, it is not
possible to determine the traffic light’s operating state. In some causing a traffic jam cost of 160 billion dollars [13].
cases a centralized control is used, allowing information exchange For current traffic lights systems to be able to manage the
with all traffic lights on the network. This paper seeks to study demand for future vehicles it is essential that it becomes a
and develop a traffic light controller electronic circuit, with smart device.
centralized control topology, able to communicate with other
The Internet of Vehicles (IoV), a scientific branch dedicated
wireless network traffic lights. All characteristics of the designed
circuit were evaluated by practical system control and monitoring to studies related to the information exchange between vehi-
tests. Finally, the electronic circuit proved to be viable in terms cles, through embedded sensor circuits, allow the collection of
of smart cities applications. road conditions [14], [15]. Therefore another utility of wireless
Index Terms—Smart traffic light, smart city, smart mobility. traffic lights is the possibility of integration with vehicles that
have IoV applications.
I. I NTRODUCTION
The present work, based on the IoT and ICT concepts,
Congestion, environmental pollution, noise pollution and intends to develop a traffic lights controller electronic circuit
increased health problems are some related problems to the capable of controlling and monitoring the state of each lamp,
badly planned city growth [1]–[5]. Although urban growth communicate with other network traffic lights, exchanging
seems to bring only problems, the constant technolog-ical system information over a wireless network, providing, in this
advances in the engineering area seek not only to reduce such way, an enhancement in the current traffic controller systems.
problems, but also offers new features that make it easier for Therefore, the following sections will describe the choice and
citizens, one of them is called Internet of Things (IoT). functioning of each block of the semaphore control electronic
The IoT term has several interpretations and definitions, ac- circuit.
cording to [6], the IoT term can be understood, in its physical
aspects, as being: “a network of items - each embedded with II. S MART T RAFFIC L IGHT
sensors - connected to the internet”.
In 2011, CISCO IBSG estimated that by 2020 there will be Although the vehicles flow control is done by the
about 50 billion devices connected to the internet [7]. In 2018, semaphore, the control mechanism can be done in different
the Qualcomm technology company assumed that at 2026 ways. According to [16], a controller may be set in two ways:
there will be about 6 billion connections of only applications • Fixed time: has constant semaphoric plane, that is, it does
involving IoT [8]. not change the time of its lights according to the flow
With the number of IoT applications growing increasingly variation;
and the constant need for strategic solutions that make life in • Acted: The determination of the green time based on the
large urban centers pleasant to citizens, there’s the emergence data by vehicle detector sensors in its approximations.
of the so-called smart cities. According to [9], [10], a city is Regarding the control mode, according to [16], traffic lights
classified as smart city when it is able to gather technology, may have:
government and society together to enable management with • Local control: the control is done directly in the controller
intelligent economy, mobility, environment, people, life and system, in loco;
governance. • Centralized control: the control is done by a single central
This study was financed in part by the Coordenação de Aperfeiçoamento device, controlling the network traffic lights operating
de Pessoal de Nı́vel Superior - Brasil (CAPES) - Finance Code 001. state.
The main sensors types used to measure vehicles flow for was considered the insertion of a pedestrian button for each
a given intersection are: magnetic and infrared sensors and controller circuit. The electronic system high-level architecture
digital cameras [2], [17], [18]. diagram can be seen in Figure 2.
The wireless traffic lights used together with several wire-
less sensors, allows the creation of strategic plans in order POWER SOURCE
to control and synchronize the traffic and for prioritizing
certain routes and keeping constant, the vehicles speed, for RTC
LINE VDC1
J1 +5V
1 2 3
Vac_in1 Vdc_out
2
VAR1 C1
1 4
Vac_in2 GNDout
NEUTRAL
Fig. 1. Traffic lights comparison, wired (upper avenue) and wireless (lower GND
avenue) communication. U1
VOUT
GND
VIN
DC_LAMP
According to Figure 1, a centralized traffic light control J2
1
2
3
2
system communication using cable, only one controller per 1 C4
+5V GND
+3V3
intersection is required. However, when removing all commu- C2
nication cables, it is necessary that all semaphores from the GND
156
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on May 08,2024 at 21:30:31 UTC from IEEE Xplore. Restrictions apply.
2019 Sixth International Conference on Internet of Things: Systems, Management and Security (IOTSMS)
U2 U3
TABLE II
RX_STM32
SENS_AC_R_S 10 18
PA0-WKUP PB0
SENS_AC_Y_S 11 19
PA1 PB1 ACTUATION TRUTH TABLE , WITH THE DC LAMP BURNT.
RX_MSP
RX_MSP
TX_MSP
TX_MSP
RST_RF
RST_RF
12 20
PA2 PB2/BOOT1
13 39 RST_RF
GND
GND
3.3V
3.3V
PA3 PB3/JTDO
SENS_AC_G_S 14 40 SENS_DC_R_S
5V
5V
PA4 PB4/JNTRST
SENS_AC_R_P 15 41 SENS_DC_Y_S R1
SENS_AC_G_P 16
PA5
PA6
PB5
PB6
42 TX_STM32 Input MOSFET BJT Output Situation
1
7
2
8
3
9
4
10
5
11
6
12
17 43
PA7 PB7
0V Blocking Blocking 3.3 V Lamp burned
AC_R_S 29 45 SENS_DC_G_S R2
PA8 PB8
3.3 V Driving Blocking 3.3 V Lamp supposedly on
RX_STM32
TX_STM32
RST_RF
SWDIO 5 2 C5
2 Y1 OSC_IN/PD0 PC13-TAMPER-RTC
SWDCLK 6 3
3 OSC_OUT/PD1 PC14-OSC32_IN GND
4
4 C6 PC15-OSC32_OUT damaged lamp can be detected when both the MOSFET (Q1)
2
1
GND Y2
44
BOOT0
GND C7 and the BJT (Q16) are blocked.
1
7
NRST GND
BT1
N P 1
GND VBAT
R3 C8 24 23
VDD_1 VSS_1
+3V3
36
48
VDD_2
VDD_3
VSS_2
VSS_3
35
47
D. Electronic AC Current Sensor Circuit
GND GND 9 8
VDDA VSSA
C9 C10 C11 C12 C13 C14 To control and monitor AC lamps, the electronic circuit
GND
of Figure 6 was designed. It has the same idea of burned
GND GND GND GND GND GND
lamps detection seen in the previous section, but because its
circuit has a AC power supply, the circuit has undergone some
Fig. 4. Microcontroller schematic circuit.
adjustments.
R29
precision crystal, Y2. The RTC peripheral will be used as a LINE 2
J8
1
clock source for the lamp timers adjustment as well as for the
4
Q11 R31
U4
synchronization between the network semaphores. U6
+3V3
1 6
D1
SENS_AC_R_S
R33
C. Electronic DC Current Sensor Circuit R35
NEUTRAL 2 5
2
+5V
One way to detect the light bulb state, whether it is working R37 R38 Q13
4
GND
normally or if it is burned, is to measure a current signal. For R41
C15
AC_R_S
the particular case of a DC lamp, the current sensing circuit
GND GND GND
of Figure 5 was designed. It also allows to control the focus
groups via the MOSFET transistor (Q1).
Fig. 6. Schematic burnt lamps sensor circuit, with AC power.
DC_LAMP J3 DC_LAMP
In this way, the lamp switching signal is sent to the
SENS_DC_R_S
2
1
R31
circuit input, AC R S, referring to the lamp AC switching
DC_R_S
that represents the red signal. The lamp status is read via
R35
Q1 R33 the circuit output, SENS AC R S. The loads are driven by
Q16
R6
R4
an optocoupler circuit (U4) which provides the trigger signal
for TRIAC, which, when in conduction, provides the supply
signal for the AC load. To check if the load is conducting
GND GND GND GND GND
current, another optocoupler circuit is inserted and when the
lamp is working correctly, emits a 0 V output signal. The
Fig. 5. Schematic burnt lamps sensor circuit, with DC power. circuit behavior of Figure 6 can be analyzed by Tables III and
IV.
Observing the input signal (DC R S - controlling the red
lamp signal) behavior, the voltage levels of their respective
TABLE III
output (SENS DC R S) can be found. Tables I and II sum- ACTUATION TRUTH TABLE , WITH THE AC LAMP WORKING NORMALLY.
marize the circuit function.
Input TRIAC Output Situation
TABLE I 0V Blocking 3.3 V Lamp off
ACTUATION TRUTH TABLE , WITH THE DC LAMP WORKING NORMALLY. 3.3 V Driving 0V Lamp on
In order not to damage the microcontroller’s input pins, in Input TRIAC Output Situation
the output SENS DC R S, the resistors R31 and R33 values 0V Blocking 0V Lamp burned
were adjusted so that the signal did not exceed the 3.3 V input 3.3 V Driving 0V Lamp supposedly on
voltage limit.
157
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on May 08,2024 at 21:30:31 UTC from IEEE Xplore. Restrictions apply.
2019 Sixth International Conference on Internet of Things: Systems, Management and Security (IOTSMS)
FULL CYCLE
Device
M4IoT
Fig. 9. Model of an T intersection TW/TW.
N4IoT
158
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on May 08,2024 at 21:30:31 UTC from IEEE Xplore. Restrictions apply.
2019 Sixth International Conference on Internet of Things: Systems, Management and Security (IOTSMS)
VFG1
As described in Subsection III-B, the adopted microcon-
trolling system performed the execution of all the necessary
PFG1 routines to establish a wireless traffic management of all
semaphores in the network. The XMesh network proved to be
VFG2 feasible to manage the manage the data packets through the
N4IoT network layer, in addition to administering the message
PFG2
exchange through the M4IoT protocol.
VFG3
The actuator and sensor AC/DC circuits described in Sub-
sections III-C and III-D demonstrated their versatility in
PFG3 working with focal groups with 127/220 V AC and 12 V DC
power.
t The results obtained in Section IV for the T intersection
TW/TW demonstrated the designed traffic light controller cir-
Fig. 10. Temporal diagram of an T intersection TW/TW, theoretical.
cuit functionality, allowing all traffic lights at the intersection
to operate in synchronism.
Data collection by IoV applications, such as traffic accident
detection, shared with the proposed system, enables the en-
hancement of traffic light management systems, blocking and
creating alternative routes to not only avoid the traffic jams,
but also avoid new accidents.
Therefore, the designed traffic light controller circuit, be-
sides offering a new alternative to today’s traffic light control
systems, allows the study and development of technologies
that contribute to the transformation of large urban centers
into smart cities.
ACKNOWLEDGMENT
This study was financed in part by the Coordenação
de Aperfeiçoamento de Pessoal de Nı́vel Superior - Brasil
(CAPES) - Finance Code 001.
159
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on May 08,2024 at 21:30:31 UTC from IEEE Xplore. Restrictions apply.
2019 Sixth International Conference on Internet of Things: Systems, Management and Security (IOTSMS)
160
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on May 08,2024 at 21:30:31 UTC from IEEE Xplore. Restrictions apply.