You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.


Traffic Light Using Arduino Uno and LabVIEW

Article · October 2017


0 6,308

1 author:

Bogdan Mihai
Lucian Blaga University of Sibiu


Some of the authors of this publication are also working on these related projects:

CityPulse View project

All content following this page was uploaded by Bogdan Mihai on 04 November 2017.

The user has requested enhancement of the downloaded file.

Traffic Light Using Arduino Uno and LabVIEW

Mihai Bogdan

Computer Science and Electrical Engineering Department,

“Lucian Blaga” University of Sibiu, 550025, Romania,
E-Mail: mihai.bogdan[at]

The purpose of this paper is to design and implement a low cost systemintended in terms of
hardware and software,to make a street traffic light for cars.This system will be built using the
Arduino Uno development platform, and programming will be done using the LabVIEW
graphical programming.Hardware resources that will be used in the paper are: Arduino Uno,
a red, yellow and green LED, a breadboard, 3 x suitable resistors for the LEDs you have (
probably 220 Ohms is fine) and connecting wires. The results will be displayed through the
serial interface on the computer in the LabVIEW program, and also on the three LEDs on the

Keywords: Traffic lights,Arduino, LabVIEW, Case structure, Enum Constant

1 Introduction
Traffic light is an optical signaling device that indicates different signals related to traffic, rail,
naval and pedestrian.The traffic light aims,a traffic safety(Dinesh, 2013).
This paper aims to create a virtual instrument for controlling a street traffic light.
For implement this project we will need the following materials: an Arduino UNO,breadboard,
3 LEDs(Red, Yellow and Green), 3x220 ohm resistors and jumpers wires to connect.

Figure 1.The Arduino Uno board

The 12th International Conference on Virtual Learning ICVL 2017 287

Figure 2.The components necessary for the elaboration of the technical project

Figure 3. The hardware of the traffic light

2 The Virtual Instrument of the traffic light

Programs developed in LabVIEW are called virtual instruments or Vis, and have the extension .vi.
These programs have the role of receiving data from the user or from the computer interfaces with
the process, processing them and then displaying, storing or transmitting them remotely.
A VI contains the following three components:
- Front Panel—Serves as the user interface.
- Block Diagram—Contains the graphical source code that defines the functionality of the VI.
- Icon and Connector Pane—Identifies the interface to the VI so that you can use the VI in
another VI. A VI within another VI is called a subVI. A subVI corresponds to a subroutine in text-
based programming languages (
Represented in Figure 4 is theFront Panel of the traffic light. It contains the following
-A control for setting the serial port to which Arduino is connected;
- A boolean Stop control to turn off the virtual instrument;
- 3xLEDs indicators, belonging to the traffic lights.
288 University of Bucharest and “L. Blaga” University of Sibiu

Figure 4. The Front Panel of the VI

To make the Block Diagram of the VI (Figure 5), we will use the LINX software. LINX provides
easy to use LabVIEW VIs for interacting with common embedded platforms, like Arduino.
LINX is an open source project by VI Package Manager and is designed to make it easy to
develop embedded applications using LabVIEW. LINX includes VIs for over 30 of the most
common embedded sensors as well as hardware agnostic APIs for accessing peripherals like digital
I/O, analog I/O, PWM, I2C, SPI, and UART (
The BockDiagram of the VI, also contains a While loop and a threesub-diagramsCase structure.
A While Loop, executes the code it contains until a condition occurs. A Case structure has two or
more sub-diagrams, or cases (
structures).The Case selector is Enumtype, with three items: RED, YELLOW and GREEN.At the
border of the While loop I created a shift register. Use shift registers when you want to pass values
from previous iterations through the loop to the next iteration. A shift register appears as a pair of
terminals, shown as follows, directly opposite each other on the vertical sides of the loop border
The 12th International Conference on Virtual Learning ICVL 2017 289

Figure 5. The BlockDiagram of the VI

Figure 6. The three under the charts of the House structure

Virtual instrumentation is a concept introduced over 30 years ago, being born of the desire to use
the computer to build a measuring instrument.
The main advantages of virtual instrumentation:
- does not require physical storage space;
290 University of Bucharest and “L. Blaga” University of Sibiu

Figure 7. The Experimental Stand

- can be with distributed items (can measure in multiple places at one time);
- the data can be transmitted over the internet (the measurement lab can be located in a certain
place and the analysis of the results can be done in a completely different way);
- measurements can be made in dangerous places for humans, and it is not necessary to have it
in the immediate vicinity of the measuring system
- flexibility (virtual instruments can be easily transformed by programming);
- Costs are significantly reduced (a single, multifunctional DAQ device with the associated
software can replace a lot of other dedicated physical instrument).

Dinesh K., N., Bharagava Sai,G., (2013): Trafic Control System Using LabVIEW, Global Journal of
Advanced Engineering Technologies, ISSN: 2277-6370, Vol2-Issue2-2013

View publication stats