Light Fidelity
Background:
Light Fidelity (Li-Fi) is a wireless communication method which uses light to transmit data between devices. "In technical terms, Li-Fi is a visible light communications system that is capable of transmitting data at high speeds over the visible light, ultraviolet, and infrared spectrums," (Wikipedia). The actual term "Li-Fi" was termed by Professor Harald Haas in his TED Talk, a co-founder of PureLiFi. This technology is fairly new and many different organizations are trying to standardize it.
Project Overview:
Develop a Li-Fi technology that is consumer friendly both in price and application, maximized for distance and speed. Below is a mock up of our final design and the underlying components:
In this project the micro-controller used was the Arduino Due, due to its ease of use and ability to quickly prototype with it, and the fact that the Due has an ADC. The Arduino itself does no processing of data, it simply forwards the processed data from the UART to the Serial1 TX pin and from the Serial1 RX pin to the UART. The ADC on the Arduino Due is used to set a calibration voltage which is used in a comparator to filter out noise. Both the receive and send circuits can be found below:
All of the data processing is done on the computer itself. This is done by a Python program with a GUI which makes the selection of files to transfer over the Li-Fi medium more friendly for end users. You can view the code for this "driver", the firmware for the Arduino, and the Eagle files for the custom PCB at https://github.com/RParkerE/LiFi-With-Arduino.
One reason for this blog is to showcase an exciting technology and some cool applications for this community to attempt, but I would also love for this project to be added on to and developed further, and I hope this post brings attention to this and us, as a community, can develop a very cool and unique product available for all to take full and unlimited advantage of.
How It Works (A Bit More Detail)
The Python GUI must be opened on both computers. When opened both Arduinos are by default waiting to Receive (to out.txt), this can be changed in the GUI by selecting different files to receive to or to send, and can be sent by simply clicking the 'SEND' button.
Once the data transfer is initiated by sending data from one device, the data is processed and a meta packet is sent containing the number of packets to be received, the number of null bytes padded to the last packet, and the extension type of the file. After that is sent, the actual data is split into 56 byte chunks, a 4 byte index and a 4 byte checksum is added to the data chunk, creating a 64 byte packet.
These packets are transmitted from the computer to the Arduino over the USB port, which pushes it to the Serial1 TX pin (where the LED is connected). On the receiver side, when the LED goes low, it starts reading the data. if the data is not corrupted it writes it to the file, if the data happens to be corrupted, the packet number is added to a list and is asked to be resent after all of the data has all been transmitted.
The ADC on the Arduino is used to provide a reference voltage to the comparator that takes in the output of the photodetector, in order to provide a threshold to reduce the effect of noise on the signal.
Please comment if you have any questions, comments, or suggestions as I would love for this to start some great conversations around this great new technology.
Top Comments