Pajisja mat shpejtësinë në intervalin 0-999 km në orë, dhe gjithashtu ka 2 numërues kilometrash - kilometrazhin total dhe ditor. Odometri ditor numëron jo vetëm qindra, por edhe dhjetëra metra, si dhe mijëra kilometra, gjë që mund të quhet veçori e pajisjes. Të gjitha funksionet kontrollohen nga një buton i vetëm. Tregimi bëhet në treguesit LED me 7 segmente: 3-shifror pa pikë për shpejtësinë dhe dy 3-shifror (ose 6-shifror) me një pikë për matësit e udhëtimit. Pajisja është e kalibruar për një sensor shpejtësie me 6 puls dhe për një raport kilometrazhi prej 6 pulsesh për 1 metër udhëtim.
Më shumë detaje rreth funksionimit të pajisjes: Kur ndezja është e fikur, treguesit janë të fikur dhe konsumi aktual është i papërfillshëm. Nëse ndizni ndezjen, pajisja ndez të gjitha segmentet e treguesit për vetë-diagnozë (do të jetë menjëherë e dukshme nëse ndonjë segment është i gabuar). Më pas, pas disa sekondash, pajisja fillon të shfaqë shpejtësinë dhe kilometrazhin e përzgjedhur më parë.Duke shtypur shkurtimisht butonin, ndërrohet mënyra e shfaqjes së kilometrazhit ditor ose total. Kur në ekran shfaqet kilometrazhi ditor, një shtypje e gjatë (më shumë se 2 sekonda) e rivendos në zero numëruesin e kilometrazhit ditor. Pas fikjes së ndezjes, pajisja shfaq fjalën "RECORD" për disa sekonda dhe të gjitha vlerat e odometrit regjistrohen në memorien jo të paqëndrueshme EEPROM, kështu që edhe shkëputja e baterisë nuk do të rivendosë odometrin.
Çdo numërues ka formatin e vet:
Odometer i përgjithshëm XXXXXXX (rend i ulët 1 kilometër) 6 karaktere, pa pikë.
Odometer ditor ХХХХ.ХХ (shifra e rendit të ulët 10 metra), 6 karaktere, pika e 4-të në
Kjo pajisje është e kalibruar për një sensor që ka 6 impulse për 1 metër, ose është e barabartë me 1 metër për 1 rrotullim. Kjo formulë është e përshtatshme për shumicën e makinave. (Për shembull! Shpejtësia është bërë për një makinë japoneze, në të cilën 0,62 rrotullime janë të barabarta me 1 metër (ose 1 rrotullim 1 milje), dhe për të mos shkelur formulën ekziston një sensor prej 10 pulsesh për 1 metër (0,62 rrotullime = 1 metër = 6 impulse, ose 1 rrotullim = 1 milje = 10 pulse).
Pajisja gjithashtu mund të kalibrohet për të punuar me pothuajse çdo sensor dhe raportin e kilometrazhit ndaj pulsit. Kjo mund të bëhet duke redaktuar tekstin burimor.
Kopjoni tekstin burimor në programin MPLAB IDE, modifikoni dhe përpiloni një skedar të ri HEX të korrigjuar.
E RËNDËSISHME!!!
Është më mirë të instaloni kuarc, KX-3HT 10.0 MHz. Kjo është një temperaturë e funksionimit të rezonatorit termostabil: nga -40 në 85 °C, është disa herë më e shtrenjtë.
Në dritat e pasme LED për ndriçimin e njëtrajtshëm të mbishkrimeve, prisni lentet dhe matni sipërfaqen në çdo mënyrë që keni në dispozicion.
Shpejtësometri dixhital i makinës i ofruar më poshtë është projektuar për instalim në makina me shpejtësi matës standarde analoge, të kontrolluar nga impulset elektrike që vijnë nga sensorët e instaluar të shpejtësisë. Është gjithashtu e mundur të përdoret një pajisje e tillë në rast të vetë-instalimit të sensorëve të ngjashëm në një makinë. Matësi i shpejtësisë bazohet në një mikrokontrollues të lirë dhe të aksesueshëm PIC16F628A. Treguesit LED përdoren si pajisje për shfaqjen e informacionit SC10-21YWA(lartësia e tabelës 25.4 mm, dritë e verdhë, katodë e zakonshme) kompani "Kingbrihgt." |
Pajisja është e lidhur me kontaktin e sinjalit të shpejtësisë standarde analoge. Duke shtypur një buton (të kopjuar me zë), mund të ndryshoni shkëlqimin e treguesve "në një rreth". Nëse dëshironi, mund të instaloni gjithashtu një buton bllokimi për të fikur energjinë e shpejtësisë (nuk tregohet në diagram).
Kur dera e makinës nuk është e mbyllur fort (sinjali është në nivel të ulët në krahasim me trupin) dhe shpejtësia e drejtimit është më shumë se 9 km në orë, dëgjohet një sinjal me ndërprerje dhe leximi i shpejtësisë në tregues zëvendësohet me shkurtesën " dor' (shkurt për "derë" - ndezur me ndriçim të plotë) .
Fuqia në shpejtësimatës merret nga çelësi i ndezjes (kontakti - "ndezja"). Sa herë që e ndizni, ndriçimi i treguesve vendoset në të njëjtën mënyrë siç ishte vendosur më parë nga përdoruesi. Të gjitha zerat e parëndësishme në tregues përveç shifrës më pak të rëndësishme janë çaktivizuar. Kur përdorni tregues të tjerë të ngjashëm, mund të jetë e nevojshme të zgjidhni rezistorë kufizues të rrymës në qarkun e anodës së segmenteve të tyre. Një emetues tingulli me një gjenerator të integruar HA1 mund të zëvendësohet me çdo gjenerator tingulli të bërë në shtëpi me një frekuencë 1000-1500 Hz, i aftë të funksionojë nga një burim energjie 5 volt.
Programi, i cili duhet të futet në MK duke përdorur programuesin, do t'i lejojë përdoruesit të zgjedhë një nga pesë opsionet për shpejtësimatësin në varësi të numrit të pulseve që vijnë nga sensori i shpejtësisë së automjetit. Shpejtësometri dixhital i propozuar “kupton” sensorët që nxjerrin: 2500 imp/km, 4000 imp/km, 6000 imp/km, 8000 imp/km dhe 10000 imp/km. Lista mund të zgjerohet duke bërë ndryshimet e duhura në program. Deri më sot, autori i këtyre rreshtave ka hasur vetëm sensorët e mësipërm.
Për të zgjedhur opsionin e dëshiruar, duhet të hyni në modalitetin e shërbimit, i cili kërkon instalimin e kërcyesit S1 dhe më pas futjen e energjisë në pajisje. Tani, duke shtypur butonin SB1 "Brightness" (për 1-2 s, me një pauzë midis shtypjeve prej 1-2 s), zgjidhet opsioni i dëshiruar:
1 shtypje - 2500 imp/km;
2 presa - 4000 imp/km;
3 presa - 6000 imp/km;
4 klikime - 8000 imp/km;
5 klikime - 10000 imp/km.
3 sekonda pas shtypjes së fundit, do të dëgjohet numri përkatës i bipeve të shkurtra HA1, duke konfirmuar hyrjen e opsionit të dëshiruar në EEPROM të mikrokontrolluesit. Nëse nuk zgjidhni modalitetin e shërbimit kur e ndizni për herë të parë, modaliteti për sensorin e shpejtësisë do të vendoset automatikisht në 2500 impuls/km. Nëse numri i klikimeve është më shumë se 5, do të vendoset gjithashtu standardi japonez (2500). Për të zgjedhur një mënyrë tjetër funksionimi, thjesht përsërisni procedurën e shërbimit nga fillimi.
Pas zgjedhjes së mënyrës së dëshiruar të funksionimit, kërcyesi S1 duhet të hiqet. Pajisja është gati për përdorim.
Gabimi i indikacioneve është për:
1 opsion (2500) +0.2 km;
2 opsione (4000) më pak se 0.1 km;
3 opsione (6000) +0.2 km;
4 opsione (8000) - 0,4 km;
5 opsione (10000) më pak se 0.1 km;
Nëse numri i pulseve nga sensori i shpejtësisë është i panjohur, duhet të kryhet procedura e mëposhtme. Në një pjesë të sheshtë të rrugës, matni 10 metra nga rrota e makinës. Lidhni voltmetrin e treguesit (testuesin) me kontaktin e sinjalit të shpejtësisë analoge dhe, duke lëvizur ngadalë, numëroni numrin e "dridhjeve" të gjilpërës së voltmetrit. Shumëzojeni rezultatin me 100.
Makina e treguar në këtë artikull shpejtësimatës dixhital, është e mundur të instalohet në një makinë në vend të një shpejtësimetësi analog të fabrikës që përpunon sinjalet që vijnë nga një sensor standard shpejtësie.
Përshkrimi i funksionimit të shpejtësimatësit dixhital
Pajisja është projektuar bazuar në mikrokontrolluesin e mirënjohur PIC16F628A. Për të shfaqur shpejtësinë e matur, përdoret një tregues LED me një lartësi shenjë prej 25.4 mm me një katodë të zakonshme (SC1021YWA - ngjyra e verdhë e dritës). Ky shpejtësimetër dixhital lidhet me të njëjtin lidhës si shpejtësimatësi standard analog.
Duke shtypur butonin SA2 mund të ndryshoni shkallën e ndriçimit të treguesit dixhital; çdo shtypje në SA2 shoqërohet me një sinjal akustik. Nëse dera e makinës nuk mbyllet plotësisht, hyrja 2 e PIC16F84A merr një nivel të ulët tensioni. Kur shpejtësia e automjetit është më shumë se nëntë kilometra në orë, tingëllon një sinjal akustik me ndërprerje dhe ekrani "dor" shfaqet me shkëlqim të plotë.
Qarku dixhital i shpejtësisë së makinës mundësohet drejtpërdrejt nga terminali i çelësit të ndezjes. Qarku i ekranit është projektuar në atë mënyrë që zero të parëndësishme të shuhen. Qarku përdor një emetues tingulli me një gjenerator të integruar, me një frekuencë zëri prej rreth 1400 Hz. dhe projektuar për të funksionuar nga 5 volt.
Ekzistojnë disa lloje të sensorëve të shpejtësisë, të gjithë ata ndryshojnë nga njëri-tjetri në numrin e impulseve për 1 kilometër udhëtim të automjetit. Firmware, i cili duhet të shkruhet në memorien PIC16F84A duke përdorur , përpunon sinjalin hyrës të 5 llojeve të sensorëve, duke prodhuar 2500, 4000, 6000, 8000 dhe 10000 impulse për 1 kilometër.
Për të aktivizuar modalitetin e kërkuar, duhet të instaloni bluzën SA1. Ndizni fuqinë dhe shtypni për 2 sekonda. Butoni SA2. Çdo shtypje do të korrespondojë: nga 1 (2500) në 5 (10000) dhe më pas në një rreth. Nëse kanë kaluar më shumë se 3 sekonda nga shtypja e fundit, shpejtësiometri do të lëshojë një sinjal zanor, që tregon se modaliteti i zgjedhur është regjistruar në kujtesën e mikrokontrolluesit. Pas kësaj, ju duhet të hiqni kërcyesin SA1 dhe tani mund të përdoret shpejtësia.
Speedometër-odometër, ideja nuk është e re, por zbatimi i një pajisjeje të tillë ka opsione të ndryshme, unë sjell në vëmendjen tuaj një qark të thjeshtë të bazuar në ATmega8 MK të zakonshëm, qarku ka dy lloje firmware për treguesit; 16x2 dhe 16x4. , si dhe një projekt për funksionimin e qarkut në Proteus.
Diagrami i këtij shpejtësimatës-odometër,
Koeficientët për sensorin e shpejtësisë mund të rregullohen direkt nga menyja e përdoruesit, për çdo sensor të shpejtësisë me ndonjë (me numrin e pulseve nga 1 në 9999......), dhe numri i pulseve për kilometër caktohet dhe rregullohet gjithashtu. nga menyja e përdoruesit.
Karakteristikat e qarkut
Shfaqja e shpejtësisë aktuale (ekrani në LCD, për 16x2 nga 0,1 km/h, për 16x4 nga 0,001 km/h)
kilometrazhi total (shfaqet në LCD, për 16x2 nga 0,1 km/h, për 16x4 nga 0,001 km)
kilometrazhi ditor (mbani…..20 !!! numëruesit ditore, zgjidhni Nr. nga menyja),
duke shfaqur kohën e aktivitetit të secilit sportel (të përgjithshëm dhe për pagesat ditore); me fjalë të tjera, kohën e udhëtimit.
Mundësia për të vendosur një alarm për shpejtësinë.
Menyja e përdoruesit ju lejon të vendosni të gjithë koeficientët (shpejtësia dhe kilometrat) direkt nga tastiera e pajisjes.
Të gjitha të dhënat ruhen në kujtesën e kontrolluesit.
Këtu unë jap një përshkrim të funksionimit të menusë dhe shfaqjes së leximeve për një ekran 16x2 (për një ekran 16x4 ky përshkrim i funksionimit është gjithashtu plotësisht i përshtatshëm, vetëm shfaqja e informacionit në një ekran 16x4 është më e plotë pa shkurtesa).
Përshkrimi i menusë.
1) Zgjedhja e numrit të numëruesit personal ditor të km, duke marrë parasysh kohën e periudhës së aktivitetit të qelizës
2) Shikoni numëruesin personal ditor të km (ai që shfaqet në rreshtin e parë rivendoset në zero kur shtypni butonat e hyrjes djathtas.)
3) Rivendosja e totalit (total) km (nuk ndikon në numëruesit ditorë)
4) Rivendosni numërimin aktual të km (nuk ruhet në EEPROM)
5) CILËSIMET
5.1) Vendosja e frekuencës së kuarcit korrigjimin e cikleve të orës së rezonatorit kuarc ATmega8 me 1 sekondë (ndikon vetëm në llogaritjen e shpejtësisë km/h)
5.2) Numri i impulseve të sensorit të shpejtësisë (6 impulse të parazgjedhura)
5.3) Pulsi për km, ky është numri i pulseve nga numëruesi për 1 kilometër (parazgjedhja 600 pulse)
5.4) Ora për sekondë - një variabël i brendshëm i orës së brendshme në pinin PB1, prodhon një puls të shkurtër prej 0,5 Hz; nëse ora është me nxitim, numri duhet të rritet; nëse mbetet prapa, numri duhet të jetë ulur.
5.4) shpejtësia maksimale, - vendosja e pragut maksimal. shpejtësi (buzzer) .
5.5) Lindje. parazgjedhjet - rivendosni cilësimet e paracaktuara.
5.6) Ruani cilësimet - derisa të klikoni këtë artikull - gjithçka është e vlefshme vetëm derisa ta fikni.
Të dhëna të tilla ruhen në EEPROM;
a) cilësimet e përgjithshme,
b) leximet totale (shuma totale e të gjithë numëruesve) me fiksimin dhe shfaqjen e orës, periudhën e funksionimit të gjendjes aktive të shpejtësimatësit - odometri.
c) 20 qeliza personale të leximeve të km, me fiksim dhe shfaqje të orës, periudhën e funksionimit të gjendjes aktive të qelizës së shfaqur.
Për të dhënat totale dhe personale, kunja INT 0 është përgjegjëse për ruajtjen në memorie kur qarku është i çaktivizuar; ai lidhet përmes një ndarësi rezistence, i cili lidhet 2 kOhm me tokën dhe 4,7 kOhm me furnizimin me energji + 12 V.
Shtuar një përshkrim, diagram, vulë, ekran të siguresave për ponyprog, dalje të korrigjuar të informacionit dhe mbishkrime të menusë në kodin burimor për qëllimin e drejtpërdrejtë të pajisjes shpejtësimatës-odometër, por në parim programi është mjaft universal dhe mund të jetë një shpejtësimatës, dhe nje mates frekuence, dhe nje takometer, dhe ne pergjithesi vetem zemra jote deshiron...eshtja eshte qe ai numeron shume sakte duke shumezuar frekuencen me nje koeficient dhe numeron numrin total te impulseve qe e pjeston me koeficientin, ne parimi, duke zgjedhur koeficientët, mund të funksionojë me çdo gjë......
Skema në Proteus.
Shpejtësometri dixhital i makinës i ofruar më poshtë është projektuar për instalim në makina me shpejtësi matës standarde analoge, të kontrolluar nga impulset elektrike që vijnë nga sensorët e instaluar të shpejtësisë. Është gjithashtu e mundur të përdoret një pajisje e tillë në rast të vetë-instalimit të sensorëve të ngjashëm në një makinë.
Matësi i shpejtësisë bazohet në mikrokontrolluesin e përdorur gjerësisht PIC16F84A-04I/P nga MICROCHIP. Treguesit LED SC10-21YWA (lartësia e shenjës 25.4 mm, dritë e verdhë, katodë e zakonshme) nga Kingbrihgt u përdorën si pajisje për shfaqjen e informacionit.
Pajisja është e lidhur me kontaktin e sinjalit të shpejtësisë standarde analoge. Duke shtypur butonin (i kopjuar me zë), mund të ndryshoni shkëlqimin e treguesve "në një rreth". Nëse dëshironi, mund të instaloni gjithashtu një buton bllokimi për të fikur energjinë e shpejtësisë (nuk tregohet në diagram).
Kur dera e makinës nuk është e mbyllur fort (sinjali është në nivel të ulët në raport me trupin) dhe shpejtësia e drejtimit është më shumë se 9 km në orë, dëgjohet një sinjal me ndërprerje dhe leximi i shpejtësisë në tregues zëvendësohet me shkurtesën ". dor” i ndezur me ndriçim të plotë (shkurt për “door” - door) .
Fuqia në shpejtësimatës merret nga çelësi i ndezjes (kontakti - "ndezja"). Sa herë që e ndizni, ndriçimi i treguesve vendoset në të njëjtën mënyrë siç ishte vendosur më parë nga përdoruesi. Të gjitha zerat e parëndësishme në tregues përveç shifrës më pak të rëndësishme janë çaktivizuar. Kur përdorni tregues të tjerë të ngjashëm, mund të jetë e nevojshme të zgjidhni rezistorë kufizues të rrymës në qarkun e anodës së segmenteve të tyre. Një emetues tingulli me një gjenerator të integruar HA1 mund të zëvendësohet me çdo gjenerator tingulli të bërë në shtëpi me një frekuencë 1000-1500 Hz, i aftë të funksionojë nga një burim energjie 5 volt. Vizatimet e PCB janë bashkangjitur.
Kodet burimore të programit dhe skedarët HEX për mikrokontrolluesin nën:
- Standardi japonez (2500 impulse për km rrugë)
- standard ndërkombëtar (6000 impulse për km rrugë)
- standarde 10,000 impulse për km rrugë
janë në shtojcë.
Duhet të theksohet se në opsionin e parë, koha e matjes dhe më pas e shfaqjes është 1,44 sekonda (për lehtësi, është softuer i reduktuar në 0,72 sekonda). Në opsionin e dytë, 0,6 sekonda dhe në opsionin e tretë, 0,36 sekonda. Për të vendosur kohën për matjen e pulseve nga sensori i shpejtësisë me një saktësi prej 1 km në orë, duhet të ndani 3600 me numrin e pulseve nga sensori i shpejtësisë për 1 km distancë të përshkuar. Vlera e kohës së matjes që rezulton (në sekonda) duhet të futet në program. Për shembull, 3600/2500=1.44 sekonda. Koha e shfaqjes dhe ndryshimi në leximet e treguesve gjatë vozitjes janë mjaft të lexueshme në të gjitha rastet e paraqitura.