Cov txheej txheem:

Digital Compass Siv Arduino thiab HMC5883L Magnetometer: 6 Kauj Ruam
Digital Compass Siv Arduino thiab HMC5883L Magnetometer: 6 Kauj Ruam

Video: Digital Compass Siv Arduino thiab HMC5883L Magnetometer: 6 Kauj Ruam

Video: Digital Compass Siv Arduino thiab HMC5883L Magnetometer: 6 Kauj Ruam
Video: Компас на ардуино своими руками / DIY compass on arduino 2024, Hlis ntuj nqeg
Anonim
Digital Compass Siv Arduino thiab HMC5883L Magnetometer
Digital Compass Siv Arduino thiab HMC5883L Magnetometer

Nyob zoo cov neeg, Qhov ntsuas no tuaj yeem qhia txog thaj tsam North, South, Sab Hnub Tuaj, thiab Sab Hnub Poob, peb tib neeg kuj tseem tuaj yeem siv nws thaum lub sijhawm xav tau. Yog li Hauv kab lus no cia peb sim nkag siab li cas Magnetometer sensor ua haujlwm thiab yuav ua li cas cuam tshuam nrog microcontroller zoo li Arduino. Ntawm no peb yuav tsim lub Digital Compass txias uas yuav pab peb nrhiav cov lus qhia los ntawm ci ci LED taw qhia rau sab Qaum Teb.

Cov Digital Compass no tau ua tiav zoo ntawm PCB los ntawm LIONCIRCUITS. Sim lawv tawm, hais mav. Lawv cov PCB zoo yog qhov zoo tiag tiag.

Kauj Ruam 1: Yuav Tsum Kho Vajtse

Cov hauv qab no tau siv:

  • Arduino Pro mini ua
  • HMC5883L Magnetometer sensor
  • LED teeb - 8Nos
  • 470Ohm Resistor - 8Nos
  • Chim Jack
  • Ib lub chaw tsim khoom PCB uas ntseeg tau zoo li LionCircuits
  • FTDI Programmer rau mini
  • PC/Laptop

Kauj Ruam 2: Dab tsi yog Magnetometer thiab Nws Ua Haujlwm Li Cas?

Ua ntej peb dhia mus rau hauv Circuit Court, cia peb nkag siab me ntsis txog lub tshuab nqus hlau thiab seb lawv ua haujlwm li cas. Raws li lub npe qhia tias lub sij hawm Magneto tsis hais txog qhov kev hloov pauv vwm hauv kev xav tsis thoob uas tuaj yeem tswj hwm hlau los ntawm kev ua si piano hauv huab cua. Ohh! Tab sis kuv nyiam tus txiv neej ntawd nws txias.

Lub tshuab ntsuas hluav taws xob yog ib qho khoom siv uas tuaj yeem paub txog cov hlau nplaum sib nqus ntawm lub ntiaj teb thiab taw qhia cov lus qhia raws li qhov ntawd. Peb txhua tus paub tias Lub Ntiaj Teb yog ib qho loj ntawm cov hlau nplaum kheej kheej nrog Sab Qaum Teb thiab Sab Qaum Teb. Thiab muaj qhov chaw sib nqus vim nws. Tus Magnetometer hnov qhov sib nqus no thiab raws qhov kev taw qhia ntawm qhov chaw sib nqus nws tuaj yeem txheeb xyuas cov lus qhia uas peb tab tom ntsib.

Kauj Ruam 3: Yuav ua li cas HMC5883L Sensor Module Ua Haujlwm?

HMC5883L yog lub tshuab ntsuas hluav taws xob ua haujlwm zoo ib yam. Nws muaj HMC5883L IC ntawm nws uas yog los ntawm Honeywell. IC no muaj 3 cov khoom sib nqus sib nqus sab hauv uas tau teeb tsa hauv cov kab x, y, thiab z. Tus nqi tam sim no ntws los ntawm cov ntaub ntawv no nkag siab rau lub ntiaj teb kev sib nqus. Yog li los ntawm kev ntsuas qhov kev hloov pauv tam sim no ntws los ntawm cov ntaub ntawv no, peb tuaj yeem tshawb pom qhov kev hloov pauv hauv ntiaj teb lub ntiaj teb sib nqus. Thaum qhov kev hloov pauv yog qhov chaw sib nqus tau nqus cov txiaj ntsig tuaj yeem xa mus rau ib qho kev tswj xyuas zoo ib yam li microcontroller lossis processor los ntawm I2C raws tu qauv.

Kauj Ruam 4: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Lub Circuit Court rau Arduino raws Digital Compass yog qhov yooj yim zoo nkauj, peb tsuas yog yuav tsum cuam tshuam nrog HMC5883L sensor nrog Arduino thiab txuas 8 LEDs rau GPIO pins ntawm Arduino Pro mini. Daim duab hluav taws xob ua tiav tau qhia hauv daim duab saum toj no.

Sensor module muaj 5 tus pin tawm ntawm qhov DRDY (Cov Ntaub Ntawv Npaj) tsis tau siv hauv peb qhov haujlwm txij li peb tau ua haujlwm lub sensor nyob rau hauv hom txuas mus. Vcc thiab tus pin hauv av tau siv los txhawb lub Module nrog 5V los ntawm Arduino board. SCL thiab SDA yog I2C cov tsheb npav sib txuas uas txuas nrog rau A4 thiab A5 I2C tus pin ntawm Arduino Pro mini feem. Txij li tus qauv nws tus kheej muaj rub siab tiv thaiv kab, tsis tas yuav ntxiv lawv sab nraud.

Txhawm rau qhia qhov kev taw qhia peb tau siv 8 LEDs txhua qhov uas txuas nrog GPIO pins ntawm Arduino los ntawm kev txwv tam sim no tiv thaiv ntawm 470 Ohms. Qhov ua tiav Circuit Court yog siv lub roj teeb 9V los ntawm lub thoob Jack. Qhov 9V no tau muab ncaj qha rau Vin tus pin ntawm Arduino qhov nws tau tswj hwm rau 5V siv tus tswj hwm ntawm on-board ntawm Arduino. Qhov 5V no yog tom qab siv los ua lub zog ntsuas thiab Arduino ib yam.

Kauj Ruam 5: Kev Txiav Txim Siab rau PCB Tsim

1. Kab dav tuab yog yam tsawg 8 mil.

2. Qhov sib txawv ntawm lub dav hlau tooj liab thiab tooj liab yog qhov tsawg kawg yog 8 lab.

3. Qhov sib txawv nruab nrab ntawm txoj kab rau kab laum yog yam tsawg kawg ntawm 8 mil.

4. Qhov me me qhov loj me yog 0.4 hli.

5. Txhua txoj kab uas muaj txoj hauv kev tam sim no xav tau cov kab tuab.

Kauj Ruam 6: Kev tsim khoom

Kev tsim
Kev tsim
Kev tsim
Kev tsim

Koj tuaj yeem kos PCB Schematic nrog ib qho software raws li koj qhov yooj yim.

Ntawm no, Kuv muaj kuv tus kheej tsim thiab Gerber cov ntawv txuas nrog. Tom qab koj tsim cov ntawv Gerber koj tuaj yeem xa nws mus rau txhua lub chaw tsim khoom PCB.

Kev xav ntawm tus kheej: Tshaj tawm rau LIONCIRCUITS thiab koj tuaj yeem tso xaj online. Nws yog qhov yooj yim heev rau upload thiab xaj ntawm lawv lub tshuab siv tshuab.

Pom zoo: