📶 Li-Fi Data Transfer System
Wireless light-based communication. Transmit data or audio through modulated visible light using an LED and photodiode.
Overview
Light Fidelity (Li-Fi) is an innovative, high-speed, and secure wireless communication technology that uses visible light waves to transmit data instead of radio frequencies. This project implements a hardware transceiver system.
What you'll learn: Optical signal modulation and demodulation, analog photodiode threshold sensing, operational amplifier filtering, and building optical wireless transmitter/receiver circuits.
Estimated time: 2-3 hours. Difficulty: ⭐⭐⭐⭐ Advanced.
Components Needed
| Component | Specification | Qty | Notes |
|---|---|---|---|
| Arduino Uno R3 (x2) | 5V Logic | 2 | One for transmitter, one for receiver |
| Solar Panel or Photodiode | Small 5V / BPW34 | 1 | Light receiver |
| LM358 Op-Amp | Dual channel | 1 | Amplifies received signals |
| High-Power White LED | 1W / 3.3V | 1 | Light transmitter |
| TIP122 Transistor | NPN Darlington | 1 | Drives high-power LED |
| Resistors & Capacitors | 100uF, 10k, 1k, 220 Ohm | 1 set | For filtering circuit |
Step-by-Step Tutorial
1
Assemble Transmitter Circuit
Connect Arduino Pin 3 (PWM/Serial TX) to the base of the TIP122 transistor via a 1k resistor. Wire the high-power LED to the transistor collector with an external power source.
2
Assemble Receiver Circuit
Wire the photodiode or small solar panel to the non-inverting input of the LM358 operational amplifier to boost the weak optical pulses into a clean 5V square wave.
3
Establish Communication Protocol
Write a serial transmitter protocol that modulates data by turning the LED on and off at high frequencies (baud rates).
4
Upload Transmitter Code
Upload the serial packet sender code to the transmitter Arduino, modulating high-speed data bits into light.
5
Upload Receiver Code
Upload the serial packet decoder code to the receiver Arduino to parse incoming light pulses and reconstruct the sent text.
Keep the transmitter and receiver in a straight line-of-sight path. High ambient room lighting can create signal noise; use a dark tube around the receiver to isolate it.
Code / Configuration
lifi_transfer.ino
INO
// Li-Fi Transmitter Modulation Code - Volt X
int txPin = 3; // Modulating LED pin
void setup() {
Serial.begin(9600);
pinMode(txPin, OUTPUT);
}
void loop() {
if (Serial.available()) {
char data = Serial.read();
transmitChar(data);
}
}
void transmitChar(char c) {
// Simple bit-bang UART emulation over light
digitalWrite(txPin, LOW); // Start bit
delayMicroseconds(104); // 9600 Baud rate duration
for (int i = 0; i < 8; i++) {
digitalWrite(txPin, (c & (1 << i)) ? HIGH : LOW);
delayMicroseconds(104);
}
Reviews & Ratings
—0 reviews
Sign in to leave a review
Loading reviews...