Cov txheej txheem:

Yuav Siv NMEA-0183 Nrog Raspberry Pi: 6 Cov Kauj Ruam
Yuav Siv NMEA-0183 Nrog Raspberry Pi: 6 Cov Kauj Ruam

Video: Yuav Siv NMEA-0183 Nrog Raspberry Pi: 6 Cov Kauj Ruam

Video: Yuav Siv NMEA-0183 Nrog Raspberry Pi: 6 Cov Kauj Ruam
Video: 051 Tuabneeg Yuav Siv Tug Nplaig 2024, Hlis ntuj nqeg
Anonim
Yuav Siv NMEA-0183 Nrog Raspberry Pi li cas
Yuav Siv NMEA-0183 Nrog Raspberry Pi li cas

NMEA-0183 Yog tus qauv hluav taws xob txhawm rau txuas GPS, SONAR, lub ntsuas pa, lub ntsuas ntsuas pib thiab lwm yam hauv nkoj thiab nkoj. Hauv qhov sib txawv rau NMEA 2000 tus qauv tshiab (raws li CAN) NMEA 0183 yog ua raws EIA RS422 (qee qhov qub thiab/lossis cov kab ke yooj yim siv RS-232, lossis ib leeg hlau).

Kuv xav qhia koj yuav ua li cas txuas Raspberry Pi 3B rau ib qho khoom siv NMEA-0183 nrog cov zis sib txawv. Txawm hais tias tus qauv hu rau cais tawm tswv yim thiab tso tawm nws muaj txiaj ntsig los siv RS422 / RS485 HAT nrog kev sib cais sib cais.

Kauj ruam 1: Cov cuab yeej thiab Software

Cov cuab yeej thiab Software
Cov cuab yeej thiab Software

Cov ntaub ntawv:

Raspberry Pi

RS422 / RS485 HAS

ib qho khoom siv NMEA0183

Software:

Raspbian Stretch

NMEA simulators

Kauj Ruam 2: Kev Sib Txuas rau NMEA 0183

Kev sib txuas rau NMEA 0183
Kev sib txuas rau NMEA 0183

Hauv daim duab saum toj no koj tuaj yeem pom cov cuab yeej NMEA raug nrog cov txiaj ntsig sib txawv. Lub davhlau ya nyob twg yog NMEA OUT+ thiab NMEA OUT- lossis TX+ lossis TX-. NMEA IN+ thiab NMEA IN-xov hlau yog nyob ntawm yeem.

yog tias koj muaj ib txoj kab xa xov los ntawm koj lub cuab yeej (feem ntau yuav sau tias TX lossis NMEA OUT lossis qee yam zoo li ntawd), tom qab ntawd koj lub cuab yeej siv RS-232 raws tu qauv. Hauv qhov no koj yuav xav tau qhov hloov pauv RS232 yooj yim.

Kauj Ruam 3: DIP Hloov Chaw

DIP Hloov Chaw
DIP Hloov Chaw

Kauj Ruam 4: Pub Dawb Ua Ntej Kab thiab Pab UART ntawm Raspberry Pi

Txoj hauv kev yooj yim tshaj plaws yog siv cov cuab yeej raspi-teeb tsa txhawm rau hloov UART mus rau GPIO14/15 pins.take tus duab Raspbian tshiab

sudo raspi-teeb tsa

tau txais '5 Kev Xaiv Ua Haujlwm'

tau txais 'P6 Serial'

'Koj puas xav kom lub plhaub nkag mus kom nkag mus tau ntau dua?' TSIS YOG

'Koj puas xav kom lub khoos phis tawj serial chaw nres nkoj kom qhib?' YOG

Ua tiav raspi-config

reboot Raspberry Pi

Tam sim no koj tuaj yeem nkag mus rau UART ntawm /dev /serial0

Kauj ruam 5: Firmware

Koj tuaj yeem pom ntau qhov sib txawv NMEA-0183 software Python sib tsoo rau Raspberry Pi Kev daws yooj yim heev yog NMEA lub tsev qiv ntawv los ntawm Nick Sweeting:

github.com/nsweeting/NMEA0183

Thov nco tseg: pyserial xav tau rau kev sib txuas txuas:

github.com/nsweeting/NMEA0183

Kauj Ruam 6: Xeem Khiav

Kuaj Khiav
Kuaj Khiav

Txoj haujlwm Python yuav txiav txim siab cov txheej txheem NMEA tuaj. Yog tias koj tsis muaj NMEA lub cuab yeej nyob hauv tsev, koj tseem tuaj yeem siv Simulator ntawm koj lub PC thiab USB yooj yim rau RS485 adapter hloov chaw ntawm lub cuab yeej tiag tiag.

Pom zoo: