{'fraction_non_alphanumeric': 0.02242657044193536, 'fraction_numerical': 0.007527257207154774, 'mean_word_length': 4.964822957648693, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Arduino Based Traffic Light System With Integrated LED Advertising Display

Rapid advancement in scientific knowledge and growth in worldwide economic activities has led to a steep rise in the volume of vehicular activity for human and product mobility hence leading to more road constructions. Vehicular Movement controls in addition to controllers are, therefore, a critical necessity of the modern – day society. Toward this end, this paper is aimed toward the design of microcontroller-based traffic control device taking as a case study the complex layout and linkage among the service roads of the Senate building and College of Science and Technology, Covenant University, Nigeria. The Arduino platform is the microcontroller preference for this idea. Also, to make this idea more effective and productive, a Light Emitting Diode (LED) advertising displays has been incorporated into its implementation to take advantage of the red light wait time to disseminate useful information or facts.


Introduction
In the emerging modern society, electronics, robots and artificial intelligence are replacing humans in many fields of endeavor one of which is traffic controlling. They are very reliable and error free. To persons who journey or adventurers, congestion means lost time, missed opportunities, and dissatisfaction. To an employer, congestion means lost workers efficiency, delivery delays and increased costs. To resume at work and to disseminate useful information to various offices within a given area during peak hours, becoming more difficult for workers and other member of the community. Due to congestion problems, traffic of four road lanes is controlled using microcontroller for 24 hrs. and this lessens waiting time for the road users. [1] [2]. As an added productive and incentive feature, wait times at the turning on of the red light can be effectively utilized for information dissemination since it is the time the driver and passengers are stationary and focused on the light to turn green. The information disseminated could be adverts, public information, and weather forecast and so on. The adverts can serve as a source of income generation creating a very lucrative Return on Investment (ROI). Full color or monochrome LED displays are normally employed for outdoor information dissemination. These apart from disseminating information, will add colorful aesthetic hues to the nearby surroundings beautifying the whole place [3] [4]. The case study of this paper is the interlocking junction between the senate building and the college of science and technology Covenant University Nigeria as shown in Figure 2. This junction is a staggered link between the two main entrance and exit roads. Due to its staggered nature, maneuvering into any of the two roads can be very daunting and dangerous. Therefore, the need for a traffic control system is crucial. Human traffic control at this junction is impractical as the road itself is too narrow to accommodate a human traffic officer. Also, the staggered nature of this junction makes it difficult to find a suitable place to locate a traffic officer. Therefore, an electronic traffic control system (microcontroller based) is more than adequate as it defies these two limitations for a human traffic officer.
The rest of this paper involves a detailed review of related studies in section 2. In section 3, the traffic light system with integrated led advertising display algorithm is presented by describing the various algorithms involved. The discussion of the findings and comparison is presented in section 4 while section 5 concludes the paper.

Literature Review
This section deals with a review of previous related work on Traffic Light System and Integrated Led Advertising Display. According to Zhang et al. [5],it was stated that in the approach of lattice hydrodynamic model with the partial reduced lane for numerical simulation, various complex traffic jam patterns such as triggered stop-and-go (TSG), pinned localized cluster (PLC), oscillatory congested traffic (OCT), homogeneous congested traffic (HCT), homogeneous synchronized traffic (HST) and moving localized cluster (MLC) can be reproduced. In [6], it was established through extensive advertising survey, that there is prevalence of pervasive computing technologies to the domain of advertising. In [7], the paper developed a selection of control approach also showed their efficiency in dispersing incident-based traffic jam in a 2-way rectangular grid network. By means of the spatial topology of traffic jam propagation, the authors applied the aim of vehicle movement ban that is frequently adopted in real urban networks as a temporary traffic management measure. Four control plans were developed, that are referred to as single-line control, multiline control, area control, and diamond control. Authors also explored a combination of those control plans and figured out the impact of these control plans on the changes in traffic jam size and congestion delay. Lastly, the paper simulates the method of traffic congestion formation and dissipation using the cell transmission model and displays the performance of the projected plan of action. Simulation outcome showed that the proposed plans can indeed disperse incident-based traffic jams thoroughly. Light emitting diodes (LEDs) are being used increasingly as light sources in life sciences applications such as in vision research, fluorescence microscopy and in brain computer interfacing. According to Teikari et al. [8], presented a low priced but effectual visual stimulator based on light emitting diodes (LEDs) and open-source Arduino microcontroller prototyping platform. In another study [9], Mainstream traffic flow control (MTFC shields) was planned as a new and effective motorway traffic management tool, and its likely execution and principal impact on traffic flow efficiency was analyzed. Monk in [10], introduced details about exploiting the Arduino capabilities (power management, integration with one-wire and other types of physical interfaces, Wi-Fi and much more). In [11], Arduino Programming allows to quickly and instinctively develop programming skills by way of sketching in code. It also provides understanding of the basic framework for developing Arduino code. In [12], a four lanes intersection was introduced using sensor in order to sense the nearness of vehicles holding up at or drawing closer to an intersection. This incorporated VHDL code and finite state machine and transferring the VHDL configuration code on ALTERA kit for confirmation of design.  3 Liu et al. in [13], proposed two protected smart traffic light control plans. The authors adopting fog computing whose safety is established on the stability of the computational Diffie-Hellman puzzle and the hash collision puzzle accordingly. The plans presume the traffic light is a fog device. When the vehicle density is high the 1 st plan is not efficient while the 2 nd plan is fog device friendly and more efficient even when the vehicle density is high. Therefore, the plans can avoid the problem of single point failure and it is fog device friendly. In [14], an urban transport system is viewed as an intricate arrangement with multiple developments gotten from its parallel nature as regard transportation processes. Structuring a procedure for selecting and affirming a variety of options in transportation system advancements as a mathematical model raised a platform for justifying the following: (i) a digital model of a city street and road network as well as public transport routing system (ii) a specific system of nonlinear dynamic models of the transport and economic system of a region (iii) instruments for predicting and processing calculation experiments. These procedures allow for carrying out a variation of simulations in the advancement of a transport system. In [15], the paper presented inductive loops as a tool for measuring the denseness of traffic. Data related to traffic denseness as regards different lanes, acquired through the deployment of inductive loops, can be received by using a programmed microcontroller. The paper also discusses designs that reduce traffic jams and ensure that individuals in less clogged lanes are not delayed for an excessive amount of time. Programs can be developed to absolve traffic jams but this depends on the density of traffic. In a bid to reduce traffic jams in multiple lanes, this paper developed a new inductive loop structure which corresponds with the algorithm used in the paper. Asides time delay they have been multiple cases of deaths due to traffic jams as aid cannot be gotten on time where it is needed. The model proposed utilizes radio transmitter-receiver in detecting the presence of important vehicles which include fire brigades, ambulances, police vehicles etc. and gives priority to these vehicles by providing immediate right of way through the anticipation of traffic signals. The model also includes utilization of infrared sensors that detected vehicles that disrespect the red light and sounds a buzzer to inform the police. Abbas et al. [16], introduced an active traffic light phase scheme in order for single-isolated junction. Advanced controlling technique was compared with four other techniques also, these demonstrated high quality efficiency in terms of lowering the average and highest sequence lengths, enhancing the given green time amount as wanted. It also improved the junction throughput. Again, it maintained high quality traffic light balance at entire levels of request. Pang in [17], focused on providing a review of research works that have been undertaken in the smart traffic light fields in relation with the microcontroller-based traffic management systems. Recent discoveries and improvements on the traffic light management systems are discussed in the paper with an addition of futures works related to the research. In [18], Geng and Cassandras discussed the challenge faced with traffic light control situated at multiple intersections around a particular environment by viewing these traffic light controls as a postulated hybrid system whilst also, constructing a Stochastic Flow Model (SFM) applicable to it. Utilizing small Perturbation Analysis (SPA), this deduces approximations of cost metric on-theline gradients as relates to the operable red and green cycle periods. The IPA determinants acquired demand computing traffic light switches and approximations in the advent of specific events such as car flow rates. The determinants are utilized to repeatedly fine-tune light cycle periods to enhance performance and in parallelism with an ideal gradient-based design, to acquire choicest values that conform to varying traffic conditions. Simulation outcomes are incorporated to demonstrate the approach. In [19], the authors explained that, in the previous years, the lab exercises conducted for their Digital Systems course were customarily individualistic. The inability for students to apply knowledge hindered them from totally discerning a complete digital system throughout the course program. A non-complex traffic light controller model project was initiated to mitigate this drawback and to enable students attain experience in getting a better understanding of installation and interfacing challenges of a new and novel digital system. Students installed a completely operational traffic signal controller designated for a four-way junction. Sensors are incorporated into the junction to monitor and identify oncoming vehicles or vehicles that might be parked at the junction. The model includes various theories and devices that were elaborated on further during the duration of the course program. Comprised in these, were: VHDL for modeling and synthesis, memory interfaces, FPGAs, embedded microprocessors, finite state machines, serial communication, and signal synchronization. The uniqueness of the methodology approach boosts student's span of knowledge and creativity. This article at the end aimed at giving students a deeper appreciation of digital system design methods via hands-on experience. According to Vlasov [20], the paper made use of a cyclic balance model detailing transportation demand and supply, so as to discover an ideal traffic light control approach. The traffic light control approach is ascertained by disputing the topic of enlargement of the intensive traffic control to constraints on the density of arriving and leaving flows and the string length at corresponding groups of networks. One characteristic of the proposed model employed in the article is a modified approach to transportation networks. A suggestion was made that surplus traffic demand control zone should be centered on a group of networks specified by the availability of a manageable line. In [21], the programming platform for the simulation of the traffic light system was done using C++ programming language while the electronic circuit used was designed with some semiconductor components like transistors, microprocessor, resistors and light emitting diodes (LEDs) to accomplish best performance of the traffic lights. In this paper, an enhanced and engaging traffic light solution has been developed for the case study junction. The basic cross-road traffic light algorithm was employed for the traffic lighting sequence. And a RED light wait time is now made more engaging, informative and productive by the incorporation of a full color LED advert displays.

Methodology
Design and Implementation of the Proposed Algorithm In this section, focus is on the steps taken to produce the result expected. This includes the algorithm design, Hardware and Software design, then simulation with results generated and recorded. The implementation was carried out with the Arduino Uno prototyping platform.
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Open Source, meaning the user has the right to modify the software as he/she pleases. The Arduino is actually a microcontroller based prototyping platform and is able to: a, read inputs, such as reading a sensor, a key press on a keypad, b, turn on an output such as activating a motor, or turning on an LED as in this case. The Arduino comes in many variant flavors categorized in either 8bit or 32bit processing power. It is a very popular platform with a very active support community, a large Library repository, and lots of easy add-ons called shields to provide extra capabilities. Microcontroller based designs are easily implemented on the Arduino platform as the programs are written in C and a host of very good library functions are available reducing project development time. We refer to [20] to check the pin out diagram of the Arduino Uno Prototyping Board. The pin labeling is as follows starting from left to right in an anti-clockwise direction: x Power Jack Input (5V to 13V input) x Power and Ground Pins (Vin, 5V, 3.3V, GND -red, red, red, black) x Analog Input Pins (A0 -A5: pink) x Arduino Microcontroller direct programming input (ICSP -In-Circuit Serial Programming) x Digital Input and Output Ports (0 -13: pink) x Analog reference input for external voltage input to the in-built ADC module (Aref: yellow) x I 2 C inputs (SCL, SDA: blue) x USB to Serial Converter Microcontroller direct programming input (ICSP -In-Circuit Serial Programming) x Arduino Platform Reset button x USB input Jack for PC connection The design of the traffic light sequence implemented in this solution is time-based and was simulated in software using the Proteus VSM environment and in Hardware using LEDs. A special function of the Arduino programming language was used in the development of the time-based sequence of the traffic light design. This function is called Millis (). The use of the Millis () function enables the inclusion of delays in Arduino programs without inhibiting other program functions from running. That is, instead of using the traditional delay () routine which wastes processing power and locks the entire processor in a spot for the entire delay period, the use of the Millis () function can add delays in Arduino programs while at the same time allowing the processing of other functions. This is so important as room is left for future improvement of the design for instance by the inclusion of sensors etc. LED monochrome or full color displays are normally used for outdoor information dissemination. In this design, the full color LED display is considered for its unique characteristics of colorful information presentation, environmental beautification and incentive generation.

Light Switching Pattern Algorithm Design
The traffic light switching pattern algorithm is derived from the traffic flow study of the junction taken as case study. The junction is as shown the Figure 1. From Figure 1, given above the following Truth Table 1, describing the switching pattern for the implied case study junction was derived. Hardware prototyping of the Traffic lights switching sequence was carried out with the Arduino Uno platform. Other components employed are:

Hardware Design
x LEDs (red, yellow, green -4pcs each) x 1k resistors x Jumper wires The LEDs were grouped in three's as Red, Yellow, and Green with each group representing the traffic light at the installation points. For the Advertising Screen implementation, LED full color displays were considered. An LED display is made of up three basic components: x the LED matrix x the controller computer system and lighting circuitry x high current DC power supply Table 1. Traffic light Switching and timing Pattern Algorithm

The LED matrix
The LED matrix is an arrangement of LEDs in a rows and columns formation. Each element of this row and column arrangement becomes a lighting dot of the entire screen and form what is known as a Pixel. For monochrome displays, single color LEDs are used as each LED pixel dot while for full color displays, RGB (Red, Green, and Blue) are used as each LED pixel dot. The number of LEDs arranged in this row and column formation is the number of pixels required to produce the desired image. Also, the quality of image (resolution) to be displayed is a function of the number of pixels available. High quality images will require more pixels and hence more LEDs per surface area of the screen and vice-versa. Some screen resolutions and their pixel densities used for image display are as follows: x 640 * 480 (VGA) x 720 * 576 (SD) x 1280 * 720 (HD) x 1920 * 1080 (Full HD) For instance, the VGA resolution pixel density is 640pixels horizontal by 480pixels vertical. Therefore, if the LED matrix is to be used for VGA quality image output, then there would be 480 rows of LED pixel dots with 640 LED pixel dots per row. This makes a total of 3,072 LED pixel dots making up the entire screen. The nomenclature shown above is normally employed in screen resolution description of TVs and computer monitors but in the LED display terminology, the distance (usually measured in mm) between to LED pixel dot is used. This is often called the Pixel Pitch. So, for instance if for a particular resolution of an LED display the distance between two LED pixel dot is 2mm, the LED display is said to be of resolution P2 or a pixel pitch of 2mm or just simply said: "a P2 LED full color display". Typical LED screen resolutions for outdoor use are: P5, P6, P7.62, P8, P10, P13, P16, P20, P22. As it would have been noticed by now, the higher the resolution, the smaller the distance between two LED pixel dots. Therefore, as the LED screen resolution descends from P22 to P5, the screen resolution and hence the image quality increases which implies the number of LEDs per surface area of the LED screen increases and hence the overall cost also increases. Three major factors determine the choice of the pixel pitch to use for a particular outdoor LED display application. These include: cost, size, and a third criteria known as the viewing distance. This is the distance between the display and the closest point an observer in front of the display would be without noticing a pixelated (grainy) image. The rule of thumb normally employed is: the pixel pitch value of an LED display represents the minimum good image viewing distance in meters (m). Hence, a P10 LED display has a minimum viewing distance of 10m etc. Size also determines the pixel pitch to use in an LED display. In the advertisement world, there are standard billboard dimensions by which LED displays sizes can be based upon. Some of these sizes and their nomenclature are: x 48 sheets (6m W by 3m H) x 96 sheets (12m W by 3m H) x Unpoled (18m W by 6m H) Recommended for this project scenario is a 48 sheets sized LED display with a pixel pitch of 10mm. (P10). With a pixel pitch of 10mm, the pixel density for the 48sheets sized LED display is 600 * 300 pixels which is very close to VGA quality.

The Controller Computer System and Lighting Circuitry
This is the computer board responsible for image processing in different from multiple sources. The image is processed into its RGB (red blue green) components with color values, scaled and then transferred to the LED screen through the lighting circuitry which turns on and off rapidly each LED pixel dot according to the RGB color values of each dot as scaled from the controller computer.

High Current DC Power Supply
Since each LED pixel dot is to be controlled separately, a high current DC supply is needed. Usually because the DC current requirement is great, the entire LED screen is assembled in modules with several modules grouped together and a high current DC supply connected to the group. Usually a typical LED screen would have several of these groups and hence several high current DC power supplies.

Software Design
The software algorithm is based on the truth table as described in section 4.1. The LEDs representing the traffic lights are switched on and off based on the truth table. Also, a delay is inserted in between each lighting sequence as described in the truth table. These delays provide the timing required between each light sequence. Delays used in software are achieved using the

3.4
Simulation and Results: The circuit design was simulated both in software (Figure 3a and 3b) and hardware (Figure 4). For the software simulation, the Proteus VSM environment was employed. The Proteus VSM environment is an innovative software from Lab center Electronics suitable for Analog, digital and mixed mode circuit analysis. It is widely used in schools globally as the software is very intuitive and easy to use. Below are several screenshots of the Proteus VSM simulation results with the switching pattern generated as a set of waveforms. The delay values used in the simulation were made short to facilitate quick response of the design so as to be able to capture the outputs as waveforms in the shortest possible time.

Result and discussions
Traffic is frequently contemplated as a type of fluid flow network, just like an electrical circuit. Nevertheless, what is different about the fluid network is that the flow is alternating, halting at Red lights, and begin again at Green lights. It is the aim of the traffic engineer to make perfect or upgrade the traffic flow within a given road network. The proposed work was compared to the other researcher works, and it was far better in term of low cost, and programming time. For example, some authors used VHDL code, and ALTERA kit to achieve four lane intersections which are more complex and expensive compared to the proposed method which the design is based on microcontroller, and easier to implement on Arduino platform. The Other benefit of this proposed work to the university, and the road user are: x Helps movement and help conduct an orderly flow by giving right of way to cars and not others. x Helps lessen the number of accidents at the proposed area.
x Also help university management to disseminate useful information via LED advertisement display such as special announcement, activities on campus, weather forecast, and so on. The proposed controlling technique was compared with other techniques that used different methods to achieve their various results but none of the authors ever thought of incorporating LED adverting display with traffic light system or taking the advantage of using Red light wait time to disseminate useful information. This showed a good performance in term of optimizing Green time amount as needed, Incorporated LED advertising displays by utilizing Red light wait time to disseminate useful information, also maintained a good, and standard stability at all level of demand.

Conclusion and future work
Although several studies have covered the areas of traffic controllers and road congestion [22][23][24][25][26][27][28][29][30][31]. This study has uniquely tried to highlight the need for duplicity of purpose for the traffic light system. An enhanced and engaging traffic light solution has been developed for the case study junction. The basic cross-road traffic light algorithm was employed for the traffic lighting sequence. The RED light wait times is now made more engaging, informative and productive by the incorporation of a full color LED advert displays. This solution not only provide traffic control but also provides an avenue for revenue generation to quickly replenish the money used for the traffic light installation, cater for future maintenance costs and also revenue generation for other use.  10 For future work, the proposed techniques will be incorporated with LED Gender displays to display the number of each gender in the vehicles by utilizing RED light wait time for security purpose.