LiFi Communication System – DIY 78

[ux_video url=”” height=”55%”] [ux_video url=”” height=”55%”]

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. Connection Diagram and codes are given below, please look carefully.

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



  1. 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

    syed sheik mohammed P
    1. Hello,

      Please send your project details on mail.

      1. Bro I have done as u shown in Ur video but I am getting the display bro

        1. Well I believe you got support on a call. Let me know if problem still presists.

  2. 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.

    syed sheik mohammed P
    1. Hello,
      The error can be of Keypad Library.
      You’ll have to download and install keypad library for the program to work.

  3. 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.

    syed sheik mohammed
    1. Hello,
      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. 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?

    syed sheik mohammed P
    1. I think you can. Just try it and share results with me.

  5. Where is the code? I don’t see any posted

    1. Hello, code is in the link with the heading Circuit diagram and Files. Please recheck.

  6. 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.

    1. Yes it is possible, please drop us a mail to [email protected] and we’ll contact you.

  7. Sir my calibration is not working properly.
    Please help me. what can I do ?

    1. Hello,
      Can you share what have you done till now on our helpline no. whatsapp?

  8. can i use arduino uno instead of nano?

    1. Yes you can use any Arduino.

  9. need to see circuit of keypad to arduino and sensor board

    1. Circuit is in the blog. Please check the section before Components required.

  10. Sir, I want to transmit Internet threw li – fi…. So I want your advice to make it.
    And will be I able to make it threw arduino?

    1. We have not worked on Internet communication using LiFi.

  11. Can you explain how exactly is the data being transmitted through light and how is the BMES LDR MODULE receiving the data ?

    1. We are sending ASCII Serial data through Light in the form of HIGH’s and LOW’s as per data. HIGH = Light ON, LOW = Light OFF. The LDR module has been tuned to differentiate the series of HIGH and LOW in such a way that it is able to distinguish between valid/invalid data bits.

  12. Sir I am not able to do the sensor circuit can u pls help me broooo plss bro it’s urgent…

    1. Hello, you can purchase the ready made module from our store. If you wish to make it yourself, we have a video/schematic also. We may release a video on how to build the sensor but it’s pretty straight forward circuit.

      1. Bro can u share Ur video bro please .. or I will share my number as I am doing this for my college project bro please broo

        1. We don’t have a video of making the LDR sensor circuit.

  13. hello I’m doing this project but i want to ask for the transmitter part do we have to use white Leds? or it doesn’t matter.
    and for the receiver part I’m no getting any number in the lcd and I’m sure about the connection even the dashes I’m not getting them when you pass the flash.

    1. Color or LED’s don’t really matter but we have seen white give better results.
      In the receiver section, first ensure basic LCD sketch is working, i.e. you are able to display any text on the LCD. Once that is ensured, then you can try receiving the LiFi data.

  14. can i know the lifi led is normal led or special

    1. It is a normal LED 5 mm

  15. Can we use any other ldr module

    1. Yes you can use any ldr module.

  16. What alternative can be used for LDR sensor to increase data transfer speed ?
    How can other components be upgraded to increase data transfer speed ?

    1. We are still working on better sensors for this technology.

      1. Have you found any better sensors to achieve higher data transfer speed

        1. Phototransistors/Photodiodes will give better results, please try.

  17. This is an amazing project , can be used by students to demonstrate the emerging Li-Fi via Arduino.
    Thank You.

    1. Thank you.

  18. Sir I cant access the codes

    1. The codes are downloadable, please retry.

  19. sir please share the contact details

    1. Please mail to [email protected]

  20. Sir
    I am interested in this project
    I have studied few books on LiFi and it points to prof harald Haas
    But in PROF experiment an internet connection was established and people could browse websites on line , download and upload file using the internet
    I don’t know where they got the ISP that gave the service
    Sir I want to know is this project like they of the Prof’s

    Ololo chukwuemeka bright
    1. Hello,
      No this is the most simplest demonstration of data transmission through light.

  21. Is this the internet communication using LiFi
    Project like PROF HARALD HAAS

    Ololo chukwuemeka bright
  22. Doe the LiFi system generate it’s own INTERNET?

    Ololo chukwuemeka bright
    1. LiFi technology is a mode of communication, it cannot generate its own internet. However, it can help in transmission of internet signals.

  23. Doesthe LiFi system generate it’s own INTERNET?

    Ololo chukwuemeka bright
    1. LiFi technology is a mode of communication, it cannot generate its own internet. However, it can help in transmission of internet signals.

  24. Hello, in order for this to work do i need to use BMES LDR Module or i can use other LDR module as well?

    1. You can use make your own sensor or use any LDR module based on LM358.

      1. So it will not work with ldr module with LM393 chip? Because it’s hard to find the components here

        1. You can try, we got results but after trying a lot. You can also try with a small solar panel which works and Phototransitor.

        2. Hello sir,
          Can you please suggest any idea in order to avoid demerit of sensor circuit? sothat this prototype may work effectively? also I’m having trouble in finding the coding for Tx and Rx circuit.Please do guide
          Thank you

          1. Well no suggestions till now. We are working on improving the sensor circuit and will update the results. Code is in the blog, please check.

            Mandeesh Singh
  25. Hi! Can we use Adruino Pro Mini instead of Adruino Nano?

    1. Yes you can use anything Arduino compatible.

  26. What is the maximum baud rate this system can run on ?

    1. With LDR Module, results go bad after 400 Baud.

  27. Hi,
    I want to ask you about that I want to do the communication between two arduino via LIFI but with PhotoDiode

    1. Hi,
      You can do the same thing using a Photodiode also.

  28. Sir @Mandesh Singh Can i get the Li-Fi project code?

    Aaditya Ratanpara
    1. It’s in blog, please check carefully.

      1. Hi I have done your project. …..but I am getting the garbage values in the receiving section , unable to get the data that is being transmitted

        1. Hi,

          Please tune the receiver potentiometer as discussed in the video. The output will come if it is properly tuned.

  29. Can we connect ethernet cable directly to led bulb to transmit internet data ?

    Tarun Venkatesh H
    1. No you cannot, you’ll need some device which can encode ethernet data into light signals.

  30. Hello. I am interested in one of your projects. Is it possible to purchases if I’m from the Philippines? Please reply

    1. Please mail to [email protected]

  31. I keep getting weird characters when transferring data. Please help!

    Jesus Flores-Valladares
    1. Hello,
      Weird characters mean, you are very close to tune the receiver with incoming light data. Try adjusting the distance + potentiometer. There’ll be a point where it’ll work.

  32. sir i want to make a project on navigation system using li-fi technology. can you guide me in this regard.

    1. Please mail to [email protected]

  33. Can we implement this in Proteus software and simulate it in software ?

Leave a Reply