Tuesday, July 8, 2014

Visible Light Communication Chronicles Part III

Welcome to Part 3 of my experiments with visible light communication. In this post i will reveal the final circuit that i used for transmitting UART data over the link. Alternatively i also managed a successful Manchester encoded data transmission over the VLC link. The circuits for the transmitter and receiver are shown below. This is the most basic configuration and yields a maximum UART data transmission rate of 2400 Baud (with flicker) and transmission of Manchester encoded data stream at 1200 Baud (no flicker).

The transmitter above consists of a P55NF06 N-Channel MOSFET whose gate is driven by one of the Arduino pins. The data stream is directly connected to the gate. This causes variations in the drain to source current and varies the drain source voltage Vds and hence the intensity of the LED. This circuit just acts as a modulator. VDD is kept at 13 Volts and in the ON state the LED draws approximately 0.87 A. In the next iteration of this circuit i plan to buffer the gate input and also add a gate driver for a faster response. The code on the transmitter side is hown below. This is the Manchester encoded data stream using the Manchester library for Arduino that you can find here. The test code is pretty basic and just transmits a string of data. As a homework you've got to figure out other parts of the code yourself. No freebies !! Same goes for most circuits.


As mentioned in earlier posts the receiver consists of a TEMT 6000 ambient light sensor whose output is coupled through a capacitor into a LM324N based non-inverting comparator. The reference voltage to the comparator is selectable between 2.5V and 3.3V. This determines how accurately the signal is re-constructed. The output of the OP-AMP is then connected to an Arduino pin as input via a buffer. The various signals are shown below. The power rails of the LM324N quad are connected to 5V and GND.


The output of the TEMT 6000 is in orange. This signal is fed into the OP-AMP non-inverting input. Observe the non-linearity due to the fall time. This is the signal for a Manchester encoded data at 1200 baud. The signal in blue color is the output of the comparator. Based on the reference voltage set the timing of the manchester data stream is not affected and can be decoded easily.


In the above case i reduced the drain-source voltage Vds to around 8V thereby reducing the intensity of light. Observe the non-linearity in both the rise and fall-times of the TEMT 6000 sensor. However the comparator was successfully able to re-construct the signal. The code on the receiver side is shown below


The plots for UART data are shown below. The first plot is the UART data at 2400 Baud with Vds = 13V. The second plot is the same data at 2400 Baud but with Vds = 8V. Note the effects of LED brightness on the output of the sensor. The orange plot is the sensor output and the blue plot is the comparator output. The dark black horizontal line is Vref at 2.5V.


Complete loss of timing information in this one

This concludes the initial stages of experimentation for the visible light communication link that i want to build. The primary objective right now is to find a high speed sensor whose rise and fall times are in the nanosecond range. Less than or equal to 100 ns preferably. Once i get my hands on the new sensor i will post the details about it here. Until then, take it easy.....




No comments: