Showing posts with label vlc. Show all posts
Showing posts with label vlc. Show all posts

Sunday, October 5, 2014

Visible Light Communication Chronicles - Part V - The Boards

The boards are here !! The images shown below are the VLC RX and TX boards i designed as shields for the Arduino UNO. An array of 12 LEDs forms the transmitter, a TEMD6200FX photodiode on the RX board, an Analog Devices XRAD8051 transimpedance amplifier followed by a SY8890 limiting amplifier. The wires on the TX board are test points i added at every stage of the output blocks. The FTDI is an alternative interface to connect the boards on USB-UART to a cellphone over OTG. The control path signalling is implemented using the NRF24L01+ RF module.

Time to solder all them components and get 'em boards runnin' (strong southern accent :P)









Saturday, August 30, 2014

Visible Light Communication Chronicles - Part IV - The Photodiode

In this post i will compare the new ambient light sensor that i got - the TEMD 6200FX01 by Vishay to the TEMT 6000 phototransistor [PT]. The TEMD6200FX01 is a PIN photodiode [PD]. More information can be found in its datasheet here. The circuit i hooked up with the PD is shown below.






The PD is reverse biased with a voltage of 3.3V and the output is taken across the 10K load resistor. Looking at the reverse voltage vs capacitance curve from the data sheet i approximated that the diode capacitance will be around  30 pF. The load resistor and the capacitance will determine the cut-off frequency and the time constant. Based on above values these turn out to be as shown below


Hence the cut-off frequency happens to be approximately around 530 KHz with this configuration of the PD.
The LED was modulated with different frequencies and the light was focused on both the PD and the PT. The below waveforms were observed on the scope. The orange trace is the PT output and the blue trace is the PD output. (In case of the PT the circuit is same as before and the output is obtained across a 10K resistor). It was pointless to go beyond 10KHz as the PT output faded away.

100 Hz square wave


1 KHz square wave

10 KHz square wave


The board i designed for mounting the TEMD 6200 0805 SMD so that i could breadboard the test circuit


In the next chronicle i will be hooking up the PD to a transimpedance amplifier...

Thursday, August 14, 2014

Visible Light Communications - Lumia 920 Windows Phone + Galaxy S5 Android

While i wait for the components to arrive i am trying some new stuff using the existing setup. Here is how i implemented a VLC data transmitter using the Windows Phone 8.0 - A Nokia Lumia 920....

--- A few eons later ---

Well this just did not turn out to be good. I tried to modulate the flash of the camera on both the Lumia 920 Windows phone and Android Galaxy S5 with similar results - It Does Not Work !! The maximum modulation frequency i got was around 33 Hz for both the devices. I believe achieving higher data rates using onboard timer mechanisms of the OS just does not work. If you are reading this and are an expert on Android or Windows Phone Operating systems, i would be glad if you could give this a try or even sugesst me how to achieve high resolution timers that operate without giving any distortion / timing errors if i use them to modulate the camera flash. The image below shows the application. Turn On / Turn Off just switch the flash ON/OFF using the torch mode. Timed button activates a timer based on the DispatchTimer class. The time duration is taken from the Textbox. Similarly the Pool Timer button activates a timer created using the ThreadPoolTimer class.


As an example here is the code from my windows phone program. P.S - This code was adapted from several examples i found on the internet and after doing a brief study on the WP8 How Tos. I do not major in WP8 programming ;) So if you spot something wierd please let me know...


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




Wednesday, July 2, 2014

Visible Light Communication Chronicles Part I - The Light

I've begun experimenting with Visible Light Communication recently and hope to design a complete system using it. VLC is a promising means of communication having it's own bunch of pros and cons which i will not detail out here and waste my time and yours. Google It !! Nevertheless it is worth a try to design it and share the data with everyone on this planet.

I purchased a TEMT 6000 ambient light sensor breakout from Sparkfun as my first choice for a light sensor and check out it's performance. From the datasheet it can be seen that it has a fairly decent response in the visible light spectrum from around 400nm to 800 nm with peak sensitivity around 570 nm. I hooked it up to a 3.3V power supply and fed the ouput signal into my scope.



Now let me mention that my room has a flourescent light source - A tubelight. The light from this source is incident on the TEMT 6000 sensor. As i had expected the output on my scope is shown below. The signal was around 100 mV with an average frequency of 100 Hz. This was the "default" lighting of my room, call it the base lighting value. This is the output of the TEMT 6000. When i turned the light OFF and observed the output, the frequency component was not present, just a very small DC voltage resulting from the light from my laptop display.


When i superimposed light from an LED source directly on the sensor the effect of the flourescent light became negligible. The LED that i am using is this one. It is very bright, runs on 12V and draws around 2A of current. My first step is to modulate the LED source using a MOSFET whose gate will be driven by a UART TX pin from an Arduino. I will also find a way to eliminate the low frequency component in the output signal and get a a clean DC signal at the output. Alternatively i might go for a totem pole gate driver for the MOSFET. Once that is done i shall post about it here soon. So stay tuned...

Continue Here