19
1 LiDAR Based Home Mapping: Using the OSLRF-01 and Arduino to Generate Floor Plans Eric Duong [email protected] Lyndon Shi [email protected] Eric Ward [email protected] Saurin Patel [email protected] Aditya Sridhar [email protected] Mentors: Ryan Flynn, Josef Grossman, Edward Kahn, and Nicholas Lofaso RTA: Rowen Kanj Abstract Often, old buildings require new or updated floor plans; however, few methods currently exist for efficient and effective home mapping. Additionally, technology for quick and accurate distance measurement in an enclosed space was not accessible to the average consumer until recently. This technology, Light Detection and Ranging (LiDAR), had already been in use for several decades by large organizations, such as NASA, for atmospheric and topographical mapping. 1 A new, inexpensive LiDAR device is the OSLRF-01. This open source laser rangefinder was combined with the Arduino Uno and Futaba S3003 Standard Servo to construct a proof-of-concept device for automatic home mapping. Testing results determined that the device was able to accurately scan and construct a two- dimensional model of a room. In the future, this technology can be used to generate three- dimensional maps of rooms, and can also be mounted on low-end robots to replace the ultrasonic sensor. 1. Introduction In the 1970s, NASA began working on laser-based remote sensing to map the atmosphere. This technology, called LiDAR, gained many applications over time. Today, LiDAR is used in spacecraft, autonomous vehicles, surveying tools, robots, and law enforcement devices. These applications seem high-end and beyond the scope of daily life, as they require high-frequency, high-cost electronics. Recently, however, low-cost devices that implement LiDAR have entered the market, allowing hobbyists, not just organizations, to utilize this technology. A potential low-end application of LiDAR is home mapping. LiDAR provides accurate distance measurements that can be used to automatically construct home maps for buildings with nonexistent or undetailed engineering drawings. 1.1 History of Home Mapping The concept of home mapping originated in the late 1800s. The map of Winchester Center, which dates back to the 1870s, is one of the earliest known hand drawn maps and depicts downtown Winchester and the locations of various houses and buildings. 2 Over time, blueprints and floor plans have become an integral part of architectural design. 1.2 The Advantage of LiDAR The availability of LiDAR to the general public has increased in recent years; despite this, the use of ultrasonic sensors for distance measurement is still prevalent. Many

LiDAR Based Home Mapping: Using the OSLRF-01 and Arduino ... · LiDAR operates similarly to radar; however, instead of transmitting radio waves, LiDAR transmits and receives a laser

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

1

LiDAR Based Home Mapping: Using the OSLRF-01 and Arduino to Generate Floor Plans

Eric Duong

[email protected]

Lyndon Shi [email protected]

Eric Ward [email protected]

Saurin Patel [email protected] Aditya Sridhar [email protected]

Mentors: Ryan Flynn, Josef Grossman, Edward Kahn, and Nicholas Lofaso

RTA: Rowen Kanj

Abstract Often, old buildings require new or

updated floor plans; however, few methods currently exist for efficient and effective home mapping. Additionally, technology for quick and accurate distance measurement in an enclosed space was not accessible to the average consumer until recently. This technology, Light Detection and Ranging (LiDAR), had already been in use for several decades by large organizations, such as NASA, for atmospheric and topographical mapping. 1 A new, inexpensive LiDAR device is the OSLRF-01. This open source laser rangefinder was combined with the Arduino Uno and Futaba S3003 Standard Servo to construct a proof-of-concept device for automatic home mapping. Testing results determined that the device was able to accurately scan and construct a two-dimensional model of a room. In the future, this technology can be used to generate three-dimensional maps of rooms, and can also be mounted on low-end robots to replace the ultrasonic sensor.

1. Introduction In the 1970s, NASA began working

on laser-based remote sensing to map the atmosphere. This technology, called LiDAR, gained many applications over time. Today,

LiDAR is used in spacecraft, autonomous vehicles, surveying tools, robots, and law enforcement devices. These applications seem high-end and beyond the scope of daily life, as they require high-frequency, high-cost electronics. Recently, however, low-cost devices that implement LiDAR have entered the market, allowing hobbyists, not just organizations, to utilize this technology.

A potential low-end application of LiDAR is home mapping. LiDAR provides accurate distance measurements that can be used to automatically construct home maps for buildings with nonexistent or undetailed engineering drawings.

1.1 History of Home Mapping The concept of home mapping

originated in the late 1800s. The map of Winchester Center, which dates back to the 1870s, is one of the earliest known hand drawn maps and depicts downtown Winchester and the locations of various houses and buildings.2 Over time, blueprints and floor plans have become an integral part of architectural design.

1.2 The Advantage of LiDAR The availability of LiDAR to the general public has increased in recent years; despite this, the use of ultrasonic sensors for distance measurement is still prevalent. Many

2

robots use ultrasonic sensors to measure distances in order to navigate around obstacles and through mazes. The implementation of ultrasonic sensors is not limited to only robotics, as these sensors are inexpensive and easy to handle. Despite this, the ultrasonic sensor has its limitations. According to Generation Robots, a robot manufacturer, an ultrasonic sensor only has a range of 1 to 250 cm. Ultrasonic sensors are also sensitive to temperature and pressure changes. Additionally, the accuracy of the sensor is inversely proportional to the distance. Two alternate technologies exist for distance measurement: infrared proximity sensors and LiDAR. Data show that infrared has a shorter range of 5 to 80 cm. In addition, the infrared sensor, like the ultrasonic sensor, decreases in accuracy as distance increases. Lasers, on the other hand, can measure longer distances with greater accuracy. Although lasers are relatively expensive when compared to ultrasonic sensors and infrared sensors, they measure distance most accurately.3

LiDAR technology has become cheaper and thus more available to the general public. An example of a low-cost LiDAR sensor with high performance is the OSLRF-01, an open source laser rangefinder module (Figure 1.2.1). The OSLRF-01 includes a laser, detector, optics, and sequential-equivalent-time-sampling (SETS) circuits.4

Figure 1.2.1: The OSLRF-014 The OSLRF-01 detects the time-of-flight of its laser; it can be used as a laser

rangefinder when interfaced with the analog-to-digital converter (ADC) channels of a microcontroller, and has a range of up to 9 meters.

2. Background The home mapping device comprises

several components which include the OSLRF-01, the Arduino Uno microcontroller board, and the Futaba S3003 Standard Servo.

2.1 The OSLRF-01 LiDAR operates similarly to radar;

however, instead of transmitting radio waves, LiDAR transmits and receives a laser beam. The photons in the laser beam sent by the transmitter are scattered and reflected back into the receiver (Appendix, Figure 2.1.1).5

This principle allows the usage of LiDAR to measure distances (Eq. 1).

𝑑 = 𝑆𝑝𝑒𝑒𝑑 𝑜𝑓 𝐿𝑖𝑔ℎ𝑡 × 𝑇𝑖𝑚𝑒 𝑜𝑓 𝐹𝑙𝑖𝑔ℎ𝑡

2

Eq. 1: General formula for calculating the

distance (d) to an object using LiDAR5

The dividend is the total distance that the light traveled between transmission and reception, and the divisor is two since the light has to travel to the object and back.

The OSLRF-01 functions using the same principles, but the method for calculating distance is slightly different. The OSLRF-01 transmits laser pulses periodically based upon a signal called SYNC. SYNC is a periodic square wave, and the laser pulse is sent out on the falling edge of SYNC. This outgoing pulse is called ZERO, and the returning pulse is called RETURN (Appendix, Figure 2.1.2).

The OSLRF-01 can measure a distance of up to 18.33 m in one period of the SYNC signal. While the period of the SYNC signal is 122 ns in real-time, the SETS circuit in the OSLRF-01 expands the timebase to a period of more than 20 ms, and is adjustable

3

to up to 1 second. The expansion of the timebase allows a microcontroller to read the output signals of the OSLRF-01, as the frequency of the signals are too high to be read in real-time. Regardless of the timebase expansion, the period of SYNC always equates to a distance of 18.33 m. In other words, the range of the sensor is unaffected by the period of SYNC. 4

The following equation is given by the datasheet to calculate the distance between the OSLRF-01 and an object:

𝑑 = 𝑅𝑡 − 𝑍𝑡

𝑆𝑝 × 18.33 𝑚

Eq. 2: Formula for calculating distance

specifically for the OSLRF-01. Zt is the time elapsed from the falling edge of SYNC to the peak of ZERO. Rt is the time elapsed from

the falling edge of SYNC to the peak of RETURN. Sp is the length of the period of

the SYNC signal.4

Since both Zt and Rt are relative to the

falling edge of SYNC, any potential delay in the firing of the laser pulse is accounted for. As a result, accurate distance measurements can be obtained.

2.2 The Arduino Uno The Arduino Uno (Figure 2.2.1) is a

microcontroller board that has 6 analog inputs, 14 digital I/O pins, and is programmed via a USB connection to a computer. The Arduino programming language is very similar to C++.

Figure 2.2.1: The Arduino Uno6

The analog inputs are each connected internally to an analog-to-digital converter (ADC), each with 10 bit resolution. As a result, the ADC can only convert analog voltages to integers between 0 and 1023. Since the maximum input voltage on each analog input pin is 5 V, the ADC converter would convert 0 V to 0 and 5 V to 1023 (1111111111 in binary). This means that the step size of the ADC is 4.9 mV, and an increase of 4.9 mV on the analog input pin results in an increase of 1 in the output of the ADC.7

The digital I/O pins can read and write digital values, and perform pulse width modulation.8

Pulse width modulation (PWM) is a technique used for simulating an analog output using a digital pin. Digital signals have discrete values; in other words, only two states exist: HIGH (on, 1, 5 V) and LOW (off, 0, 0 V). Analog signals have infinitely many values (e.g. all values from 0 V to 5 V). As the digital I/O pins of the Arduino Uno can only output either 0 V or 5 V, PWM must be used to achieve an analog output on those pins.

A pulse is the time during which a digital signal is HIGH; pulse width is the length of time of the pulse. In pulse width modulation, the pulse width of a digital signal is modulated, or modified. If the pulses occur at a high enough frequency, the digital signal will act as an analog signal with a steady voltage that can be anywhere between 0 V and 5 V.9

The frequency of a PWM signal for the Arduino is 500 Hz. Thus, the period is 2 ms. A 50% duty cycle means that the signal is HIGH for 1 ms each period, and a 25% duty cycle means that the signal is HIGH for 0.5 ms each period (Figure 2.2.2).

4

Figure 2.2.2: Pulse Width Modulation. Duty cycle is defined as the percentage of time that

the signal is HIGH during a period.10

The effects of differing duty cycles

can be demonstrated by an LED connected to a digital output pin. If the duty cycle were 100%, the LED would appear to be on continuously at maximum brightness. As the duty cycle decreases and approaches zero, the LED would continue to appear on, albeit at constantly decreasing brightness. Therefore, the effect of PWM on the LED is that, despite the fact that the LED is connected to a digital pin, the voltage given to the LED can appear to be any value between 0 V and 5 V.10

2.3 The Futaba S3003 Standard Servo A servo is a motor that can be

precisely controlled. A standard servo is a servo that has limited rotation; that is, it can only rotate to an angle from 0° to 180°. A servo can be controlled by a microcontroller, which uses PWM to turn the servo to a specific angle. The Arduino programming language contains a library, Servo, specifically for controlling a servo.11

This project uses the Futaba S3003 Standard Servo (Figure 2.3.1). The servo provides 44 oz-in of torque at 4.8 V and 56.8 oz-in of torque at 6 V.12 Since the Arduino Uno supplies the servo with 5 V, which lies within the correct range, the servo is able to spin the OSLRF-01 mounted on top.

Figure 2.3.1: The Futaba S3003 Standard Servo12

2.4 GNU Octave GNU Octave, a mathematical software, is used to generate maps of rooms using the data from the OSLRF-01. It is a high-level language, similar to MATLAB, in which scripts can be written to perform computations and generate detailed graphs.13

3. Design and Construction The device for home mapping is

designed so that the OSLRF-01 rests on top of a gear controlled by a servo. The gears enable the OSLRF-01 to be rotated 360° and accurately map a room. The design and construction of the home mapping device was divided into two parts: the sensor module and the motor module. Both components were developed separately and integrated into a common housing body.

3.1 The Sensor Module Construction of the sensor module

began with the wiring of the OSLRF-01 and

0% Duty Cycle

25% Duty Cycle

50% Duty Cycle

75% Duty Cycle

100% Duty Cycle

Pulse Width Modulation

5

the Arduino Uno. The SYNC output from the OSLRF-01 was connected to D8 on the Arduino because SYNC is a digital signal. The analog outputs of the OSLRF-01, ZERO and RETURN, were connected to A3 and A1, respectively. D10 on the Arduino pin was connected to the CONTROL pin to allow the Arduino to expand the timebase. Because the sensor requires 12 V to function while the Arduino can only provide 3.3 V or 5 V, an AC/DC power converter is used to power the OSLRF-01 (Appendix, Figure 3.1.1).

3.1.1 Timebase Expansion The timebase is the period over which

the signal response is stretched.4 The voltage on CONTROL determines the timebase. 0 V on CONTROL causes the timebase to default to a 20 ms period, while experimentation determined that 3.3 V (the maximum allowable voltage on CONTROL) on CONTROL sets the timebase to 500 ms.

3.1.2 Sensor Module Testing The sensor module was tested, and

the first trial produced anomalous SYNC, ZERO, and RETURN values. The SYNC signal was expected to be a periodic square wave, unlike the random, inconsistent signal received. Additionally, during this trial, the LiDAR was not moved; therefore, the ZERO and RETURN values should have been periodic and unvarying (Appendix, Figure 3.1.2).

A brief analysis of the coding and circuitry revealed that the Arduino and OSLRF-01 did not share a common ground. After the common ground was connected, the test produced expected values; SYNC was a periodic square wave, and the amplitudes of ZERO and RETURN were consistent (Appendix, Figure 3.1.3).

3.2 The Base The initial rudimentary model (Figure

3.2.1) was able to house two Arduino boards and was created in Autodesk AutoCAD, a modeling software. After discussion, it was

decided that only one Arduino would be necessary, and Autodesk Inventor was used to redesign the housing.

Figure 3.2.1: Initial housing design

The improved model houses a single Arduino. The exterior base and the resting plate for the servo were also modeled (Figure 3.2.2). Then, gears were created in order to achieve 360° rotation. The design was adjusted to be more aesthetically appealing. Finally, all the parts were assembled into a single model (Figure 3.2.3) and 3-D printed (Appendix, Figure 3.2.4).

6

Figure 3.2.2: The exterior base (top) and the plate for the servo (bottom).

Figure 3.2.3: Final model assembly

3.3 Motor and Motor Control Because the OSLRF-01 needs to

rotate 360° in order to map a room, the sensor is mounted on a gear system turned by a standard servo. The motor used in this project is the Futaba S3003 Standard Servo. The servo’s +Vin pin is connected to 5 V from the Arduino, while the signal pin connects to D9 on the Arduino as the servo functions using a PWM signal (Appendix, Figure 3.3.1).

3.3.1 Standard vs. Continuous Servo The two main types of servos are

continuous and standard servos. Continuous servos can rotate indefinitely in both directions, but require a motor encoder to record the degrees of rotation. On the other hand, standard servos are limited to only 180° of rotation yet do not need motor encoders.

A standard servo was chosen over a continuous motor due to a limited budget. In order to allow for 360° of rotation, a gearing mechanism is used. With a proper gear ratio, 180° can be converted to 360° of rotation or more.

3.3.2 Gear Ratios The gear ratio of two gears is the

relationship between the number of teeth on each gear. For example, if a gear ratio is 3:1, one gear would have 3 times more teeth than the other gear. Additionally, the diameter of the gears can be manipulated in order to change the relative sizes of the teeth. For this project, a gear ratio of 2.4783:1 is utilized (Figure 3.3.2). This converts the 180° from the servo into the 360° that is needed.

7

Figure 3.3.2: The gears modeled in Autodesk Inventor; on top is the smaller gear, while the

larger gear is on the bottom.

3.3.3 Controlling the Motor using the Arduino Uno The Servo library in the Arduino

programming language is used to control a servo using Arduino boards such as the Arduino Uno. Useful functions for this project include attach(), write(), and writeMicroseconds().

The function attach() simply tells the Arduino Uno that a servo is attached to a pin. write() and writeMicroseconds() are two different functions that can be used to control the rotation of the standard servo. On one hand, write() instructs the standard servo to turn to a specific angle (0° to 180°).14 On the other hand, writeMicroseconds() changes the pulse width of the PWM signal used to control the motor.15 For the Futaba S3003 Standard Servo, a pulse width of 525 us equates to 0°, while a pulse width of 2260 us equates to 180°. This was determined through experimentation. Since write() only accepts integer values from 0 to 180, writeMicroseconds() is used in the program to obtain rotations smaller than one degree, thus increasing the precision of rotations (Appendix, Figure 3.3.3).

3.4 Integrating the Sensor and Base Modules

Integration of the sensor with the base occurred on a software layer as well as a mechanical layer. The finalized code base (Appendix, Figure 3.4.1) is broken up into three encapsulated files: one which handles the sensor (LiDAR.ino), one which controls the motor’s position (Motor.ino), and one which interfaces with these two and handles serial I/O (RoomScanner.ino). These 3 components have little coupling, which means changes can be made to each program without having to change their interfaces. LiDAR.ino provides one core function which returns a distance in millimeters, while Motor.ino provides an interface to set the sensor’s current angle. This organization was developed because the components were prototyped independently by different authors. All the piece-parts were interfaced in RoomScanner.ino, which writes data in the following format:

< 𝑎𝑛𝑔𝑙𝑒 𝑖𝑛 𝑑𝑒𝑔𝑟𝑒𝑒𝑠 > < 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑖𝑛 𝑚𝑖𝑙𝑙𝑖𝑚𝑒𝑡𝑒𝑟𝑠 >

On the mechanical layer, the sensor

module and motor module were wired to one Arduino Uno. There was no overlap in the pins needed by each module, so all pin connections between each module and the Arduino Uno remained the same (Appendix, 3.4.2). The base had not been 3-D printed in time due to technical difficulties, while the gears have been printed. In order to obtain results, a prototype of the base was built using Legos (Appendix, 3.4.3).

3.5 Mapping Algorithm In order to create a 2-D

representation of a room, polar coordinates are sent over a serial connection in real time by the Arduino to a laptop. The serial port of the laptop is forwarded to an Octave script. The script waits for each point and adds it to a matrix which is then replotted to a window. At the end of the data collection, the Octave

8

script quits and saves the map and data to a file named based on the time and settings on the scan (Appendix, Figure 3.5.1).

4. Testing and Results

4.1 Accuracy Test and Calibration To test the accuracy of the OSLRF-01,

a set of distances from 1 to 9 m, in increments of 0.2 m, were marked in a line on the floor of a large room. The OSLRF-01 was aligned at one end of the line. White poster paper was held at these various increments in front of the LiDAR and the distance was measured. The code scanned for the peak values of the ZERO and RETURN signals during each period of the SYNC signal and calculated the distance between the peaks.

This data was used to calculate the ratio between the laser time-of-flight, and the period of the SYNC signal. This ratio was plotted on a graph as a function of the actual distance. The line of best fit shows that the proportion of the ratio to the actual distance is constant at all distances. The correlation is confirmed by the r2 value, which is 0.999. This means that the OSLRF-01 is both a precise and accurate sensor. Additionally, the proportionality constant was determined to be 18.22 m, not 18.33 m as stated in the datasheet (Appendix, Figure 4.1.1).

The OSLRF-01 was also tested on various colors and surfaces. The results from these experiments demonstrated that accuracy is independent of color and surface. Different colors and different surfaces cause varying amplitudes in the RETURN signal, but this does not affect the time-of-flight and thus does not alter the measured distance.

4.2 Timebase Modifications An optimal combination of timebase

and accuracy needed to be determined. The Arduino reads a pin value approximately once every 10 ms. When a larger timebase is set, the Arduino is able to read more values. The result is an inverse trade-off between timebase

and accuracy. This effect can be slightly reduced by averaging multiple readings.

An experiment was conducted in which measurements were taken with varying timebases against a controlled distance (1.7 m). A total of 10 measurements were taken for each timebase and plotted (Appendix, Figure 4.2.1). The data showed that accuracy increased as the timebase increased; however, at about 2.25 V on the CONTROL pin, the accuracy did not change significantly. As a result, 2.25 V is provided to the CONTROL pin during normal operation of the mapping device.

4.3 Rotation Increments The most important tradeoff to

consider is time versus resolution. If the servo were to turn in greater angle increments, a full rotation takes less time at the cost of lower resolution. This results in room maps that have smooth edges but rounded corners. While a lower resolution is optimal for measuring a large room with little furniture and edge detail, a higher resolution is necessary for a more detailed map. To achieve higher resolution, the mapping device should be set to turn at very small increments between distance measurements, ensuring that each corner is mapped closer to its actual location and not missed entirely. Ultimately, the choice of resolution is dependent on the application of this device.

4.4 Mapping Maps generated by the device are

somewhat accurate. Before the gears finished printing, a map of a hallway was generated using only 180° of rotation for testing. This map was not compared with the exact dimensions of the hallway, but looked roughly similar (Appendix, Figure 4.4.1). After the gears were received, a map of a rectangular study room was generated with 360° of rotation (Appendix, Figure 4.4.2).

9

This time, exact dimensions were obtained. The room measured is 2.87 m by 2.87 m, and the graph generated reflected this. At the same time, the walls in the map are not straight and the corners are rounded. While there is a television mounted on one wall, and a door in another wall, these objects do not account for the jagged edges. Possible causes include problems with the OSLRF-01 itself, the build of the base, or the mapping algorithm. Based on previous results, the OSLRF-01 is able to take an accurate distance measurement standalone and most likely not the cause of the jagged edges. The base used to take the 360° measurement is a prototype built using Legos. The base is not very stable, and the OSLRF-01 shakes while taking measurements due to the rotation of the servo. This may be one explanation for the rough map. Another cause may be the mapping algorithm. In the algorithm, seven readings are taken at each motor angle. These distance measurements are averaged, and as more readings are obtained, the average should approach the real value. The problem with this algorithm is that an extremely large number of readings need to be taken to obtain an accurate average distance, resulting in a time-inefficient process. Seven may be an insufficient number of measurements and thus a cause of the rough map. While the testing of other algorithms is beyond the scope of this paper, an algorithm that could be more efficient makes assumptions about the layout of rooms. This algorithm would search for corners instead of plotting every point found in a 360° rotation. The mapping device would record the local maxima and minima in the distances found in a sweep across the room and plot only these points. Then, the points would be connected together to generate a room map with straight edges. This algorithm is purely theoretical, and further algorithms are left to the creativity of the reader.

5. Conclusions and Summarizing Ideas The goal of this project is to develop a

proof of concept device for automatic distance measurement and home mapping. The results of testing show that the goal was achieved, as the device accurately mapped out a room.

Many future projects now appear viable. For example, 3-D mapping can be achieved with a motor to provide vertical rotation. The device can be deployed into structurally unsound buildings to map rooms without endangering human lives. As LiDAR sensors become cheaper, they can be used as a replacement for ultrasonic sensors on robots, especially in kits such as Lego Mindstorms.

Although there is room for improvement, the accomplishments of this project prove the accuracy and reliability of low-cost LiDAR sensors. This project demonstrates the potential of low-cost LiDAR sensors, and could spawn numerous innovative projects pioneered by the average consumer.

Acknowledgements The authors would like to

acknowledge Lockheed Martin engineers Ryan Flynn, Josef Grossman, Edward Kahn, and Nicholas Lofaso for their technical expertise and support throughout the course of this project. The authors are also grateful to Rowen Kanj for organizing the project and reviewing their work. Finally, the authors would like to thank the organizers of the New Jersey Governor’s School of Engineering and Technology for the opportunity to work on this project, including Ilene Rosen and Jean Patrick Antoine, the director and associate director, respectively; as well as the sponsors: Rutgers University, the Rutgers Engineering Department, Lockheed Martin, Silver Line Windows and Doors, the Provident Bank Foundation, Novo Nordisk, Inc.; South Jersey Industries, Inc.; and New Jersey Resources

10

References 1. J. Carter et al., “Lidar 101:An

introduction to Lidar Technology, Data, and Applications,” Nov 2012, http://coast.noaa.gov/digitalcoast/_/pdf/lidar101.pdf (14 July 2015)

2. D. Rumsey, E. M. Punt, “Two dimensional GIS broweser,” David Rumsery Map Collection, http://www.davidrumsey.com/view/2d-gis (14 July 2015

3. Generation Robots, “ Ultrasound Sensor ? high quality sensors available now,” http://www.generationrobots.com/en/content/65-ultrasonic-sonar-sensors-for-robots, (14 July 2015)

4. Lightwave OptoElectronics, “OSLRF-01 Laser Range Finder Product Manual,” http://www.lightware.co.za/shop/en/index.php?controller=attachment&id_attachment=7, (15 July 2015)

5. LiDAR UK “How Does LiDAR Work?” http://www.lidar-uk.com/how-lidar-works/, (15 July 2015)

6. Arduino, “Arduino UNO” hhttps://www.arduino.cc/en/Main/arduinoBoardUno, (15 July 2015)

7. Arduino, “analogRead(),” 2015, https://www.arduino.cc/en/Reference/analogRead, (15 July 2015)

8. Arduino, “DigitalPins,” 2015, https://www.arduino.cc/en/Reference/DigitalPins, (15 July 2015)

9. National Instruments, “What is Pulse Width Modulation (PWM) Signal and What is it used for?” 31 Jan 2014, http://digital.ni.com/public.nsf/allkb/294E67623752656686256DB800508989, (17 July 2015)

10. Arduino, “PWM,” 2015, https://www.arduino.cc/en/Reference/PWM, (15 July 2015)

11. Arduino, “Servo Library,” 2015, https://www.Arduino.cc/en/reference/servo, (12 July 2015)

12. Electronics Source, “S3003 Futaba Servo,” http://www.es.co.th/schemetic/pdf/et-servo-s3003.pdf, (15 July 2015)

13. J. W. Eaton, “GNU Octave,” http://www.gnu.org/software/octave/, (18 July 2015)

14. “write(),” Arduino, 2015, https://www.arduino.cc/en/Reference/ServoWrite, (15 July 2015)

15. Arduino, “writeMicroseconds,” 2015, https://www.arduino.cc/en/Reference/ServoWriteMicroseconds, (13 July 2015)

16. Atmospheric Remote Sensing Laboratory, “What is LiDAR?” http://www2.engr.arizona.edu/~arsl/lidar.html, (15 July 2015)

11

Appendix

Figure 2.1.1: Basic LiDAR concept for atmospheric sensing. The laser beam is reflected into the

receiver by aerosols (particles or droplets in the air).16

Figure 2.1.2: OSLRF-01 timing signals4

12

Figure 3.1.1 Sensor module circuit diagram

Figure 3.1.2 Initial data readings

13

Figure 3.1.3 Normalized data readings

Figure 3.2.4: 3-D printed base; however, base was not printed in time to be assembled with the sensor and motor modules and tested.

14

Figure 3.3.1 Servo circuit diagram

Figure 3.3.3: Motor control code snippet

Figure 3.4.1: UML diagram showing the organization of code

15

Figure 3.4.2: Circuit diagram of the home mapping device after the sensor and motor modules were

integrated

Figure 3.4.3: Prototype of the home mapping device built using LEGOs

16

Figure 3.5.1: Diagram showing the algorithm behind room mapping

17

Figure 4.1.1: The ratio of the laser time-of-flight to the SYNC period is plotted on the y-axis, while the distance traveled by the laser is plotted on the x-axis. The line of best fit has an r2 value of 0.999,

showing that the data is highly correlated.

Figure 4.2.1: 10 measurements were taken against a distance of 1700 millimeters and the readings are plotted

18

Figure 4.4.1: On top is a map of a hallway generated using only 180° of rotation. On the bottom is a picture of the same hallway. The map is tilted relative to the picture of the room, as the sensor was

not properly centered.

19

Figure 4.4.2: On the top are the dimensions of the room. On the bottom is the map generated with

360° of rotation.