Phone : +8801894-801150 Email : projects.zeronebd@gmail.com
support 24/7
project photo

How to Make Li-Fi Bidirectional Wireless Data Transmission System.

Now we are going to learn about a new project. This project is based on Li-Fi technology, which uses light to transmit data between devices. Here, we will build and demonstrate a bidirectional Li-Fi system for wireless data communication.

Introduction
Li-Fi (Light Fidelity) is a wireless communication technology that uses visible light to transmit data between devices. Unlike traditional wireless communication methods that rely on radio frequency, Li-Fi uses LED light to send and receive information. This project demonstrates how to build a bidirectional Li-Fi system, allowing two-way communication between devices using light signals. Such a system offers advantages like high data transfer rates, improved security, and reduced electromagnetic interference.

Materials:

Arduino Uno (or any compatible microcontroller)

LEDs (for data transmission)

Photodiodes or Light Dependent Resistors (LDR) (for data reception)

Resistors (various values)

Breadboard

Connecting wires

Power supply (5V)

Transistors (optional, for signal amplification)

Voltage regulators (if required)

Working Principle
The system works by modulating data signals onto the LED light. The transmitting Arduino sends data by rapidly switching the LED on and off, creating light pulses that represent digital information. The receiving device uses a photodiode or LDR to detect these light pulses and convert them back into electrical signals. For bidirectional communication, each device is equipped with both transmitting and receiving components, enabling data to flow in both directions using visible light. The modulation and demodulation processes are synchronized to ensure accurate data transmission and reception.

CODE:

int ledPin = 9;        // LED connected to digital pin 9
String message = "HELLO";  // Message to send
int bitDelay = 200;    // Delay between bits in milliseconds
void setup() {
  pinMode(ledPin, OUTPUT);
}
void loop() {
  sendMessage(message);
  delay(3000);  // Wait before sending again
}
void sendMessage(String msg) {
  for (int i = 0; i < msg.length(); i++) {
    sendChar(msg.charAt(i));
  }
  sendChar('\n');  // End of message
}
void sendChar(char c) {
  for (int i = 7; i >= 0; i--) {
    int bitVal = bitRead(c, i);
    digitalWrite(ledPin, bitVal);
    delay(bitDelay);
  }
}