You are on page 1of 36

------------------------------------------------------------------------------------------------------------

How Can a Product Be Made that Aids Distracted Driving and Solves Speed Limit

Ignorance?

------------------------------------------------------------------------------------------------------------

Brady Loughry

A Thesis Presented to the Central Magnet Faculty

In Partial Fulfillment of the Requirements of Graduation

May 2022
Abstract

Distracted driving can come in many forms and sometimes when drivers least
expect it. To combat distracted driving, my goal is to give the driver as many tools as
possible to make the driving experience as stress free and easy as possible. The idea for
my product is to give drivers access to the speed limit at all times, displayed on their
dashboards. Newer cars like Tesla have already accomplished this goal, but for drivers
that do not have access to these cars, I propose an off the shelf product that will work in
any car. Having access to the speed limit on a dashboard display gives the driver one less
aspect of driving to worry about and may make the driving experience slightly easier. But
that is all it takes to make change.

ii
Acknowledgments

Thank you very much to my field of study advisor, Mr. Guthrie, and to my
English teacher, Mrs. Benjamin, for all of their support and advice given along the way.
And thank you very much to my Mentor, Mr. Batey, for being patient and
teaching me throughout the entire build process. I have gained so much knowledge for
Mr. Batey and I couldn’t have done it without him.

iii
Table of Contents

Distracted Driving and Speed Limit Ignorance: Chapter One.................1

Research Question.........................................................................................................1

Research Review: Chapter Two..................................................................3

Educating Drivers..........................................................................................................3

Distracted Driving and Data.........................................................................................4

Current Products...........................................................................................................7

Methodology: Chapter Three.......................................................................8

Design Process..............................................................................................................10

Liquid Crystal Display i2c........................................................................................11

Arduino MKR GSM 1400..........................................................................................14

Arduino MKR GPS shield..........................................................................................17

CAD Modeling...........................................................................................................19

Bing Maps API..........................................................................................................21

Arduino IOT Cloud and MKR GSM 1400.................................................................23

Conclusion: Chapter 4................................................................................26

Study Summary...........................................................................................................26

Limitations....................................................................................................................28

Implications..................................................................................................................28

iv
Future Study.................................................................................................................28

Refrences..........................................................Error! Bookmark not defined.

v
Table of Figures and images

Figure 1LCD wiring diagram …………..…………………..……………………………11

Figure 2 LCD i2c wiring diagram .……………………………………………………... 11

Figure 3 i2c search code (lastminuteengineers.com) …………………………………... 13

Figure 4 i2c search code return ………………………………………………………… 13

Figure 5 LCD address and pinout ……………………………………………………… 13

Figure 6 LCD display code. ……………………………………………………………. 14

Figure 7 Arduino MKR GSM 1400 (Arduino Support, n.d.) ………………………….. 15

Figure 8 Arduino MKR GSM 1400 signal strength code ……………………………… 16

Figure 9 Signal strength code – serial monitor ………………………………………… 17

Figure 10 Arduino MKR GPS shield wiring (Arduino Docs, Karl Söderby, n.d.) …….. 18

Figure 11MKR GPS test code (Arduino Docs, Karl Söderby, n.d.) ………..………….. 19

Figure 12 MKR GPS test code - serial monitor ………………………………………... 19

Figure 13 Hardware housing (Sketch) …………………………………………………. 20

Figure 14 CAD model Hardware housing (front) ……………………………………… 20

Figure 15 CAD model Hardware housing (back) ……………………………………… 20

Figure 16 Final print with LCD in place ……………………………………………….. 21

Figure 17 Bing Maps API URL – return ………………………………………………. 22

Figure 18 Arduino IOT connection code ………………………………………………. 23

Figure 19 Complete final code …………………………………………………………. 25

vi
Distracted Driving and Speed Limit Ignorance: Chapter One

Research Question
How can a product be made that aids distracted driving and solves speed limit

ignorance?

Problem Relevancy

For every 100 fatal distracted driving crashes 109 people die. This means that

distracted driving harms not only the user, but it harms other people in the process.

The discussion of distracted driving in Tennessee is so preeminent compared to

other Tennessee state laws.  Hands Free Tennessee is a state campaign launched to

educate Tennessee drivers on public chapter number 412 passed on July 1, 2019. Other

campaigns like Slow Down Tennessee, a statewide campaign to cut down on reckless

driving. These programs have been put into place to help with Tennessee’s distracted

driving and speeding problem. According to the Tennessee Department of Homeland

Security there were 500 driving related deaths in the first 6 months of 2019, 429 in 2020,

and in the first 6 months of 2021 there have been 620 deaths. Aggressive drivers, taxed

police officers, and steadily increasing numbers show that a change needs to be made. All

numbers on distracted driving related deaths can be found on the TDHS’s Crash Data

page.

One way to prevent distracted driving is to solve speed limit ignorance. Speed

limit ignorance is not being aware of the speed limit. Automobile companies have been

working to solve this issue through location data for at least 4 years. Technology that

1
gives drivers the luxury of always knowing the speed limit by displaying it on the

dashboard. This location data technology will become more and more relevant as time

goes on. One Company, HERE 360, is a Netherlands based location data company.

HERE 360 develops software often used in automobiles. Some of HERE 360’s clients

include German car companies like Audi and BMW. One article, published by HERE

360, explains that while driving there are many things you need to pay attention to.

Drivers must pay attention to other cars, road hazards, warning signs, and maybe

directions on a device (Reimer, J; 2021). Even experienced drivers can experience

confusion. The HERE ISA (Intelligent Speed Assistance) system helps drivers

acknowledge and comply with the legal speed limits. HERE technologies are working to

help prevent automotive injuries and deaths and they are taking a step in the right

direction. A speed limit display gives drivers one more tool at their disposal so that they

can feel as comfortable as possible behind the wheel.

While large technology companies are implementing these devices in the newest

cars, availability becomes an issue. Many drivers cannot afford new cars with built in

location data and speed limit assistance. Companies like Tesla, BMW, and Audi all have

these helpful tools in their cars. This tech should be attainable for any driver especially

newer ones. A product that can be sold off the shelf and placed on a driver’s dashboard at

a reasonable price would accomplish all these goals. To succeed in cutting down on

distracted driving, drivers must have full access to all the information needed at the

wheel, including whatever speed limit is expected.

2
Research Review: Chapter Two

Because distracted driving is such a predominant topic, it is important to identify

what it is exactly, identify how drivers experience distracted driving, and how they can

prevent it. The sources in this study help educate drivers, give data on distracted driving

incidences, and exhibit current technologies.

Educating Drivers

A website called I Drive Safely is an educational website for drivers. This website

helps explain how easy it is to fall into the spell of distracted driving. One article on the

website is titled, “Don’t Let Your GPS Distract You While Driving.” In the article, the

safety of using a GPS is discussed. The article talks about while occasionally a GPS

is required to get to your destination, it can, if used incorrectly, lead to distracted

driving. According to a study by the University of Utah, calibrating a GPS is more

distracting than texting. Programming a GPS can take a significant amount of time and

will require a serios amount of focus. The study also showed that after the GPS was

programmed, it took an extra amount of time to refocus the mind. Suggestions for driving

safely with a GPS were to use the sound feature so that you do not have to look down at

directions. Many teenagers turn off the sound of directions so that they can listen to

music. Mounting a phone at eye level is safer so that eyes are not completely off the

road. I Drive Safely helps to understand that you might now even realize how even a

simple task like programming a GPS can lead to distracted driving (I Drive Safely, n.d.).

Distracted Driving and Data

3
To help understand exactly how to define distracted driving, The Tennessee

Highway Safety Office has an article that talks about what distracted driving is and its

different forms. Cognitive, Visual, and Manual are all forms of distracted driving. And

the article goes on to provide definitions and examples of each. Cognitive is when

the driver's mind is not focused. Examples of Cognitive driving include talking to

passengers and listening to loud music. Visual distractions are described as the driver not

looking at the road ahead, weather that is watching a movie or looking at

a GPS. Finally, Manual distractions are when the driver takes one or both hands off the

wheel. An example of manual distracted driving could be eating and drinking. Many

distracted driving habits are now becoming illegal. According to public chapter No. 412,

it is illegal for a driver to:  

(a) hold a cellphone or mobile device with any part of their body, 

(b) write, send, or read any text-based communication, 

(c) reach for a cellphone or mobile device in a manner that requires the driver to no

longer be in a seated driving position or properly restrained by a seat belt, 

(d) watch a video or movie on a cellphone or mobile device, and 

(e) record or broadcast video on a cellphone or mobile device. 

The THSO has suggested that drivers put away mobile phones and set GPS in

advance of starting the car to prevent distracted driving. By informing readers of different

forms of distracted driving, readers will be better educated on the road and can recognize

when they might be at risk.

4
One source of information on the severity of the distracted driving issue can be

viewed on an article posted by Andrew Hurst. Insurance distributer, Value Penguin, has

done research on distracted driving fatalities across the United States. One of their data

tables shows that the national average of distracted driving fatal car crashes was 9.4 -10.2

fatal crashed per 10 billion miles driven nationally. This data was based on the fact that

there was more than 16 trillion miles driven nationally from 2015-2019. Value Penguin

takes a step further by showing each state's fatal car crash to 10 billion miles driven

ratio.  The data shows that 19 states had a higher fatality rate than the national average.

New Mexico being the worst at 53.9 fatalities per 10 billion miles. And Tennessee being

21st with an average of 10 fatal crashes per 10 billion miles. Value Penguin also

mentioned that it's very common for more than one person to die in a fatal car crash. The

NHTSA (National Highway Traffic Safety Administration) claims that for every 100

fatal crashes, there are 109 fatalities. Half of the top ten states in fatalities have the

weakest laws on distracted driving. Distracted driving caused all these fatal car crashes.

A change needs to be made to prevent such a disaster moving forward. (Hurst A; 2021).

Speed limit ignorance is a main topic to consider for this thesis. Ignorance is

defined as the lack of knowledge or information. To have a scholarly conversation about

speed limit ignorance it must be understood where the problems could lie. On a site

like DefensiveDriving.Com, users can get traffic tickets dismissed by completing courses

required by some courts. In one specific article titled “Adhere to Posted Speed

Limits at All Times,” Defensive Driving talks about how it is the driver's responsibility to

know all posted speed limits and that a road’s speed limit can fluctuate. Because the

speed limit fluctuates, it is important for drivers to stay focused while driving. The

5
Article says that distractions like the stereo, cell phones, and passengers can create a

distracted setting that can lead to illegal speeds or not being aware of posted

speed limits. Speed limits can also fluctuate based on state laws, while some states may

have a 75-mph speed limit posted on an interstate, others may have 65-mph posted. It

is the driver’s responsibility to know these speed limits as a vehicle operator. It is

also important to note that when a driver is pulled over for speeding their guilt is not

determined by whether you intended to speed but whether you were speeding in

fact. Drivers pleading that they did not intend to speed may get off with a warning but in

a court of law this is not a lawful excuse. This article helps readers understand the idea

that you are responsible for always knowing the speed limit and you will be prosecuted.

Other general articles about the driving experience in Tennessee can help readers

relate to the numbers. News Channel 5 has done a recent interview with

a Tennessee resident and driving instructor Jeremy Lyon, owner of Brentwood Driver

Training. Lyon says, “If you just did the things you knew from the beginning, if you just

drove the speed limit it would make a world of a difference in this town," speaking on the

fact that many drivers are coming back after the pandemic, not driving for maybe a

year are maybe out of practice. According to the Tennessee Department of Homeland

Security there were 500 driving related deaths in the first 6 months of 2019, 429 in 2020,

and in the first 6 months of 2021 there have been 620 deaths. Aggressive drivers, taxed

police officers, and steadily increasing numbers show that a change needs to be

made. Lyon has owned and operated at the driving school since 1993. He says that

especially now he is trying to set a good example for young drivers so that they have a

positive impact behind the wheel. This article helps us understand local numbers of

6
driving death and that with the pandemic passing numbers seem to have gone up.

(McDonald, H; 2021).

Current Products

Looking into products that are already out there, a gap is shown that needs to be

filled.

It is important to study what larger corporations are working on or have already

made. One Company researched was HERE 360, a Netherlands based location data

company. HERE 360 develops software often used in automobiles. Some of HERE 360’s

clients include German car companies like Audi, and BMW. Software they are

developing is exactly what the researcher wants to create, except it will be in the form of

an off-the-shelf product as opposed to automobile software. An article on HERE 360’s

website argues the importance and need for a speed limit display much like the

one developing in this proposal. Justification for the product itself can come from the

existence of the technology HERE 360 developing. The article is helpful in developing

ideas of why exactly road signs are not always visible even for experienced drivers. 

In addition to larger corporations, similar gadgets that are already on the

market were researched. Hudway is a gadget company that mainly produces dashboard

speedometers and other dashboard gadgets. The Hudway Drive HUD is a flexible rubber

platform that adheres to your dashboard and has a clear display screen. The Dive HUD

has an accompanying app that controls the device. The HUD offers a wide variety of

tools including a speedometer, GPS, outside temperature, top speed, weather, and can

even display phone notifications. The large, clear display screen allows for a more

7
focused driving experience, having everything you need basically displayed on your

windshield prevents distracted driving. While this product is great it does have its

downsides. The Drive HUD comes in at $299 which makes the product a luxury. Another

issue with this product is its capabilities. Having the ability to display phone notifications

can lead to visual and cognitive distracted driving. 

Major gaps in the research are shown with distracted driving. Although we cannot

completely solve the issue of distracted driving, it is possible to solve other minor issues.

One minor issue that can be solved is speed limit ignorance, letting the driver always

have access to the speed limit while driving. The Gap in the market of speed limit

assistance is found within the price of products. While there is technology out there that

solves the issue of speed limit ignorance, it is far out of reach for the average driver.

Speed limit assistance exists in expensive new car technology, like Tesla. And while

there are apps that seem to solve this problem, drivers need a product that does not use a

phone screen to display speed. Distractions can arise from the phone screen like

temptation to read a text or email. Drivers need a product that is off the shelf and

accomplishes one task. A product that is off the shelf will make speed limit assistance

available to a much larger audience. An off the shelf product will also give the driver

speed limit assistance without the distraction of the phone.

Methodology: Chapter Three

My solution to distracted driving was aiding the driver. My main way of aiding

the driver was to install systems that give the driver as much information as possible. One

set of data that intrigued me was the speed limit sign. While some cars have access to this

8
luxury, I do not. Driving around town I often found myself wondering what the speed

limit was. I imagined a screen that sat on my dashboard and displayed the correct speed

limit of where I was, and I was satisfied by its imaginary convenience.

After conversing with family, teachers, and friends, it was decided that the best

approach would be to use an Arduino. Arduino is an open-source hardware and software

company, project, and user community, that designs and manufactures single board

microcontrollers and microcontroller kits for building digital devices. The wide variety of

hardware and parts available to connect to the Arduino boards and its’ easy-to-use

platform, made it an easy decision.

One skill I will need near the end of the thesis will be CAD/ 3D modeling. In

order to create a safe and compact case to hold and display the components of the project,

a case must be 3D modeled and printed. I do have the skills for this part of the project,

and I assume it will go very quick and smooth.

The skills needed to create a speed limit display with Arduino parts are extensive

and some of the skills needed will have to be learned. Electronics will be the first

difficulty in learning Arduino. Learning what parts I needed and which parts are

compatible for my project was a huge undertaking. Another part of electronics is learning

how to wire hardware together. Thankfully Arduino has a very helpful interface that

supports beginners in the field.

Another major skill needed is codding. For Arduino in particular, their platform

uses a form of C++. Learning how to read code in Arduino is a huge task. Much of my

process required advanced coding, that I cannot do by myself, so my mentor will have to

help me understand and write some of the code.

9
The hardest part of this project was understanding an API. API, is the acronym for

Application Programming Interface, which is a software intermediary that allows for two

applications to talk to each other. For my project I will be using Bing Maps’ API to

retrieve speed limit data. This speed limit data will be retrieved based on the GPS

location of my device. Once the speed limit is retrieved it will display on an LCD screen.

My mentor is a huge help, specifically, because he works on APIs. My mentor is

Tom Batey, a software developer in North Carolina. Originally, I had picked my mentor

because he works for my dad, and he knows a lot about what I’m doing. He has worked

with other big databases like Google Maps API.

Design Process

To put the idea of the product simply: An Arduino board will be communicating

through a cellular network with the Bing Maps Database or API. The API will receive the

GPS location of the board and send back the Speed Limit of the nearest road and other

data like the road name. This data will be filtered out until just the speed limit is left.

Finally, the speed limit will be displayed on a LCD screen mounted on the drivers

dashboard. The board will only make a call every x second(s) so that excessive calls to

the Database are not made.

Parts needed:

- Arduino MKR GSM 1400

- Arduino MKR GPS shield

- Liquid Crystal Display i2c

- Lithium-Ion Battery Pack

- Antennae

10
- Arduino IDE software

Liquid Crystal Display i2c

The first step in building the speed limit display is to set up the Liquid Crystal

Display (LCD). The LCD used in this project is of the i2c variety and is 16 x 2 in pixels.

I2c stands for inter-integrated circuit. This i2c module sits directly on the back of the

LCD screen and converts 16 connection pins to only 4. Basically the i2c device makes

the wiring more simple and compact.

Figure 1 LCD wiring diagram Figure 2 LCD i2c wiring diagram

Figure 1 shows the wiring diagram for a basic LCD screen. As you can see, many

of the pins on the board are taken up by the plethora of wires used to connect the display.

The small blue square represents a potentiometer wired up to control the brightness of the

LC Display.

Figure 2 shows the wiring diagram for an LCD i2c. As you can see in figure 2,

the i2c module adds many benefits to the simplicity of the final product. Benefits like

using less jumper cables, using less real estate on the board, and a built-in potentiometer.

Once the Lcd i2c is wired up to the Arduino board itself, the next steps to

displaying text are on the computer. Downloading software and writing code is all that is

left before we can display our text.

11
The first thing to be downloaded will be the Arduino IDE software. IDE simply

stands for implemented design environment. This IDE will allow my laptop to write and

upload code to my Arduino board through a USB port and cable. The Arduino IDE can

be downloaded to a computer free off the Arduino website.

After the IDE is installed, the computer must have a way to communicate easily

with the LCD. To do this, Arduino has many downloadable files called libraries. The

library needed for the LCD is named “LiquidCrystal”.

And finally, after all the software is downloaded, we can start uploading code to

the Arduino board.

For the code to work properly with our i2c module we must find its address. This

address will be used in later coding to upload display code to the board; and because the

LCD in this project is 16 x 2 pixels the address is either 0x27Hex or 0x3FHex.

To find the address you need to run a code that will search for any i2c devices that

are connected to the Arduino board.

12
Figure 3
i2c search code (lastminuteengineers.com)

This script in Figure 3 will search for any

i2c devices connected to the board. If no i2c

devices are found it will return “No I2C devices

found/n”. If there is a device though the serial

monitor tab will display the address we are

looking for.

So, we wire up the LCD to the Arduino

board, plug up the Arduino board to the laptop

through USB, and upload the i2c search code to

the Arduino board.

Figure 4
i2c search code return

Once the i2c search code is run, the

serial monitor tab will show what the

board returns. And as seen in a screenshot of the serial monitor tab, Figure 4, the address

returned successfully with 0x27.

Figure 5
LCD address and pinout

13
With the i2c address found, we can start on the display code. Figure 5 displays

the code that will define each pin of the i2c board and how it links up to the Arduino

board.

Figure 6
LCD display code
Line 5 and 6 of Figure 6 show

the address and pinout of the i2c found

earlier. Simple commands like

“lcd.print” and

“lcd.setCursor”determine what is

printed on the LCD and where the type

is printed respectively. Later, we can use these commands and the i2c address in our final

code for displaying the speed limit on the product.

Arduino MKR GSM 1400

The Arduino MKR GSM 1400 is an Arduino board of the maker series. The board

takes advantage of cellular networks as a means of communication. The GSM module

connects to the 3G network through the use of a SIM card. The board can be registered

and connected through Arduino’s personal IOT cloud where the board can receive code

through an online location. For the remainder of the project, we will be switching from

the Arduino IDE to the Arduino Online Editor and IOT cloud.

In order to use the Arduino MKR GSM 1400 properly, there are 3 parts necessary.

The parts needed include a SIM card, an antenna, and a lithium-ion battery pack.

14
The first part purchased was a SIM card. The SIM card used in this build is

produced by Arduino and made specifically for Arduino related projects. There are some

steps required to activate the SIM card on the Arduino website, but the steps are self-

explanatory. Activating the sim card links the SIM to a designated Arduino account so all

data is transferred to the correct place.

Once the SIM card is activated, we can connect our other pieces of hardware to

the Arduino board and start testing the device.

Figure 7
Arduino MKR GSM 1400 (Arduino Support, n.d.)
Figure 7 displays the

reserved connection sires of the

battery, SIM, and antenna. The type

of antenna that connects to the

module is called a Dipole Pentaband

Antenna. This antenna attaches

through a micro UFL port as shown

in Figure 7.

To use the board remotely and without power from the USB port, the

board can be powered with a lithium-ion battery. This battery can also be used in

conjunction with the power from the USB port to maximize signal strength.

(Image of battery and antenna connected.)

Now that all the parts are in place, we can test to see if the SIM card and GSM are

working together. This code was found from the Arduino Docs titled “Scanning

Available Networks with MKR GSM 1400”. The code provided in this article will return

15
the current carrier of the device and the signal strength. We can also test out how the

lithium-ion battery and the antennae affect the signal strength; as opposed to no antenna,

and only power through the USB port.

Figure 8
Arduino MKR GSM 1400 signal strength code
Some important pieces of

information needed for any MKR GSM

1400 projects is the sim card’s PIN

number, APN, username, and password.

These pieces are given by the SIM

provider and can be input into the code,

shown on line 3 of Figure 8.

After everything is sorted in the

hardware and the code, the board can be

connected to the USB port and the code

can be uploaded.

16
Figure 9
Signal strength code – serial monitor
After the code is uploaded, the GSM

gives back the IMEI and then takes a few seconds

to search for the network. IMEI stand for:

International Mobile Equipment Identity. The

IMEI is basically just a special number given to

mobile devices that use cellular services. Once

the network is found, the serial monitor shows the

carrier that the GSM is operating on, and the

signal strength. This command will refresh every 10 seconds or so showing a live feed of

the signal strength. This information lets us know that all the hardware is connected

properly and that the GSM is recognizing the cellular network.

Arduino MKR GPS shield

Now that the parts of the GSM are working properly, we can move on to the next

components of the build. That next component is the GPS location. In the final product,

the GSM will need to send its GPS location to the Bing Maps API. When the API gets

the GPS location, it will snap to the nearest road and send back the speed limit.

To accomplish getting the GPS location, I will be using an Arduino MKR GPS

shield. This piece of hardware will give us a live update of its latitude, longitude, altitude,

and speed in km/h.

Wiring up the GPS shield to the GSM is as simple as an i2c cable as shown in

Figure 10.

17
Figure 10
Arduino MKR GPS shield wiring (Arduino Docs, Karl Söderby,
n.d.)

It is important to mention that to test the GPS shield properly, the GSM must still

have the SIM card inserted and the antenna connected. Once the GPS shield is connected

to the GSM with the SIM card and antennae, we can plug up the GSM to the computer

through the USB port and upload a test code. And because we are using the online editor

there is no need to download any libraries.

18
Figure 11
MKR GPS test code Figure 12
(Arduino Docs, Karl Söderby, n.d.) MKR GPS test code - serial monitor

The code is run, and all the proper information is returned. Location is blurred in

the image for confidentiality but was returned properly. Now that the GPS code is

working, we can move on to other components.

19
CAD Modeling

At this point in the project, I took a day to model a casing for all of the hardware

to fit compactly on my dashboard. My first step in designing the model was the

dimensions. I knew that the LCD screen would be sticking out of the front of the box so I

would have to build around it. Instead of using calipers to make many small

measurements, I simply downloaded a 3D model of an LCD 12c offline and built around

it. The method I used to secure the LCD was 4 pins that stuck through the 4 built in holes

at every corner of the LCD. I made the design as simple as possible to cut down on print

time and made sure to leave room for the rest of the hardware, like the MKR GSM and

the MKR GPS.

Figure 13
Hardware housing (Sketch)
My idea for the sketch was to have the screen central

and the parts on the interior. One issue I would repair in the

CAD model would be space for the LCD wires. The wires

that come from the LCD i2c require about half an inch of

clearance so the box could not be as compact as I initially

thought. Another change was that I simply made an open

back rather than a removable lid so that it would be simpler to model and print.

Figure 14 Figure 15
CAD model Hardware housing (front)
CAD model Hardware
housing

20
(Back)
As you can see, the housing unit has four

pins positioned around a rectangular hole.

The pins’ position and size as well as the

rectangular hole’s position and size were

modeled around the exact dimensions of the

LCD i2c.

Figure 16
Final print with LCD in place

As you can see in the final print, the LCD fits snugly. The pins were in just the

right spot and allows for no movement of the LCD. The rest of the parts fit into the back

and can be removed and replaced easily.

Bing Maps API

To retrieve the speed limit date, we will be using the free Bing Maps API. The

API uses a type of URL with a corresponding Key to retrieve the correct information

21
from the Bing Maps Database. To create a Key, I went to the “Bing Maps API portal”

and followed the steps their website provided.

Key: At-

rADayKBtuXhnIlzOj8_3uniUPs4hOsHcBPGyMTFkIqh3VG_zLlf9jGFsOzR4a

The next step will be to insert the key into a custom URL. My mentor, Tom

Batey, was a huge help in helping me write the URL. Below is the URL and you can see

the same key made before is inserted at the end of the link.

URL:
https://dev.virtualearth.net/REST/v1/Routes/SnapToRoad?
points=31.1316876, -
99.3348678&interpolate=false&includeSpeedLimit=true&includeTruckS
peedLimit=false&speedUnit=mph&key=At-
rADayKBtuXhnIlzOj8_3uniUPs4hOsHcBPGyMTFkIqh3VG_zLlf9jGFsOz
R4a

Inside the URL there is also “points=”, this is where we will input our own GPS

coordinates. For now, though, we can manually input some coordinates to test the URL.

After we input the test coordinates, we can click on the link to see if it worked.

Figure 17
Bing Maps API URL – return

22
As you can see in Figure 17, out of all the information returned, there is a speed

limit that has been returned. In addition to the speed limit, there is also a road name.

Later, we might use this road name on the display.

Finally, the URL we created will need to be inserted into the final code. Because

while right now my computer is making the call to the maps service, we want the call to

be made by the MKR GSM through its cellular connection. So, the Code will be written

that will enter the URL and make the call.

Arduino IOT Cloud and MKR GSM 1400

With the LCD i2c, MKR GSM 1400, MKR GPS shield, and API working

properly we can now move into the final steps of the project. This step will be connecting

the GSM to Arduino’s IOT cloud so that the GSM can make and receive calls.

The Arduino website provides a very in-depth procedure of how to connect the

GSM to their cloud. First, you have the site recognize your device by plugging it up to

the computer. Then, you follow the steps to generate a code that will connect the device

to the cloud. Once the code is created, you can upload it to the board and wait for the

website to say that the

board is “online”.

Figure 18
Arduino IOT connection
code

Return from IOT code:

***** Arduino IoT


Cloud - configuration
info *****

23
Device ID: a4dc7ebc-47c0-4077-b825-515fd2e3af78
MQTT Broker: mqtts-sa.iot.arduino.cc:8883

This information is the ArduinoCloud.printDebugInfo () which means that the

code did not run properly.

Disaster.

After uploading the code, it seemed to work properly until the “online” indicator

never came. And after many hours of altering the code and troubleshooting, there was no

success. As the days went on with no success, I sought help from one of my dad’s

friends, Noah Deinlein. We altered Arduino’s code so that the code would display in the

serial monitor each step’s completion. This led us to an avail; we found that the code was

not entering the loop of the code at all. After Noah made some changes to the Arduino

code, the GSM entered the loop but did not complete the ArduinoCloud.update

command. While this did seem like a success it took about 10 mins after the code was

running for this to happen. So, even in this 1 in 10 chance, where the code actually enters

the loop and works, it would not be useful for our purposes. For my product to work I

will need the device to be working as soon as the car was going and to update every x

seconds.

So, the GSM cannot connect to the IOT cloud remotely which means that it

cannot make a call to the Bing Maps service from the car. This means that testing is not

going to be an option.

Despite this obstruction, me and my mentor designed the final code as a proof of

concept but to test the IOT connection code one last time.

24
Figure 19
Complete final code

The final

code shows all of

steps needed to send

a request to the Bing

Maps API based on

the GPS coordinates

of the device. The

code will then sort

through all of the

returned information

and separate the

speed limit / road

name.

While the code in Figure 19 is complete, it will not run on its own. At around line

48 is when the MKR GSM starts to connect to the Arduino IOT cloud. This portion of the

code is the same generated from the Arduino IOT tutorial from earlier. This is where

25
things go wrong again. Even though the code is uploaded to the board and the serial

monitor is returning the responses, everything seems to get held up on the GSM

connection to the cloud and no further commands go through. So, the same problem is

still occurring from the previous connection attempts.

After many hours of troubleshooting the issue and reading posts on the Arduino

Forum, I found many other people having the same issue and error code. I read that there

are a few solutions to the problem like making a new account, restarting your computer,

deleting the sketch and creating a new one. None of these fixes have worked for me.

Other solutions to the problem could be changing brand of SIM card or switching to

raspberry pie hardware.

Conclusion: Chapter 4

Study Summary

Distracted driving is an area that I am interested in because of all the people

affects especially with all of the ideas that new technology can facilitate. The research

that I have gathered reveals some gaps in technology, and I have found some information

that I did not know about before.

One finding that my research suggests is about how easy it is to fall into the act of

distracted driving. Distracted driving comes in many forms, and it is easier to fall under

the spell than expected. Simple tasks like programing a GPS can be even more distracting

than texting on your phone. My research also talks about the importance of knowing the

speed limit. Speed limits can fluctuate from state to state and road to road. These speed

26
limits are put there for a reason and knowing the speed limits is the driver’s

responsibility. Because of this request to know the speed limit, I suggest that having this

data will cut down on distracted driving. Having a device that will only display the speed

limit is logically better than a cell phone, because of the distractions a cell phone can

bring, from visual to mental distraction.

One gap in the research for my product was a gap in the price for speed limit

assistance. Modern technology has brought us the speed limit assistance built into new

cars. Cars like Tesla have monitors that will display road signs including the speed limit.

While most people do not have access to this technology, a solution must be presented. I

think that an off the shelf product with a speed limit display is not out of reach. The

product I have suggested and attempted to build is one that has no further distractions.

My device does not display weather or phone notifications. My device has one purpose

and that is to inform the driver of the speed limit, solving speed limit ignorance.

My thesis on speed limit ignorance and distracted driving has taught me about the

severity of distracted driving through my research. The product side of my thesis has

given me the basic knowledge and skills to understand code and Arduino hardware. I

have always wanted to learn the basics of code and what it means to write code. Through

this project I have not only learned about code, but I have also learned about the

hardware side of it through Arduino products. I think that there is something to learn

about how distracted driving relates to modern technology. Distracted driving deaths are

not going down and in a world of technology even a sliver of benefit is enough. A speed

limit display could help one person one time from being distracted, and that is enough. I

27
do believe that there is a large market for this technology and the software developers,

like HERE 360, are only marketing to large car companies like Audi and BMW. This

software needs to make it onto the market for people who don’t have the newest cars.

Limitations

My limitations stem from the Arduino IOT website and their code. Because I was

unable to solve the issue of connecting to the IOT cloud, I could not fully test my product

outside of my home. Riding in the car and observing how the device affects the driver is

completely out of the picture because I was not able to make a request to the Bing Maps

API other than using my laptop.

Implications

Software companies like HERE 360 should consider facilitating other markets

other than just large car companies. The technology, used in cars like Audi and BMW,

can be reused in an off the shelf product that can facilitate to a larger audience. Looking

forward, I think that all cars will have speed limit display built in and that would be an

amazing solution to the problem. For now, I believe the best fix is something off the shelf

that any driver can buy and install in their car without any huge cost.

Future Study

I do wish that I would have been able to test my product in a car. Testing in a car

would have allowed me to observe how the device affects drivers. I recommend that a

different route is taken other than Arduino if someone attempts this project because of the

difficulty others and I had with their IOT cloud.

28
References

Covington, T. (2021, July 30). Distracted driving statistics + research [updated


2021 ... Distracted Driving Statistics: Research and Facts in 2021. Retrieved
November 13, 2021, from. https://www.thezebra.com/resources/research/distracted-
driving-statistics/. 

Department of Safety & Homeland Security. (2021). TDHS. Retrieved September 25,
2021, from https://www.tn.gov/safety.html 

Driving, D. (2015, February 13). Adhere to Posted Speed Limits at All Times. Defensive
Driving. https://www.defensivedriving.com/blog/rules-of-the-road-observe-and-
adhere-to-posted-speed-limits-at-all-times/

Herrid. (2020, August 29). Cant connect to Arduino IOT Cloud. Arduino Forum.
Retrieved March 20, 2022, from https://forum.arduino.cc/t/cant-connect-to-arduino-
iot-cloud/672300 

Hurst, A. (2021, July 28). New Mexico, Kentucky and Kansas are the worst states for
distracted driving, even as crashes, deaths across U.S. trend downward.
ValuePenguin. Retrieved March 22, 2022, from
https://www.valuepenguin.com/worst-states-distracted-driving 

I Drive Safely. (n.d.). Don’t Let Your GPS Distract You While Driving. Retrieved
September 24, 2021,
from https://www.idrivesafely.com/defensive-driving/trending/gps-distracting-
you-while-driving 

Jammenhva. (2021, July 10). Suddenly: Could not connect to mqtts-


sa.iot.arduino.cc:8883. Arduino Forum. Retrieved March 23, 2022, from
https://forum.arduino.cc/t/suddenly-could-not-connect-to-mqtts-sa-iot-arduino-cc-
8883/883812/2 

Last Minute Engineers. (2020, December 18). In-depth: Interfacing an I2C LCD with
Arduino. Last Minute Engineers. Retrieved March 4, 22, from
https://lastminuteengineers.com/i2c-lcd-arduino-tutorial/

McDonald, H. (2021, June 24). Tennessee traffic deaths up 26% during pandemic despite
fewer commuter. .  News Channel
5. https://www.newschannel5.com/news/tennessee-traffic-deaths-up-26-during-
pandemic-despite-fewer-commuters

29
NHTSA. (n.d.). Distracted driving. NHTSA. Retrieved November 13, 2021, from.
https://www.nhtsa.gov/risky-driving/distracted-driving. 

Reimer, J. (2021, February 1). What's the speed limit? New speed assistance tech helps
drivers stay safe. HERE 360. https://360.here.com/intelligent-speed-assistance. 

Roberson, B. (2021, Feb 25). Road Tech Review: The Hudway Drive HUD System


Is Cool,And A True Safety
Solution. Forbes. https://www.forbes.com/sites/billroberson/2021/02/25/road-
tech-review-the-hudway-drive-hud-system-is-cooland-a-true-safety-solution/?
sh=543f5e37508c. 

Söderby, K. (n.d.). MKR GPS Shield Basics: Arduino documentation. MKR GPS Shield
Basics. Retrieved March 4, 2022, from https://docs.arduino.cc/tutorials/mkr-gps-
shield/mkr-gps-basic 

Support, A. (n.d.). How to connect the MKR GSM 1400 to Arduino IOT cloud ... How to
connect the MKR GSM 1400 to Arduino IoT Cloud. Retrieved March 5, 2022,
from https://support.arduino.cc/hc/en-us/articles/360021568419-How-to-connect-
the-MKR-GSM-1400-to-Arduino-IoT-Cloud 

Tennessee Highway Safety Office. (2021) updated*. What is Distracted Driving? 


THSO. https://tntrafficsafety.org/distracted-driving 

30

You might also like