Arduino Projects

Visible Light Communication “VLC” or LIFI Project using Arduino



Visible Light Communication “VLC” or LIFI Project using Arduino- Nowadays, wireless communications has become fundamental to our lives and we transmit a lot of data every day. The main way we transmit wireless data is by using electromagnetic waves, in particular radio waves. However, radio waves can support only limited bandwidth because of restricted spectrum availability and interference. Furthermore, radio spectrum is full to bursting and it is difficult to find radio capacity to support media applications.

LiFi is a wireless optical networking technology that uses LEDs for data transmission. In simpler terms, LiFi is considered to be as a light-based WiFi which uses light instead of radio waves to transmit information.

There is an emerging wireless communication with a promising future and which can be a complement of radio waves: Visible Light Communication (VLC) or LIFI. VLC or LIFI is a data communication technology that uses a visible light source as a signal transmitter, the air as a transmission medium or channel and a signal receiving device. Generally, the transmitters are Light Emitting Diodes (LEDs) while the principal device of the receiver is a photodetector, usually a photodiode. By using VLC or LIFI in short distance applications, we can supplement radio waves achieving high data rates and a larger bandwidth.

Light is part of the electromagnetic spectrum, specifically the visible light spectrum, which covers wavelengths between 380-780nm. We have already a lot of LED-based lights installed in the world and we can use them for communications. A LED is a semiconductor device that has the advantages of fast switching, power efficiency and emits visible light that is safe for the human because it is not harmful to vision. Therefore, we can both illuminate and transmit data everywhere.

Some of the most commonly used electronic components and tools available on Amazon.

Arduino Nano USB-C Type (Recommended)

LM741 Operational Amplifier



2.5V laser

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Brief history of Visible Light Communication Or LIFI

Human being has used a visible light source as a form of data transmission since ancient times. Light sources used and their respective main systems of communication invented by human are listed below:


  • The heliograph was used to send information over large distances by using reflecting mirrors.
  • In 1880, Alexander Graham Bell invented the “Photophone”, which allowed transmitting sounds over long distances on a beam of light. It is considered as the first sophisticated wireless communications device.


  • Beacons were fires lit located on hills or high places, used either as lighthouses for navigation at sea, or for signaling over land that enemy troops were approaching, in order to alert defenses.
  • Lighthouses in ancient times were used to help ships navigate by fires built on hilltops.
  • Burning kites were used in the battlefield for communication.


  • In ship to ship communication lamps were used for communication (using Morse code).
  • Traffic lights are used to control the flow of vehicles or pedestrian crosses using three Colors (red, amber and green) to communicate three different messages.


More recently, since 2003, there have been various researches in VLC or LIFI for data transmission using LEDs. The most important were made by the Nakagawa Laboratory, Smart Lighting Engineering Centre, Omega Project, D-Light Project, UC-Light Centre and work at Oxford University.

These days, many lighting devices can incorporate a Visible Light Communication VLC system – we will go into detail, Later explaining some VLC applications.

VLC Characteristics.

As mentioned above, visible light communication VLC or LIFI is a data communication technology that uses visible light between 380 nm and 780 nm. These wavelengths correspond to a frequency range of approximately 384 THz to 789 THz.

The main characteristics of this technology:


: The bandwidth is virtually not limited; it offers a frequency band of approximately 400THz.


: We can both transmit data and illuminate so it is a high efficiency


Data rates

: VLC can achieve high data rates (hundreds of Mb/s) and it can therefore be used for high speed wireless communications.


: As VLC uses the visible light spectrum it is free of cost. Furthermore, transmitters and receivers are cheap.

Human safety

: VLC is harmless to human health and it is not injurious to the human eye.

Omnipresent nature

. We have the infrastructure because there are already a lot of LED-based lights installed in the world which are potential VLC transmitters and therefore we can use them for communications.


: As light waves do not penetrate opaque objects they can not be intercepted, so it offers a very secure communication. It is very difficult for an intruder to make use of your signal.

VLC versus Radio Waves.

Although radiofrequency communications is the most popular technology today, it ha s also disadvantages. Therefore, we can compare VLC with radiofrequency using five main concepts:


Radio spectrum is full and it is difficult to find radio capacity to support the demand of wireless data transmissions for media applications: radio waves are limited, expensive and we only have a certain range of it. By using Visible Light Communication VLC or LIFI we have more spectrum and we have the infrastructure because there are lots LED-based lights installed in the world that are potentially VLC transmitters. We can then compare the available bandwidth:

Δf (RF)~300 GHz

Δf (VLC)~400 THz


Radio waves consume a lot of energy while Visible Light Communication VLC or LIFI is highly energy efficient because we can illuminate and transmit data at the same time. Furthermore, VLC transmitters and receivers devices are cheap and there is no need for expensive RF units.


Radio waves cannot be used in some sensitive scenarios like hospitals, aircrafts, due to Interferences with other devices. On the other hand, we can use VLC when there is light and no interference with radiofrequency based systems exits. Hence, we can use this technology in many places.


Radio waves penetrate through walls and they can be intercepted. If someone has bad intentions, he can make use of your network. By using Visible Light Communication VLC or LIFI we only transmit data where the light is because light does not penetrate through walls, that is to say, we have a very secure data communication.

Human health

The transmission power of radio waves van cannot be increased over a certain level because there are serious health risks for humans. As Visible Light Communication VLC or LIFI technology is harmless for the human body we can increase the transmission power if needed.

Visible Light Communication VLC versus Infrared Communications

Another important wireless data-transmission technology widely used in many applications such as mobile phones or laptops is Infrared (IR) Communication. Infrared light is a electromagnetic radiation with a wavelength longer than that of visible light, measured from the nominal edge of visible red light at 0.74 μm, and extending conventionally to 300 μm. These wavelengths correspond to a frequency range of approximately 1 to 400 THz, so both the IR and visible light communications have a similar bandwidth.

However, in IR communications, data rates cannot be increased over a certain level as it has serious threat to the human eye, so this problem can be solved by using VLC because it is suitable to the human eye in terms of visibility. Moreover, we can obtain higher data rates with VLC.

Visible Light Communication Disadvantages

Although it seems to be a “perfect” technology, VLC or LIFI technology has also drawbacks. The main disadvantages of  VLC or LIFI Technology are listed below:

  • A VLC or LIFI system is prone to interference from other light sources, like the sunshine, Incandescent light, fluorescent lamp, etc.
  • The range of Visible Light Communication VLC or LIFI is quite short; it works over a few meters.
  • Another important disadvantage is that Visible Light Communication VLC or LIFI requires a line of sight (LOS), in other words, we can only transmit data where the light is.

Visible Light Communication VLC or LIFI Potential Applications.

There are several future applications for visible light communications; the most important and interesting are listed below:


Radio waves cannot be used by passengers in aircrafts. LED-based lights are already used in aircraft cabins and each of these lights could be potentials VLC transmitters to provide both illumination and media services for passengers. Furthermore, this will reduce the aircraft construction costs and its weight.

Smart Lighting

Smart buildings require aesthetic lighting. Smart lighting with VLC provides the infrastructure both for lighting and communication and will reduce the circuitry and the energy consumption within an edifice.

Hazardous Environments

In environments such as petro-chemical plants, mines, etc RF is potentially dangerous because there are explosion risks, so communication becomes difficult. VLC can be interesting in this area as it is a safe technology and provides illumination and communication at the same time.

Device Connectivity

By pointing a visible light at another device you can have a very high speed data link and with security because you can shine a beam of light in a controlled way.

Vehicle and Transportation

Traffic lights and many cars use LED-based lights. Cars can communicate to each other to prevent accidents and also traffic lights can communicate to the car to ensure road safety. By using VLC, vehicles can communicate to each other and prevent accidents.

Defense and Security

VLC can enable secure and high data rate wireless communications within military vehicles and aircraft.


In hospitals, there is some equipment that is prone to interference with radio waves, so using VLC has many advantages in this area.

Underwater Communications

Visible Light Communication VLC or LIFI can support high data rates beneath the water, where other wireless technologies like RF do not work. Thus, communications between divers or remote operated vehicles are possible.

VLC System Architecture

Visible Light Communication VLC Transmitter

The components of the Visible Light Communication VLC transmitter are visible solid-state emitter; this can be either an LED or a semiconductor laser, depending on the application. Both lasers and LEDs have been used for data communications, but when the VLC or LIFI transmitter must act as a communication transmitter and an illumination device at the same time white light LEDs are used. In the following section we will consider white LEDs for illumination and data communications.

 White light LEDs

There are two main ways to produce white light: white light sources based on LEDs and white light sources based on wavelength converters.

 White light sources based on LEDs.

The generation of white light with LEDs can be achieved with a huge number of possible

spectra and can be based on dichromatic, trichromatic or tetrachromatic sources. However, the most common used are trichromatic sources (red, green and blue) on a single chip, also called RGB LEDs. All the three colours are emitted simultaneously. This three colour mixer has many advantages such as a wide bandwidth and therefore higher data rates.

White light sources based on wavelength converters.

Most white light emitters use an LED emitting a short wavelength and a wavelength converter. There are many types of converter materials such as phosphors, semiconductors and dyes, but the most common wavelength converter materials are phosphors. Again, the generation of white light with wavelength converters is based on dichromatic, thrichromatic and tetrachromatic sources.

The most applied type of white light source is the white light LED which uses blue light and an exciting phosphor on a single chip.

 RGB LEDs vs. Phosphor-based LEDs

RGB LEDs have a bigger bandwidth and therefore can achieve higher data rates. However, they require more difficult modulation techniques and are more expensive than

Phosphor-based LEDs. The following table shows a comparison between RGB LEDs and

Phosphor-based LEDs:

RGB LEDs Phosphor-based LEDs

Data rates” 100 Mbps ,40 Mbps

Price More expensive Low cost

Bandwidth Higher bandwidth Phosphor limits the bandwidth

Visible Light Communication VLC Channel

The Visible Light Communication VLC optical channel consist of a line of sight (LOS) or a number of LOS components that correspond to the paths from lighting sources to the receiver and a diffuse component created by reflections of walls or objects in the room.

Interferences with other light sources.

Ambient light interference affects the VLC channel. Ambient light noise can be caused by other light sources such as incandescent lights, fluorescent lamps or the sunlight. Incandescent lights emit high levels of infrared radiation, fluorescent lamps emit higher levels in the visible spectrum range and the sunlight emit both high levels of ultraviolet radiation and a considerable amount of infrared radiation.

Sunlight causes extra photocurrent which depends on the wavelength detected and on the environment. This photocurrent can be blocked by an AC coupling of the receiver. However, the white noise of the shot noise that this light contributes is not blocked and at high light levels the photodetector can lead to saturation. One possible solution to avoid this noise source would be the use of an optical interference filter. This filter (placed on the photodiode) would allow the receiver to detect signals of a certain wavelength. On the other hand, the use of such a filter would reduce the strength of the detected signal making the device less sensitive and therefore more susceptible to receiving errors.

Incandescent lights and fluorescent lamps create electrical interference photocurrent harmonics. This problem could be reduced with electrical filtering. There have been few published researches about the effects of other light sources interferences on the VLC channel and more investigation is required on this area.

Visible Light Communication VLC receiver.

The main element is the photodiode that is a type of photo detector able to convert light into a photocurrent. For VLC, Silicon Photodiodes are used; they operate in a wavelength range of 190-1100 nm, so they show a good responsivity at the visible light wavelength region (380- 780 nm). Both PIN photodiodes and avalanche photodiodes (APD) can be used, but for usual applications PIN photodiodes are sufficient. The PIN photodiode has not a high gain like the APD, but it is cheaper, presents a larger active area and it is more convenient in high noise scenarios.

To detect the maximum signal (power) a big active area is required, but increasing the area of the detector often decreases the bandwidth. When the VLC bandwidth requirements are relatively low a large detector area can be utilized.

The optical concentrator is used to compensate for high spatial attenuation due to the beam divergence from the LEDs to illuminate large area. The VLC system is vulnerable to the sunlight and other illuminations, so it is important to implement a suitable optical filter to receive signals of a certain wavelength band and reject unwanted noise components.

Modulation for Visible Light Communication VLC

In order to send out data via LEDs it is necessary to modulate the information into a carrier signal. The IEE 802.15.7 standard for VLC covers both the physical layer (PHY) and the medium access control (MAC), but we will focus on the physical layer. The physical layer is divided into three types (PHY I. PHY II and PHY III) and each PHY contains different modulation schemes. In this chapter, a brief description of the data modulation schemes and the physical layer will be presented.

Modulation schemes

The main modulation methods for VLC are introduced in the following. Note that for all the modulation schemes listed below there are many variants that we will not go into detail.

On-Off Keying (OOK)

OOK modulation is the simplest modulation scheme for VLC, as the LEDs are turned on or off depending if the data bits are “1” or “0”. In the easiest form, a digital 1 represents the light ON state and a digital 0 represents the light OFF state. The 802.15.7 standard uses Manchester encoding which embeds the clock into the data by representing a logic zero as an OOK symbol “01” and a logic one as an OOK symbol “10”. In this manner, the period of the positive pulses is the same as the negative ones but also doubles the bandwidth required for OOK transmission. For higher data rates run length limited (RLL) coding is used because is more efficient.

Variable Pulse Position Modulation (VPPM)

. VPPM changes the duty cycle of each optical symbol which is distinguished from others by the pulse position to encode bits.

The variable term in VPPM represents the change of the pulse width (duty cycle) in response to the requested dimming level. The logic 0 and logic 1 are symbols are pulse width modulated depending on the dimming duty cycle requirement.


It uses multiple optical sources with different frequencies (colours) and operates from 12 to 96 Mb/s. The modulation method is CSK. The major challenge for VLC is to increase the modulation bandwidth of the LED, including RGB and phosphor-based LEDs. When using a phosphor-based LED, the most common method is to use an optical filter to detect only the blue component at the receiver and block the slow time constant of the phosphor. Although this increases the bandwidth, the channel bandwidth is still low.

The effect of the slow phosphor is demonstrated. The modulation bandwidth of a Luxeon Star device is measured and results show a bandwidth of about 3 MHz for the white emission and 12 MHz for the blue emission.


The channel response can be equalised at the transmitter (pre-equalisation), at the receiver (post-equalisation) or a combination of both. At the moment it is not known which technique will provide highest data rates. Many investigations have been carried out in this area:


Equalisation at the transmitter has been investigated and this can increase the data rate and the bandwidth; this technique allow to compensate the quickly fall-off in response of white LEDs at high frequencies.

Most LED lighting applications consist of an array of LEDs, and it is possible to equalize each device separately so the overall response of the array provides higher bandwidth than individual devices. A prototype has been built using this technique. Results show that using an array of 16 LEDs, each with a bandwidth of 3 MHz, the overall response of the system was 25 MHz and a data rate of 40 Mb/s using Non-Return to Zero (NRZ) On-Off Keying (OOK).

b)Post equalization

Equalisation at the receiver has been tested  and this can improve data rates using a simple first order equaliser to compensate the narrow bandwidth of the phosphor-based LED.

Parallel data communication

In lighting applications many LEDs are used to provide the required illumination. Sending different data from each LED to a receiver array with each photodetector illuminated by one device (different information from each stream) is a good option to increase the overall data rate of the system. This technique is called Optical Multi-Input Multi-Output (MIMO).

Providing an uplink.

Although VLC in a natural broadcast medium, sometimes it is required to send information back to the transmitter and providing an uplink is challenging. Several approaches

have been considered:

1) A retroreflector can be used to return incident light back to the source. The light is modulated upon reflection with the data that is to be sent back to the transmitter.

2) The use of RF [24] has also been considered. The VLC downlink can be combined with a RF uplink. Although relative high data rates can be achieved there is no VLC used for the uplink which could be undesirable in sensitive scenarios.

3) Also, the VLC light source can be co-located with a VLC receiver, but this will increase the price of the system, it is less energy efficient and it might look unsightly to some smart applications.

Standardization activities

In Japan, the Visible Light Communication Consortium (VLCC) have published two JEITA (Japan Electronics and Information Technology Industries Association) standards, JEITA CP-1221[25] and JEITA CP-1222[26].

In the Institute of Electrical and Electronics Engineers (IEEE), The IEEE 802.15.7 [18] Visible Light Communication Task Group has completed a PHY and MAC standard for Visible Light Communications (VLC).

In the Wireless World Research Forum (WWRF), the working group 5 has published a white paper on VLC.

Project Objective

Our objective is to design VLC “Visual Light Communication” system using LASER  and super Saver. In this project we are sending a specific frequency” a train of Pulses” which are received and monitored at the receiving end.

Project Scope 

The Scope of thesis is limited to certain frequencies with only command implementation. We send a train of pulses with real time variable time setting control. And then those pulses are monitored at the receiver end to turn ON a specific Load.

We have used an LDR “ light dependent resistor differentiate between a “ 0 “ and “ 1 “. Laser use in this way can increase the range from meters to kilometers.

Assessment Methodology

The implementation of the Visual Light Communication is carried out by LASER, ARDUINO, and Receiving circuit. The LASER is used as a transmitter to send the pulses representing 1’s and 0’s. This train of pulses is received through the receiver circuit and is given to the Arduino pin2 for further processing.

If the command is successfully executed then the load connected to the Arduino is switched on.

Block Diagram of the Visible Light Communication VLC or LIFI Project

Visible Light Communication Transmitter Side

Visible Light Communication

Visible Light Communication Receiver Side    

Visible Light Communication

Visible Light Communication Project Arduino Transmitter Side Circuit Diagram:

Visible Light Communication

A very basic circuit diagram to explain the concept of Visible light communication “VLC” or LIFI is given above. The positive of the 2.5V battery is connected with the Anode pin of the laser while the ground of the power supply is connected with the emitter of the 2n2222 NPN transistor and also with the ground pin of the Arduino Uno. The 2n2222 NPN transistor is used to turn ON and turn OFF the laser as per the commands given by the Arduino Board. This transistor is controlled using the Arduino’s pin number 13.

Visible Light Communication Project Arduino Receiver Side Circuit Diagram:

Visible Light Communication

The Receiver circuit as you can see in the above Schematic can be divided into three portions.

  1. Power Supply
  2. Receiving circuitry
  3. Load controlling

A DC voltage (Voltage > 12 and voltage < 30) is given to the Voltage regulator IC 7812 and IC 7805. J2 is the female power jack and this is where we connect the Adaptor, 12v battery or a Solar Panel. This DC female Power Jack is connected with the input legs of the 7805 and 7812 voltage regulators. 470uf decoupling capacitors are connected at the input and output sides of the voltage regulators. A 330 ohm resistor is connected in series with a 2.5v LED. This is a current limiting resistor. This LED is used as the indicator that the circuit is powered up.

The receiving circuitry is made with the help of the LM741 Operational Amplifier, which is used as the comparator in this project and an LDR. LDR is connected in series with a 10k ohm resistor, the LDR and 10k resistor makes the voltage divider circuit. As the light falling on the LDR changes, this results in the change of resistance due to which we get variable voltage. This voltage is then given to the LM741 IC which monitors whether the light is falling on the LDR or not.  If the light is falling this means 1 while if the light is not falling on the LDR then it means 0. This information is given to the Arduino interrupt pin2 through an Optocoupler and a pull up resistor of 10k. The load circuitry consists of the relay “12v” and an NPN transistor “2n2222”.

When the train of pulses received matches the predefined value in the controller the load is activated. This is a very basic circuit for beginners; LDR’s are slow to respond to the quick light changes. You can also use a photo-transistor for this, which I think will be the perfect choice.

Visible Light Communication “VLC” or LIFI Arduino Transmitter side Programming:

Visible Light Communication “VLC” or LIFI Arduino Receiver side Programming:




Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles


Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button