Monday, July 21, 2014

Visible Light Communication - Updates

While i wait for my new sensors to arrive, here are a few updates that i have done to the existing circuits to get the maximum performance using the TEMT 6000, from the sensor point-of-view. With these upgrades i am able to transmit and receive signals upto 20KHz in frequency, distorted of course but not so distorted that they cannot be recovered. Due to certain limitations of the LM324N the output exhibits excessive slew but the signal gets reproduced.

Transmitter Modifications:

Using one of the papers published by Texas Instruments - Design and Application Guide for High Speed MOSFET Gate Drive Circuits i modified my circuit using the components available with me. The rise time at the mosfet drain when it was switched off was significantly improved. This however introduced some ringing at the drain (parasitic drain oscillations). Now this is wierd and could possibly be because of bad probes. Infact i am not using probes at all. The probes on the Digilent Analog Discovery are just regular connectors. The figure below shows the signal at the drain in orange. Ignore the blue signal it is the output of the op-amp at the receiver side. The blue signal needs to be shifted to the left to align it with the drain signal's off period. The other figure is that of the oscillations at the drain.

Receiver Modifications:

The original sparkfun breakout circuit for the phototransistor can be seen here. This utilizes a 10K resistor across which the signal output is obtained. I did an initial analysis for this which is shown in the figure below. As per the datasheet from Vishay, the collector to emitter capacitance is 16pF. At a light intensity of 100 lux the device outputs a current of 50uA when the supply is 5V. So, assuming these conditions and that if i want the output signal Vo to have atleast a 5V swing i.e. Vo = Vcc, the value of the load resistor needs to be computed. Using the datasheet values this evaluates to 100K as shown below. Alternatively this value along with the capacitance will give a time constant of around 1.6 microseconds thereby restricting the bandwidth of the device. I shall leave the bandwidth calculation to you.

THAT's 1.6 Micro Seconds up there !!

So, now if we apply the same to the default sparkfun board with load resistor of 10K we get a maximum output voltage of 500mV and a time constant of 0.16 1.6 microseconds. Hence both circuits have their pros and cons. After doing some more research on the switching times of phototransistor i came across one app note. This app note suggests several techniques to improve rise and fall times of phototransistor. As my circuit is taking output across the emitter which makes it a common collector configuration, this paper states that for a common collector configuration the miller capacitance is absent and it therefore has fast rise times and slow fall times as demonstrated in my earlier posts. The cascode topology was thus feasible option to implement in my circuit. For more information goto the paper. The modified circuit is shown below. Yes, i have an endless supply of BC547s and 557s :P

In this topology, the phototransistor does not see the load resistor R3, only the input resistance of the common base transistor Q3. The output of the sensor is shown below in orange and the output of the op-amp voltage follower is in blue. The transmitter is connected to a 20 KHz square wave signal source. The op-amps are LM324N in quad package.

The slewing in the output starts around  frequencies higher than 900 Hz. The same can be verified by a simple simulation.

No comments: