336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


의뢰를 원하시는 분은 링크를 눌러주세요

출처 :: Arduino Workshop - John Boxall

(65개 Projects)

Project #44: Creating a Simple GPS Receiver



GPS = Global Positioning System is satellite-based navigation system.

사용할 모듈 : EM406 GPS Receiver.

To use this receiver, 

you’ll need the GPS shield kit from SparkFun (part number RTL-10709) shown in Figure 13-2. This part includes the receiver, a matching Arduino shield, and the connection cable.


GPS Shield (링크)

 GPSShield-v16.zip    (PCB자료 약 10만원짜리)

EM-406 GPS Module (현재 EM-506) (링크)

EM506_um.pdf





 Pin Numbers

 Name

 Type

 Description

 1,5

 GND 

 P

Ground 

 2

 Vin

 P

 Main power supply(4.5V ~ 6.5V)

 3

 RXD

 I

 Receive channel

 4

 TXD

 O

 Transmits channel

 6

 Directive

 O

 The Pin indicates the GPS States.

 (LED OFF : Receiver switch off)

 (LED ON : Signal searching)

 (LED Flashing : Position Fixed)








Testing the GPS Shield After you buy the GPS kit, 

it’s a good idea to make sure that it’s working and that you can receive GPS signals.

GPS receivers require a line of sight to the sky

but their signals can pass through windows.

시선은 하늘로 but 신호는 창문을 관통해 지나간다.

It’s usually best to perform this test outdoors

but it might work just fine through an unobstructed window or skylight.

야외에서 수행하는게 최선이다.

but an unobstructed(=방해없는)창 or skylight에서 작업하는것도 좋다.

To test reception, 

you’ll set up the shield and run a basic sketch that displays the raw received data.

수신 테스트를 위해

넌 set up해라. the shield를 and 돌려라. a basic sketch를 that 디스플레이하는 the raw한 받은 데이터를.

To perform the test, first connect your GPS receiver via the cable to the shield, 

and then attach this assembly to your Arduino.

수행하기위해 the 테스트를, 우선 연결해라. 네 GPS 수신기를 via the 케이블을 통해 to the shield로,

and then 부착해라. 이 조합을 to 네 Arduino로.

Notice the small switch on the GPS shield, which is shown in Figure 13-4.

기억해라. the 작은 스위치를


When it’s time to upload and run sketches on your GPS shield, 

move the switch to the DLINE position, 

and then change it to UART and be sure to turn on the power switch for the receiver. 

Enter and upload the sketch in Listing 13-1

When 이게 to 업로드할타임에 and 돌릴타임에 sketches를 on 너의 GPS shield에,

이동시켜라. the switch를 to the DLINE 위치에,

and then 바꿔라. 이걸 to UART로 and be 확인해라. to 켜기위해 the 파워 스위치를 for the 리시버를위해.

Enter and 업로드해라. the sketch를


// Listing 13-1 

void setup() 

{

Serial.begin(4800);     //To match the data speed of the GPS receiver (4800)

}

void loop() 

 byte a;                        //GPS데이터를 담기위해서 byte형 변수를 지정

if ( Serial.available() > 0 )     //This sketch listens to the serial port at Here

a = Serial.read();             // get the byte of data from the GPS 

Serial.write(a);             //when a byte of data is received from the GPS module, 

   //it is sent to the Serial Monitor at Here.

}


Once you’ve uploaded the sketch, move the data switch back to UART.

(sketch 업로드할때:DLINE // 통신할때:UART)

Now check the LED on the GPS receiver that tells us its status.

If the LED is lit, the GPS is trying to lock onto the satellite signals.

After about 30 seconds the LED should start blinking, which indicates that it is receiving data from the satellite.

After the LED starts blinking, open the Serial Monitor window in the IDE and set the data speed to 4,800 baud. You should see a constant stream of data similar to the output shown in Figure 13-5.






Le't create a simple GPS receiver.

But first, because you'll usually use your GPS outdoors-and to




#include <TinyGPS.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );

// Create an instance of the TinyGPS object

TinyGPS gps;

void getgps(TinyGPS &gps);

void setup()

{

Serial.begin(4800);

lcd.begin(16, 2);

}

void getgps(TinyGPS &gps)

// The getgps function will display the required data on the LCD

{

float latitude, longitude;

//decode and display position data

gps.f_get_position(&latitude, &longitude);

lcd.setCursor(0,0);

lcd.print("Lat:");

lcd.print(latitude,5);

lcd.print(" ");

lcd.setCursor(0,1);

lcd.print("Long:");

lcd.print(longitude,5);

lcd.print(" ");

delay(3000); // wait for 3 seconds

lcd.clear();

}

void loop()

{

byte a;

if ( Serial.available() > 0 ) // if there is data coming into the serial line

{

a = Serial.read(); // get the byte of data

if(gps.encode(a)) // if there is valid GPS data...

{

getgps(gps); // grab the data and display it on the LCD

}

}

}





▼GY-NE06MV2 기반 Test

https://www.youtube.com/watch?v=09sNLmoJ3HI

https://www.youtube.com/watch?v=YvGp5SXuQb0

https://circuitdigest.com/microcontroller-projects/arduino-vehicle-tracker-on-google-maps-using-esp8266


▼NEO-6M 모듈 기본정보들

https://create.arduino.cc/projecthub/ruchir1674/how-to-interface-gps-module-neo-6m-with-arduino-8f90ad

>>

Overview of NEO-6M

The heart of the module is NEO-6M GPS chip from U-Blox.

(U-Blox는 칩셋 브렌드명이다.)

It can track up to 22 satellites on 50 channels

and achieves the industry's highest level of sensitivity

>>

Position Fix LED Indicator

There is an LED on the NEO-6M GPS Module

which indicates the status of Position Fix.

It'll blink at various rates depending on what state it is in

깜빡일것이다. at 다양할 률로 따라서 on 뭔 상태에 그게 속해있는지에...


No Blinking ==> means it is searching for satellites

Blink Every 1s ==> means Position Fix is found.




▼태국인이 정리한 코드(별도의 Library는 필요없음)

https://arduinowolrd.blogspot.com/2018/01/show-gps-to-i2c-lcd.html?showComment=1605351004699#c5875775523057287138






(▶LINK)


Vehicle Tracking System becomes very important nowadays, especially in case of stolen vehicles. 

If you have GPS system installed in your vehicle, you can track your Vehicle Location, and it helps police to track the Stolen Vehicles. 

Previously we have built similar project in which Location coordinates of Vehicle are sent on Cell Phone, check here ‘Arduino based Vehicle Tracker using GPS and GSM.

(in which : 그것의....로 쭉 해석하면 됨)




Here we are building more advanced version of Vehicle Tracking System in which you can Track your Vehicle on Google Maps

여기서 우린 구축중이다. more 앞선 버젼을 of 차량추적시스템의

in which 네가 can Track할수있는 차량을 on 구글맴상에서.

In this project, we will send the location coordinates to the Local Server and you just need to open a ‘webpage’ on your computer or mobile, where you will find a Link to Google Maps with your Vehicles Location Coordinates. 

우린 will 전송할것이다. the 위치좌표를 to the Local Server에

and you just need to 열어야한다. webpage를

where 네가 찾을수있는 a Link를 to Google Mpas로가는

with 네 차량 위치좌표와 함께하는.

When you click on that link, it takes you on Google Maps, showing your vehicles location. In this Vehicle Tracking System using Google Maps, GPS Module is used for getting the Location Coordinates, Wi-Fi module to keep sending data to computer or mobile over Wi-Fi and Arduino is used to make GPS and Wi-Fi talk to each other.

when네가 클릭할때 on that 링크를, it takes you on 구글맴상으로 데려갈것이다.

보여주는 네 차량위치를.

In this 차량추적시스템 사용하는 구글맵s 에서,

GPS모듈은 사용된다 for 얻는데 the 위치좌표를,

Wi-Fi모듈은 to keep sending하는데 데이타를 to 디바이스들에 over Wifi를 건너서

and Arduino는 사용된다. to 시키는데 GPS & Wifi가 소통하도록 to each other 서로간에.




>>

How it works = 사용법

To track the vehicle, we need to find the Coordinates of Vehicle by using GPS module. GPS module communicates continuously with the satellite for getting coordinates. Then we need to send these coordinates from GPS to our Arduino by using UART. And then Arduino extract the required data from received data by GPS.

GPS(Tx) >> Arduino(Rx) 단방향 통신


여기서 쓰인 Wifi Module 명 (▶LINK) (▶LINK)


Before this, Arduino sends command to Wi-Fi Module ESP8266 for configuring & connecting to the router and getting the IP address. 

Before this, 아두이노는 보낸다. 명령어를 to ESP8266에 for 구성하기위해 & 연결하기위해

to the 라우터에 and 얻기위해 the IP address를.

After it Arduino initialize GPS for getting coordinates and the LCD shows a ‘Page Refresh message’. 

That means, user needs to refresh webpage.

After it, 아두이노는 초기화시킨다. GPS를 for 얻기위해 좌표들을 and the LCD는 보여준다. a Page Refresh message를.

When user refreshes the webpage Arduino gets the GPS coordinates and sends the same to webpage (local server) over Wi-Fi, with some additional information and a Google maps link in it. 

When 유저가 ReFresh할때 the webpage를, Arduino는 얻는다. the GPS좌표들을.

&보낸다. the 같은걸 to webpage에

with추가적인 정보들과 구글맵과함께.

Now by clicking this link user redirects to Google Maps with the coordinate and then he/she will get the Vehicle Current Location at the Red spot on the Google Maps. The whole process is properly shown in the Video at the end.



>>

회로설명

GPS TX >> Arduino 10번핀(RX) 단방향

ESP8266 Vcc & GND are directly connected to 3V3 & GND of Arduino.

(2420원 --- 동신전자 기준)


USB adapter에 연결후 SerialMonitor를 통해서 아래그림처럼 AT Command를 입력할 수 있다.

(단, default인 115200 BaudRate로 설정해줘야한다.)



AT+CWMODE?

::Wifi모드가 현재 뭘로 설정되있는지 확인할 수 있습니다.

AT+CWMODE=3

::Wifi모드를 1,2,3 중 선택할 수 있습니다.

::1(=Station), 2(=AP), 3(=Station+AP)




Wifi 이용가능한 List를 보고싶다면 AT+CWLAP를 치면 됩니다.

AT+CWJAP="U+Net???","PassWord"

요런식으로 적어줘야합니다.

초록색 부분이 SSID에 해당합니다.

PassWord가 없다면

AT+CWJAP="U+Net???",""

▲이렇게 PW부분을 입력하지않고 따옴표2개로만 쓰면 됩니다.

when you got stuck in Failure to connect to SSID with spaces in them,

with an SSID of "Volleyball Girls". I connects perfectly when I change the SSID to "Volleyball_Girls". (Changing the space to an underscore)

Underscore를 쓰는게 추천방식인데 Test해보니 그닥효과는 없다.
SSID with No Space is better to hijacking the Wifi.

CWLAP : ( 뒤에 바로 따로오는 숫자들
0,3,4,4,4 등등은 protection level 을 의미한다.








현재 연결된 Wifi 확인하고 싶을때

AT+CWJAP?


현재 연결된 Wifi를 DisConnected 시키고 싶을때

AT+CWQAP


할당받은 IP Address 확인

AT+CIFSR






AT Commands Overview in PDF file (▶LINK)     Web (▶LINK)

For changing the baudrate permanently you can use this command:

AT+ UART_DEF=<baudrate>,<databits>,<stopbits>,<parity>,<flow control>

>>> AT+UART_DEF=9600,8,1,0,0 (이걸 쓰는걸 권장합니다.)

For changing the BaudRate temporarily you can use this as below:

>>> AT+CIOBAUD=9600    (테스트 해보니 Error가 발생)





Putty를 이용한 방법

2:33

COM포트와 Serial통신으로 세팅

3:33

AT+GMR    :: 버젼 체크

AT+CIOBAUD?     :: BaudRate체크 (안뜰때도 있음)

AT+CWMODE?       ::모드체크 (3으로 설정해주는게 보편적이다. )

4:44

AT+CWLAP    :: Lists all APs nearby ESP module

List에 보면 ( 바로뒤에 붙는 숫자들 : protection level is displayed

3 is possible protected

0 is Not protected (Open Wifi)

Once you joined AP, it will remember even if Power is Off (롬에 저장된다.)

7:00

AT+CIPMUX=1        :: This will set the module to multiple connections unless you do this, you cannot start a server now

7:14

AT+CIPSERVER=1,80

AT+CIFSR

여기서 STAIT가 0000 이 아닌 IP주소가 떠야한다.





ESP8266 교육시키기(▶LINK) (▶LINk)

First of all we need to connect our Wi-Fi module to Wi-Fi router for network connectivity. 

Then we will Configure the local server, Send the data to Web and finally Close the connection. 

This process and commands have been explained in below steps:

1. First we need to test the Wi-Fi module by sending AT command, it will revert back a response containing OK.

2. After this, we need to select mode using command AT+CWMODE=mode_id , we have used Mode id =3. Mode ids:

1 = Station mode (client)

             2 = AP mode (host)

             3 = AP + Station mode (Yes, ESP8266 has a dual mode!)

3. Now we need to disconnect our Wi-Fi module from the previously connected Wi-Fi network, by using the command AT+CWQAP, as ESP8266 is default auto connected with any previously available Wi-Fi network

4. After that, user can Reset the module with AT+RST command. This step is optional.

5. Now we need to connect ESP8266 to Wi-Fi router using given command

             AT+CWJAP=”wifi_username”,”wifi_password”

6. Now get IP Address by using given command:

            AT+CIFSR

            It will return an IP Address.

7. Now enable the multiplex mode by using AT+CIPMUX=1 (1 for multiple connection and 0 for single connection)

8. Now configure ESP8266 as server by using AT+CIPSERVER=1,port_no (port may be 80). Now your Wi-Fi is ready. Here ‘1’ is used to create the server and ‘0’ to delete the server.

9. Now by using given command user can send data to local created server:

           AT+CIPSEND =id, length of data

            Id = ID no. of transmit connection

           Length = Max length of data is 2 kb

10. After sending ID and Length to the server, we need to send data like : Serial.println(“circuitdigest@gmail.com”);

11. After sending data we need close the connection by given command:

          AT+CIPCLOSE=0

          Now data has been transmitted to local server.

12. Now type IP Address in Address Bar in web browser and hit enter. Now user can see transmitted data on webpage.

Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백