You are on page 1of 6

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

net/publication/320852827

Traffic Light Using Arduino Uno and LabVIEW

Article · October 2017

CITATIONS READS

0 6,308

1 author:

Bogdan Mihai
Lucian Blaga University of Sibiu
21 PUBLICATIONS   28 CITATIONS   

SEE PROFILE

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]ulbsibiu.ro

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

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 (http://zone.ni.com/reference/en-XX/help/371361H-01/lvconce
pts/intro_to_vis/).
Represented in Figure 4 is theFront Panel of the traffic light. It contains the following
controlsandindicators:
-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 (http://sine.ni.com/nips/cds/view/p/lang/ro/nid/212478).
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 (http://www.ni.com/getting-started/labview-basics/execution-
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
(http://www.ni.com/getting-started/labview-basics/shift-registers).
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

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

References
Dinesh K., N., Bharagava Sai,G., (2013): Trafic Control System Using LabVIEW, Global Journal of
Advanced Engineering Technologies, ISSN: 2277-6370, Vol2-Issue2-2013
https://www.arduino.cc
http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/intro_to_vis/
http://sine.ni.com/nips/cds/view/p/lang/ro/nid/212478
http://www.ni.com/getting-started/labview-basics/shift-registers
http://www.ni.com/getting-started/labview-basics/execution-structures

View publication stats