Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/310489806

A cost-efficient transceiver prototype for Arduino-based laser communication

Conference Paper · October 2016


DOI: 10.1109/IEMCON.2016.7746087

CITATIONS READS
3 2,978

4 authors, including:

Kai Corley-Jory Pooya Taheri


University of British Columbia - Vancouver Simon Fraser University
1 PUBLICATION   3 CITATIONS    22 PUBLICATIONS   113 CITATIONS   

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Pooya Taheri on 24 December 2018.

The user has requested enhancement of the downloaded file.


A Cost-Efficient Transceiver Prototype for
Arduino-Based Laser Communication

Simon Bambey, Edward Lim, Kai Corley-Jory, and Pooya Taheri


Department of Computing Science & Information Systems
Langara College
Vancouver, BC, Canada
ptaheri@langara.bc.ca

Abstract—The main goal of this paper is to propose a simple due to low divergence. The main advantage of this system
and low-cost microcontroller-based laser communication link. To over RF communication and fiber optics are high transmission
demonstrate that laser communication is a viable and efficient security and reliability [9]-[10].
means for transmitting data, a transceiver capable of transfer The intent of this paper is to propose an inexpensive
rates of approximately 0.7 kB/s is prototyped. The hardware
used for the transceiver consists of Commercial Off-The-Shelf
microcontroller-based laser communication transceiver which
(COTS) lasers, photodiodes, and the Arduino Mega 2560 which is can be easily deployed and connects to a chat server to enable
an open-source and easy-to-use microcontroller-based platform reliable point-to-point two-way communication. One-way
intended for making interactive projects. A graphic user microcontroller-based laser communication has been
interface utilizing the Meteor framework is developed to implemented using a simple RS232 signal converter and
facilitate the communication between the user and transceiver. operational amplifier [11]. Another laser data link based on
The developed transceiver prototype is capable of receiving and
transmitting data at significant ranges with no loss of
light collectors and high-switch-rate MOSFET was proposed
information. Furthermore, stable and secure communication is in [12] with a high two-way transmission rate of up to 20 Mb/s
achieved through several mechanisms developed to manage over a range of approximately 5 m.
simultaneous sending and receiving, in addition to detecting Our proposed prototype had to be uncomplicated,
physical interruptions during transmission. The design setup is inexpensive, and reliable. The system involves a very simple,
scalable and with further development can be transformed into a cost-effective physical setup consisting of an Arduino Mega
fiber-optic transmission system. Due to its nature, laser
communication is very secure and can provide a safe and private
2560 [13], a QRD1114 photodiode, and a 650-nm red Keyes
communication link. Overall, this paper demonstrates how laser laser module [14]. The effect of amplifiers and
communication can be an economical, durable, and effective photomultipliers on the signal-to-noise ratio and the quality of
means of information transfer. data transmission has been studied extensively [15]. To keep
the prototype as simple and inexpensive as possible, emphasis
Keywords—Arduino microcontrollers; laser applications; user was placed on determining the limitations of the simple
interfaces; wireless communication.
sensors and optimizing the code, rather than using amplifiers
or photodiodes which are capable of faster response time.
I. INTRODUCTION The software consists of advanced communication logic on
One of the most interesting developments in the field of the microcontroller and a web server written in JavaScript to
telecommunications is the use of laser light to transfer serve the chat interface. Both the collected and sent data are
information over large distances. The ever increasing cost and carried through the serial port of the Arduino 2560 Mega to
the lack of space available in congested metropolitan cities, as and from a Meteor web-interface [16]. This transceiver
well as the rapid developments in the field of Internet of prototype was implemented as proof of concept for large-scale
Things (IoT) call for the advent of a less costly projects of data transmission to remote environments. By
communication system [1]-[2]. The advancements in the field integrating with fiber optics, secure communication between
of semiconductor lasers have made possible the use of lasers two nodes is achieved. The project was designed to simply
for signal transmission which reduces the need for broadcast allow for the switching of existing hardware for more
rights and buried cables [3]. Therefore, with the development expensive parts.
of applications in space technology [4]-[6], and the increasing Sections II and III explain the preliminary tests and the
importance of wireless sensor networks [7]-[8], laser proposed methodology of the work. In Section IV, the
communication has become the subject of great research and hardware and software setup of the laser transceiver is
development activity. A remarkable feature of laser
explained. In Section V we talk about the web-based chat
technology is the concentration of energy to extremely high
interface. And finally, the results and conclusion are presented
intensities that remain relatively constant over long distances
in Sections VI and VII, respectively.

II. PRELIMINARY TESTS


A top-down engineering approach was utilized to ensure
that design challenges were identified early and could be
easily remedied when encountered. Early tests were conducted Fig. 2 Laser eye-injury hazard
to determine the feasibility of the project. The earliest tests
involved a red 633-nm LED, as well as a standard off the shelf The Arduino Mega 2560 is used for transferring and
photoresistor. Due to a very shallow response gradient from processing data, as well as controlling the functionality of
the photoresistor, the signal delay was significant and the other components. Arduino is an open-source microcontroller
highest attainable response frequency was 3Hz. board, intended to formulate a more accessible process of
Further tests were conducted using a red 650-nm Keyes exploiting electronics in multidisciplinary projects. Arduino
laser module and a QRD1114 photodiode. A significant simplifies the process of working with microcontrollers, and
improvement in the response frequency was obtained, with the offers some advantages for students, teachers and interested
photodiode being able to accurately pick up signals in the amateurs over other systems [20]-[21]. The Arduino interface
connectors provide direct connections to microprocessor pins
above-1-kHz range. Oscilloscope readouts of photodiode
such as digital I/O, analog I/O, interrupts and TTL-level
responses can be found in Fig. 1. In these readouts the very
UARTS. With a simple add-on “shield”, Arduino can be used
steep rising edges can be noticed. The photodiode’s residual
as a network infrastructure to control wireless sensor nodes
capacitance discharge causes a signal delay of approximately [22]-[24].
100 microseconds on the falling edge. Due to this bottleneck, The Arduino Mega 2560 is a microcontroller board based
the signal frequency was limited between 5–10 kHz as on the ATmega 2560. It has 54 digital I/O pins (of which 15
dictated by the hardware. can be used as PWM outputs), 16 analog inputs, 4 UARTs
Further tests were conducted to determine the operating (hardware serial ports) for TTL (5V) serial communication.
range of the setup by testing signal reception at incrementally- The Arduino Software (IDE) includes a serial monitor which
longer distances. Laser transceivers require less energy, but allows simple textual data to be sent to and from the board
need line-of-sight for communication and are sensitive to [13]. Fig. 3 shows the main components of the transceiver.
atmospheric conditions [17]. Due to a high degree of beam
divergence in the low-cost laser module, reliable operation
was only accomplished at distances up to five meters.
However, there is little doubt that with the right laser this
setup is easily extendable over larger distances.

(a) (b) (c)

Fig. 3 The main components of the laser transceiver: (a) Keyes-008


laser module, (b) QRD1114 photodiode, (c) Arduino Mega 2560
(a) (b)

Fig. 1 Photodiode response at (a) 0.5 and (b) 10 kHz


III. METHODOLOGY
Safety is of utmost importance when dealing with laser The system consists of two modules. On the user-facing
devices. The laser identified for use is a low power KY-008 side there is a web interface that interacts with the serial
laser module, with a power rating between 2–5 mW. As stream from the Arduino to serve as the actual chat interface.
shown in Fig. 2, the American Standards Institute (ANSI) This web page is built using a JavaScript framework called
classifies these lasers as “Class 3R” [18]. Lasers in this class Meteor. The back-end logic controls the data transmission
are safe given that they are handled carefully, and direct eye using two Arduino Mega 2560 microcontrollers, each of
exposure is kept to a minimum. As the prototyped transceiver
which is connected to one Keyes laser module and one
is off for the most part and only ever pulses for less than a
QRD1114 photodiode. Thee block diagram of the transceiver
second, safety concerns are very minor. Furthermore, a Class
design, images of the setup, and circuit schematics are shown
3R laser is normally low powered and would not harm the
eyes during a momentary exposure of less than ¼ second. This in Fig. 4-Fig. 6.
is within the aversion response, where a person turns away
and/or blinks to avoid bright light [19]. For added safety, laser
communication is inhibited until both parties acknowledge
and activate the laser through the web interface. Additionally,
the state of the laser is set to off when there are no
transmissions. Fig. 4 Transceiver setup
with coupled nodes [28]. Our system design is loosely based
on that of UART devices where each node acts as both a
receiver and transmitter. A UART is a part of an integrated
circuit used for serial communications. The UART hardware
initiates a start bit, shifts the required number of data bits out
of the line and adds the stop bits, as soon as data is deposited
in the shift register [29]. However, there are some significant
differences in that there is no single stop or start bit but rather
a start byte and a stop byte used to ensure stability at both the
start and end of transmissions, which, if accurately received
gives a high degree of certainty that the sent message was
Fig. 5 Transceiver block diagram
received properly. UART signals are traditionally held high by
default, which would not make sense for laser communication
and hence the default idle state is low for this setup.
The message sent from Meteor across the serial connection
first lands in a 64-byte First-In First-Out (FIFO) serial buffer
on the Arduino. It is not possible to read this buffer all at one
time due to the fact that the photodiode signal needs to
continuously be sampled to ensure that no incoming laser bits
are missed. For our setup, characters are read one-by-one from
the FIFO buffer and stored in a character array on the Arduino
until a carriage return is read at which point we know that a
full message was received. It is also important to note that
serial connections by default do not terminate on a termination
Fig. 6 Schematic of Transceiver [25] character in the Arduino environment but rely on a timeout to
signal the end of transmission. This timeout had to be
Efforts were made to keep the transmission logics separate removed completely to ensure reliable communication.
which in theory, means that the lasers could transmit any Once a message is ready to be transferred through the laser
String data received over a serial connection, not just from and there is no queued incoming message, a start signature is
Meteor. The microcontroller logic has no dependencies on the sent. Then, the character array will be iterated for the length of
content of messages at all but is only responsible for
the message and each character is split into its 8-bit ASCII
transmitting exactly what is provided through the serial
sequence which then shifts across the port register to transfer
connection.
Serial communication uses a single data line which helps the message with the fewest clock cycles. A modified delay
minimize the problem of transmitting data with an 8-bit data function is used to ensure accurate delays between signals.
communication including cable-length limitations and cost. In Finally, to end the data transmission another stop sequence is
asynchronous serial data communication, each data character sent.
has a bit which identifies its start and 1 or 2 bits, which
identify its end. Since each character is individually identified,
characters can be sent at any time. When no data is being sent,
the signal line is in a constant high or masking state.
Following the data bit is a parity bit, which is used to check
for errors in the data received [26].

IV. TRANSCEIVER LOGIC


To walk-through the setup and logic of the transmission,
the reader is encouraged to refer to Fig. 7 in order to visualize
the data flow. All codes are available publicly at [27].
The transceiver logic is responsible for accurately
transferring over the laser any data received through the serial
connection at rates of 0.7 kB/s, as well as receiving any
incoming messages through laser and making them available
over the serial connection. The back-end also detects timeouts
which usually occur when a laser transmission is interrupted. Fig. 7 Transceiver logic diagram
Synchronization is required in communication networks
The line to the photodiode is continuously sampled at a database and the serial connection. A snapshot of the chat
rate that is significantly higher than the transmission rate over interface is shown in Fig. 9.
the laser. This ensures that there is no way in which an
incoming bit can be missed. If a high bit is received at any
point, this indicates the likely beginning of the start sequence.
The logic measures the time delay between signal changes and
then calculates how many signals of that type were received
using the known baud rate. This is called the multiplier. Note
that due to the stray capacitance in the photodiode shown in
Fig. 1 a HIGH signal will be received for longer than a LOW
signal. To ensure accurate calculation of how many bits were
received, the incoming signal length is rounded to the nearest
period integer multiple before the bit multiplier is calculated.
Once the multiplier is known, the received bit is shifted
onto a byte in memory (from now on referred to as received
byte) that keeps track of the last eight bits received. This is
repeated as many times as determined by the multiplier. A
separate counter keeps track of how many times the received
byte was shifted and every time this counter reaches eight, a
full character is received and the byte is casted to a char and Fig. 8 Front-end logic diagram
appended to a received string. Afterwards the counter is reset
and the cycle repeats. If at any time the stop sequence is
received, the process terminates.
Once a full string has been received, the string is sent over
the serial port to the Meteor front-end on the receiving end. If
at any point the duration of a signal exceeds a timeout value, it
is likely that the signal was in some way interrupted or less
likely that the equipment failed, in which case this is indicated
to the Meteor front-end through a serial message.

V. CHAT INTERFACE
To follow the walk-through of the logic and data flow of
the web interface, the reader is encouraged to refer to Fig. 8.
Meteor is an open-source JavaScript web framework for Fig. 9 Meteor chat interface
making reactive web pages. Meteor facilitates the creation of
Meteor monitors the website for submitted messages and
real-time web applications where the interactions between
when a message is sent it is added to the local database along
client and server take place at such a speed that users with the username in JSON format. This JSON file is checked
experience direct feedback on their interactions with the to ensure it doesn’t exceed the maximum character
application and other users. Meteor offers a free hosting transmission count, then it is “stringified” and sent over the
service that allows developers to deploy their application in a serial connection to the Arduino. The logic on the receiving
minute with only one command [30]. side is similar but reversed, except that the JSON is verified to
Each computer runs its own local Meteor server with its ensure its integrity before adding the message to the database.
own database, MongoDB in this case [31]-[32]. As a message
is submitted on one device, the local database is updated, the VI. RESULTS
message is then transmitted and the database on the other A practical local Meteor web-based application to manage
computer is updated. This means that the databases are not communication through Arduino microcontrollers was
synchronized. If a message is sent while there is no successfully built. This application is a chat page served on a
connection, that message would only ever exist in one local server with a clean design and useful features including
database. user account, ability to scroll to new messages when they are
Our Meteor application consists of three main parts, an received, and supporting emojis and clickable links.
HTML file which contains the design of our website which The Arduinos have been uploaded with a very efficient
Meteor serves locally, a CSS file that gives more flair to our program that allows users of the local Meteor web page to
website, and a JavaScript file. This JavaScript file contains all communicate with each other. This program is sophisticated in
the logic to support the website enabling it to interact with the that it has taken many scenarios and potential occurrences into
account and is very robust. One of the main features of this
program is that there are protocols for when both of the users [9] P. Swami, P. Singh, R. K. Rana, P. Sharma, and A. Govind, “Laser-light
based voice and data transmission and electric appliance automation,”
attempt to send messages at the same time. Neither of the
Int. Advanced Research J. in Sci., Eng. and Technol., vol. 3, no. 4, pp.
messages will be lost, in fact both of them will go through 184–189, Apr. 2016.
without being affected at all. Another important feature is how [10] W. K. Pratt, Laser Communication Systems, Wiley, 1969.
our program deals with a broken message. If the transmission [11] MarkerComputing, Serial data transmission over laser. [Online].
Available: https://www.youtube.com/watch?v=2yxwmSS6wrA.
is broken for longer than an allotted time a system error is
[Accessed: 01-Jun-2016].
triggered and the user receives this error instead of the original [12] Furri, Laser transceiver (laser data link). [Online]. Available:
message. The implementation of such features allows the http://www.instructables.com/id/Laser-Transceiver, [Accessed: 01-Jun-
continued transmission of data even after broken messages. 2016].
[13] Arduino MEGA 2560. [Online]. Available:
https://www.arduino.cc/en/Main/ArduinoBoardMega2560, [Accessed:
VII. CONCLUSION 01-Jun-2016].
[14] TkkrLab, Arduino KY-008 laser sensor module. [Online]. [Accessed:
One of the ways to connect two mobile terminals is
01- Jun- 2016]. Available: https://tkkrlab.nl/wiki/Arduino_KY-
through a point-to-point free-space laser communication [33]. 008_Laser_sensor_module,
Laser communications systems can be easily deployed [15] H. Steinberg, “The use of a laser amplifier in a laser communication
because of their small size, low cost, and no requirement for system,” Proc. of the IEEE, vol. 51, no. 6, pp. 943–943, June 1963.
radio interference studies. In this project, a low-cost [16] Meteor: Build Apps with JavaScript. [Online]. Available:
https://www.meteor.com/, [Accessed: 01-Jun-2016].
microcontroller-based web chat link was engineered that [17] U. Jawarkar, P. Panchore, and S. Deshmukh, “Overview of wireless
allows for fully-stable communication over laser at transfer sensor network and its applications,” Int. J. of Electron. Commun. and
speeds of 0.7 kB/s. The limiting factor was determined to be Comput. Eng., vol. 4, no. 2, pp. 29–32, 2013.
the response time of the photodiodes. This project has a [18] IEC 60825-1:2007, Safety of laser products - Part 1: equipment
classification and requirements. [Online]. Available:
potential for larger-scale implementation. By using a more https://webstore.iec.ch/publication/17996, [Accessed: 01-Jun-2016].
powerful laser and a photodiode with a faster response time, [19] Laser safety facts, http://www.lasersafetyfacts.com/3R/, [Accessed: 01-
the rate and distance at which data could be successfully Jun-2016].
transferred would be immensely increased. Furthermore, a [20] S. R. R. D. Purusothaman, R. Rajesh, V. Vijayaraghavan, and K. K.
Bajaj, “Design of Arduino-based communication agent for rural Indian
focusing lens, amplifiers, or fiber optic cables could be added microgrids,” in Proc. IEEE Innovative Smart Grid Technologies-Asia
to the transceiver design to compensate for small (ISGT ASIA), Kuala Lumpur, pp. 630–634, 2014.
misalignments in the laser. [21] I. Harris, The Arduino platform and C programming. [Online].
Available: https://www.coursera.org/learn/arduino-platfom, [Accessed:
01-Jun-2016].
ACKNOWLEDGMENT [22] N. W. Bergmann, M. Wallace, and E. Calia, “Low cost prototyping
This paper is based on the final design project completed system for sensor networks,” in Proc. 6th Int. Conf. on Intelligent
Sensors, Sensor Networks and Inform. Process. (ISSNIP), Brisbane,
at Langara College, Engineering-Transfer program. The QLD, pp. 19–24, 2010.
authors would like to thank Dr. Todd J. Stuckless and Mr. [23] V. Georgitzikis, O. Akribopoulos, and I. Chatzigiannakis, “Controlling
Henry Lei for their valuable help and support. physical objects via the internet using the Arduino platform over
802.15.4 networks,” IEEE Latin America Trans., vol. 10, no. 3, pp.
1686–1689, Apr. 2012.
REFERENCES [24] M. S. Perez and E. Carrera, “Time synchronization in Arduino-based
wireless sensor networks,” IEEE Latin America Trans., vol. 13, no. 2,
[1] A. Agrawal, G. Kumar, M. N. Singh, P. Kumar, and P. Mathur, “Data
pp. 455–461, Feb. 2015.
transmission using laser light,” Int. J. of Advanced Comput. Technol.,
[25] Fritzing. [Online]. Available: http://fritzing.org/home/, [Accessed: 01-
vol. 1, no. 2, pp. 32–38, 2012.
Jun-2016].
[2] G. Kortuem, F. Kawsar, V. Sundramoorthy, and D. Fitton, “Smart
[26] G. M. Padayattil1, D. Poly, P. K. Paulson, M. Thomas, and J. Joseph,
objects as building blocks for the internet of things,” IEEE Internet
“Highly efficient free space laser communication,” Int. J. of Advanced
Computing, vol. 14, no. 1, pp. 44–51, Feb. 2010.
Research in Elect., Electron. and Instrumentation Eng., vol. 4, no. 4, pp.
[3] F. E. Goodwin, “A review of operational laser communication systems,”
2037–2044, Apr. 2015.
Proc. of the IEEE, vol. 58, no. 10, pp. 1746–1752, Oct. 1970.
[27] S. Bambey, E. Lim, and K. Corley-Jory, DialUp. [Online]. Available:
[4] H. A. Aljenabi, H. J. Kbashi, Y. I. Alshomary, “Free space digital laser
https://github.com/sbambey/DialUp, [Accessed: 01-Jun-2016].
communication system based on microcontroller,” Atti Della
[28] C. R. Mirasso, P. Colet, and P. Garcia-Fernandez, “Synchronization of
Fondazione Giorgio Ronchi Anno LXIII, no. 4, pp. 543–548, 2008.
chaotic semiconductor lasers: application to encoded communications,”
[5] M. Toyoshima, T. Fuse, D. R. Kolev, H. Takenaka, Y. Munemasa, N.
IEEE Photonics Technol. Lett., vol. 8, no. 2, pp. 299–301, Feb. 1996.
Iwakiri, K. Suzuki, Y. Koyama, T. Kubooka, M. Akioka, and H.
[29] E. Kewlani and E. Rani, “Laser communication: shedding some light,”
Kunimori, “Current status of research and development on space laser
Int. J. of Advanced Research in Sci. and Eng., vol. 2, no. 9, pp. 31–37,
communications technologies and future plans in NICT,” in Proc. IEEE
Sept. 2013.
Int. Conf. on Space Optical Systems and Applicat. (ICSOS), New
[30] S. Rust, J. Schelling, and D. Schipper, Building real-time web
Orleans, LA, 2015.
applications with Meteor. [Online]. Available:
[6] R.A. Ewart and M. Enoch, “Free space laser communication,” IEEE
http://staas.home.xs4all.nl, [Accessed: 01-Jun-2016].
Commun. Mag., vol. 38, no. 8, pp. 124–125, Aug. 2000.
[31] MongoDB for giant ideas. [Online]. Available:
[7] M. A. M. Vieira, C. N. Coelho, D. C. da Silva, and J. M. da Mata,
https://www.mongodb.com, [Accessed: 01-Jun-2016].
“Survey on wireless sensor network devices,” in Proc. Emerging
[32] Y. S. Kang, I. H. Park, J. Rhee and Y. H. Lee, “MongoDB-based
Technologies and Factory Automation (ETFA) Conf., pp. 537–544,
repository design for IoT-generated RFID/sensor big data,” IEEE
2003.
Sensors J., vol. 16, no. 2, pp. 485–497, Jan. 2016.
[8] I. F. Akyildiz, T. Melodia, and K. R. Chowdury, “Wireless multimedia
[33] Y. Arimoto, “Compact laser transceiver for mobile terminals,” Digest of
sensor networks: A survey,” IEEE Wireless Commun., vol. 14, no. 6, pp.
the LEOS Summer Topical Meetings, pp. 31–32, 2005.
32–39, Dec. 2007.

View publication stats

You might also like