LiFi Communication System – DIY

LiFi Communication or Li-Fi! We all have heard about it. It sounds exciting and can disrupt the future; changing the way we communicate with each other. 

After working and researching on Li-Fi based applications over the past 2 years, we finally decided to make a DIY tutorial as a lot of people were emailing us for the same. As you all must have heard about LiFi Communication (or Li-Fi), it stands for Light-Fidelity.


LiFi Communication technology, proposed by the German physicist—Harald Haas, provides transmission of data through illumination by sending data through an LED light bulb that varies in intensity faster than the human eye can follow.  We have always heard about he comparison between Li-Fi with Wi-Fi and how Li-Fi has speed advantage than the latter. 

LiFi Communication vs WiFi Communication

Wi-Fi is great for general wireless coverage within buildings, whereas Li-Fi is ideal for high density wireless data coverage in confined area and for relieving radio interference issues.

Li-Fi provides better bandwidth, efficiency, availability and security than Wi-Fi and has already achieved blisteringly high speed in the lab. By leveraging the low-cost nature of LED’s and lighting units there are many opportunities to exploit this medium, from public internet access through street lamps to auto-piloted cars that communicate through their headlights.

LiFi Communication

Haas envisions a future where data for laptops, smart phones, and tablets will be transmitted through the light in a room. Consider the following use case shown in the image below.

LiFi Communication Project Details

In the application we try to implement a very low level Li-Fi data communication where we send some data through a small led at a low data rate.

We referred to few blogs and journals and are very thankful for their research and information sharing.

Transmitter Section

  1. We use an Arduino to capture the input from a 4×4 Keypad and display it on the LCD.
  2. We then transmit the same data by encoding it into a light signal using a LED and Serial Communication (UART) protocol. For better communication, high wattage LED’s or LED arrays can be used.   

Receiver Section

  1. To capture the light signal, we use a LDR (Light Sensor) and filter/amplify the signal using a comparator circuit (LM358). Now tuning this receiver circuit takes time and some effort
  2. We then decode the transmitted signal and display it on the LCD screen.

NOTE : The sensor is prone to external light interference and can give garbage data so ensure you tune it in consistent light conditions. 

Components required :

1) 2 x Arduino Uno R3 Board (Buy here) or Arduino Nano (Buy here)
2) 1 x 16×2 LCD Display (Buy here)
3) 1 x 4×4 Keypad Matrix (Buy here)
4) 1 x 840 Point BreadBoard (Buy here)
5) 40 pcs x Male to Male Jumper Wire (Buy here)
6) 5 x LED’s  (Buy here)
7) 1 x BMES LDR Module (Buy here)
8) 1 x PCB (Buy here)
9) 1 x Resistor pack (Buy here


1) Tools (Buy here)

Connection Diagram & Code Files

Tx Section
Receiver Section

In case of any questions or queries, feel free to post below.

Subscribe to our YouTube Channel and check out other tutorials of DIY projects.

Some Project Ideas using Lifi Communication


12 thoughts on “LiFi Communication System – DIY

  1. syed sheik mohammed P says:

    bro…i want to vehicle to vehicle data transmission using lifi program.if u like share the program with plzzz contact my gmail account or my phone number 9976885152 or 8248420395..plzz contact me….bro

  2. syed sheik mohammed P says:

    bro in your lifi data transmit project there is one error in program broo. I can’t solve the error. The error is “#include “.soo plzz tell me how to clear a error in program.

    • Mandeesh Singh says:

      The error can be of Keypad Library.
      You’ll have to download and install keypad library for the program to work.

  3. syed sheik mohammed says:

    Arduino: 1.8.8 (Windows 10), Board: “Arduino/Genuino Uno”

    In file included from Y:\Tx-files\Tx\Tx.ino:1:0:

    C:\Program Files (x86)\Arduino\libraries\Keyboard\src/Keyboard.h:29:2: warning: #warning “Using legacy HID core (non pluggable)” [-Wcpp]

    #warning “Using legacy HID core (non pluggable)”


    Tx:18:1: error: ‘Keyboard’ does not name a type

    Keyboard customKeyboard = Keyboard( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);


    Y:\Tx-files\Tx\Tx.ino: In function ‘void loop()’:

    Tx:53:20: error: ‘customKeyboard’ was not declared in this scope

    char customKey = customKeyboard.getKey();


    exit status 1
    ‘Keyboard’ does not name a type
    Bro i solve the keypad error but i have a another error an progrram. the error is given below:
    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.
    “keyboard does not name a type ” It is showing error on arduino.

    plzz tell how to solve the error.

    • Mandeesh Singh says:

      This is because you haven’t installed the library for keypad.
      1) Download Keypad library.
      2) Install it in Arduino.
      Google these instructions and once you have installed the library, try compiling the code again.

  4. syed sheik mohammed P says:

    bro i have another doubt in your data transmission using lifi projects. In receiver side we are using solar panel in data transmission. Where it is possible to use solar panel in receiver side?

  5. Jyotika vyas says:

    Sir,my name is jyotika vyas.I want to make basic lifi communication circuit.So,I want to purchase it .Is it possible.I live in Vadodara.How much cost of project.

Leave a Reply

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