SlideShare a Scribd company logo
1 of 53
1
2
Acknowledgment:
This report could not be written to its fullest without [Doctor Jamal
Kharousheh], who served as my supervisor, as well as one who challenged and
encouraged me throughout my time spent studying under him. He would have
never accepted anything less than my best efforts, and for that, I thank him.
Also, we wish to thank everyone who helped us complete this dissertation.
Without their continued efforts and support, we would have not been able to
bring our work to a successfulcompletion. Dr. Mazen Rasekh and Dr. Falah
Mohammad.
3
Table of Contents (TOC)
Abstract………………………………………………………………….7
1. Introduction…………………………………………………………..8-01
1.1 statement of the problem……………………………………8
1.2 Motivation and Objectives………………………………..8
1.3 scope of the work …………………………………...........9
1.4 significance(importance) ……………………………..…..9-01
1.5 Organization of the Report…………………………….…01
2. Constraints and Standards……………………………………..00-16
2.1 Constraints………………………………………………00
2.2 Standards…………………………………………………00-12
2.3 Earlier course work…………………………………........12-16
3. Literature review………………………………………………17-21
3.1 The Visible Light Communication System Considered…..17
3.2 Traffic Light………………………………………………….18
3.3 Intelligent Transport System………………………………18-19
3.4 Visible Light Communication for Advanced Driver Assistant
Systems…………………………………………………………….19
3.5 Visible Light Communication Link for Video & Audio
Transmission……………………………………………………….21
4. Materials and Methods……………………………………………20-26
5. Results and Analysis……………………………………………….27-32
6. Discussion…………………………………………………………..33
7. Conclusions and Recommendations……………………………..34
7.1 Conclusions…………………………………………………34.
7.2 Recommendations…………………………………………..34
8. References………………………………………………………….35-36
9. Appendices………………………………………………………..37-53
4
List of Figures (LOC)
1. VLC system (Fig. 1.1)………………………………………………………………….8
2. VLC Advantages (Fig. 1.2)…………………………………………………………….9
3. How LED work (Fig. 2.1)………………………………………………………………13
4. Typical Led Characteristics (Fig. 2.2)………………………………………………….13
5. Phototransistor (Fig .2.3) ............................................................................…………….13
6. Arduino UNO pins (Fig.2.4) ……………………………………………………………14
7. Universal Serial Bus (USB) (Fig.2.5) …………………………………………………..14
8. 220 Ω resistor (Fig.2.6) ………………………………………………………………….15
9. 1 K Ω resistor (Fig.2.7) …………………………………………………………………15
10. Pin Configurations for opa847 (Fig.2.8)………..………………………………………15
11. Pin Configurations for opa358 (Fig.2.9) …………………….…………………………16
12. Arrangement of LEDs & receivers in an indoor system (Fig 3.1) ……………………17
13. Distribution of LEDs inside model room (Fig 3.2) ……………………………………17
14. Road-to-vehicle visible light communication (Figure 3.3)…………………………….. 18
15. Traffic lights and tail lights can be used as communication source (Fig3.4) ………….19
16. General architecture for a full duplex VLC system (Figure 3.5) ………………………19
17. Block diagram of real-time video/audio VLC transmission system (Fig.3.6) …………21
18. The VLC circuit (Fig.4.1)………………………………………………………………20
19. Experimental circuit (Fig.4.2)…………………………………………………………...22
20. The final transmitter circuit (Fig4.3)……………….……………………………………23
21. The final receiver circuit (Fig.4.4)………………………………………………………24
22. Transmitter application (Fig4.5)………………………………………………………..24
23. Receiver application (Fig.4.6)…………………………………………………………24
24. The Flowchart (Fig.4.7)……………………………………………………………….25
25. Testing result (Fig.5.1)…………………………………………………………………28
5
26. Transmission and Reception operations (Fig.5.2)…………………………………….29
27. Selecting Image (Fig.5.3)…………………………………………………………….31
28. Show receiving image (Fig.5.4)………………………………………………………30
29. Distance testing (Fig.5.5)……………………………………………………………..32
6
List of Tables (LOT)
Table 1: Comparison between VLC System and other Communication systems……....27
Table 2: Comparison between VLC System and RF ……………………..…………….28
Table 3: The Voltage at Photo transistor………………………………………...………29
7
Abstract:
The increase of mobile applications using radio frequencies (RFs) has
highlighted concerns about the adequate availability of RF bands and the limits
of transmission capacity in mobile telecom networks, as well as the data
security issues involved. Visible Light Communication (VLC) technology is
used as a medium for data transmission which is one of the most advanced
optical wireless communication technologies, in which light in the visible
region (375nm-780nm). This technology is more secure and achieves high data
rates as compared to conventional wireless technologies.
8
Chapter 1: Introduction
1.1 statement of the problem
Nowadays people are using several types of communication system such as
infrared, radio communication, Bluetooth …… etc. these types face some
problems including limited transmission power, security, limited data rates
…etc. in our project we are developing a new communication system that will
solve almost all these problem. This system is called visible light
communication.
Visible Light Communication (VLC): is free space optical communication,
and line of sight (LOS) is the common link between two points in optical
wireless communication system, where the transmitter directs the visible light
beam in a straight and unobstructed path to the receiver [1]. In this technology
LEDs are used as transmitter, the Air as a transmission medium and the
Photodiodes as a receiver.
Fig.1.1 VLC system. [2]
1.2 Motivation and Objectives
From our review of the literature, it became evident that work should be done to
look into the possibility of designing a new model that could fit the present
infrastructure for indoor applications [3]. Therefore, the objectives of the
research presented in this thesis can be summarized as follows:
 Build a circuit for VLC by using LED to LED.
 Test the circuit then take notes and discus the performance.
9
 Suggest a guideline for the design and implementation of future
development of the prototypes.
1.3 Scope of the work
we hope that the achievement of this project in reality will make everyone in
everywhere and at all times be able to send and receive text, image, audio and
video with lowest cost, reasonable rate and more security without using the
internet.
1.4 Significance (importance)
VLC Advantages:
Fig.1.2 VLC Advantages [4]
VLC System has many advantages over the other Communication Systems:
1- Security: VLC is use light communication and it's visible so in this case
it's easy to determine who can receive the message and it's impossible to
tap the communication without breaking the link.
2- Human Safety: VLC doesn't effect at the human body. Thus, the
transmission power can be kept high if needed.
10
3- Bandwidth: VLC has a bandwidth range from 430 THz to 750 THz and
this range is larger than the bandwidth in the RF Communications from 3
kHz to 300 GHz.
4- High Data Rates.
5- Unlicensed Spectrum: No company owns property rights for visible
light and thus no royalty fees have to be paid nor does expensive patent-
license have to be purchased in order to use visible light for
communication purposes [5].
6- Ubiquitous Nature: visible light is present in many places, so there is the
opportunity to combine light communication with lighting design to let
Visible Light Communication (VLC) coexist with the lighting setup
present in many offices, homes, or institutions.
1.5: Organization of the Report
Chapter 1 of this thesis serves to provide an overview of the basic concepts and
techniques in physics and engineering and also shows several designs that are
required for the implementation of VLC. Chapter 2 provides the constraints,
standards /codes and earlier course work. Chapter 3 literature review. Chapter 4
methodology .Chapter 5 results and analysis. Chapter 6 discussion the results.
Chapter 7 presents recommendations for improving the designs, as well as the
conclusion with suggestions for further improvements in the work.
11
Chapter 2:
2.1Constraints
The main problem was with dealing with the Arduino Where we encountered a
problem in writing the code. Also we had two problems with the hardware
circuit. The first one is LOS Communication which means that we need line
of sight communication. The second problem was the short Range i.e. this
technology usually works over a short distance range. Also we faced many
other problems such as:
1. Important elements of the circuit were unavailable in Palestine so we had
to order them from other countries. They took a lot of time to be available
in our hands and thus there was a very short time for the implementation
of the circuit.
2. The size of the elements is very small, so we needed special equipments
for the implementation.
3. Part of the project needed new software which required us to learn a new
software programs.
2.2Standards
 the Visible Light Communication Consortium was established
in 2003 by Japanese tech-companies
 aims to standardize VLC technology
 avoid fragmentation of different protocols and implementations
 two standards are proposed:
 JEITA CP-1221
 JEITA CP-1222
 also tries to raise public awareness for VLC and promote its
applications
 Standardization efforts for physical and media access layer are
also done by IEEE 802.15, Task Group 7.
 in 2007, the VLCC proposedtwo different standards:
 Visible Light Communication System Standard
 Visible Light ID System Standard
 JEITA (Japan Electronics and Information Technology
Industries Association) accepted these standards as JEITA
CP-1221 and JEITA CP-1222
12
JEITA CP-1221 (1/2)
 motivation:
 avoid fragmentation and proprietary protocols
 prevent interference
 light that is used for communication purposes must be within a
range of 380nm to 750nm emitted light must be within a particular range
with an accuracy of 1nm sub-carrier (SC) modulation is proposed (as
opposedto modulating the frequency of the actual light)
JEITA CP-1221 (2/2)
 there are three major frequency ranges:
 range 1 (15 kHz to 40 kHz):
- communication purposes
 range 2 (40kHz to 1 MHz):
- fluorescent lights cannot use this range
- they are too slow and generate too much noise
 range 3 (> 1 MHz):
- should only be used for vast data transmission with special LEDs19
JEITA CP-1222
 according to Shinichiro Haruyama (vice chairman of the VLCC)
the following recommendations are proposedbyJEITA CP-1222 :
 SC frequency: 28.8 kHz
 transmission rate: 4.8 kbps
 modulation: SC-4PPM(chosen to avoid flickering)
 cyclic redundancy checks (CRC) for error detection/correction .[5]
2.3 Earlier Coursework
In this project we made use in some subjects such as electronic, digital
communication,……. Etc.
13
*Light Emitting Diode (LED)
Fig.2.1 How LED work [6] Fig.2.2 Typical Led Characteristics [7]
*Phototransistor:
the st-1kla is a high-sensitivity phototransistor mounted in durable ,
hermetically sealed TO-18 metal can which provide years of reliable
performance even under demanding conditions such as use outdoors. It has two
leads. It can be used in various applications such as smoke detectors, infrared
sensor, optical switches and optical detectors. [8]
Fig .2.3 Phototransistor [9]
14
*Arduino UNO
Fig.2.4 Arduino UNO pins [10]
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to supportthe
microcontroller; simply connectit to a computer with a USB cable or power it
with an AC-to-DC adapter or battery to get started. The Uno differs from all
preceding boards in that it does not use the FTDI USB-to-serial driver [11]
* Universal Serial Bus (USB)
Used to communicate via the USB protocol with a host computer (for
programming or sending/receiving serial data).
Fig.2.5 Universal Serial Bus (USB)
15
*Resistors:
Resistor is an electrical component that reduces the electric current.
The resistor's ability to reduce the current is called resistance and is measured in
units of ohms (symbol: Ω).
Fig.2.6 220 Ω resistor Fig.2.7 1 K Ω resistor
16
OPA847
Fig.2.8 Pin Configurations for opa847 [12].
OPA358:
Fig.2.9 Pin Configurations for opa358 [13]
17
Chapter 3 Literature Review
This chapter provides an overview of the topics that supplied the ideas for this
report and the following sections examine the previous works which have been
done on implementing Visible Light Communication technology.
3.1 The Visible Light Communication System Considered
Fig 3.1: Arrangement of LEDs & receivers
In an indoor system [14]. Fig 3.2: Distribution of LEDs
Inside model room [14].
The final objective of VLC development is the application of off-the-shelf
LEDs in home environment wireless network to satisfy the needs of both
illumination and data transmission. An indoor visible light communication
system using white LEDs under consideration is shown in Fig. 3.1& 3.2[14].
All the lights in the room are replaced by LEDs. The LEDs are not only used for
illuminating the room but also for an optical wireless communication system.
18
3.2 Traffic Lights
Figure 3.3: Road-to-vehicle visible light communication [15].
The above Fig. 3.3 shows the basic usage of LED as a transmitter and
CAMERA as a Receiver. In this model, they mounted a camera before the front
end of the car. The Camera is used as the information receiver from traffic
signal lights. The advantage of using the camera is that multiple data can be
transmitted by the LEDs and received by High-speed cameras [15].
3.3Intelligent Transport System
This technology can be used to design an intelligent transport system to ensure
road safety. Nowadays, solid state lighting is widely used in traffic signals and
vehicle lights. So, these sources can also be used for both car-to-car and car-to-
traffic signal information communication.
19
Fig3.4 Traffic lights and tail lights can be used as communication source [16].
For instance it has been proposed a traffic light can be used to transmit the time
for which it would remain yellow to the vehicles as far as 50m away .In addition
to it, car –to car communication can be used for data logging at the time of
accident. This information can be used to investigate the nature of the accident
[16].
3.4 Visible Light Communication for Advanced Driver
Assistant Systems
Figure 3.5: General architecture for a full duplex VLC system [3].
Optical communications for outdoor communication has been discussed and
elaborated upon. Devices such as laptops and mobile phones can be used for
transmitting and receiving information, using transceivers, as shown in Fig. 3.5.
Transceiver systems use both LEDs and photodiodes. Intensity modulation was
implemented to reach the most viable modulation. Various important design
parameters were optimized by using intensive investigation based on gain
variation over 100m of transmission range [3].
20
3.5 Visible Light Communication Link for Video & Audio
Transmission
Fig.3.6 Block diagram of real-time video/audio VLC transmission system [1].
Video and audio signal captured by video camera are amplified by a self-
designed amplifier and then superimposed onto two LED lamps. Thus, the
output light rays changes in intensity corresponding to the variation in signal,
which however is insensitive to human eyes due to the rapid frequency response
of LED devices. The distance between two LEDs was about 10 cm in order to
avoid mutual interference caused by light sources. At the receiver, two highly
sensitive photodiodes are used to detect light transmitted over two separate
optical channels. And the directionality of the PDs is required to be aligned with
the most intense portion of the emitted light beams. After detection, optical
signals are converted into photo electric current proportional to the variation of
incident light which then is amplified and filtered by a low pass filter (LPF) [1].
21
Chapter 4 Materials and Methods
4.1 Designof VLC Prototype
Fig 4.1 The VLC circuit
VLC is typically implemented using white LED light bulbs at the transmitter.
These devices are normally used for illumination only by applying a constant
current. However, by fast and subtle variations of the current, the optical output
can be made to vary at extremely high speeds. This very property of optical
current is used in VLC setup. The operational procedure is very simple, if the
LED is on, you transmit a digital 1, if it’s off you transmit a 0. The LEDs can be
switched on and off very quickly, which gives nice opportunities for
transmitting data. Hence all that is required is some LEDs and an Arduino that
code data into those LEDs. All one has to do is to vary the rate at which the
LED’s flicker depending upon the data we want to encode. Further
enhancements can be made in this method, like using an array of LEDs for
parallel data transmission to transmit larger data like, videos, audios and
pictures.
22
After building the previous circuit that shown in Fig.4.1 and sending a message
from 5cm distance between the transmitter and receiver circuits we worked to
improve our VLC system in order to increase the distance and to send more
types of data in addition to the message such as images and voice.
At first, we tried to build the circuit shown in fig.4.2 but unfortunately it didn’t
work as we wanted.
Fig.4.2 Experimental circuit
Because of that we tried other ways to make the distance larger as:
1. Changing resistors values in the transmitter and receiver circuits and put
instead of old ones smaller values. So we put a 60Ω resistor at the
transmitter circuit and 20Ω resistor at the receiver circuit.
This increased the distance from 5cm to 30cm.
2. Put two convex lenses, one (30cm focal length) after the white LED and the
other (taken from car) before the photo transistor.
And this way increased the distance between the transmitter and the receiver
to 1.6m.
23
The final circuits that we achieved are shown in the figure below:
1. The final transmitter circuit :
We put the LED in the center of the convex lens to be sure that we use
all the light.
Fig4.3 The final transmitter circuit
24
2. The final receiver circuit:
The distance between the photo transistor and the convex lens is 15cm and we
chooseit after testing many distances.
Fig4.4 The final receiver circuit
4.2 Software Design
In order to send more data such as, images we designed a new applications
(transmitter and Receiver) using C sharp programme.
The figures below show the two applications:
Fig4.5 Transmitter application Fig4.6 Receiverapplication
25
4.3 Flow Chart
Fig 4.7 the Flowchart
Arduino
We used it to convert the input data into bits in order to transmit it into the LED.
Resistors
To protect the LED and Phototransistor from the high current.
LED:
It modulates the Bits received from the Arduino by converts the electrical
current into light pulses
Start
Insert Data to
Arduino
Bits are
modulated
inside the LED
Light pulses will
transmitted
through the light
Photo transistor
will receive the light
pulses
Light pulses will be
demodulated inside the
photo transistor
the Arduino will receive
the Bits
Bits will be converted
to sinusoidal signal
Convert data
into bits
End
TransmitterReceiver
26
Why we used LEDs ?
With LEDs, it is possible to control light brightness at a frequency much higher
than conventional light bulbs: LEDs can be switched on and off at very high
rates. As result, LED-based lighting can be used for wireless communication
services by modulating the intensity of the emitted light. Further, LEDs can also
be used as receivers just like photodiodes. We call this concept Visible Light
Communication (VLC) with LED-to-LED networking [17].
Phototransistor
In order for data transmission to have any significance there must be a way to
receive the signal at the other end of the design. This is the purpose of the
photodiodes as they react to the light emitted from the LEDs and allow for
current to flow to the rest of the receiver circuit. When there is no light emitted
from the LEDs the photodiodes do not allow current to flow through to the
Arduino on the receiver.
USB
It used to transmit the data from the device to Arduino.
27
Chapter 5 Results
After research we found that the VLC system is different from the other
Communication systems and we summarize these differences in the following
tables:
GPS RFID WIFI QR code Visible light
communication
Position
accuracy
Several
meters
Several
millimeters
to Several
meters
Several
meters to
Several
hundred
meters
Several
millimeters
to Several
meters
Several meters
Measurement
time
A few
minutes
Less than a
second
Several
seconds
Several
seconds
Less than a
seconds
Measurement
device
GPS
receiver
RFID reader WIFI
transceiver
Image
sensor
Visible light
receiver
Database Not
necessary
necessary necessary necessary Not necessary
The use of
indoor and
underground
impossible possible possible possible possible
Recognition
of building
floors
Impossible possible difficult possible possible
Applications Outdoor Inoutdoor Inoutdoor Inoutdoor Inoutdoor
Possibility of
widespread
use
Already
widely used
for outdoor
Need to
install RFID
tags all over
the place
Need to
install WIFI
base
stations all
over the
place
Need to
install QR
code
stickers all
over the
place
Need to install
Visible light
transmitters all
over the place
illumination
lights can be
used as
transmitter
Table 2: Comparison Between VLC System and other Communication system.
28
RFVLCProperty
NOYesVisibility
850-950nm400THZ-790THZFrequency
1-2 mb/s3.25 Gb/sData rate
Less comp. to VLCMoreSecurity
MediumRelative lowPower Consumption
MediumShortCoverage Distance
YesNOHarmless for human
body
Table 3: Comparison Between VLC System and RF.
After building the basic circuit of the VLC system we test it by connectthe
receiver to an oscilloscope and got the following result:
Fig.5.1 testing result
29
This result mean that the message was sent from the transmitter should be the
same at the receiver in order to make sure that the phototransistor receives data
from the LED.
Next, a measurement was made on the voltage at several distances in order to
know at what distance the receiver (phototransistor) will not receive any data
from the transmitter (LED). The results are showed in the following table:
Output Voltage (p)Distance
400 mv2cm
178 mv4cm
Table 1: The Voltage at Photo transistor
After measuring the voltage, the codewas downloaded into the arduino and a
text message was inserted into it then the transmission operation begun. The
photo below shows transmission and reception operations
Fig.5.2 Transmission and Reception operations
30
As we mentioned earlier we tried to send other types of data like images by
writing C# code.
The result we got is shown in the figures below:
Fig.5.3 Selecting Image
31
Fig.5.4 Show Receiving Image
Then after increasing the distance we test the circuit and we succeed to send
messages from 1.6m distance
32
Fig.5.5 Distance testing
33
Chapter6 Discussion
At the beginning of our project we hoped (or expected) that we will be able to
send and receive data through light with relatively high data rate and at
acceptable distance (at first we looked forward to send and receive data at least
at 3 meters). on one hand, we succeeded to send receive the data. But on the
other hand, there was a problem in the distance, i.e. the highest distance the
receiver was able to receive data from the transmitter with relatively low error is
5 cm. There were two suggested problems; the first problem is that the LED
needed relatively high power in order to send the data to high distance, the
second problem is that the light distract along high distances.
We solved these two problems by decreasing the resistors values in the
transmitter and receiver circuits and by adding two convex lenses after the white
LED and before the photo transistor.
34
Chapter7: Conclusion and Recommendation
At the end of this project we were able to send and receive text message through
led-to-led communication. This proved that at the future we will be able to send
and receive any kind of data using every light bulb everywhere like the Wi-Fi
hotspots.
In the future we hope to send and receive all kind of data such as video and
audio. In addition, we hope to have mobile-to-mobile communication instead of
computer-to-computer communication.
35
References
[1]Yingjie He ,Liwei Ding, Yuxian Gong, Yongjin Wang, “ Real-time Audio & Video
Transmission System Based on Visible Light Communication ” Optics and Photonics
Journal, 2013, 3, 153-157.
[2] renesas, Renesas Solutions for Wireless Sensor Networks―Part 4: Visible Light
. [Online] Available from:Communication (VLC)
http://www.renesas.com/edge_ol/features/10/index.jsp
November, 2014].,th[Last Access: 27
[3] Durgesh Gujjari, “VISIBLE LIGHT COMMUNICATION”
. [Online]Available from:Visible Light Communication,web.it.nctu.edu.tw[4]
.http://web.it.nctu.edu.tw/~lab332/research2.html
, November, 2014].th[Last Access: 29
[5] Christian Pohlmann, “Visible Light Communication”, June 2010.
[Online]Available from:Light Emitting Diode.,physics.tutorvista[6]
diode.html-emitting-magnetism/light-and-http://physics.tutorvista.com/electricity
, November, 2014].th[Last Access: 27
[7] expertsmind, Light Emitting Diode Colors. [Online]Available from:
http://www.expertsmind.com/learning/light-emitting-diode-colours-assignment-help-
7342873207.aspx
[Last Access: 27th, November, 2014].
[8] alldatasheet, Photo transistor ST-1KL. [Online]Available from:
http://pdf1.alldatasheet.com/datasheet-pdf/view/253316/KODENSHI/ST-1KLA.html
[Last Access: 27th, November, 2014].
. [Online]Available from:the PhototransistorLindsayAndy, (2012), Introducing[9]
http://learn.parallax.com/lightspectrum
[Last Access: 27th, November, 2014].
from:.[Online]AvailableUnoArduino,electronics-store.fut[10]
Uno+r3.html-electronics.com/11Ard-http://store.fut
[Last Access: 27th, November, 2014].
[11] arduino, Arduino Uno. [Online]Available from:
http://arduino.cc/en/Main/arduinoBoardUno.
[Last Access: 27th, November, 2014].
[12] alldatasheet, Wideband, Ultra-Low Noise, Voltage-Feedback
36
OPERATIONAL AMPLIFIER with Shutdown. [Online]Available from:
http://pdf1.alldatasheet.com/datasheet-pdf/view/89734/BURR-BROWN/OPA847.html
[Last Access: 28th, April, 2015].
[13] alldatasheet, 3V Single-Supply 80MHz High-Speed Op Amp in SC70.
[Online]Available from:
http://pdf1.alldatasheet.com/datasheet-pdf/view/156278/BURR-BROWN/OPA358.html
[Last Access: 28th, April, 2015].
[14] T. Komine and M. Nakagawa, “Fundamental Analysis for Visible-Light
Communication System Using LED Lights”, IEEE Transactions on Consumer
Electronics, Vol. 50, no. 1, pp. 100-107, February 2004
[15] S. Iwasaki, C. Premachandra, T. Endo, T. Fujii, M. Tanimoto, and Y. Kimura.
"Visible light road-to-vehicle communication using high-speed camera", in Proc.
IEEE IVS’08, June 2008, Eindhoven, Netherlands, pp. 13-18.
[16] Nishant Bharti, Nishant Gupta, R Kritika, Saurabh Singh “Visible Light
Communication”.
[17] Stefan Schmid, Giorgio Corbellini, Stefan Mangold, Thomas R. Gross “An LED-
to-LED Visible Light Communication System with Software-Based Synchronization”
3rd IEEE Workshop on Optical Wireless Communications (OWC'12).
37
38
Appendix A
Arduino Codes
Testing Code:
Transmitter code:
void setup()
{
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
// Clear Timer on Compare Match (CTC) Mode
bitWrite(TCCR1A, WGM10, 0);
bitWrite(TCCR1A, WGM11, 0);
bitWrite(TCCR1B, WGM12, 1);
bitWrite(TCCR1B, WGM13, 0);
// Toggle OC1A and OC1B on Compare Match.
bitWrite(TCCR1A, COM1A0, 1);
bitWrite(TCCR1A, COM1A1, 0);
bitWrite(TCCR1A, COM1B0, 1);
bitWrite(TCCR1A, COM1B1, 0);
// No prescaling
bitWrite(TCCR1B, CS10, 1);
bitWrite(TCCR1B, CS11, 0);
bitWrite(TCCR1B, CS12, 0);
OCR1A = 210;
OCR1B = 210;
39
Serial.begin(2400);
}
void loop()
{
Serial.println("testing testing testing");
delay(500);
}
Receivercode:
void setup()
{
Serial.begin(2400);
pinMode(13, OUTPUT);
}
void loop()
{
// if incoming serial
if (Serial.available()) {
readSerial();
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
delay(10);
}
40
void readSerial() {
char val = Serial.read();
Serial.print(val);
}
41
The final Code for Arduino:
Transmitter code:
#include <SoftwareSerial.h>
SoftwareSerial altSerial(2, 3); // RX, TX
//generates 38kHz carrier wave on pin 9 and 10
//sends data via TX every 500ms
void setup()
{
Serial.begin(2400);
altSerial.begin(2400);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(13, OUTPUT);
// Clear Timer on Compare Match (CTC) Mode
bitWrite(TCCR1A, WGM10, 0);
bitWrite(TCCR1A, WGM11, 0);
bitWrite(TCCR1B, WGM12, 1);
bitWrite(TCCR1B, WGM13, 0);
// Toggle OC1A and OC1B on Compare Match.
bitWrite(TCCR1A, COM1A0, 1);
bitWrite(TCCR1A, COM1A1, 0);
bitWrite(TCCR1A, COM1B0, 1);
bitWrite(TCCR1A, COM1B1, 0);
42
// No prescaling
bitWrite(TCCR1B, CS10, 1);
bitWrite(TCCR1B, CS11, 0);
bitWrite(TCCR1B, CS12, 0);
OCR1A = 210;
OCR1B = 210;
}
void loop()
{
char c;
if (Serial.available()) {
c = Serial.read();
altSerial.print(c);
altSerial.flush();
Serial.flush();
}
if (altSerial.available()) {
c = altSerial.read();
Serial.print(c);
}
}
43
Receiver code:
void setup()
{
Serial.begin(2400);
pinMode(13, OUTPUT);
Serial.flush();
}
void loop()
{
// if incoming serial
if (Serial.available()) {
readSerial();
// Serial.flush();
digitalWrite(13, HIGH);
} else {
// Serial.flush();
digitalWrite(13, LOW);
}
delay(2);
}
void readSerial() {
char val = Serial.read();
Serial.flush();
Serial.print(val);
}
44
Appendix B
C Sharp Code:
Transmitter Application code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.IO.Ports;
namespace CSharpEasySerial
{
public partial class frmSerial : Form
{
public string strFileName = "";
public static System.IO.Ports.SerialPort serialPort1;
private delegate void LineReceivedEvent(string line);
System.IO.FileStream _FileStream = new System.IO.FileStream("c:rcrc.txt",
System.IO.FileMode.Append, System.IO.FileAccess.Write);
public frmSerial()
{
InitializeComponent();
45
}
private void btnConnect_Click(object sender, EventArgs e)
{
System.ComponentModel.IContainer components = new
System.ComponentModel.Container();
serialPort1 = new System.IO.Ports.SerialPort(components); // Creating the new
object.
serialPort1.DataReceived += serialPort1_DataReceived;
serialPort1.PortName = "COM" + numCom.Value.ToString(); // Setting what port
number.
serialPort1.BaudRate = 2400; // Setting baudrate.
serialPort1.DtrEnable = true; // Enable the Data Terminal Ready
serialPort1.Open(); // Open the port for use.
btnConnect.Text = "Connected.";
btnConnect.Enabled = false;
numCom.Enabled = false;
}
private void btnSend_Click(object sender, EventArgs e)
{
try {
// Sends the text as a byte.
// serialPort1.Write(new byte[] { Convert.ToByte(txtDatasend.Text) }, 0, 1);
byte[] bytes = System.IO.File.ReadAllBytes(strFileName);
serialPort1.Write(bytes, 0, bytes.Length );
46
lblSucceed.Visible = true;
}
catch( Exception exc){
Console.WriteLine("Exception caught in process: {0}", exc.ToString());
}
}
private void btnSelect_Click(object sender, EventArgs e)
{
lblSucceed.Visible = false;
OpenFileDialog fd = new OpenFileDialog();
// string strFileName = null;
fd.Title = "Open File Dialog";
fd.InitialDirectory = "C:";
fd.Filter = "All files (*.*)|*.*|All files (*.*)|*.*";
fd.FilterIndex = 2;
fd.RestoreDirectory = true;
if (fd.ShowDialog() == DialogResult.OK)
{
strFileName = fd.FileName;
lblFileName.Text = lblFileName.Text + strFileName;
}
}
47
private void serialPort1_DataReceived(object sender,
System.IO.Ports.SerialDataReceivedEventArgs e)
{
int bytes = serialPort1.BytesToRead;
byte[] buffer = new byte[bytes];
serialPort1.Read(buffer, 0, bytes);
ByteArrayToFile("c:rcrc.txt", buffer);
//RxString = serialPort1.ReadExisting();
//this.Invoke(new EventHandler(DisplayText));
}
public bool ByteArrayToFile(string _FileName, byte[] _ByteArray)
{
try
{
// Open file for reading
// Writes a block of bytes to this stream using data from a byte array.
_FileStream.Write(_ByteArray,0, _ByteArray.Length);
// close file stream
_FileStream.Close();
return true;
48
}
catch (Exception _Exception)
{
// Error
Console.WriteLine("Exception caught in process: {0}", _Exception.ToString());
}
// error occured, return false
return false;
}
private void frmSerial_FormClosing(object sender, FormClosingEventArgs e)
{
if (serialPort1.IsOpen) serialPort1.Close();
}
}
}
49
Receiver application code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace SimpleSerial
{
public partial class Form1 : Form
{
// Add this variable
System.IO.FileStream _FileStream = new System.IO.FileStream("c:rcrc.txt",
System.IO.FileMode.Append, System.IO.FileAccess.Write);
public Form1()
{
InitializeComponent();
serialPort1.DataReceived += serialPort1_DataReceived;
}
private void buttonStart_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM" + textBox2.Text ;
50
serialPort1.BaudRate = 2400;
serialPort1.Open();
if (serialPort1.IsOpen)
{
buttonStart.Enabled = false;
buttonStop.Enabled = true;
// textBox1.ReadOnly = false;
}
}
private void buttonStop_Click(object sender, EventArgs e)
{
if (serialPort1.IsOpen)
{
serialPort1.Close();
buttonStart.Enabled = true;
buttonStop.Enabled = false;
//textBox1.ReadOnly = true;
}
}
//private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
//{
// // If the port is closed, don't try to send a character.
// if (!serialPort1.IsOpen) return;
51
// // If the port is Open, declare a char[] array with one element.
// char[] buff = new char[1];
// // Load element 0 with the key character.
// buff[0] = e.KeyChar;
// // Send the one character buffer.
// serialPort1.Write(buff, 0, 1);
// // Set the KeyPress event as handled so the character won't
// // display locally. If you want it to display, omit the next line.
// e.Handled = true;
//}
private void DisplayText(object sender, EventArgs e)
{
// textBox1.AppendText(RxString);
}
private void serialPort1_DataReceived(object sender,
System.IO.Ports.SerialDataReceivedEventArgs e)
{
int bytes = serialPort1.BytesToRead;
byte[] buffer = new byte[bytes];
serialPort1.Read(buffer, 0, bytes);
ByteArrayToFile("c:rcrc.txt", buffer);
52
//RxString = serialPort1.ReadExisting();
//this.Invoke(new EventHandler(DisplayText));
}
public bool ByteArrayToFile(string _FileName, byte[] _ByteArray)
{
try
{
// Open file for reading
// Writes a block of bytes to this stream using data from a byte array.
_FileStream.Write(_ByteArray, 0, _ByteArray.Length);
// close file stream
_FileStream.Close();
lblfileRec.Text = "File Received";
return true;
}
catch (Exception _Exception)
{
// Error
Console.WriteLine("Exception caught in process: {0}", _Exception.ToString());
}
// error occured, return false
return false;
53
}
private void button1_Click(object sender, EventArgs e)
{
MemoryStream stream = new MemoryStream(File.ReadAllBytes(@"c:rcrc.txt"));
Image image = Image.FromStream(stream);
this.pictureBox1.Image = image;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (this.serialPort1.IsOpen)
{
this.serialPort1.Close();
}
}
}
}

More Related Content

What's hot

Ppt presentation
Ppt presentationPpt presentation
Ppt presentationvishal4799
 
Li-Fi Technology advantages,disadvantages,application,scope
Li-Fi Technology advantages,disadvantages,application,scopeLi-Fi Technology advantages,disadvantages,application,scope
Li-Fi Technology advantages,disadvantages,application,scopeLeo Johnson
 
Broadband technology used in bsnl
Broadband technology used in bsnlBroadband technology used in bsnl
Broadband technology used in bsnlSyed Arfat Ahmad
 
Audio Transmission using LED
Audio Transmission using LEDAudio Transmission using LED
Audio Transmission using LEDAuwal Amshi
 
Orthogonal Frequency Division Multiplexing (OFDM)
Orthogonal Frequency Division Multiplexing (OFDM)Orthogonal Frequency Division Multiplexing (OFDM)
Orthogonal Frequency Division Multiplexing (OFDM)Gagan Randhawa
 
Evolution of wireless communication systems (1 G to 5G).
Evolution of wireless communication systems (1 G to 5G).Evolution of wireless communication systems (1 G to 5G).
Evolution of wireless communication systems (1 G to 5G).MANIRAFASHA Cedrick
 
Li fi and its application
Li fi and its applicationLi fi and its application
Li fi and its applicationAuwal Amshi
 
Task communication
Task communicationTask communication
Task communication1jayanti
 
Wireless network ppt
Wireless network pptWireless network ppt
Wireless network pptBasil John
 
lifi presentation
lifi presentationlifi presentation
lifi presentationHappy Soni
 
Lifi (presentation)
Lifi (presentation)Lifi (presentation)
Lifi (presentation)Aman Durrani
 
4 Weeks Summer Training In BSNL, Agartala
4 Weeks Summer Training In BSNL, Agartala4 Weeks Summer Training In BSNL, Agartala
4 Weeks Summer Training In BSNL, AgartalaArijit Roy
 
Free space optical communication
Free space optical communicationFree space optical communication
Free space optical communicationNaveen Kumar
 
History of wireless communication
History of wireless communicationHistory of wireless communication
History of wireless communicationAJAL A J
 

What's hot (20)

Ppt presentation
Ppt presentationPpt presentation
Ppt presentation
 
Li-Fi Technology advantages,disadvantages,application,scope
Li-Fi Technology advantages,disadvantages,application,scopeLi-Fi Technology advantages,disadvantages,application,scope
Li-Fi Technology advantages,disadvantages,application,scope
 
Broadband technology used in bsnl
Broadband technology used in bsnlBroadband technology used in bsnl
Broadband technology used in bsnl
 
NOMA in 5G Networks
NOMA in 5G NetworksNOMA in 5G Networks
NOMA in 5G Networks
 
Audio Transmission using LED
Audio Transmission using LEDAudio Transmission using LED
Audio Transmission using LED
 
Orthogonal Frequency Division Multiplexing (OFDM)
Orthogonal Frequency Division Multiplexing (OFDM)Orthogonal Frequency Division Multiplexing (OFDM)
Orthogonal Frequency Division Multiplexing (OFDM)
 
Evolution of wireless communication systems (1 G to 5G).
Evolution of wireless communication systems (1 G to 5G).Evolution of wireless communication systems (1 G to 5G).
Evolution of wireless communication systems (1 G to 5G).
 
Li fi and its application
Li fi and its applicationLi fi and its application
Li fi and its application
 
Task communication
Task communicationTask communication
Task communication
 
BSNL Training Report
BSNL Training ReportBSNL Training Report
BSNL Training Report
 
Wireless network ppt
Wireless network pptWireless network ppt
Wireless network ppt
 
lifi presentation
lifi presentationlifi presentation
lifi presentation
 
5G tecnology
5G tecnology5G tecnology
5G tecnology
 
Daknet ppt
Daknet pptDaknet ppt
Daknet ppt
 
Lifi (presentation)
Lifi (presentation)Lifi (presentation)
Lifi (presentation)
 
5G TECHNOLOGY project report
5G TECHNOLOGY project report5G TECHNOLOGY project report
5G TECHNOLOGY project report
 
4 Weeks Summer Training In BSNL, Agartala
4 Weeks Summer Training In BSNL, Agartala4 Weeks Summer Training In BSNL, Agartala
4 Weeks Summer Training In BSNL, Agartala
 
Free space optical communication
Free space optical communicationFree space optical communication
Free space optical communication
 
Li-Fi Technology presentation
Li-Fi Technology presentationLi-Fi Technology presentation
Li-Fi Technology presentation
 
History of wireless communication
History of wireless communicationHistory of wireless communication
History of wireless communication
 

Similar to Visible light communication (sending data through light)

Manuscrit de Doctorat_El Abdellaouy Hanane
Manuscrit de Doctorat_El Abdellaouy HananeManuscrit de Doctorat_El Abdellaouy Hanane
Manuscrit de Doctorat_El Abdellaouy HananeElabdellaouy Hanane
 
Sensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDsSensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDsEngineer Humair Gohar
 
Sensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDsSensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDsEngineer Humair Gohar
 
Implementation of li_fi_using_arduino
Implementation of li_fi_using_arduinoImplementation of li_fi_using_arduino
Implementation of li_fi_using_arduinoVivek Bakul Maru
 
A PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING r
A PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING rA PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING r
A PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING rStephen Achionye
 
report 1 joe final w 25eran for etisalat
report 1 joe final w 25eran for etisalatreport 1 joe final w 25eran for etisalat
report 1 joe final w 25eran for etisalateslam aboeliel
 
visible light communication
visible light communicationvisible light communication
visible light communicationHossam Zein
 
Extended LTE Coverage for Indoor Machine Type Communication.pdf
Extended LTE Coverage for Indoor Machine Type Communication.pdfExtended LTE Coverage for Indoor Machine Type Communication.pdf
Extended LTE Coverage for Indoor Machine Type Communication.pdfYAAKOVSOLOMON1
 
Thesis-Vamsi
Thesis-VamsiThesis-Vamsi
Thesis-Vamsichagari
 
Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...
Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...
Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...TELKOMNIKA JOURNAL
 
library get way management system
library get way management systemlibrary get way management system
library get way management systemEmaz Zee
 
PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)
PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)
PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)IJAEMSJORNAL
 
USRP Project Final Report
USRP Project Final ReportUSRP Project Final Report
USRP Project Final ReportArjan Gupta
 
10.1109@jiot.2020.29954
10.1109@jiot.2020.2995410.1109@jiot.2020.29954
10.1109@jiot.2020.29954MarcoToledoO
 
Adaptive Laser Cladding System with Variable Spot Sizes
Adaptive Laser Cladding System with Variable Spot SizesAdaptive Laser Cladding System with Variable Spot Sizes
Adaptive Laser Cladding System with Variable Spot SizesJorge Rodríguez Araújo
 

Similar to Visible light communication (sending data through light) (20)

Manuscrit de Doctorat_El Abdellaouy Hanane
Manuscrit de Doctorat_El Abdellaouy HananeManuscrit de Doctorat_El Abdellaouy Hanane
Manuscrit de Doctorat_El Abdellaouy Hanane
 
Sensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDsSensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDs
 
Sensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDsSensing and Communication using bi-directional LEDs
Sensing and Communication using bi-directional LEDs
 
Implementation of li_fi_using_arduino
Implementation of li_fi_using_arduinoImplementation of li_fi_using_arduino
Implementation of li_fi_using_arduino
 
A PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING r
A PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING rA PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING r
A PROTOTYPE REMOTE CONTROL FOR HOME APPLIANCE USING r
 
report 1 joe final w 25eran for etisalat
report 1 joe final w 25eran for etisalatreport 1 joe final w 25eran for etisalat
report 1 joe final w 25eran for etisalat
 
VLC
VLCVLC
VLC
 
visible light communication
visible light communicationvisible light communication
visible light communication
 
etd7288_MHamidirad
etd7288_MHamidiradetd7288_MHamidirad
etd7288_MHamidirad
 
Extended LTE Coverage for Indoor Machine Type Communication.pdf
Extended LTE Coverage for Indoor Machine Type Communication.pdfExtended LTE Coverage for Indoor Machine Type Communication.pdf
Extended LTE Coverage for Indoor Machine Type Communication.pdf
 
Thesis-Vamsi
Thesis-VamsiThesis-Vamsi
Thesis-Vamsi
 
Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...
Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...
Noise Analysis in VLC Optical Link based Discrette OPAMP Trans-impedance Ampl...
 
library get way management system
library get way management systemlibrary get way management system
library get way management system
 
PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)
PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)
PC to PC Transfer of Text, Images Using Visible Light Communication (VLC)
 
Guide otn ang
Guide otn angGuide otn ang
Guide otn ang
 
USRP Project Final Report
USRP Project Final ReportUSRP Project Final Report
USRP Project Final Report
 
RF_Path_eBook.pdf
RF_Path_eBook.pdfRF_Path_eBook.pdf
RF_Path_eBook.pdf
 
10.1109@jiot.2020.29954
10.1109@jiot.2020.2995410.1109@jiot.2020.29954
10.1109@jiot.2020.29954
 
Adaptive Laser Cladding System with Variable Spot Sizes
Adaptive Laser Cladding System with Variable Spot SizesAdaptive Laser Cladding System with Variable Spot Sizes
Adaptive Laser Cladding System with Variable Spot Sizes
 
Blackbook LIFI final
Blackbook LIFI finalBlackbook LIFI final
Blackbook LIFI final
 

More from slmnsvn

Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system slmnsvn
 
Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system slmnsvn
 
Smart home
Smart homeSmart home
Smart homeslmnsvn
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detectorslmnsvn
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detectorslmnsvn
 
Rfid attendace system
Rfid attendace systemRfid attendace system
Rfid attendace systemslmnsvn
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicleslmnsvn
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicleslmnsvn
 
Power factor correction
Power factor correctionPower factor correction
Power factor correctionslmnsvn
 
Power factor correction
Power factor correctionPower factor correction
Power factor correctionslmnsvn
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallahslmnsvn
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallahslmnsvn
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkslmnsvn
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkslmnsvn
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2slmnsvn
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2slmnsvn
 
Optimum performance for aqraba electrical network
Optimum performance for aqraba electrical networkOptimum performance for aqraba electrical network
Optimum performance for aqraba electrical networkslmnsvn
 
Multi tone test
Multi tone testMulti tone test
Multi tone testslmnsvn
 
Multi tone test
Multi tone testMulti tone test
Multi tone testslmnsvn
 
Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...slmnsvn
 

More from slmnsvn (20)

Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
 
Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
 
Smart home
Smart homeSmart home
Smart home
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detector
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detector
 
Rfid attendace system
Rfid attendace systemRfid attendace system
Rfid attendace system
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
 
Power factor correction
Power factor correctionPower factor correction
Power factor correction
 
Power factor correction
Power factor correctionPower factor correction
Power factor correction
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallah
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallah
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate network
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate network
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
 
Optimum performance for aqraba electrical network
Optimum performance for aqraba electrical networkOptimum performance for aqraba electrical network
Optimum performance for aqraba electrical network
 
Multi tone test
Multi tone testMulti tone test
Multi tone test
 
Multi tone test
Multi tone testMulti tone test
Multi tone test
 
Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 

Visible light communication (sending data through light)

  • 1. 1
  • 2. 2 Acknowledgment: This report could not be written to its fullest without [Doctor Jamal Kharousheh], who served as my supervisor, as well as one who challenged and encouraged me throughout my time spent studying under him. He would have never accepted anything less than my best efforts, and for that, I thank him. Also, we wish to thank everyone who helped us complete this dissertation. Without their continued efforts and support, we would have not been able to bring our work to a successfulcompletion. Dr. Mazen Rasekh and Dr. Falah Mohammad.
  • 3. 3 Table of Contents (TOC) Abstract………………………………………………………………….7 1. Introduction…………………………………………………………..8-01 1.1 statement of the problem……………………………………8 1.2 Motivation and Objectives………………………………..8 1.3 scope of the work …………………………………...........9 1.4 significance(importance) ……………………………..…..9-01 1.5 Organization of the Report…………………………….…01 2. Constraints and Standards……………………………………..00-16 2.1 Constraints………………………………………………00 2.2 Standards…………………………………………………00-12 2.3 Earlier course work…………………………………........12-16 3. Literature review………………………………………………17-21 3.1 The Visible Light Communication System Considered…..17 3.2 Traffic Light………………………………………………….18 3.3 Intelligent Transport System………………………………18-19 3.4 Visible Light Communication for Advanced Driver Assistant Systems…………………………………………………………….19 3.5 Visible Light Communication Link for Video & Audio Transmission……………………………………………………….21 4. Materials and Methods……………………………………………20-26 5. Results and Analysis……………………………………………….27-32 6. Discussion…………………………………………………………..33 7. Conclusions and Recommendations……………………………..34 7.1 Conclusions…………………………………………………34. 7.2 Recommendations…………………………………………..34 8. References………………………………………………………….35-36 9. Appendices………………………………………………………..37-53
  • 4. 4 List of Figures (LOC) 1. VLC system (Fig. 1.1)………………………………………………………………….8 2. VLC Advantages (Fig. 1.2)…………………………………………………………….9 3. How LED work (Fig. 2.1)………………………………………………………………13 4. Typical Led Characteristics (Fig. 2.2)………………………………………………….13 5. Phototransistor (Fig .2.3) ............................................................................…………….13 6. Arduino UNO pins (Fig.2.4) ……………………………………………………………14 7. Universal Serial Bus (USB) (Fig.2.5) …………………………………………………..14 8. 220 Ω resistor (Fig.2.6) ………………………………………………………………….15 9. 1 K Ω resistor (Fig.2.7) …………………………………………………………………15 10. Pin Configurations for opa847 (Fig.2.8)………..………………………………………15 11. Pin Configurations for opa358 (Fig.2.9) …………………….…………………………16 12. Arrangement of LEDs & receivers in an indoor system (Fig 3.1) ……………………17 13. Distribution of LEDs inside model room (Fig 3.2) ……………………………………17 14. Road-to-vehicle visible light communication (Figure 3.3)…………………………….. 18 15. Traffic lights and tail lights can be used as communication source (Fig3.4) ………….19 16. General architecture for a full duplex VLC system (Figure 3.5) ………………………19 17. Block diagram of real-time video/audio VLC transmission system (Fig.3.6) …………21 18. The VLC circuit (Fig.4.1)………………………………………………………………20 19. Experimental circuit (Fig.4.2)…………………………………………………………...22 20. The final transmitter circuit (Fig4.3)……………….……………………………………23 21. The final receiver circuit (Fig.4.4)………………………………………………………24 22. Transmitter application (Fig4.5)………………………………………………………..24 23. Receiver application (Fig.4.6)…………………………………………………………24 24. The Flowchart (Fig.4.7)……………………………………………………………….25 25. Testing result (Fig.5.1)…………………………………………………………………28
  • 5. 5 26. Transmission and Reception operations (Fig.5.2)…………………………………….29 27. Selecting Image (Fig.5.3)…………………………………………………………….31 28. Show receiving image (Fig.5.4)………………………………………………………30 29. Distance testing (Fig.5.5)……………………………………………………………..32
  • 6. 6 List of Tables (LOT) Table 1: Comparison between VLC System and other Communication systems……....27 Table 2: Comparison between VLC System and RF ……………………..…………….28 Table 3: The Voltage at Photo transistor………………………………………...………29
  • 7. 7 Abstract: The increase of mobile applications using radio frequencies (RFs) has highlighted concerns about the adequate availability of RF bands and the limits of transmission capacity in mobile telecom networks, as well as the data security issues involved. Visible Light Communication (VLC) technology is used as a medium for data transmission which is one of the most advanced optical wireless communication technologies, in which light in the visible region (375nm-780nm). This technology is more secure and achieves high data rates as compared to conventional wireless technologies.
  • 8. 8 Chapter 1: Introduction 1.1 statement of the problem Nowadays people are using several types of communication system such as infrared, radio communication, Bluetooth …… etc. these types face some problems including limited transmission power, security, limited data rates …etc. in our project we are developing a new communication system that will solve almost all these problem. This system is called visible light communication. Visible Light Communication (VLC): is free space optical communication, and line of sight (LOS) is the common link between two points in optical wireless communication system, where the transmitter directs the visible light beam in a straight and unobstructed path to the receiver [1]. In this technology LEDs are used as transmitter, the Air as a transmission medium and the Photodiodes as a receiver. Fig.1.1 VLC system. [2] 1.2 Motivation and Objectives From our review of the literature, it became evident that work should be done to look into the possibility of designing a new model that could fit the present infrastructure for indoor applications [3]. Therefore, the objectives of the research presented in this thesis can be summarized as follows:  Build a circuit for VLC by using LED to LED.  Test the circuit then take notes and discus the performance.
  • 9. 9  Suggest a guideline for the design and implementation of future development of the prototypes. 1.3 Scope of the work we hope that the achievement of this project in reality will make everyone in everywhere and at all times be able to send and receive text, image, audio and video with lowest cost, reasonable rate and more security without using the internet. 1.4 Significance (importance) VLC Advantages: Fig.1.2 VLC Advantages [4] VLC System has many advantages over the other Communication Systems: 1- Security: VLC is use light communication and it's visible so in this case it's easy to determine who can receive the message and it's impossible to tap the communication without breaking the link. 2- Human Safety: VLC doesn't effect at the human body. Thus, the transmission power can be kept high if needed.
  • 10. 10 3- Bandwidth: VLC has a bandwidth range from 430 THz to 750 THz and this range is larger than the bandwidth in the RF Communications from 3 kHz to 300 GHz. 4- High Data Rates. 5- Unlicensed Spectrum: No company owns property rights for visible light and thus no royalty fees have to be paid nor does expensive patent- license have to be purchased in order to use visible light for communication purposes [5]. 6- Ubiquitous Nature: visible light is present in many places, so there is the opportunity to combine light communication with lighting design to let Visible Light Communication (VLC) coexist with the lighting setup present in many offices, homes, or institutions. 1.5: Organization of the Report Chapter 1 of this thesis serves to provide an overview of the basic concepts and techniques in physics and engineering and also shows several designs that are required for the implementation of VLC. Chapter 2 provides the constraints, standards /codes and earlier course work. Chapter 3 literature review. Chapter 4 methodology .Chapter 5 results and analysis. Chapter 6 discussion the results. Chapter 7 presents recommendations for improving the designs, as well as the conclusion with suggestions for further improvements in the work.
  • 11. 11 Chapter 2: 2.1Constraints The main problem was with dealing with the Arduino Where we encountered a problem in writing the code. Also we had two problems with the hardware circuit. The first one is LOS Communication which means that we need line of sight communication. The second problem was the short Range i.e. this technology usually works over a short distance range. Also we faced many other problems such as: 1. Important elements of the circuit were unavailable in Palestine so we had to order them from other countries. They took a lot of time to be available in our hands and thus there was a very short time for the implementation of the circuit. 2. The size of the elements is very small, so we needed special equipments for the implementation. 3. Part of the project needed new software which required us to learn a new software programs. 2.2Standards  the Visible Light Communication Consortium was established in 2003 by Japanese tech-companies  aims to standardize VLC technology  avoid fragmentation of different protocols and implementations  two standards are proposed:  JEITA CP-1221  JEITA CP-1222  also tries to raise public awareness for VLC and promote its applications  Standardization efforts for physical and media access layer are also done by IEEE 802.15, Task Group 7.  in 2007, the VLCC proposedtwo different standards:  Visible Light Communication System Standard  Visible Light ID System Standard  JEITA (Japan Electronics and Information Technology Industries Association) accepted these standards as JEITA CP-1221 and JEITA CP-1222
  • 12. 12 JEITA CP-1221 (1/2)  motivation:  avoid fragmentation and proprietary protocols  prevent interference  light that is used for communication purposes must be within a range of 380nm to 750nm emitted light must be within a particular range with an accuracy of 1nm sub-carrier (SC) modulation is proposed (as opposedto modulating the frequency of the actual light) JEITA CP-1221 (2/2)  there are three major frequency ranges:  range 1 (15 kHz to 40 kHz): - communication purposes  range 2 (40kHz to 1 MHz): - fluorescent lights cannot use this range - they are too slow and generate too much noise  range 3 (> 1 MHz): - should only be used for vast data transmission with special LEDs19 JEITA CP-1222  according to Shinichiro Haruyama (vice chairman of the VLCC) the following recommendations are proposedbyJEITA CP-1222 :  SC frequency: 28.8 kHz  transmission rate: 4.8 kbps  modulation: SC-4PPM(chosen to avoid flickering)  cyclic redundancy checks (CRC) for error detection/correction .[5] 2.3 Earlier Coursework In this project we made use in some subjects such as electronic, digital communication,……. Etc.
  • 13. 13 *Light Emitting Diode (LED) Fig.2.1 How LED work [6] Fig.2.2 Typical Led Characteristics [7] *Phototransistor: the st-1kla is a high-sensitivity phototransistor mounted in durable , hermetically sealed TO-18 metal can which provide years of reliable performance even under demanding conditions such as use outdoors. It has two leads. It can be used in various applications such as smoke detectors, infrared sensor, optical switches and optical detectors. [8] Fig .2.3 Phototransistor [9]
  • 14. 14 *Arduino UNO Fig.2.4 Arduino UNO pins [10] The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to supportthe microcontroller; simply connectit to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver [11] * Universal Serial Bus (USB) Used to communicate via the USB protocol with a host computer (for programming or sending/receiving serial data). Fig.2.5 Universal Serial Bus (USB)
  • 15. 15 *Resistors: Resistor is an electrical component that reduces the electric current. The resistor's ability to reduce the current is called resistance and is measured in units of ohms (symbol: Ω). Fig.2.6 220 Ω resistor Fig.2.7 1 K Ω resistor
  • 16. 16 OPA847 Fig.2.8 Pin Configurations for opa847 [12]. OPA358: Fig.2.9 Pin Configurations for opa358 [13]
  • 17. 17 Chapter 3 Literature Review This chapter provides an overview of the topics that supplied the ideas for this report and the following sections examine the previous works which have been done on implementing Visible Light Communication technology. 3.1 The Visible Light Communication System Considered Fig 3.1: Arrangement of LEDs & receivers In an indoor system [14]. Fig 3.2: Distribution of LEDs Inside model room [14]. The final objective of VLC development is the application of off-the-shelf LEDs in home environment wireless network to satisfy the needs of both illumination and data transmission. An indoor visible light communication system using white LEDs under consideration is shown in Fig. 3.1& 3.2[14]. All the lights in the room are replaced by LEDs. The LEDs are not only used for illuminating the room but also for an optical wireless communication system.
  • 18. 18 3.2 Traffic Lights Figure 3.3: Road-to-vehicle visible light communication [15]. The above Fig. 3.3 shows the basic usage of LED as a transmitter and CAMERA as a Receiver. In this model, they mounted a camera before the front end of the car. The Camera is used as the information receiver from traffic signal lights. The advantage of using the camera is that multiple data can be transmitted by the LEDs and received by High-speed cameras [15]. 3.3Intelligent Transport System This technology can be used to design an intelligent transport system to ensure road safety. Nowadays, solid state lighting is widely used in traffic signals and vehicle lights. So, these sources can also be used for both car-to-car and car-to- traffic signal information communication.
  • 19. 19 Fig3.4 Traffic lights and tail lights can be used as communication source [16]. For instance it has been proposed a traffic light can be used to transmit the time for which it would remain yellow to the vehicles as far as 50m away .In addition to it, car –to car communication can be used for data logging at the time of accident. This information can be used to investigate the nature of the accident [16]. 3.4 Visible Light Communication for Advanced Driver Assistant Systems Figure 3.5: General architecture for a full duplex VLC system [3]. Optical communications for outdoor communication has been discussed and elaborated upon. Devices such as laptops and mobile phones can be used for transmitting and receiving information, using transceivers, as shown in Fig. 3.5. Transceiver systems use both LEDs and photodiodes. Intensity modulation was implemented to reach the most viable modulation. Various important design parameters were optimized by using intensive investigation based on gain variation over 100m of transmission range [3].
  • 20. 20 3.5 Visible Light Communication Link for Video & Audio Transmission Fig.3.6 Block diagram of real-time video/audio VLC transmission system [1]. Video and audio signal captured by video camera are amplified by a self- designed amplifier and then superimposed onto two LED lamps. Thus, the output light rays changes in intensity corresponding to the variation in signal, which however is insensitive to human eyes due to the rapid frequency response of LED devices. The distance between two LEDs was about 10 cm in order to avoid mutual interference caused by light sources. At the receiver, two highly sensitive photodiodes are used to detect light transmitted over two separate optical channels. And the directionality of the PDs is required to be aligned with the most intense portion of the emitted light beams. After detection, optical signals are converted into photo electric current proportional to the variation of incident light which then is amplified and filtered by a low pass filter (LPF) [1].
  • 21. 21 Chapter 4 Materials and Methods 4.1 Designof VLC Prototype Fig 4.1 The VLC circuit VLC is typically implemented using white LED light bulbs at the transmitter. These devices are normally used for illumination only by applying a constant current. However, by fast and subtle variations of the current, the optical output can be made to vary at extremely high speeds. This very property of optical current is used in VLC setup. The operational procedure is very simple, if the LED is on, you transmit a digital 1, if it’s off you transmit a 0. The LEDs can be switched on and off very quickly, which gives nice opportunities for transmitting data. Hence all that is required is some LEDs and an Arduino that code data into those LEDs. All one has to do is to vary the rate at which the LED’s flicker depending upon the data we want to encode. Further enhancements can be made in this method, like using an array of LEDs for parallel data transmission to transmit larger data like, videos, audios and pictures.
  • 22. 22 After building the previous circuit that shown in Fig.4.1 and sending a message from 5cm distance between the transmitter and receiver circuits we worked to improve our VLC system in order to increase the distance and to send more types of data in addition to the message such as images and voice. At first, we tried to build the circuit shown in fig.4.2 but unfortunately it didn’t work as we wanted. Fig.4.2 Experimental circuit Because of that we tried other ways to make the distance larger as: 1. Changing resistors values in the transmitter and receiver circuits and put instead of old ones smaller values. So we put a 60Ω resistor at the transmitter circuit and 20Ω resistor at the receiver circuit. This increased the distance from 5cm to 30cm. 2. Put two convex lenses, one (30cm focal length) after the white LED and the other (taken from car) before the photo transistor. And this way increased the distance between the transmitter and the receiver to 1.6m.
  • 23. 23 The final circuits that we achieved are shown in the figure below: 1. The final transmitter circuit : We put the LED in the center of the convex lens to be sure that we use all the light. Fig4.3 The final transmitter circuit
  • 24. 24 2. The final receiver circuit: The distance between the photo transistor and the convex lens is 15cm and we chooseit after testing many distances. Fig4.4 The final receiver circuit 4.2 Software Design In order to send more data such as, images we designed a new applications (transmitter and Receiver) using C sharp programme. The figures below show the two applications: Fig4.5 Transmitter application Fig4.6 Receiverapplication
  • 25. 25 4.3 Flow Chart Fig 4.7 the Flowchart Arduino We used it to convert the input data into bits in order to transmit it into the LED. Resistors To protect the LED and Phototransistor from the high current. LED: It modulates the Bits received from the Arduino by converts the electrical current into light pulses Start Insert Data to Arduino Bits are modulated inside the LED Light pulses will transmitted through the light Photo transistor will receive the light pulses Light pulses will be demodulated inside the photo transistor the Arduino will receive the Bits Bits will be converted to sinusoidal signal Convert data into bits End TransmitterReceiver
  • 26. 26 Why we used LEDs ? With LEDs, it is possible to control light brightness at a frequency much higher than conventional light bulbs: LEDs can be switched on and off at very high rates. As result, LED-based lighting can be used for wireless communication services by modulating the intensity of the emitted light. Further, LEDs can also be used as receivers just like photodiodes. We call this concept Visible Light Communication (VLC) with LED-to-LED networking [17]. Phototransistor In order for data transmission to have any significance there must be a way to receive the signal at the other end of the design. This is the purpose of the photodiodes as they react to the light emitted from the LEDs and allow for current to flow to the rest of the receiver circuit. When there is no light emitted from the LEDs the photodiodes do not allow current to flow through to the Arduino on the receiver. USB It used to transmit the data from the device to Arduino.
  • 27. 27 Chapter 5 Results After research we found that the VLC system is different from the other Communication systems and we summarize these differences in the following tables: GPS RFID WIFI QR code Visible light communication Position accuracy Several meters Several millimeters to Several meters Several meters to Several hundred meters Several millimeters to Several meters Several meters Measurement time A few minutes Less than a second Several seconds Several seconds Less than a seconds Measurement device GPS receiver RFID reader WIFI transceiver Image sensor Visible light receiver Database Not necessary necessary necessary necessary Not necessary The use of indoor and underground impossible possible possible possible possible Recognition of building floors Impossible possible difficult possible possible Applications Outdoor Inoutdoor Inoutdoor Inoutdoor Inoutdoor Possibility of widespread use Already widely used for outdoor Need to install RFID tags all over the place Need to install WIFI base stations all over the place Need to install QR code stickers all over the place Need to install Visible light transmitters all over the place illumination lights can be used as transmitter Table 2: Comparison Between VLC System and other Communication system.
  • 28. 28 RFVLCProperty NOYesVisibility 850-950nm400THZ-790THZFrequency 1-2 mb/s3.25 Gb/sData rate Less comp. to VLCMoreSecurity MediumRelative lowPower Consumption MediumShortCoverage Distance YesNOHarmless for human body Table 3: Comparison Between VLC System and RF. After building the basic circuit of the VLC system we test it by connectthe receiver to an oscilloscope and got the following result: Fig.5.1 testing result
  • 29. 29 This result mean that the message was sent from the transmitter should be the same at the receiver in order to make sure that the phototransistor receives data from the LED. Next, a measurement was made on the voltage at several distances in order to know at what distance the receiver (phototransistor) will not receive any data from the transmitter (LED). The results are showed in the following table: Output Voltage (p)Distance 400 mv2cm 178 mv4cm Table 1: The Voltage at Photo transistor After measuring the voltage, the codewas downloaded into the arduino and a text message was inserted into it then the transmission operation begun. The photo below shows transmission and reception operations Fig.5.2 Transmission and Reception operations
  • 30. 30 As we mentioned earlier we tried to send other types of data like images by writing C# code. The result we got is shown in the figures below: Fig.5.3 Selecting Image
  • 31. 31 Fig.5.4 Show Receiving Image Then after increasing the distance we test the circuit and we succeed to send messages from 1.6m distance
  • 33. 33 Chapter6 Discussion At the beginning of our project we hoped (or expected) that we will be able to send and receive data through light with relatively high data rate and at acceptable distance (at first we looked forward to send and receive data at least at 3 meters). on one hand, we succeeded to send receive the data. But on the other hand, there was a problem in the distance, i.e. the highest distance the receiver was able to receive data from the transmitter with relatively low error is 5 cm. There were two suggested problems; the first problem is that the LED needed relatively high power in order to send the data to high distance, the second problem is that the light distract along high distances. We solved these two problems by decreasing the resistors values in the transmitter and receiver circuits and by adding two convex lenses after the white LED and before the photo transistor.
  • 34. 34 Chapter7: Conclusion and Recommendation At the end of this project we were able to send and receive text message through led-to-led communication. This proved that at the future we will be able to send and receive any kind of data using every light bulb everywhere like the Wi-Fi hotspots. In the future we hope to send and receive all kind of data such as video and audio. In addition, we hope to have mobile-to-mobile communication instead of computer-to-computer communication.
  • 35. 35 References [1]Yingjie He ,Liwei Ding, Yuxian Gong, Yongjin Wang, “ Real-time Audio & Video Transmission System Based on Visible Light Communication ” Optics and Photonics Journal, 2013, 3, 153-157. [2] renesas, Renesas Solutions for Wireless Sensor Networks―Part 4: Visible Light . [Online] Available from:Communication (VLC) http://www.renesas.com/edge_ol/features/10/index.jsp November, 2014].,th[Last Access: 27 [3] Durgesh Gujjari, “VISIBLE LIGHT COMMUNICATION” . [Online]Available from:Visible Light Communication,web.it.nctu.edu.tw[4] .http://web.it.nctu.edu.tw/~lab332/research2.html , November, 2014].th[Last Access: 29 [5] Christian Pohlmann, “Visible Light Communication”, June 2010. [Online]Available from:Light Emitting Diode.,physics.tutorvista[6] diode.html-emitting-magnetism/light-and-http://physics.tutorvista.com/electricity , November, 2014].th[Last Access: 27 [7] expertsmind, Light Emitting Diode Colors. [Online]Available from: http://www.expertsmind.com/learning/light-emitting-diode-colours-assignment-help- 7342873207.aspx [Last Access: 27th, November, 2014]. [8] alldatasheet, Photo transistor ST-1KL. [Online]Available from: http://pdf1.alldatasheet.com/datasheet-pdf/view/253316/KODENSHI/ST-1KLA.html [Last Access: 27th, November, 2014]. . [Online]Available from:the PhototransistorLindsayAndy, (2012), Introducing[9] http://learn.parallax.com/lightspectrum [Last Access: 27th, November, 2014]. from:.[Online]AvailableUnoArduino,electronics-store.fut[10] Uno+r3.html-electronics.com/11Ard-http://store.fut [Last Access: 27th, November, 2014]. [11] arduino, Arduino Uno. [Online]Available from: http://arduino.cc/en/Main/arduinoBoardUno. [Last Access: 27th, November, 2014]. [12] alldatasheet, Wideband, Ultra-Low Noise, Voltage-Feedback
  • 36. 36 OPERATIONAL AMPLIFIER with Shutdown. [Online]Available from: http://pdf1.alldatasheet.com/datasheet-pdf/view/89734/BURR-BROWN/OPA847.html [Last Access: 28th, April, 2015]. [13] alldatasheet, 3V Single-Supply 80MHz High-Speed Op Amp in SC70. [Online]Available from: http://pdf1.alldatasheet.com/datasheet-pdf/view/156278/BURR-BROWN/OPA358.html [Last Access: 28th, April, 2015]. [14] T. Komine and M. Nakagawa, “Fundamental Analysis for Visible-Light Communication System Using LED Lights”, IEEE Transactions on Consumer Electronics, Vol. 50, no. 1, pp. 100-107, February 2004 [15] S. Iwasaki, C. Premachandra, T. Endo, T. Fujii, M. Tanimoto, and Y. Kimura. "Visible light road-to-vehicle communication using high-speed camera", in Proc. IEEE IVS’08, June 2008, Eindhoven, Netherlands, pp. 13-18. [16] Nishant Bharti, Nishant Gupta, R Kritika, Saurabh Singh “Visible Light Communication”. [17] Stefan Schmid, Giorgio Corbellini, Stefan Mangold, Thomas R. Gross “An LED- to-LED Visible Light Communication System with Software-Based Synchronization” 3rd IEEE Workshop on Optical Wireless Communications (OWC'12).
  • 37. 37
  • 38. 38 Appendix A Arduino Codes Testing Code: Transmitter code: void setup() { pinMode(9, OUTPUT); pinMode(10, OUTPUT); // Clear Timer on Compare Match (CTC) Mode bitWrite(TCCR1A, WGM10, 0); bitWrite(TCCR1A, WGM11, 0); bitWrite(TCCR1B, WGM12, 1); bitWrite(TCCR1B, WGM13, 0); // Toggle OC1A and OC1B on Compare Match. bitWrite(TCCR1A, COM1A0, 1); bitWrite(TCCR1A, COM1A1, 0); bitWrite(TCCR1A, COM1B0, 1); bitWrite(TCCR1A, COM1B1, 0); // No prescaling bitWrite(TCCR1B, CS10, 1); bitWrite(TCCR1B, CS11, 0); bitWrite(TCCR1B, CS12, 0); OCR1A = 210; OCR1B = 210;
  • 39. 39 Serial.begin(2400); } void loop() { Serial.println("testing testing testing"); delay(500); } Receivercode: void setup() { Serial.begin(2400); pinMode(13, OUTPUT); } void loop() { // if incoming serial if (Serial.available()) { readSerial(); digitalWrite(13, HIGH); } else { digitalWrite(13, LOW); } delay(10); }
  • 40. 40 void readSerial() { char val = Serial.read(); Serial.print(val); }
  • 41. 41 The final Code for Arduino: Transmitter code: #include <SoftwareSerial.h> SoftwareSerial altSerial(2, 3); // RX, TX //generates 38kHz carrier wave on pin 9 and 10 //sends data via TX every 500ms void setup() { Serial.begin(2400); altSerial.begin(2400); pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(13, OUTPUT); // Clear Timer on Compare Match (CTC) Mode bitWrite(TCCR1A, WGM10, 0); bitWrite(TCCR1A, WGM11, 0); bitWrite(TCCR1B, WGM12, 1); bitWrite(TCCR1B, WGM13, 0); // Toggle OC1A and OC1B on Compare Match. bitWrite(TCCR1A, COM1A0, 1); bitWrite(TCCR1A, COM1A1, 0); bitWrite(TCCR1A, COM1B0, 1); bitWrite(TCCR1A, COM1B1, 0);
  • 42. 42 // No prescaling bitWrite(TCCR1B, CS10, 1); bitWrite(TCCR1B, CS11, 0); bitWrite(TCCR1B, CS12, 0); OCR1A = 210; OCR1B = 210; } void loop() { char c; if (Serial.available()) { c = Serial.read(); altSerial.print(c); altSerial.flush(); Serial.flush(); } if (altSerial.available()) { c = altSerial.read(); Serial.print(c); } }
  • 43. 43 Receiver code: void setup() { Serial.begin(2400); pinMode(13, OUTPUT); Serial.flush(); } void loop() { // if incoming serial if (Serial.available()) { readSerial(); // Serial.flush(); digitalWrite(13, HIGH); } else { // Serial.flush(); digitalWrite(13, LOW); } delay(2); } void readSerial() { char val = Serial.read(); Serial.flush(); Serial.print(val); }
  • 44. 44 Appendix B C Sharp Code: Transmitter Application code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.IO.Ports; namespace CSharpEasySerial { public partial class frmSerial : Form { public string strFileName = ""; public static System.IO.Ports.SerialPort serialPort1; private delegate void LineReceivedEvent(string line); System.IO.FileStream _FileStream = new System.IO.FileStream("c:rcrc.txt", System.IO.FileMode.Append, System.IO.FileAccess.Write); public frmSerial() { InitializeComponent();
  • 45. 45 } private void btnConnect_Click(object sender, EventArgs e) { System.ComponentModel.IContainer components = new System.ComponentModel.Container(); serialPort1 = new System.IO.Ports.SerialPort(components); // Creating the new object. serialPort1.DataReceived += serialPort1_DataReceived; serialPort1.PortName = "COM" + numCom.Value.ToString(); // Setting what port number. serialPort1.BaudRate = 2400; // Setting baudrate. serialPort1.DtrEnable = true; // Enable the Data Terminal Ready serialPort1.Open(); // Open the port for use. btnConnect.Text = "Connected."; btnConnect.Enabled = false; numCom.Enabled = false; } private void btnSend_Click(object sender, EventArgs e) { try { // Sends the text as a byte. // serialPort1.Write(new byte[] { Convert.ToByte(txtDatasend.Text) }, 0, 1); byte[] bytes = System.IO.File.ReadAllBytes(strFileName); serialPort1.Write(bytes, 0, bytes.Length );
  • 46. 46 lblSucceed.Visible = true; } catch( Exception exc){ Console.WriteLine("Exception caught in process: {0}", exc.ToString()); } } private void btnSelect_Click(object sender, EventArgs e) { lblSucceed.Visible = false; OpenFileDialog fd = new OpenFileDialog(); // string strFileName = null; fd.Title = "Open File Dialog"; fd.InitialDirectory = "C:"; fd.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"; fd.FilterIndex = 2; fd.RestoreDirectory = true; if (fd.ShowDialog() == DialogResult.OK) { strFileName = fd.FileName; lblFileName.Text = lblFileName.Text + strFileName; } }
  • 47. 47 private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { int bytes = serialPort1.BytesToRead; byte[] buffer = new byte[bytes]; serialPort1.Read(buffer, 0, bytes); ByteArrayToFile("c:rcrc.txt", buffer); //RxString = serialPort1.ReadExisting(); //this.Invoke(new EventHandler(DisplayText)); } public bool ByteArrayToFile(string _FileName, byte[] _ByteArray) { try { // Open file for reading // Writes a block of bytes to this stream using data from a byte array. _FileStream.Write(_ByteArray,0, _ByteArray.Length); // close file stream _FileStream.Close(); return true;
  • 48. 48 } catch (Exception _Exception) { // Error Console.WriteLine("Exception caught in process: {0}", _Exception.ToString()); } // error occured, return false return false; } private void frmSerial_FormClosing(object sender, FormClosingEventArgs e) { if (serialPort1.IsOpen) serialPort1.Close(); } } }
  • 49. 49 Receiver application code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace SimpleSerial { public partial class Form1 : Form { // Add this variable System.IO.FileStream _FileStream = new System.IO.FileStream("c:rcrc.txt", System.IO.FileMode.Append, System.IO.FileAccess.Write); public Form1() { InitializeComponent(); serialPort1.DataReceived += serialPort1_DataReceived; } private void buttonStart_Click(object sender, EventArgs e) { serialPort1.PortName = "COM" + textBox2.Text ;
  • 50. 50 serialPort1.BaudRate = 2400; serialPort1.Open(); if (serialPort1.IsOpen) { buttonStart.Enabled = false; buttonStop.Enabled = true; // textBox1.ReadOnly = false; } } private void buttonStop_Click(object sender, EventArgs e) { if (serialPort1.IsOpen) { serialPort1.Close(); buttonStart.Enabled = true; buttonStop.Enabled = false; //textBox1.ReadOnly = true; } } //private void textBox1_KeyPress(object sender, KeyPressEventArgs e) //{ // // If the port is closed, don't try to send a character. // if (!serialPort1.IsOpen) return;
  • 51. 51 // // If the port is Open, declare a char[] array with one element. // char[] buff = new char[1]; // // Load element 0 with the key character. // buff[0] = e.KeyChar; // // Send the one character buffer. // serialPort1.Write(buff, 0, 1); // // Set the KeyPress event as handled so the character won't // // display locally. If you want it to display, omit the next line. // e.Handled = true; //} private void DisplayText(object sender, EventArgs e) { // textBox1.AppendText(RxString); } private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { int bytes = serialPort1.BytesToRead; byte[] buffer = new byte[bytes]; serialPort1.Read(buffer, 0, bytes); ByteArrayToFile("c:rcrc.txt", buffer);
  • 52. 52 //RxString = serialPort1.ReadExisting(); //this.Invoke(new EventHandler(DisplayText)); } public bool ByteArrayToFile(string _FileName, byte[] _ByteArray) { try { // Open file for reading // Writes a block of bytes to this stream using data from a byte array. _FileStream.Write(_ByteArray, 0, _ByteArray.Length); // close file stream _FileStream.Close(); lblfileRec.Text = "File Received"; return true; } catch (Exception _Exception) { // Error Console.WriteLine("Exception caught in process: {0}", _Exception.ToString()); } // error occured, return false return false;
  • 53. 53 } private void button1_Click(object sender, EventArgs e) { MemoryStream stream = new MemoryStream(File.ReadAllBytes(@"c:rcrc.txt")); Image image = Image.FromStream(stream); this.pictureBox1.Image = image; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (this.serialPort1.IsOpen) { this.serialPort1.Close(); } } } }