Full Integration of GPS System on Arduino

Similar documents
P8X32A-Q44 SchmartBoard (#27150)

Quick Start Guide New Mountain Visit our Website to Register Your Copy (weatherview32.com)

Assembly and Operation Manual. April 2016

SC125MS. Data Sheet and Instruction Manual. ! Warning! Salem Controls Inc. Stepper Motor Driver. Last Updated 12/14/2004

ISSP User Guide CY3207ISSP. Revision C

A clock designed in close consultation with people living with Dementia.

CS ProtoBox. Available 15 Sept 2014 at the Stores shop.

User's Guide. DISTO online. Leica Geosystems

Data Logger V2. Instruction Manual

PCAN-MicroMod Evaluation Kit. Test and Development Environment for the PCAN-MicroMod. User Manual

Experiment A11 Chaotic Double Pendulum Procedure

S Sapling INSTALLATION MANUAL FOR FIELD SELECTABLE ANALOG CLOCKS SAA SERIES SPECIFICATIONS. advanced time and control systems

Acceleration, Velocity, Separate probe VIBRATION METER Model : VB-8202

OPERATION MANUAL. Acceleration, Velocity RMS measurement, Metric & Imperial unit PEN VIBRATION METER Model : PVB-820

Assembly Instructions for the 1-Wire Weather Station V2.0/V3.0

Laboratory 3 Measuring Capacitor Discharge with the MicroBLIP

PoleMaster User Manual (Northern Hemisphere)

RECON. How to Setup the Telescope to Observe. This guide will show you how to setup your telescope for observing. Written By: Brittany McCrigler

10 - Celestron Telescope II: Operation

Digital Design through Arduino

Using a Microcontroller to Study the Time Distribution of Counts From a Radioactive Source

INSTALLATION INSTRUCTIONS FRONT PLOW MOUNT KIT Part Number: Application: Polaris Sportsman 400, 500, 800

Acceleration/Velocity/Displacement VIBRATION METER

CONTENTS. Batteries. La Crosse Technology, Ltd Page 1

Arduino Weather Station And Ascom Observing Conditions

SHARK Snow Plow. 52 (132 cm) / 60 (152 cm) Complete system blade INSTRUCTIONS / ESTABLISHMENT

Richter Optica. Instructions for Model: S850 Stereo Zoom Microscope

Installation guide 862 MIT / MIR

Galileo Telescope Solar Viewer Joseph Hora, Elizabeth Hora 2017/09/18

WeatherHub2 Quick Start Guide

TABLE OF CONTENTS. IC Recorder. Model No. RR-US300E. Colour (S)...Silver Type

OPERATION MANUAL. Acceleration, Velocity RMS measurement, Metric & Imperial unit PEN VIBRATION METER Model : PVB-820

Doc No. KF08-002D. Portable Ultrasonic Flowmeter UFP-20. Installation & Operation Manual

Paramaters. Resolution 0.2 m (for measurements < 25 meas. / sec )

VELA. Getting started with the VELA Versatile Laboratory Aid. Paul Vernon

2 One-dimensional motion with constant acceleration

For Customer Service, Rev A - 6/ OF 6

STEAM Clown Production. Series Circuits. STEAM Clown & Productions Copyright 2017 STEAM Clown. Page 2

micro:climate Kit Experiment Guide

ISOCON-6. 24V AC or DC POWERED ISOLATING SIGNAL CONVERTER

Experiment 4. RC Circuits. Observe and qualitatively describe the charging and discharging (decay) of the voltage on a capacitor.

BASIC ELECTRICITY STUDY COURSE

PHY222 - Lab 7 RC Circuits: Charge Changing in Time Observing the way capacitors in RC circuits charge and discharge.

Circular Motion and Centripetal Force

Lab 5a: Magnetic Levitation (Week 1)

Training Guide. Coastal Environmental Systems, Inc.

Digital Design through Pi

Circuit Analysis and Ohm s Law

OP-02 / OP-03 / OP-04

In-System Serial Programming (ISSP) Guide

Observing Procedure for C11 GPS

FOREMAN ASSEMBLY / OWNER S MANUAL

INSTALLATION INSTRUCTIONS ATV Plow Blade Part Number: (50 ), (54 ), or (60 ) Application: All Terrain Vehicles

BEFORE USE... POINTS OF CAUTION COMPONENT IDENTIFICATION INSTRUCTION MANUAL MODEL R7K4DH-1-DAC32D R7K4DH-1-DAC32D

INSTALLATION INSTRUCTIONS ATV PLOW ACCESSORY Plow Mounting Kit:Warn PN Application:2002 and newer+ Suzuki Eiger 400

CHV Series Vector Control Inverter Options. Operating Instructions for Tension Control Card

Visual Physics 218 Forces & Acceleration [Lab 3]

ph Probe ReallyEasyData com

Safety Precautions WARNING If critical situations that could lead to user s death or serious injury is assumed by mishandling of the product.

QUANTUM CONCEPT. Swimming User s Manual

Calibration Routine. Store in HDD. Switch "Program Control" Ref 1/ Ref 2 Manual Automatic

ASSEMBLY / OWNER S MANUAL

FIELD SPECTROMETER QUICK-START GUIDE FOR FIELD DATA COLLECTION (LAST UPDATED 23MAR2011)

POINTS OF CAUTION BEFORE USE...

WeatherHawk Weather Station Protocol

Acid-Base Titration. Sample

hydrideicp Hydride Generation System

MLCC APPLICATION GUIDE

PTC04-DB-HALL02. Daughter Board for Melexis PTC devices. Features and Benefits. Applications. Ordering Information. Accessories. 1. Functional Diagram

Assembly Programming through Arduino

SuperCELL Data Programmer and ACTiSys IR Programmer User s Guide

PHOENIX CONTACT - 04/2016. Features

HMS-5000 Manual. Product Name: HMS-5000 Hall Effect Measurement System with variable temperature from 80K to 350K. - Manual version: ver 5.

WS-7047TWC Wireless 433 MHz Weather Station With Rainfall and Temperature. Instruction Manual

Exam Practice Problems (3 Point Questions)

LIGHT TRACKER ACTIVITY

In-System Serial Programming (ISSP) Guide

Conservation of Mechanical Energy Activity Purpose

Quick Start Guide. The ieq45 GoTo German Equatorial Mount # 8000C

RTAC104 AFM References in Package

Electrical Connections

PLANCK S CONSTANT IN THE LIGHT OF AN INCANDESCENT LAMP

For the electronic measurement of current: DC, AC, pulsed..., with galvanic separation between the primary and the secondary circuit.

AIRBIO : AIRBONE DISINFECTION

Experiment C-10 Titration of a Strong Acid and a Strong Base

In-System Serial Programming (ISSP) Guide

User's Manual altimeter V1.1

Chapter 1 Fundamental Concepts

Lab Activity H4 It s Snow Big Deal

ph electrode Instruction Manual For use with the RAH-210 & RPH-250

VIBRATION METER Acceleration & Velocity Model : VB-8201HA

B Left-hand case side (x1) F

P300. Technical Manual I/Os, 240 solenoid drivers th Street, Davis, CA 95616, USA Tel: Fax:

LEE Project Room AH177

AccuAligning TM Polar Scope for SmartEQ TM Portable German Equatorial GOTO Mount. Installation and User Manual. Product #3130

WEATHERPAK MTR Training Guide

PTC04-DB Daughter Board for Melexis PTC devices

Lab Manual for ICEN 553/453 Cyber-Physical Systems Fall 2018

Evaluation copy. Ground Temperature Measurements. computer OBJECTIVES MATERIALS PRE-LAB QUESTIONS

Lab #15: Introduction to Computer Aided Design

Transcription:

Full Integration of GPS System on Arduino Alex (Seong Hoon) Lee 1, Professor Robert Winglee 2, 1 Unviersity of Washington, Electrical Engineering Dept. 2 University of Washington, Earth and Space Sciences Dept. 4 November 2017

Contents 1 Arduino DC Barrel Plug Modification and Data Output Instructions 1 1.1 Desoldering the DC Power Barrel......................... 2 1.2 Data Retrieval from Arduino........................... 4 2 Increasing Structural Integrity of microsd Shield and LCD Panel Data Display 9 2.1 Initial Setup..................................... 9 2.2 Increasing Structural Integrity of microsd Shield................ 11 2.3 LCD Panel Installation and Code Modifications................. 14 2.4 LCD Panel Data Display.............................. 16 3 GPS Data - Retrieving, Storing, and Displaying on LCD 18 3.1 Strengthening the Structural Integrity...................... 18 3.2 Installing the GPS module............................. 19 3.3 Code Instructions.................................. 20 4 Full Integration of GPS System on Arduino 22 4.1 Soldering Together the Wires........................... 22 4.2 Finalized Product.................................. 25

1 Arduino DC Barrel Plug Modification and Data Output Instructions This section will be provided as a guide to modify an Ardunio s DC power barrel that is too large for this particular setup shown in Figure 1. This particular brand of Arduino is called SparkFun Inventor s Kit V3.3. Figure 1: Arduino setup with DC Barrel Plug A closer look on the side, as seen in Figure 2, gives a clearer representation of the problem. The elevated printed circuit board (PCB), called SparkFun microsd Shield, might have connectivity issues with the installed components, including the Micro SD card slot which will be used later in this instruction. Figure 2: Side view of the Arduino with DC Barrel Plug A solution to this problem is to desolder the DC Barrel Plug from the PCB. As seen in Figure 3, there are two power inputs, the DC Barrel Plug and a Mini USB port. Since the device has two power input ports, the DC Barrel Plug can be removed and the Mini USB port can be used as the primary power input port. Figure 3: Front view of the Arduino with DC Barrel Plug 1

1.1 Desoldering the DC Power Barrel The following items and safety conditions are needed for a successful desoldering of the DC Power Barrel: Soldering Iron Controller Mechanical Desoldering Pump Well ventilated room Gloves to protect your hand Protective goggles for your eyes Masks to prevent from inhaling unhealthy smoke Once all items and safety conditions are prepared, we can proceed with the desoldering process. 1. Place the Arduino on a safe surface. In this case, a removable wooden board is used. 2. Connect the soldering iron controller to a power outlet, set the power to maximum, and wait around 3-5 mintues for the soldering iron to heat up. 3. Once it has heated up, place the tip of the soldering iron onto one of the silver prongs of DC Power Barrel that is connected to the PCB, as shown in Figure 4. Tip: Gently press on the silver prong to squeeze out the solder beneath the silver prongs. Figure 4: Placement of Soldering Iron on one of the silver prongs 4. Once you can visibly see the melted solder, place the soldering iron into its stand and use the mechanical desoldering pump to pump up the solder, as can be seen in Figure 5. Tip: The best way to ensure that all melted solder is sucked up is to press the tip of the desoldering pump vertically onto the silver prong to create a seal, and pressing the release button to suck up the solder. 2

Figure 5: Placement of mechanical desoldering pump on one of the silver prongs with melted solder 5. Repeat steps 3 and 4 for about five times per prong to ensure that the majority of the solder has been removed. 6. Once the solders has been removed, place the iron solder on one of the prongs located closer to the edge of the PCB, as seen in Figure 4, and heat up the prong for approximately thirty seconds. Place the iron solder into its stand and gently lift up the DC Power Barrel so that the heated up prong is now disconnected from the PCB. 7. Repeat Step 6 for the remaining prongs and fully disconnect the DC Power Barrel, as shown in Figure 6, and place it in a safe place for possible use in the future. Figure 6: Removed DC Power Barrel next to the Arduino As shown in Figure 7, the second PCB can be installed onto the original Arduino PCB without any odd elevation caused by the DC Power Barrel. 3

Figure 7: Final installation of the second PCB onto the Arduino 1.2 Data Retrieval from Arduino Retrieving data from Arduino requires programming knowledge (preferably CSE 142) if the student desires to modify the provided code for personal use. However, the code that will be used in this documentation will be provided with appropriate comments, from both the SparkFun company and myself, so any student with minimal knowledge of programming experience can follow and modify as needed. Before proceeding, we must build a simple photoresistor circuit that we can use to retrieve the data to our microsd card. Before proceeding, please have the following items ready: Photo Resistor LED (5mm) 330Ω Resistor 10KΩ Resistor 6 Jumper Wires Please follow the official guide book that came with the kit to build the circuit, as shown in Figure 7. After building the circuit, download Arduino IDE from the official website: https://www.arduino.cc/en/main/software You must also install the correct drivers called FTDI drivers from the official SparkFun website: http://www.sparkfun.com/ftdi. Without the FTDI drivers, your computer may not be able to correctly detect the Arduino device. For this particular configuration, a 32GB microsd HC card will be used. Any microsd card with any size bigger than 1GB can be used for this project. Before using the microsd card, please format it as FAT file system. This is the primary file system that Arduino uses to read and write data. 4

Figure 8: Photoresistor Circuit #6 from SparkFun Inventor s Kit Manual Once everything is set-up, proceed with inserting the microsd card and powering the device by connecting the Arduino to the computer via mini-usb to USB cable, as shown in Figure 9. Figure 9: 32GB microsd Card In order to capture the data from the circuit, we must download the following code: https://goo.gl/tcu8xb 1 / 2 SparkFun I n v e n t o r s Kit 3 Example s k e t c h 06 4 5 PHOTO RESISTOR 6 7 Use a p h o t o r e s i s t o r ( l i g h t s e n s o r ) to c o n t r o l the b r i g h t n e s s 8 o f a LED. 9 10 This s k e t c h was w r i t t e n by SparkFun E l e c t r o n i c s, 11 with l o t s o f help from the Arduino community. 12 This code i s c o m p l e t e l y f r e e f o r any use. 13 V i s i t http : / / l e a r n. sparkfun. com/ products /2 f o r SIK i n f o r m a t i o n. 5

14 V i s i t http : / /www. arduino. cc to l e a r n about the Arduino. 15 16 Version 2. 0 6/2012 MDG 17 Version 2. 1 9/2014 BCH 18 / / 19 20 #i n c l u d e <SPI. h> 21 #i n c l u d e <SD. h> 22 23 F i l e myfile ; 24 25 // As usual, we l l c r e a t e c o n s t a n t s to name the p i n s we r e u s i n g. 26 // This w i l l make i t e a s i e r to f o l l o w the code below. 27 28 c o n s t i n t s e n s o r P i n = 0 ; 29 c o n s t i n t ledpin = 9 ; 30 31 // We l l a l s o s e t up some g l o b a l v a r i a b l e s f o r the l i g h t l e v e l : 32 i n t l i g h t L e v e l ; 33 i n t c a l i b r a t e d l i g h t L e v e l ; // used to s t o r e the s c a l e d / c a l i b r a t e d l i g h t L e v e l 34 i n t maxthreshold = 0 ; // used f o r s e t t i n g the max l i g h t l e v e l 35 i n t minthreshold = 1 0 2 3 ; // used f o r s e t t i n g the min l i g h t l e v e l 36 37 void setup ( ) 38 { 39 pinmode ( ledpin, OUTPUT) ; // Set up the LED pin to be an output. 40 S e r i a l. begin ( 9 6 00) ; 41 42 w h i l e (! S e r i a l ) { 43 ; // wait f o r s e r i a l port to connect. Needed f o r n a t i v e USB port only 44 } 45 46 47 S e r i a l. p r i n t ( I n i t i a l i z i n g SD card... ) ; 48 49 i f (! SD. begin ( 4 ) ) { 50 S e r i a l. p r i n t l n ( i n i t i a l i z a t i o n f a i l e d! ) ; 51 r e t u r n ; 52 } 53 S e r i a l. p r i n t l n ( i n i t i a l i z a t i o n done. ) ; 54 55 // open the f i l e. note that only one f i l e can be open at a time, 56 // so you have to c l o s e t h i s one b e f o r e opening another. 57 myfile = SD. open ( t e s t. t x t, FILE WRITE) ; 58 59 // i f the f i l e opened okay, w r i t e to i t : 60 i f ( myfile ) { 61 S e r i a l. p r i n t ( Writing to t e s t. t x t... ) ; 62 myfile. p r i n t l n ( t e s t i n g 1, 2, 3. ) ; 63 // c l o s e the f i l e : 64 myfile. c l o s e ( ) ; 65 S e r i a l. p r i n t l n ( t e s t i n g done. ) ; 66 } e l s e { 67 // i f the f i l e didn t open, p r i n t an e r r o r : 68 S e r i a l. p r i n t l n ( e r r o r opening t e s t. t x t ) ; 69 } 70 } 71 72 // the f o l l o w i n g f u n c t i o n w i l l be c a l l e d i n an i n f i n i t e loop 73 void loop ( ) 6

74 { 75 l i g h t L e v e l = analogread ( s e n s o r P i n ) ; // r e a d s the v o l t a g e on the s e n s o r P i n 76 S e r i a l. p r i n t l n ( l i g h t L e v e l ) ; // d i s p l a y s the l i g h t L e v e l to the s e r i a l monitor 77 myfile = SD. open ( t e s t. t x t, FILE WRITE) ; // opens the t e s t. t x t f i l e 78 myfile. p r i n t ( Light Level : ) ; // p r i n t s the s t r i n g to the f i l e 79 myfile. p r i n t ( l i g h t L e v e l ) ; // p r i n t s the v a r i a b l e l i g h t L e v e l to the f i l e 80 81 // s c a l e the l i g h t L e v e l from 0 1023 range to 0 255 range. 82 c a l i b r a t e d l i g h t L e v e l = map( l i g h t L e v e l, 0, 1023, 0, 255) ; 83 // the map ( ) f u n c t i o n a p p l i e s a l i n e a r s c a l e / o f f s e t. 84 // map( inputvalue, frommin, frommax, tomin, tomax ) ; 85 S e r i a l. p r i n t ( \ t ) ; // tab c h a r a c t e r 86 87 // p r i n t l n p r i n t s an CRLF at the end ( c r e a t e s a new l i n e a f t e r ) 88 S e r i a l. p r i n t ( c a l i b r a t e d l i g h t L e v e l ) ; 89 90 // p r i n t s the s t r i n g to the f i l e 91 myfile. p r i n t ( C a l i b r a t e d Light Level : ) ; 92 93 // p r i n t s the v a r i a b l e c a l i b r a t e d l i g h t L e v e l to the f i l e 94 myfile. p r i n t l n ( c a l i b r a t e d l i g h t L e v e l ) ; 95 myfile. c l o s e ( ) ; // c l o s e s the f i l e 96 97 // s e t the l e d l e v e l based on the input l i g h t L e v e l. 98 analogwrite ( ledpin, c a l i b r a t e d l i g h t L e v e l ) ; 99 } There are few key elements of the code that must be understood. 1. Line 23: This sets the variable myfile as a File, a global variable recognizable by any function in this program. 2. Lines 28 and 29: sensorpin and ledpin are constants, and the int variables 0 and 9 are simply the pin numbers from the Arduino to connect to the circuit elements. Any circuit element connected to a pin can be used, meaning other elements such as resistors and buttons can be assigned as a constant. 3. Lines 57 and 77: The string text.txt can be renamed to any.txt file. 4. Lines 61, 65, 76, 85, and 88: The command Serial is used to print the variable in the parenthesis to the Serial Monitor. Before running the program, you can open Serial Monitor window by heading over to Tools -> Serial Monitor. This allows you to view what is being written on the Serial Monitor. 5. Lines 75: analogread allows you to read the data from a designated circuit element connected to a pin. In this case, sensorpin is used to store its value into lightlevel from the photoresistor. Before running the code, head to Tools -> Port and select COM3 on Windows, and /dev/cu.usb on Mac or Linux. Selecting the proper port allows you to be connected to the Arduino. For more detailed instructions or troubleshooting, please head over to the aforementioned link to the FTDI drivers. After compiling and uploading the program, you can exit the program by simply unplugging the USB cable from your computer or taking out the microsd card. In the microsd 7

card, you should find a file named TEST.txt. Figure 11. The file should look like Figure 10 and Figure 10: TEST.txt data, with high intensity light on the photo resistor Figure 11: TEST.txt data, with low intensity light on the photo resistor 8

2 Increasing Structural Integrity of microsd Shield and LCD Panel Data Display This section will be provided as a guide to increase the structural integrity of the microsd shield, connecting and displaying data to LCD Panel, and retrieving data from the GPS antenna. The final setup is shown below, provided by Professor Robert Winglee and Professor Michael McCarthy, as shown in Figure 12 below: Figure 12: Final Setup of Arduino with GPS Antenna The goal is to replicate the setup and create an ideal circuit environment to retrieve GPS data from a remote device. 2.1 Initial Setup Before proceeding, the Arduino and the breadboard must be mounted on a given base. For the following instructions, the base should be oriented so that the words Sparkfun Electronics is at the bottom. Please have the following items from the SparkFun Inventor s Kit at hand: SparkFun Electronics Base SparkFun Inventor s Kit Arduino Circuit breadboard Two screws Screw Driver (not included in the kit) 1. Peel off the plastic layer at the bottom of the breadboard and attach it to left hand side of the base. 2. Place the Arduino on the right hand side of the base, but make sure to orient the Arduino so that the mini-usb port is pointing up. This is crucial in installing the screws in the next step. 9

3. As shown in Figure 13 below, install the first screw at an opening located at the bottom left. This opening is located next to the A5 Analog In pin. Caution: Do not install the screw too tight. Doing so might damage the board. A slightly loose installation will make sure that the circuit board is not bent too much. Figure 13: Installation of the first screw 4. As shown in Figure 14 below, install the second screw at an opening located at the top right. This opening is located between the SCL Digital pin and the Reset button. Again, do not screw in too tight, or the board may break. Figure 14: Installation of the second screw The following Figure 15 is the completed version of the circuit with proper screws installed. We can now proceed with the next section. 10

Figure 15: Two screws installed on the Arduino circuit board 2.2 Increasing Structural Integrity of microsd Shield The PCB Socket Pin, as shown in Figure 16, is used to install the microsd shield on top of the Arduino board. However, the pins are slightly smaller than the circle opening of the microsd shield, and it creates a small gap where no electric current is able to flow through. This causes problems, because the lower electric current is not capable of powering the elements on the shield, including the microsd card. Attempting to access the microsd card, including writing and reading from the card, will result in failure. Figure 16: One of four of the provided PCB Socket Pin In order to fix this problem, the 3.3V socket must be soldered to ensure a constant and stable current flow. The problem is apparent where the power LED on the microsd shield does not turn on when connected to a power source via mini-usb port, as seen in Figure 17. However, as shown in Figure 18, connecting a wire at the 3.3V pin turns the power LED on. A solution to this problem is to solder a small wire to the 3.3V socket to connect the shield to the Arduino board. A short instruction is provided below: 1. Make sure to disconnect ALL power connected to the Arduino device. This will ensure that you do not accidentally short circuit the device, or damage the components. 2. Test the connectivity of the current by placing a small wire that has been bent 90 11

Figure 17: microsd Shield power LED Off Figure 18: microsd Shield power LED On degrees, as shown in Figure 19. This ensures that the wire is connected to the 3.3V socket. Figure 19: microsd Shield Wire Test for Constant Current Flow 3. Solder the wire to the board, as shown in Figure 20. 12

Figure 20: Soldering on a wire to the microsd Shield 4. In order to place the socket pin properly, bend the 3.3V pin slightly, approximately 30-40 degrees, to the right, as shown in Figure 21 Figure 21: Soldering on a wire to the microsd Shield 5. Install the bent PCB socket pin onto the board, and make sure the bent pin is not touching the microsd shield. As shown in Figure 22, power on the device to test see whether the power LED turns on. Figure 22: Installation of the bend PCB Socket Pin on a soldered wire 13

C M Y K If the power LED is not turned on, there are few possible solutions: test the other sockets by touching the wire between the pin and the socket and repeat the above process, or solder the entire pins to the board (which is not recommended for testing phase). Since the structural integrity is critical in any mission, this step can be repeated for other pins to ensure that the electric current flow is constant through the final mission. However, for the purpose of flexibility and testing, soldering one socket should suffice. 2.3 LCD Panel Installation and Code Modifications For the installation of the LCD Panel, please follow the guide number 15 on SIK Guide. The following items are needed from the kit: Potentiometer 16 Jumper Wires The following Figure 23 is the circuit outline, courtesy of SparkFun: CMY CY MY CM Page 78 Circuit 15: LCD 7-15V IOREF RESET 3.3V 5V GND GND VIN A0 A1 A2 A3 A4 A5 POWER ANALOG IN ISP LEARN. SHARE. HACK. 13 TX RX ON RESET SCL SDA AREF GND 13 12 ~11 ~10 ~9 8 DIGITAL (PWM~) 7 ~6 ~5 4 ~3 2 TX 1 RX 0 a b c d e f g h i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 a b c d e f g h i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 SFE03_LCD_circuit4_01.pdf 3 8/5/14 8:55 PM Figure 23: SIK Guide #15 Keep in mind that although the layout is reversed (breadboard on the left instead of on the right as shown in Figure 23, the circuit will work just the same if all the pins are connected correctly. For instance, in our setup, the breadboard will be on the left, leaving us to place the LCD on the a column, starting from pin number a1 through a16. In this case, instead of 14

connecting the jumper wire from 11 digital pin from the Arduino to the f25 on the breadboard as instructed, connect the jumper wire from 11 digital pin to e6 on the breadboard. After installing all the necessary components, the final installation should look similar to Figure 24: Figure 24: SIK Guide #15 To ensure that the microsd card is working with the component, connect the Arduino to the computer, download this code written by SparkFun, and run the code. This code ensures that the connected SD card is formatted correctly and readable. A proper output should look like the following Figure 25 on the Serial Monitor window: Figure 25: Proper SD Card Check Serial Monitor Window 15

2.4 LCD Panel Data Display Using the code #15 from SparkFun Inventor s Kit code sample package, we are able to display a string of text onto the LCD panel as shown in Figure 26. Figure 26: LCD Panel Code Initial Test Modifying the string at line 50 lcd.print("hello, world!"); into anything else will be displayed on the LCD panel, but a string longer than 16 characters it will not use the second row of the display. The string will instead be cut off. The reasoning is because of the commands written in void loop() that displays the run-time of the code. The run-time is the number of seconds after the code starts running. The following will provide a short guide to use both rows: 1. To get rid of the run-time, you either comment out the two lines of code or comment it out by typing // in front of the codes. 2. Now, back to line 50, you can change the string to anything under 16 characters, such as Univ. Washington. 3. Make a new line, which will be line 51. Here, type in the following code: lcd.setcursor(0, 1);. This will allow the user to set the cursor to the second row. 4. Make a new line, which will be line 52. Here, the user can write a new string. In this case, we will use lcd.print("ess Department");. You can download the finalized code here. Once everything is complete, run the code, and the result should look like Figure 27. 16

Figure 27: LCD Panel Code Final Test 17

3 GPS Data - Retrieving, Storing, and Displaying on LCD This section will provide a step-by-step guide to creating an Arduino setup that is capable of using a GPS Module (link) to retrieve, store, and display the GPS data. 3.1 Strengthening the Structural Integrity This specific type of Arduino has issues with powering the microsd shield. Since the four socket pins that are holding the two boards together have spaces to freely move around while mounted, there is not a sufficient amount of current passing through to provide consistent current to power the microsd shield. In order to resolve this issue, we must solder in the four socket pins to the microsd shield. These pins can be easily removed if needed using proper equipment. By using a soldering wire and a soldering machine, solder the four socket pins like so in Figure 28: Figure 28: Soldering the socket pins Once every socket pins are soldered in, the result should look like so: Figure 29: Finished product of soldered pins 18

Finally, install the microsd shield onto the Arduino. If everything went correctly, you should see a red power led turn on. This light should stay on. Figure 30: Mouting the soldered microsd shield onto the Arduino Since the microsd shield will not freely move around, the Arduino is able to receive a consistent power to operate the mounted microsd card. 3.2 Installing the GPS module Installing the GPS module onto the Arduino is quite simple. For the given module purchased from Amazon, we can use female-to-male jumper wire to connect the device. 1. Connect the pin from TXD to pin #6. 2. Connect the pin from RXD to pin #7. 3. Connect the pin from GND, preferably using a black wire to follow the convention, to the negative node on the breadboard. 4. Connect the pin from VCC, preferably using a red wire to follow the convention, to the positive node on the breadboard. After the setup is complete, it should look similar to Figure 31: Figure 31: Soldering the socket pins 19

3.3 Code Instructions The final code can be downloaded here: https://goo.gl/n3uych. It is highly recommended that you download the code to follow the rest of the instructions. Full disclosure: the sample codes and libraries originally provided by the authors of SparkFun and TinyGPS++ has been used to write the aforementioned code. Please refer to Arduino s official website for more information on the usage of SoftwareSerial.h and LiquidCrystal.h. Line 1-21 describes the general setup of the library and the constants. Be sure to download TinyGPS++ library and install it into a correct directory. Be sure to rename the library folder TinyGPSPlus-0.95 (version 0.95 in this case) to TinyGPSPlus. Typically, the correct directory to the library folder would be in: for macos: ~/Documents/Arduino/libraries/ for Windows: My Documents\Arduino\libraries\ Since the raw GPS data is usually incomprehensible, the use of TinyGPS++ library will allow for easier parsing of the data. The void setup() helps us set up the environment. There is a safety mechanism to let the user know that the microsd card is being detected or not. In the void loop() function, the longitude and latitude data is used to display onto the serial monitor, write on the microsd card, and display on the LCD panel. More information can be stored, including more decimal points of the longitude and latitude data, time stamp, altitude, and velocity: latitude: gps.location.lat() longitude: gps.location.lng() altitude: gps.altitude.meters() velocity: gps.speed.kmph() The function smartdelay is used to ensure that the GPS data is read and displayed on a proper interval. After running the device for a test-run, we get the following results: 20

Figure 32: Serial Monitor Results Figure 33: Serial Monitor Results 21

4 Full Integration of GPS System on Arduino This section will provide a step-by-step guide to creating a fully integrated GPS tracking system on an Arduino. 4.1 Soldering Together the Wires As can be sen in Figure 34, the previous GPS tracking device needed a breadboard to run the system. However, by soldering all of the components together onto the microsd shield of the Arduino device, we are able to create a more compact form factor of the GPS tracking device. Figure 34: Previous Work of GPS tracking system with breadboard First order of business involves soldering the 5V and the ground pin to the microsd shield. Since the microsd shield has extra pin holes for other components to be integrated, we will be using the pin holes to power the potentiometer, LCD display, and the GPS tracking device. Please take off all of the components, including the wires that are connected to the microsd shield, and wire the 5V power and the ground pin like the following Figure 35. Following the convention of red wire for power and black wire for ground will make the following process easier. Figure 35: Initial Wiring of 5V and GND pins 22

Wire the LCD display accordingly, as per instructed in SparkFun Inventor s Kit Guide, using female-to-male jumper wires. This comes in handy because the pins that are attached to the LCD display uses male pins, so using female-to-male jumper wires does not require extra soldering. Figure 36: Attachment of female-to-male jumper wires on LCD display Repeat the same process for the potentiometer and the GPS receiver, wiring the power components using female-to-male jumper wires. Place all of the male pins for 5V power in pin holes surrounding the red wire intended for 5V pin, and place all of the male pins for ground pin in pin holes surrounding the black wire intended for GND pin. Figure 37: Placement of power pins on microsd shield Flip the microsd shield, and make sure that all the pins are in place. Now, solder the pins together in their own group; 5V to 5V, and GND to GND. It is possible to push the pins so that the wire will be closer to the main wire that will provide 5V power supply and GND pin connection, as shown in Figure 38. 23

Figure 38: Soldered pins in their own group Once the wiring is done, it should look like the following Figure 39. Figure 39: Soldered components Lastly, place all of the pins in correct places. For the GPS receiver: 1. Connect the pin from TXD to pin #6. 2. Connect the pin from RXD to pin #7. For the LCD display, please make the following modifications like in the last instruction: 1. Move the pin from #12 to #10. 2. Move the pin from #11 to #9. 3. Move the pin from #4 to #8. The reasoning for such modification is to not to interfere with the microsd shield writing the data to the microsd card itself. 24

4.2 Finalized Product Once everything is connected, you can attach the microsd card and power the Arduino. If everything is working correctly, it should look like Figure 40. Figure 40: Finalized Product In order to test the GPS tracking system, you can download the code using the following link: https://goo.gl/n3uych. Please be sure to have TinyGPS++ library downloaded and and installed to a correct directory. Be sure to rename the library folder TinyGPSPlus-0.95 (version 0.95 in this case) to TinyGPSPlus. Typically, the correct directory to the library folder would be in: for macos: ~/Documents/Arduino/libraries/ for Windows: My Documents\Arduino\libraries\ 25