Cov txheej txheem:
- Kauj Ruam 1: Cov Ntsiab Lus Tseem Ceeb
- Kauj ruam 2: Pinout
- Kauj Ruam 3: Cov lus piav qhia raws tu qauv
- Kauj ruam 4: Arduino Code
- Kauj ruam 5: Calibration
Video: Thrustmaster Warthog Slew Sensor I2C Hloov Kho: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nov yog cov lus qhia ntxaws txog yuav ua li cas cuam tshuam nrog I2C raws tu qauv siv ntawm ThrustmasterWarthog lub qhov muag tua lub qhov muag. Qhov no tuaj yeem siv los hloov kho los ntawm cov txheej txheem tsis muaj txiaj ntsig zoo ministick mus rau qee yam zoo dua, Tab sis tseem siv tus qauv USB tswj hwm hauv chav kaw qhov rooj. Qhov no yog ua los ntawm thawj qhov kev tshaj tawm ntawm:
forums.eagle.ru/showthread.php?t=200198
Kev nkag siab yooj yim yog tias I2C raws tu qauv xav tias feem ntau ntawm cov hauv qab no, rau kev piav qhia zoo mus rau:
learn.sparkfun.com/tutorials/i2c
Txhua yam lus nug tshwj xeeb, xav nug kuv, thiab kuv yuav sim ntxiv rau qhov tsis yooj yim rau yav tom ntej nrog cov ntaub ntawv cuam tshuam ntau dua. Qhov no tsis yog txhais tau tias ua tiav, tab sis yuav tsum yog qhov pib zoo.
Qee qhov demo Arduino code tau muab tab sis thov tsuas yog siv qhov no raws li qhov qub 5V Arduino ib txwm tsis tuaj yeem siv tsis tau hloov kho.
Kauj Ruam 1: Cov Ntsiab Lus Tseem Ceeb
Tus ministick tua lub sensor uas los nrog Thrustmaster Wathog throttleis paub zoo tias yog ib qho ntawm qhov tsis muaj zog tshaj plaws nrog lwm yam khoom lag luam zoo. Muaj ntau qhov kev sim los ntawm tib neeg los hloov nws nrog qee yam zoo dua nyob rau xyoo, tab sis feem ntau tau tawm tsam qhov nyuaj ntawm kev cuam tshuam nrog cov txheej txheem digital I2C siv los ntawm nws.
Qhov ntsuas pom tseeb siv hauv Warthog qhov ntsuas cua yog N35P112 - EasyPoint, uas siv AS5013 cov cuab yeej ua kom pom tseeb IC ua los ntawm AMS.
Cov ntaub ntawv:
ams.com/eng/Products/Magnetic-Position-Sens…
Qhov txaus siab rau chav nyob ib zaug muaj raws li kev tawm tsam los ntawm Sparkfun:
www.sparkfun.com/products/retired/10835
Lub ntsuas ntsuas tau txhais rau kev siv hauv kev siv khoom xws li lub xov tooj ntawm tes, thiab yog qhov pheej yig heev. Hauv kuv qhov kev xav tsis lees paub hauv qee yam uas raug nqi ze li $ 500.
Kauj ruam 2: Pinout
Lub ntsuas hluav taws xob txuas rau PCB hauv sab tes xis lub tog raj kheej ntawm micro 5 tus pin txuas.
Pinout yog raws li hauv qab no:
-
Vcc +3.3VDC (
Kev tswj hwm ib cheeb tsam los ntawm 5V los ntawm tus tswj kab tawm ntawm lwm sab ntawm lub rooj tsavxwm, tsuas yog tom qab lub txuas, yuav tsum zoo rau puag ncig 20mA, tab sis kuv tsis muaj txoj hauv kev sim qhov no)
- I2C SDA
- I2C TSI
- GND
- Khawm 1 (Feem ntau siab, sab hauv 5V rub tawm)
Kauj Ruam 3: Cov lus piav qhia raws tu qauv
Lub sensor ua haujlwm ntawm I2C chaw nyob 0x41 - txhua qhov sau lossis nyeem cov lus txib pib nrog qhov chaw nyob no.
Thaum lub qhov hluav taws xob txuas rau lub khoos phis tawj, muaj cov lus hais ua ntej ntawm 250ms ntawm I2C npav mus rau qhov chaw 0x40, Kuv xav tias qhov no yog rau lub ntsuas qhov sib txawv lossis qee yam zoo sib xws, tab sis nws tsis cuam tshuam rau peb.
Cov ntaub ntawv xa mus rau I2C npav hauv ib txwm siv yog hauv qab no, qhov no yuav tsum tau simulated los ntawm peb lub microcontroller los tham nrog lub qhov muag.
Teeb tsa - Cov ntaub ntawv no xa ib zaug, ib ncig 500ms tom qab USB txuas nrog, txhawm rau teeb tsa lub cim xub thawj rau siv.
Tswv Sau: 0x0F (Tswj Sau Npe 1)
Cov ntaub ntawv: 0x02 0b0000 0010 (pib kho dua tshiab)
Tswv Sau: 0x0F (Tswj Sau Npe 1)
Master Nyeem: 0xF1 0b1111 0001 (rov pib dua rau 11110000, lsb 1 qhia tau tias cov ntaub ntawv raug siv tau npaj los nyeem.
Tswv Sau: 0x2E (Tswj Sau Npe 2)
Cov ntaub ntawv: 0x 86 (qhov no tsuas yog teeb tsa kev taw qhia ntawm cov hlau nplaum hauv thawj qhov ntsuas)
Tswv Sau: 0x0F (Tswj Sau Npe 1)
Cov ntaub ntawv: 0x 80 0b1000 0000 (Teeb lub cuab yeej rau hom tsis ua haujlwm (ntsuas nws tus kheej, tsis nyob hauv lub zog qis))
Loop: Qhov no tau rov ua dua ntawm ib puag ncig 100Hz kom tau txais cov ntaub ntawv sensor.
Tswv Sau: 0x10 (X sau npe)
Master Nyeem: (qhev xa X cov ntaub ntawv, 2 qhov ua tiav 8 tus nqi me ntsis)
Tswv Sau: 0x11 (Y sau npe)
Master Nyeem: (qhev xa Y cov ntaub ntawv, 2 qhov ua tiav 8 tus nqi me ntsis)
Ib feem tseem ceeb ntawm cov txheej txheem pov tseg los ntawm kev ntsuas tus lej:
Teeb Sau rau [0x82] + ACK
0x0F + ACK
0x02 + ACK
Teeb Sau rau [0x82] + ACK
0x0F + ACK
Teeb Nyeem rau [0x83] + ACK
0xF1 + NCO
Teeb Sau rau [0x82] + ACK
0x2E + ACK
0x86 + UA
Teeb Sau rau [0x82] + ACK
0x0F + ACK
0x80 + UA
Teeb Sau rau [0x82] + ACK
0x10 + ACK
Teeb Nyeem rau [0x83] + ACK 0xFC + NAK
Teeb Sau rau [0x82] + ACK 0x11 + ACK
Teeb Nyeem rau [0x83] + ACK 0xFF + NAK
Kauj ruam 4: Arduino Code
Cov kab ntawv txuas nrog Arduino tuaj yeem siv los ntsuas lub ntsuas.
Thov nco tseg: Feem ntau Arduino cov laug cam khiav ntawm 5V, qhov no xav tau 3.3V sib xws lossis hloov kho lub rooj tsavxwm kom ua haujlwm kom tsis txhob puas rau koj lub joystick.
Kauj ruam 5: Calibration
Thaum koj lub sensor tshiab tau teeb tsa, lub qhov muag yuav xav tau ntsuas.
Txhawm rau ntsuas koj lub raj cua koj yuav lub twj tso kua mis ntsuas qhov ntsuas qhov ntsuas. Qhov no tuaj yeem rub tawm los ntawm ntau qhov chaw xws li:
forums.eagle.ru/showthread.php?t=65901
Tsis txhob siv qhov ntsuas qhov rai.
Txhawm rau kom tau txais txiaj ntsig zoo tshaj plaws ntawm qhov kev hloov pauv koj yuav tsum hloov qee qhov txiaj ntsig hauv koj li kev teeb tsa cov ntawv teeb tsa.
Hloov qhov:
Standard_DZ_SX = 0x10;
Standard_DZ_SY = 0x10;
Kab hauv A10_calibration.txt rau:
Standard_DZ_SX = 0x01;
Standard_DZ_SY = 0x01;
Qhov no yuav hloov mus rau thaj tsam tuag ntawm kev tua los ntawm 10 txog 1, thiab muab kev tswj kom zoo dua qub. Koj tuaj yeem ua si nrog qhov teeb tsa no thiab tom qab ntawv rov suav dua thiab pom yam koj nyiam tshaj plaws.
Pom zoo:
Hloov Hloov Dichoptic Hloov Kho ntawm Stereoscopic Transmission [ATmega328P+HEF4053B VGA Superimposer]: 7 Cov Kauj Ruam
Lwm Qhov Tsis Txaus Dichoptic Hloov Kho ntawm Stereoscopic Transmission [ATmega328P+HEF4053B VGA Superimposer]: Tom qab kuv sim nrog cov iav siv lead ua kua siv los ua qhov muag (ntawm no thiab nyob ntawd), Kuv txiav txim siab tsim qee yam me ntsis ntxiv thiab tseem tsis yuam tus neeg siv hnav PCB ntawm nws lub hauv pliaj (tib neeg qee zaum tuaj yeem coj tus yam ntxwv
DIY Hloov pauv Hloov Lub Rooj Hloov Kho Lub Hwj Huam "Minghe D3806" 0-38V 0-6A: 21 Cov Kauj Ruam (nrog Duab)
DIY Hloov Pauv Hloov Pauv Hloov Kho Lub Hwj Huam "Minghe D3806" 0-38V 0-6A: Ib txoj hauv kev yooj yim tshaj plaws los tsim lub Rooj Tog Zaum Lub Hwj Huam yooj yim yog siv Buck-Boost Converter. Hauv Cov Lus Qhia thiab Yeeb Yaj Kiab Kuv pib tawm nrog LTC3780. Tab sis tom qab kuaj kuv pom LM338 nws muaj nws puas lawm. Luckily kuv muaj ob peb qhov sib txawv
DIY Logitech Ntshiab Fi Nyob Qhov Twg 2 Rov Tsim Kho & Mini Bluetooth Hais Lus Hloov Kho Hloov Tshiab: 14 Cov Kauj Ruam (nrog Duab)
DIY Logitech Ntshiab Fi Nyob Qhov Twg 2 Rov Tsim Kho & Mini Bluetooth Hais Lus Hloov Kho Hloov Kho: Ib qho ntawm kuv nyiam tshaj plaws qhov no los ua, tab tom noj qee yam kuv pom pheej yig ntawm Kev Ua Siab Zoo, Yardsale, lossis txawm tias cov npe me me thiab ua qee yam zoo dua ntawm nws. Ntawm no kuv pom qhov qub Ipod chaw nres tsheb Logitech Pure-Fi Anywhere 2 thiab txiav txim siab muab nws tshiab
Mini Suab Txuas Txuas Hloov Kho Hloov Kho: 11 Kauj Ruam
Mini Suab Txuas Txuas Hloov Kho Kho: Hloov sai thiab qias neeg ntawm lub suab me me txuas. Cov khoom no tuag ntxov ua ntej ntawm lub mloog pob ntseg thiab lwm qhov chaw uas lawv tshwm sim. Cov kab hluav taws xob ntawm daim kab xev no tau tuag hauv txoj kev pom tseeb los ntawm tus txuas. Hloov cov txuas txuas exis
Kev Sib Hloov Hloov Kho Hloov Kho rau Qub Guitar Amps: 11 Cov Kauj Ruam (nrog Duab)
Kev Sib Hloov Hloov Kho Hloov Kho rau Qub Guitar Amps: Txuag koj cov tawv nqaij! Txhim kho qhov kev txaus ntshai qub amp nrog kev hloov pauv cais. Muaj ob peb lub suab nrov qub (thiab xov tooj cua) rov qab nyob rau hauv ib hnub rub lub zog los ntawm kev kho tsev neeg ncaj qha " lub ntsiab " xov hlau Qhov no yog kev xyaum tsis nyab xeeb. Feem ntau