1. The document describes a project that transmits digital signals through light pulses using LEDs and photodiodes. A microcontroller generates pulses that drive an LED, transmitting the signal through light. A photodiode receives the light and the microcontroller interprets and plots the signal.
2. The transmitter code generates pulses by alternating the output pin between high and low with delays. The receiver reads the photodiode voltage and sends it to a computer to plot the square wave signal graphically, showing accurate signal transmission.
3. Testing without the LED showed noise in the receiver between 1.28-1.32 volts, demonstrating the need for an optical signal to transmit data distinctly.
Coefficient of Thermal Expansion and their Importance.pptx
Transmitting Digital Signal through Light Pulses
1. Transmitting Digital Signal through Light Pulses 5 December 2014
1
Transmitting Digital Signal through Light Pulses
Gurjeet Singh
Karthikvel Rathinavel
Jacob Busche
Mitchell Senger
Oregon State University
2. Transmitting Digital Signal through Light Pulses 5 December 2014
2
Introduction
Lasers are extensively used in communication systems. We can say that it is backbone of modern
internet. Lasers are connecting continents with underwater optical-fiber system. Lasers are
generally used because of their high bandwidth, lower cost and robustness. Fiber optic
communication is a very efficient, fast and cheap method for transmitting data. It is used in many
applications across the world including decorative lamps and bring internet in homes. It can also
be used to transmit large amount of data between continents. Underwater fiber optic cables are
used to transmit and receive data between different countries belonging to different continents.
Just like analog data can be sent through a Laser, digital signal (1’s and 0’s) can also be sent by
using a Laser. A photo detector can be used to collect the light (containing data) and convert the
light into a voltage signal. In our lab project we are implementing digital communication using
light transmitted through a LED.
Project
In our Project, we used a computer system as a digital signal generator. The signal that we are
transmitted is a square wave. A recurring code is used to send a series of pules. These pulses are
sent to a microcontroller. The microcontroller send that data to an output pin (pin 13) of the
microcontroller. An LED is connected to this output pin which fluctuates due to the pulse input.
After going via medium (air/optical fiber). The signal will be received via photodiode and then the
signal will be fed into a receiver computer through a microcontroller, where we can display the
signal transmitted graphically. Figure 1 displays the general block diagram of the project and an
image of the actual setup.
Figure 1 Project Setup
3. Transmitting Digital Signal through Light Pulses 5 December 2014
3
Code
1. Transmitter side code:
In the transmitter side, the microcontroller is given a code to generate pulses. The code is basically
an infinite loop. A logic high (1) value is followed by a short delay, then a logic low (0) value is
given. This process is repeated to generate a series of pules which is outputted in pin 13. An LED
was connected to this pin to obtain a series of flashing light pulses. Note that the time between
pulses was set to 25 milliseconds.
Figure 2 Transmitter side code for generating pulses
2. Receiver side code:
The receiving controller was a bit more complicated. First the microcontroller was configured to
read the data from the photodiode via an analog pin. The analog pin can actually read the amplitude
of the input signal rather than just reading a high or low; the value the pin returns is an integer
between 0 and 1023 that is linearly proportional to the input. The controller was set to read the
value from the pin, then relay it to the com port’s serial monitor. The code for which is shown
below.
Figure 3 Receiver side code for capturing pulses
4. Transmitting Digital Signal through Light Pulses 5 December 2014
4
Next, a python script was developed to read information from the serial monitor and interpret it as
a signal. In the loop, a line is read from the serial monitor and the relative time at which the line is
read is recorded. At this point the integer value reported by the pin can be scaled back into a
voltage. This data is added to a pair of lists that collects the data for a preset amount of time. The
next step in the code was to plot the signal over time, but it could be interpreted as a digital signal
in more advanced software.
Figure 4 Signal Interpreting Code
Photodiode Operation:
Photodiode is connect to analog input of the microcontroller. Photodiode is connected in reverse
bias. When light is emitted on the photodiode, the microprocessor capture analog data from
photodiode and send that to computer via serial port. A computer program in the computer plot
the analog input to give us the picture of the input received.
5. Transmitting Digital Signal through Light Pulses 5 December 2014
5
Observations
1. The output waveform from the photodiode was processed by the microcontroller and was fed
into a receiving computer where it was plotted graphically. The received signal is clearly a
square wave as produced by the LED, note that the frequency of the signal is exactly the same.
This represents an extremely basic digital data transmission. Were the receiving software more
advanced, it could be used to send a more informative signal. Note that the scaling factor is
arbitrary, the high to low switch can be read regardless.
Figure 5 Received signal Plotted graphically
2. The obtained signal was tested without sending pulses through a LED. For this, the LED was
disconnected while the code on the transmitting side was running. The receiving side photo
detector was kept in darkness so that no light from the surrounding was converted into output.
It was observed that the output signal contained noise with a DC offset of about 1.3V. This
noise fluctuated between 1.28 to 1.32 Volts at about 200 Hz.
Figure 6 Noise signal contained in the Output signal