Inter-Vehicle Communication Using Li-Fi Technology (Report)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 42

Inter-Vehicle Communication Using Li-Fi

Technology

Abstract

Traffic safety applications using vehicle-to-vehicle (V2V) communication is an


emerging and promising area within the ITS environment. Many of these applications require
real-time communication with high reliability. Li-Fi is a wireless communication system in
which light is used as a carrier signal instead of traditional radio frequency as in Wi-Fi. Li-Fi is a
technology that uses light emitting diodes to transmit data wirelessly. Li-Fi is a form of Visible
Light Communication (VLC). VLC uses rapid pulses of light to transmit information wirelessly
that cannot be detected by the human eye. This paper is determined to enhance the quality
of Intelligent Transportation System (ITS) with the help of Visible light communication
technology using a Li-Fi transmitter and receiver kit. The V2V communication system
consisting of the Li-Fi transmitters placed on a leading vehicle and the Li-Fi receiver is placed
on a following vehicle. The received data can be used for further development in vehicle
control and to avoid collisions by controlling the speed of the vehicle.
INTRODUCTION

Unfortunately, most counties in the world has an alarming record in number of


death/disability due to tremendous number of accident. Accidents are occurred because of
unawareness of the people. Researchers found that 57% of accidents where due to solely
driver factors, which include his behaviour, decision making ability, reaction speed and
alertness.

The studies show that the accidents can be avoided if driver was provided with
warning message few seconds before so that, they can take some alternative route or be
cautious to avoid traffic congestion or accidents. The vehicular adhoc network was adopted to
mimic the adhoc nature of highly dynamic network. In this network two vehicles can
communicate with each other.

For Vehicle safety a new technique can be created. VANET Communication is classified
into two different types’ Vehicle to Vehicle communication and Vehicle to Infrastructure
Communication. The vehicle to vehicle communication is a communication between two
vehicles (i.e.) one hop communication, such as car to car communication. The vehicle to
Infrastructure communication is communication between vehicle and road side
Infrastructure. It acts as a multi hop communication. The vehicle to vehicle communication is
a system designed to transfer basic safety related with vehicles to provide warning to drivers
concerning accidents. The main objective of this system is to alert drivers when he closes to
front vehicle. The communication between the vehicles takes place by means of LI-FI.

The distance between two vehicles is measured using Ultrasonic sensor. The
microcontroller controls the entire circuit and is programmed to notify the driver with a
message when the vehicle comes within the Line of sight. There are several obstacles that
hinder the safety while driving. The vehicle such as car or buses may break down in middle of
the road especially during the night time these becomes a serious obstacles mainly in
highways were the roads are not lighted. The vehicle coming behind may not judge the
stationary vehicle and may cause accident; the vehicle coming behind may hit hardly to the
back of stationary vehicle and may lead to greater damage. Many scenarios were considered
for the design of the system.
SYSTEM DESIGN:

The system is designed for two vehicles. The Vehicle Module (VM) is embedded with
the vehicle so acts as moving nodes. It is responsible for communicating with vehicles and
also the display the message received from vehicles. It consists of different sensors,
microcontroller, Light emitting diode and photo diode to retrieve data. The vehicle module
has many different features such as high performance, architecture simplicity, cost sensitivity
and ultra-low power consumption. It consists of two major units Trans receiver Unit and a
Control Unit. The Trans receiver unit is responsible for transferring data between two vehicles
and the control unit is responsible for controlling the device.
Visible Light Communication:

LED's can be switched on and off very quick. For transmitting data this way all that we
require is LED's and controller that code data into Led’s. Parallel data transmission can be
done by using array of LED's or by using red, green, blue LED's to alter light frequency with the
frequency of different data channel. Advancements and enhancements in this field generate a
speed of 10 Gbps. But amazingly fast data rates and lowering band widths are not the only
reasons that enhance this technology. Li-fi usually is based on light and so it can be probably
implemented in aircrafts and hospitals that are prone to inference from radio waves. Unlike
Wi-Fi Li-Fi can work even under-water which makes it more advantageous for military
operations. Radio waves are replaced by light waves in data transmission called Li- Fi.

Li-Fi Transceiver:

Receives the information from the controller and it modulates the data to light signal
and transmits to the receiver section. The transmitter part modulates the input signal with
the required time period and transmits the data in the form of 1‟s and 0‟s using a LED bulb.
These 1‟s and 0‟s are nothing but the flashes of the bulb. Power supply DC +12V and Data
UART (universal asynchronous receiver transmitter). Input (TTL) is the input specification for
the transmitter section.

Receives the modulated information from the transmitter section and demodulates
the signal in order to recover the original data. . The receiver part catches these flashes using
a photodiode and amplifies the signal and presents the output.
BLOCK DIAGRAM:

LCD 4 X 20

RF Module
433 MHz

ATMEL
Li-Fi
ARDUINO
Transmitter

Li-Fi
Receiver

Ultrasonic
module

IR Signal RF Module
Sensor
Conditioning 433 MHz
System Working:

Communication between Vehicles and calculation of distance between vehicles is


achieved by using Spread Spectrum Technique and ultrasonic sensor. In this, a vehicle
(Vehicle-A) which is having ultrasonic sensor gives the information about distance between
target vehicle (Vehicle-B). However, in this system, communication between only two vehicles
is done, we can also design number of target Communication and ranging technologies
forcommunication between vehicles by Using Spread Spectrum Technique.In this project we
can send messages to the receiving vehicle one by one depending on condition.We are also
using speakers for voice output and LCD to display message on both transmitter and receiver
side.We are also using ultrasonic senser to keep safe distance between vehicles to avoid
accidents.If the distance between vehicles is less then that of minimum distance then buzer will
get turned on.

According to the condition, user will give the input to the microcontroller using keypad
switches.Microcontroller will convert the input into ASCII & then the ASCII value is given to
output pins of microcontoller on which Li-Fi transmitter is connected.Li-Fi converts ASCII
value into visible light spectrum. Now at the receiver side, Li-Fi receiver will receive the
message sent by LED (continious 0’s and 1’s) and decode the information and gives it to the
output unit LED and speaker
Hardware description:

Arduino UNO
Overview

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It


has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset
button. It contains everything needed to support the microcontroller; simply connect it to a
computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed
as a USB-to-serial converter. Revision 2 of the Uno board has a resistor pulling the 8U2 HWB
line to ground, making it easier to put into DFU mode. Revision 3 of the board has the
following new features:

1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage
provided from the board. In future, shields will be compatible both with the board that use
the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V. The second
one is a not connected pin, that is reserved for future purposes.

Fig 2.1 Arduino UNO


Microcontroller ATmega328

Operating Voltage 5V

Input Voltage (recommended) 7-12V

Input Voltage (limits) 6-20V

Digital I/O Pins 14 (of which 6 provide PWM output)

Analog Input Pins 6

DC Current per I/O Pin 40 mA

DC Current for 3.3V Pin 50 mA

Flash Memory 32 KB of which 0.5 KB used bybbootloader

SRAM 2 KB

EEPROM 1 KB

Clock Speed 16 MHz


Power

The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's
power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the
POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.

The power pins are as follows:

VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the
VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator,
and can damage your board. We don't advise it.

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.

GND. Ground pins.


Memory

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM and
1 KB of EEPROM (which can be read and written with the EEPROM library).

Input and Output

Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of
20-50 kOhms. In addition, some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for
details.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using
the SPI library.

LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though
is it possible to change the upper end of their range using the AREF pin and the
analogReference() function. Additionally, some pins have specialized functionality:

TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.

There are a couple of other pins on the board:

AREF. Reference voltage for the analog inputs. Used with analogReference().

Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button
to shields which block the one on the board.

See also the mapping between Arduino pins and ATmega328 ports. The mapping for the
Atmega8, 168, and 328 is identical.
Communication

The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-
to-serial chip and USB connection to the computer (but not for serial communication on pins
0 and 1).

A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For
SPI communication, use the SPI library.

Programming

The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For
details, see the reference and tutorials.

The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header; see these instructions for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available . The
ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:

On Rev1 boards: connecting the solder jumper on the back of the board (near the map of
Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground,
making it easier to put into DFU mode.

You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader). See this user-contributed tutorial for more information.

Automatic (Software) Reset

Rather than requiring a physical press of the reset button before an upload, the Arduino Uno
is designed in a way that allows it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the
reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip. The Arduino software uses this
capability to allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the lowering of
DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For
the following half-second or so, the bootloader is running on the Uno. While it is programmed
to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the
first few bytes of data sent to the board after a connection is opened. If a sketch running on
the board receives one-time configuration or other data when it first starts, make sure that
the software with which it communicates waits a second after opening the connection and
before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of
the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be
able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see
this forum thread for details.

USB Overcurrent Protection

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from
shorts and overcurrent. Although most computers provide their own internal protection, the
fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the
fuse will automatically break the connection until the short or overload is removed.
REGULATED POWER SUPPLY:

The power supplies are designed to convert high voltage AC mains electricity to a suitable
low voltage supply for electronic circuits and other devices. A RPS (Regulated Power Supply) is the
Power Supply with Rectification, Filtering and Regulation being done on the AC mains to get a
Regulated power supply for Microcontroller and for the other devices being interfaced to it.

A power supply can by broken down into a series of blocks, each of which performs a
particular function. A d.c power supply which maintains the output voltage constant irrespective of a.c
mains fluctuations or load variations is known as “Regulated D.C Power Supply”

For example a 5V regulated power supply system as shown below:


Transformer:
A transformer is an electrical device which is used to convert electrical power from one
Electrical circuit to another without change in frequency.

Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only
with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase in output voltage, step-down
transformers decrease in output voltage. Most power supplies use a step-down transformer to reduce the dangerously high
mains voltage to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is
no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron
core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little
power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up. The ratio
of the number of turns on each coil, called the turn’s ratio, determines the ratio of the voltages. A step-down transformer has a
large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of
turns on its secondary (output) coil to give a low output voltage.

An Electrical Transformer

Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

VS X IS=VP X IP

Vp = primary (input) voltage


Np = number of turns on primary coil
Ip = primary (input) current
RECTIFIER:

A circuit which is used to convert ac to dc is known as RECTIFIER. The process of conversion ac


to dc is called “rectification”

TYPES OF RECTIFIERS:

 Half wave Rectifier

 Full wave Rectifier

1. Centre tap full wave rectifier.

2. Bridge type full bridge rectifier.


Comparison of rectifier circuits:

Type of Rectifier

Parameter Half wave Full wave Bridge

Number of diodes 1 2 4

PIV of diodes Vm 2Vm Vm

D.C output voltage Vm/z 2Vm/ 2Vm/

Vdc at no-load 0.318Vm 0.636Vm 0.636Vm

Ripple factor 1.21 0.482 0.482

Ripple frequency f 2f 2f

Rectification efficiency 0.406 0.812 0.812

Transformer Utilization
Factor(TUF)
0.287 0.693 0.812

RMS voltage Vrms Vm/2 Vm/√2 Vm/√2


Full-wave Rectifier:
From the above comparison we came to know that full wave bridge rectifier
as more advantages than the other two rectifiers. So, in our project we are using full wave bridge
rectifier circuit.

Bridge Rectifier:
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-
wave rectification. This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired internally.

A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig (a) to achieve
full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown
and with single component bridges where the diode bridge is wired internally.

Fig (A)

Operation: During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is shown in the
fig (b) with dotted arrows.
Fig (B)

During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward biased
while D2 and D3 are in reverse biased as shown in the fig(c). The current flow direction is shown in the
fig (c) with dotted arrows.

Fig(C)

Filter:
A Filter is a device which removes the ac component of rectifier output but allows the dc
component to reach the load.
Capacitor Filter:

We have seen that the ripple content in the rectified output of half wave rectifier is 121% or
that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not
acceptable for most of the applications. Ripples can be removed by one of the following methods of
filtering.

(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage though it due
to low impedance. At ripple frequency and leave the D.C. to appear at the load.

(b) An inductor, in series with the load, prevents the passage of the ripple current (due to high
impedance at ripple frequency) while allowing the dc (due to low resistance to dc).

(c) Various combinations of capacitor and inductor, such as L-section filter section filter, multiple
section filter etc. which make use of both the properties mentioned in (a) and (b) above. Two cases of
capacitor filter, one applied on half wave rectifier and another with full wave rectifier.

Filtering is performed by a large value electrolytic capacitor connected across the DC supply
to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is
falling. The capacitor charges quickly near the peak of the varying DC, and then discharges as it
supplies current to the output. Filtering significantly increases the average DC voltage to almost the
peak value (1.4 × RMS value).

To calculate the value of capacitor(C),

C = ¼*√3*f*r*Rl

Where,

f = supply frequency,

r = ripple factor,

Rl = load resistance

Note: In our circuit we are using 1000µF hence large value of capacitor is placed to reduce ripples and to improve
the DC component.
Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. The maximum current they can pass also rates them. Negative voltage regulators are
available, mainly for use in dual supplies. Most regulators include some automatic protection from
excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed
voltage regulators ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator
shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your
unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative
lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the
output pin.

Fig 6.1.6 A Three Terminal Voltage Regulator

The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The
LM78XX offer several fixed output voltages making them useful in wide range of applications. When
used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective
output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is
available in the TO-252, TO-220 & TO-263packages,

Features:

• Output Current of 1.5A

• Output Voltage Tolerance of 5%

• Internal thermal overload protection

• Internal Short-Circuit Limited

• Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.
LM78XX Series Voltage Regulators

General Description

The LM78XX series of three terminal regulators is available with several fixed output voltages

making them useful in a wide range of applications. One of these is local on card regulation,

eliminating the distribution problems associated with single point regulation. The voltages available

allow these regulators to be used in logic systems, instrumentation, Hi-Fi, and other solid state

electronic equipment. Although designed primarily as fixed voltage regulators these devices can be

used with external components to obtain adjustable voltages and currents.

The LM78XX series is available in an aluminum TO-3 package which will allow over 1.0A load current if

adequate heat sinking is provided. Current limiting is included to limit the peak output current to a

safe value. Safe area protection for the output transistor is provided to limit internal power

dissipation. If internal power dissipation becomes too high for the heat sinking provided, the thermal

shutdown circuit takes over preventing the IC from overheating. Considerable effort was expanded to

make the LM78XX series of regulators easy to use and minimize the number of external components.

It is not necessary to bypass the output, although this does improve transient response. Input

bypassing is needed only if the regulator is located far from the filter capacitor of the power supply.

For output voltage other than 5V, 12V and 15V the LM117 series provides an output voltage range

from 1.2V to 57V.


SCHEMATIC AND CONNECTION DIAGRAM
LCD interfacing with MICROCONTROLLER (89c51)

Basics of LCD

►DDRAM - Display Data RAM

Display data RAM (DDRAM) stores display data represented in 8-bit character
codes. Its extended capacity is 80 X 8 bits, or 80 characters. The area in display
data RAM (DDRAM) that is not used for display can be used as general data
RAM. So whatever you send on the DDRAM is actually displayed on the LCD. For
LCDs like 1x16, only 16 characters are visible, so whatever you write after 16
chars is written in DDRAM but is not visible to the user.

Figures below will show you the DDRAM addresses of 1 Line, 2 Line and 4 Line
LCDs.

Figure 2: DDRAM Address for 1 Line LCD

Figure 3: DDRAM Address for 2 Line LCD

Figure 4: DDRAM Address for 4 Line LCD


►CGROM - Character Generator ROM

Now you might be thinking that when you send an ascii value to DDRAM, how
the character is displayed on LCD? so the answer is CGROM. The character
generator ROM generates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit
character codes (see Figure 5 and Figure 6 for more details). It can generate 208
5 x 8 dot character patterns and 32 5 x 10 dot character patterns. User defined
character patterns are also available by mask-programmed ROM.

Figure 5: LCD characters code map for 5x8 dots


Figure 6: LCD characters code map for 5x10 dots

1) As you can see in both the code maps, the character code from 0x00 to 0x07
is occupied by the CGRAM characters or the user defined characters. If user
wants to display the fourth custom character then the code to display it is
0x03 i.e. when users send 0x03 code to the LCD DDRAM then the fourth user
created character or pattern will be displayed on the LCD.
►CGRAM - Character Generator RAM

As clear from the name, CGRAM area is used to create custom characters in
LCD. In the character generator RAM, the user can rewrite character patterns
by program. For 5 x 8 dots, eight character patterns can be written, and for 5
x 10 dots, four character patterns can be written. Later in this tutorial i will
explain how to use CGRAM area to make custom character and also making
animations to give nice effects to your application.

Busy Flag

Busy Flag is an status indicator flag for LCD. When we send a command or
data to the LCD for processing, this flag is set (i.e. BF =1) and as soon as the
instruction is executed successfully this flag is cleared (BF = 0). This is helpful
in producing and exact amount of delay. for the LCD processing.

To read Busy Flag, the condition RS = 0 and R/W = 1 must be met and The
MSB of the LCD data bus (D7) act as busy flag. When BF = 1 means LCD is
busy and will not accept next command or data and BF = 0 means LCD is
ready for the next command or data to process.

►Instruction Register (IR) and Data Register (DR)

There are two 8-bit registers in HD44780 controller Instruction and Data
register. Instruction register corresponds to the register where you send
commands to LCD e.g. LCD shift command, LCD clear, LCD address etc. and
Data register is used for storing data which is to be displayed on LCD. When
send the enable signal of the LCD is asserted, the data on the pins is latched
in to the data register and data is then moved automatically to the DDRAM
and hence is displayed on the LCD.
Data Register is not only used for sending data to DDRAM but also for
CGRAM, the address where you want to send the data, is decided by the
instruction you send to LCD. We will discuss more on LCD instruction set
further in this tutorial.
Introduction
The most commonly used Character based LCDs are based on Hitachi's
HD44780 controller or other which are compatible with HD44580. In this
tutorial, we will discuss about character based LCDs, their interfacing with
various microcontrollers, various interfaces (8-bit/4-bit), programming, special
stuff and tricks you can do with these simple looking LCDs which can give a new
look to your application.

►Pin Description
The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4
Line LCDs which have only 1 controller and support at most of 80 characters,
whereas LCDs supporting more than 80 characters make use of 2 HD44780
controllers.

Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins
(two pins are extra in both for back-light LED connections). Pin description is
shown in the table below.

Figure 1: Character LCD type HD44780 Pin diagram


Pin No. Name Description

Pin no. 1 VSS Power supply (GND)

Pin no. 2 VCC Power supply (+5V)

Pin no. 3 VEE Contrast adjust

0 = Instruction input
Pin no. 4 RS
1 = Data input

0 = Write to LCD module


Pin no. 5 R/W
1 = Read from LCD module

Pin no. 6 EN Enable signal

Pin no. 7 D0 Data bus line 0 (LSB)

Pin no. 8 D1 Data bus line 1

Pin no. 9 D2 Data bus line 2

Pin no. 10 D3 Data bus line 3

Pin no. 11 D4 Data bus line 4

Pin no. 12 D5 Data bus line 5

Pin no. 13 D6 Data bus line 6

Pin no. 14 D7 Data bus line 7 (MSB)

Table 1: Character LCD pins with 1 Controller


►LCD Initialization
before using the LCD for display purpose, LCD has to be initialized either by the
internal reset circuit or sending set of commands to initialize the LCD. It is the
user who has to decide whether an LCD has to be initialized by instructions or by
internal reset circuit. we will dicuss both ways of initialization one by one.

Initialization by internal Reset Circuit


An internal reset circuit automatically initializes the HD44780U when the power
is turned on. The following instructions are executed during the initialization.
The busy flag (BF) is kept in the busy state until the initialization ends (BF = 1).
The busy state lasts for 10 ms after VCC rises to 4.5 V.

 Display clear
 Function set:
DL = 1; 8-bit interface data
N = 0; 1-line display
F = 0; 5 x 8 dot character font
 Display on/off control:
D = 0; Display off
C = 0; Cursor off
B = 0; Blinking off
 Entry mode set:
I/D = 1; Increment by 1
S = 0; No shift
Li-Fi Transmitter LED’S:

In Li-Fi Transmission, the most important requirement of light source is its ability to turn
ON and OFF Repeatedly in very short intervals (in ns range). So we use LEDs which have
very low switching time. These LEDs turn ON and OFF in Nano second based on the Pulse
signal. Since the switching taking at a faster rate, it cannot be detected by Human eye. So
it will appear as illuminating even though they are blinking. Thus modulated signal is
transmitted to receiver via Visible Light.
Li-Fi Receiver PHOTO DETECTOR:

The transmitted signal from the LEDs has to be detected, demodulated and
acknowledged. So in order to detect the message signal from the blinking LED light, we
use a photo cell or a Solar Cell (which comprises large no of photo cells connected in
series). The solar cell detects only the variation of the light, since the blinking can be
easily detected and output of the solar cell will be the message signal in the analog form.
So using solar we could detect and demodulate the message signal transmitted.
Liquid crystal display

LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs (seven
segment LEDs or other multi segment LEDs) because of the following reasons:

1. The declining prices of LCDs.


2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the
task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep
displaying the data.
4. Ease of programming for characters and graphics.

LCD SCREEN

LCD screen consists of two lines with 16 characters each. Each character consists of 5x7 dot
matrix. Contrast on display depends on the power supply voltage and whether messages are
displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked
as Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays
have built in backlight (blue or green diodes). When used during operating, a resistor for
current limitation should be used (like with any LE diode).
RF TRANSMITTER MODULE (Active RFID):

It is an 4 pin compact size module that can be directly used in the PCB. It
can be used with fixed code and rolling code encoders or direct with
microcontrollers. This module is really suitable for battery-operated devices due
to its low power consumption. The main advantage is that it does not use any
external components and tuning is not required. Frequency used for
transmission is 433 MHz. For transmission we have ASK Modulation.

1234 1. DATA
2. Vcc
3. GROUND
4. ANTENNA

The last pin is for the antenna through which transmission takes place. Then
serial data from the encoder is taken by the first pin. Second and third pin are
for Vcc and ground respectively.

The decoded codes from the decoder HT12D are given to the microcontroller.
The microcontroller will compare these codes with the prewritten codes in the
program. If the code matches, it calls a subroutine for displaying the name in the
LCD module.
RF Receiver Module (Active RFID):

The PCR2 A is a low-power ASK receiver IC which is fully compatible


with the Mitel KESRX01 IC and is suitable for use in a variety of low power radio
applications including remote keyless entry. The PCR2 A is based on a single
conversion, super heterodyne receiver architecture and incorporates an entire
phase-locked loop (PLL) for precise local oscillator generation.

1234

1. GROUND
2. DATAOUT
3. Vcc
4. ANTENNA

Here again ASK demodulation technique is used to receive the


transmitted signal. This module also can be used for fixed codes and for rolling
code application. It is sensitive to RF noise in the pass band because the desired
transmitter signals are at very low power levels. If the rise time and fall time of
the clock in a microprocessor are fast enough to produce harmonics in the
frequency range of the receiver input and harmonics fall within the pass band of
the receiver. Then special care must be taken to reduce the level of the
harmonic at the antenna part of the receiver.
Software Requirement

Arduino

Arduino is a type of computer software and hardware company that offers open-source
environment for user project and user community that intends and fabricates microcontroller
based inventions for construction digital devices and interactive objects that can sense and
manage the physical world. For programming the microcontrollers, the Arduino proposal
provides an software application or IDE based on the Processing project, which includes C,
C++ and Java programming software. It also support for embedded C, C++ and Java
programming software.

Arduino is an open-source computer hardware and software company, project and user
community that designs and manufactures microcontroller-based kits for building digital
devices and interactive objects that can sense and control the physical world. The boards
feature serial communications interfaces, including USB on some models, for loading
programs from personal computers. For programming the microcontrollers, the Arduino
platform provides an integrated development environment (IDE) based on the Processing
project, which includes support for C, C++ and Java programming languages.

An Arduino board consists of an Atmel 8, 16 or 32-bit AVR microcontroller with


complementary components that facilitate programming and incorporation into other
circuits. An important aspect of the Arduino is its standard connectors, which lets users
connect the CPU board to a variety of interchangeable add-on modules known as shields .
Some shields communicate with the Arduino board directly over various pins, but many
shields are individually addressable via an I²C serial bus so many shields can be stacked and
used in parallel. Official Arduinos have used the mega AVR series of chips, specifically the
ATmega8 , ATmega168.
An Arduino's microcontroller is also pre-programmed with a boot loader that simplifies
uploading of programs to the on-chip flash memory, compared with other devices that
typically need an external programmer. This makes using an Arduino more straightforward by
allowing the use of an ordinary computer as the programmer. Currently, opti boot loader is
the default boot loader installed on Arduino UNO. An Arduino's microcontroller is also pre-
programmed with a boot loader that simplifies uploading of programs to the on-chip flash
memory, compared with other devices that typically need an external programmer. This
makes using an Arduino more straightforward by allowing the use of an ordinary computer as
the programmer.
Application Advantages area of Li-Fi technology:

Airways:-

Whenever we travel through airways we face the problem in communication media,


because the whole airways communication are performed on the basis of radio waves.
To overcomes this drawback on radio ways ,li-fi is introduce.

Green information technology:-

Green information technology means that unlike radio waves and other
communication waves affects on the birds, human body’s etc. Li-Fi never gives such
side effects on any living thing.

Free From Frequency Bandwidth Problem:-

Li-fi is an communication media in the form of light ,so no matter about the frequency
Bandwidth problem. It does not require the any bandwidth spectrum i.e. we don’t need
to pay any amount for communication and license.

Increase Communication Safety:-

Due to visual light communication, the node or any terminal attach to our network is
visible to the host of network .

Multi User Communication:-

Li-Fi supports the broadcasting of network , it helps to share multiple thing at a


single instance called broadcasting.

Lightings Points Used as Hotspot:-

Any lightings device is performed as a hotspot it means that the light device like
car lights, ceiling lights, street lamps etc area able to spread internet connectivity using
visual light communication. This helps us to low cost architecture for hotspot. Hotspot
is an limited region in which some amount of device can access the internet
connectivity.
Smarter Power Plants:-

Wi-Fi and many other radiation types are bad for sensitive areas. Like those
surrounding power plants. But power plants need fast, inter-connected data systems
to monitor things like demand, grid integrity and (in nuclear plants) core temperature.
The savings from proper monitoring at a single power plant can add up to hundreds of
thousands of dollars. Li-Fi could offer safe, abundant connectivity for all areas of these
sensitive locations. Not only would this save money related to currently implemented
solutions, but the draw on a power plant’s own reserves could be lessened if they
haven’t yet converted to LED lighting.

Undersea Awesomeness:-

Underwater ROVs, those favourite toys of treasure seekers and James


Cameron, operate from large cables that supply their power and allow them to receive
signals from their pilots above. ROVs work great, except when the tether isn’t long
enough to explore an area, or when it gets stuck on something. If their wires were cut
and replaced with light say from a submerged, high-powered lamp then they would be
much freer to explore. They could also use their headlamps to communicate with each
other, processing data autonomously and referring findings periodically back to the
surface, all the while obtaining their next batch of orders.
Application Challenges

The several challenges were considered in designing the proposed system i.e.
processing delay, Line of sight Limitation. This Scenario can be better explained by presenting
an analogy of three vehicles (namely A, B, C) travelling in a lane. When A suddenly applies
break not only A and B are in danger but C also is in danger due to aforementioned reason.

i. Large processing time

The reaction time of the driver is more [i.e.] when driver A applies a brake after seeing
the brake light the driver B applies brake; the range of delay is very high. This delay must be
avoided in transmission of warning messages.

ii. Line of sight Limitation

The vehicle B might only see brake light of the front vehicle A while vehicle C may not
be see the brake light of A due to line of sight limitation.
REFERENCES

[1] S.Vicky,”Li-Fi The Best Alternative To Overcome The Existing Technologies” Vol. 2, Issue
2, pp: (208-212), Month: April-June 2014

[2] Shubham Chatterjee,”Scope and Challenges in Light Fidelity(LiFi) Technology in Wireless


Data Communication “Issue 6, Volume 2 (June 2015)

[3] Shaista Tarannum,”Data Transmission Through Smart Illumination Via “Visible Light
Communication Technology” Volume 4, Issue 2 (March-April, 2016), PP. 136-141

[4] N. M. Husain Fidvi, “Car to Car Communication System,” source: car communication
system

[5] M.Chinnadurai,“Smart LI-FI Based Car Parking System. ”Volume:03,Issue 02 2016

[6] http://caledonianmercury.com/the-futures-bright-the-futures-li-fi

[7] http://www.lifi-centre.com/about-li-fi/applications

You might also like