Cov txheej txheem:

Kab Follower Neeg Hlau Nrog PIC18F: 7 Kauj Ruam
Kab Follower Neeg Hlau Nrog PIC18F: 7 Kauj Ruam

Video: Kab Follower Neeg Hlau Nrog PIC18F: 7 Kauj Ruam

Video: Kab Follower Neeg Hlau Nrog PIC18F: 7 Kauj Ruam
Video: 04/18/2022 Kab mob kis XE | Neeg sib tua 4 zaug nyob Meskas | Kab mob kis tsiaj | Ncig Thaib teb 2024, Kaum ib hlis
Anonim
Image
Image
Cov Tsav Tsheb thiab Roj Teeb
Cov Tsav Tsheb thiab Roj Teeb

RACE LINK

Kuv tau ua cov kab hauv qab no cov neeg hlau rau kuv chav kawm microcontroller hauv tsev kawm qib siab. Yog li kuv tau ua cov kab ntawv hauv qab no cov neeg hlau nrog siv Pic 18f2520 thiab siv tus sau ntawm PIC CCS. Muaj ntau txoj kab hauv qab txoj haujlwm hauv is taws nem nrog ardunio lossis pic tab sis ntau txoj haujlwm zoo sib xws. Vim yog qhov laj thawj no, kuv yuav piav qhia tias kuv xaiv cov khoom zoo li cas thiab vim li cas thiaj xaiv thiab kuv yuav muab qee cov lus qhia rau cov neeg ua haujlwm kab ua tau zoo.

Kuv tsim daim npav sensor nrog siv CNY70 thiab kuv teeb tsa lub Circuit Court ntawm lub khob cij. Yog tias koj xav tau koj tuaj yeem tsim PCB monolithic rau txhua qhov khoom tab sis nws yuav muaj teeb meem yog tias koj tsis muaj kev paub txaus txog yuav ua li cas PCB.

Kauj Ruam 1: Xaiv PIC Microcontroller

Qee qhov 16f cov duab tau yooj yim heev rau cov kab hauv qab thiab lawv pheej yig heev. Kuv xaiv 18F2520 vim tias nws muaj txaus I/O thiab 32k program nco thiab qhov tseem ceeb tshaj plaws yog nws txhawb oscillator txog 40MHZ thiab nws tseem ceeb heev rau txheej txheem cov ntaub ntawv.

Kauj Ruam 2: Cov Tsav Tsheb thiab Roj Teeb

Kuv siv 4 micro dc motors 6v 350 rpm. Koj tuaj yeem muab qhov sib npaug zoo heev nrog 4 lub cev muaj zog thiab cov cai yooj yim heev tiv thaiv 2 lub cav. Yog tias koj xav tau koj tuaj yeem xaiv lub cav uas muaj rpm siab tshaj tab sis 350 rpm tau nrawm heev rau kuv thiab lawv muaj lub zog loj heev. Ib qho ntxiv, plaub lub cav muaj kev txav tau zoo thiab tig.

Li-Po roj teeb pub rau kuv tus neeg hlau, daim npav sensor, lub cev muaj zog, Pic thiab lwm yam khoom siv. Kuv lipo yog 30c 7.4v 1250ma. Kuv tsis tau ntsib txog teeb meem teeb meem hauv kev sib tw tab sis plaub lub cav siv lub zog loj thiab koj yuav tsum 1750 ma roj teeb yog tias koj xav ua ntau qhov kev xeem.

Kauj Ruam 3: Cheebtsam

  1. Duab 18f2520
  2. 20mhz siv lead ua
  3. R1 …………………………………………………………..4.7k resistor
  4. C1 thiab C2 ……………………………………………… 33pf cap.
  5. Khawm
  6. 7805 tus tswj hluav taws xob
  7. 16v 100 uf capacitor (hluav taws xob)
  8. C4 C5 C6 thiab C7 ……………………………………..100pf x4
  9. SN74HC14n
  10. D1 …………………………………………………………………….. Led
  11. L293B x2

  12. Hloov
  13. Micro dc motor 6v 350rpm x4 (koj tuaj yeem xaiv lwm txoj kev xaiv)
  14. Log x4 (Kuv xaiv R5 hli log)
  15. Lipo Roj teeb 7.4v 1250ma (1750 ma yuav zoo dua)
  16. Nqis qis hauv Circuit Court (Xaiv tau, Nws nyob ntawm koj lub roj teeb thiab lub cav)
  17. Jumper kab

Rau Sensor Card

  1. CNY70 X5
  2. R10 R11 R12 R13 R14 …………………………………………..20k resistor X5 (Kuv siv 1206 smd resistors, raws li koj xav tau koj tuaj yeem xaiv pob poob)
  3. RV1 RV2 RV3 RV4 RV5 ………………………………………….22k trimpot X5
  4. CR2 CR3 CR4 CR5 CR6 ………………………………………..330 ohm X5
  5. J1 txiv neej lub taub hau
  6. Luam tawm cov khoom siv hluav taws xob

Kauj ruam 4: Circuit Schema

Schema ntawm Circuit
Schema ntawm Circuit
Schema ntawm Circuit
Schema ntawm Circuit

Kauj Ruam 5: Daim Npav Sensor

Daim Npav Sensor
Daim Npav Sensor
Daim Npav Sensor
Daim Npav Sensor
Daim Npav Sensor
Daim Npav Sensor

Kuv lo daim npav sensor nyob hauv qab daim phiaj tab sis qhov nrug ntawm CNY thiab hauv pem teb yuav tsum tsim nyog. Aproppimatly 1-0.5 cm yog txaus.

Kauj Ruam 6: Cov lej cim

Koj tuaj yeem rub cov lej. Yeej, muaj qhov xa rov qab, sab laug thiab sab xis suav nrog cov lej. Yog tias koj xav ua kom nrawm dua ntawm cov neeg hlau koj yuav tsum hloov pauv cov lej qeeb.

Kauj Ruam 7: Cov Lus Qhia Tseem Ceeb

  • Ib qho tseem ceeb tshaj plaws yog daim npav sensor yog li koj yuav tsum tau txais cov ntaub ntawv zoo. Qhov deb ntawm CNY thiab hauv pem teb yuav tsum tsim nyog, yog li ntawd, koj ntsuas qhov ntsuas hluav taws xob ntawm CNY tus emitter thiab koj ntsuas nws nrog lub lauj kaub. Thaum kuv tau sib tw hauv pem teb tsaus ntuj yog li cov ntsuas tsis ua haujlwm tau zoo thiab kuv muab cov LED dawb tso rau hauv qab lub khob cij thiab kuv ntsuas dua ib txoj hauv kev no, kuv tau txais cov ntaub ntawv zoo dua.
  • Lwm qhov tseem ceeb yog 4 lub cav. Yog tias koj siv 4 lub cav hloov ntawm 2 lub cav koj tuaj yeem tau txais qhov sib npaug zoo dua thiab nws yuav ua tiav zoo hauv kev rov qab los.

Pom zoo: