Cov txheej txheem:

Cov Tub Ceev Xwm LED Teeb Pom Kev Siv STM8 [72 LEDs]: 9 Cov Kauj Ruam
Cov Tub Ceev Xwm LED Teeb Pom Kev Siv STM8 [72 LEDs]: 9 Cov Kauj Ruam

Video: Cov Tub Ceev Xwm LED Teeb Pom Kev Siv STM8 [72 LEDs]: 9 Cov Kauj Ruam

Video: Cov Tub Ceev Xwm LED Teeb Pom Kev Siv STM8 [72 LEDs]: 9 Cov Kauj Ruam
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Kaum ib hlis
Anonim
Image
Image

STM8S001J3 yog 8-ntsis microcontroller uas muaj 8 Kbytes ntawm Flash program nco, ntxiv rau cov ntaub ntawv muaj tseeb EEPROM. Nws raug xa mus rau cov cuab yeej siv qis hauv STM8S microcontroller tsev neeg. MCU no muab rau hauv pob SO8N me me. Hauv kab lus no, peb tab tom tsim lub phiaj xwm Tub Ceev Xwm LED Flasher uas tuaj yeem siv rau tsheb, maus taus, thiab tsheb kauj vab.

Cov neeg ua tim khawv

Tau qhov twg los:

[1]:

[2]:

[3]:

[4]:

[5]:

[6]:

[7]:

[8]:

[9]:

[10]:

[1]: Kev Txheeb Xyuas Circuit1 Daim duab 1 qhia txog daim duab qhia chaw ntawm lub cuab yeej. Lub plawv ntawm lub voj voog no yog STM8S001 microcontroller.

Kauj Ruam 1: Daim duab 1: Daim duab 1 Daim duab qhia chaw ntawm Cov Tub Ceev Xwm Kev Ua Haujlwm LED-Flasher

Daim duab 2: Nrhiav Tus Nqi Zoo Tshaj Plaws rau Series LEDs
Daim duab 2: Nrhiav Tus Nqi Zoo Tshaj Plaws rau Series LEDs

Cia peb pib qhov kev tshuaj xyuas los ntawm chav fais fab. C2 thiab C3 tau siv los txo cov suab nrov tawm suab. Tom qab ntawd qhov hluav taws xob tau ua haujlwm rau 78M09 [1] (REG1) tus tswj hwm. Nws yog siv los tswj qhov voltage ntawm 9V. C4 thiab C6 tau siv los txo tus tswj hwm lub suab nrov.

Qhov tso tawm ntawm REG1 raug daws rau thawj-xaj RC lim (R28 thiab C5). Nws pab txo cov suab nrov txawm tias ntxiv vim tias cov cuab yeej no tuaj yeem siv txuas ntxiv hauv qhov chaw muaj suab nrov xws li lub tsheb. Txoj hauv kev zoo tshaj los tshuaj xyuas tus cwj pwm ntawm lub lim dej no (lossis lwm yam lim) yog ua qhov ntsuas ntsuas. SDS1104X-E oscilloscope tau qhia txog lub ntsiab lus zoo ntawm lub ntsiab lus uas tuaj yeem ua qhov kev suav suav no.

REG2 [2] yog siv los hloov 9V rau 5V txhawm rau muab STM8s001 MCU [3] (IC1). C7 yog lub tshuab lim dej ntxiv rau IC1.

IC1 MCU tau ua haujlwm siv ib tus xaim SWIM nkaus xwb. Nws sawv cev rau Ib Leeg-Hlau Interface Module. Nws yog qhov txuas nrawm ntawm MCU thiab tus programmer/debugger. Tus pin no yuav tsum txuas nrog SWIM tus pin ntawm tus programmer/debugger. Tus pin hauv av kuj yuav tsum txuas nrog. Qhov no ua tiav qhov kev sib txuas (P2).

IC2 thiab IC3 yog qhov laj thawj N-Channel SMD Mosfets [4] uas tau siv los qhib/tua LEDs. Lub qhov rooj pins ntawm ob qho MOSFETs tau raug rub los siv 4.7K resistors kom tsis txhob muaj qhov tsis xav ua (R13, R14). SW1 yog lub pob nyem uas siv tau los hloov ntawm cov phiaj xwm flasher. R27 yog rub tawm tus tiv thaiv thiab C8 txo qhov muaj peev xwm thawb-khawm debouncing suab nrov.

R1 rau R26 resistors tau siv los txwv cov LEDs tam sim no. Hauv txhua ntu, Kuv tau tso 3 LEDs hauv kab uas txuas nrog rau +9V txoj kev tsheb nqaj hlau (Daim duab 2). Cov yam ntxwv ntawm LEDs sib txawv los ntawm cov chaw tsim khoom mus rau cov chaw tsim khoom. Yog li ntawd peb tsis tuaj yeem muab qhov txwv txwv txwv tiv thaiv rau txhua qhov xwm txheej. Qhov siab tshaj plaws tam sim no ntawm 5mm LED yog ib puag ncig 25mA. Yog li tus nqi tiv thaiv uas tuaj yeem txwv qhov tam sim no mus rau ib puag ncig 15mA (me ntsis siab dua ib nrab) zoo li txaus thiab tsis cuam tshuam rau LEDs lub neej thiab tsis txo qis qhov ci ci LED.

Koj tuaj yeem pib los ntawm 100-Ohm resistor thiab nce nws thiab ib txhij saib xyuas qhov tam sim no. Hauv kuv qhov xwm txheej, kuv nyeem 15mA los ntawm kev siv 180-ohm resistor.

Kauj Ruam 2: Daim Duab 2: Nrhiav Tus Nqi Zoo Tshaj Plaws rau Series LEDs

[2]: PCB LayoutFigure 3 qhia txog PCB txheej txheej ntawm lub flasher (kho qhov kawg). Nws yog ib txheej PCB board. Tsuas yog LEDs, txhua qhov khoom siv yog SMD thiab muab muag rau sab tooj. Hauv kev tsim cov txheej txheem no thiab PCB, Kuv tau siv ntau lub tsev qiv ntawv ua ntej los ntawm SamacSys. IC1 [5], IC2 [6], IC3 [7], REG1 [8], thiab REG2 [9] raug teeb tsa siv SamacSys cov tsev qiv ntawv thiab nws Altium Designer plugin [10] (Daim duab 4). Nws cawm kuv ntau lub sijhawm tsim. Kuv ib txwm ua yuam kev thaum kuv tsim cov tsev qiv ntawv los ntawm kos uas ua rau kuv lub hnub puas thiab PCB cov qauv. Cov tsev qiv ntawv no yog pub dawb thiab tseem ceeb dua, lawv ua raws IPC tus qauv hneev taw.

Kauj Ruam 3: Daim duab 3: PCB Txheej Txheem ntawm Tub Ceev Xwm-Flasher Circuit (Hloov Kho zaum kawg)

Daim duab 3: PCB Txheej Txheem ntawm Tub Ceev Xwm-Flasher Circuit (Hloov Kho zaum kawg)
Daim duab 3: PCB Txheej Txheem ntawm Tub Ceev Xwm-Flasher Circuit (Hloov Kho zaum kawg)

Kauj Ruam 4: Daim duab 4: Xaiv Cheebtsam hauv SamacSys Altium Plugin

Daim duab 4: Xaiv Cheebtsam hauv SamacSys Altium Plugin
Daim duab 4: Xaiv Cheebtsam hauv SamacSys Altium Plugin

Cov duab 5 thiab 6 qhia pom 3D ntawm qhov kev hloov kho zaum kawg ntawm PCB pawg thawj coj.

Kauj Ruam 5: Daim Duab 5: Saib 3D ntawm PCB Pawg Thawj Coj Los Ntawm Sab Saum (Kho Kho zaum kawg)

Daim duab 5: 3D Saib ntawm PCB Pawg Thawj Coj Los Ntawm Sab Saum (Kho Kho zaum kawg)
Daim duab 5: 3D Saib ntawm PCB Pawg Thawj Coj Los Ntawm Sab Saum (Kho Kho zaum kawg)

Kauj Ruam 6: Daim duab 6: 3D Saib ntawm PCB Pawg Thawj Coj Los Ntawm Hauv Qab (Kev Kho Dua zaum kawg)

Daim duab 6: 3D Saib ntawm PCB Pawg Thawj Coj Los Ntawm Hauv Qab (Kev Kho Kho zaum kawg)
Daim duab 6: 3D Saib ntawm PCB Pawg Thawj Coj Los Ntawm Hauv Qab (Kev Kho Kho zaum kawg)

Daim duab 7 qhia pom daim duab ntawm thawj qhov kev sim PCB tsab ntawv. Kuv xaj nws ntawm PCBWay thiab kuv tau txais 5 cov laug cam ntawm tus nqi zoo ib yam. Raws li koj tuaj yeem pom qhov ua tau zoo yog qhov zoo nyob hauv qhov kev hloov kho zaum kawg, Kuv tau hloov qee qhov hneev taw (tag nrho yog SMD tshwj tsis yog LEDs) thiab txav cov xov hlau xa mus rau sab hauv qab. Koj yuav muab cov khoom siv hluav taws xob 12V tso ncaj qha rau ntawm PCB pawg thawj coj.

Kauj Ruam 7: Daim duab 7: Thawj Tsab Ntawv ntawm Pawg Thawj Coj Flasher

Daim duab 7: Thawj Tsab Ntawv ntawm Pawg Thawj Coj Flasher
Daim duab 7: Thawj Tsab Ntawv ntawm Pawg Thawj Coj Flasher

[3] SoftwareSTM8 MCUs yog cov chips zoo, tab sis tseem, STM8CubeMX tsis txhawb nqa lawv tag nrho. Nws txhais tau tias software tsis tsim cov cai rau STM8s tseem. Txawm li cas los xij, koj tuaj yeem siv ST Visual Develop (STVP) ua tus sau thiab sau ua ntej tsev qiv ntawv rau STM8s (STSW). Daim duab 8 qhia txog STVP IDE. Koj kuj yuav tsum tau teeb tsa COSMIC STM8 txhawm rau siv los ua tus sau los ntawm STVP.

Kauj Ruam 8: Daim duab 8: ST Visual Develop IDE

Daim duab 8: ST Visual Develop IDE
Daim duab 8: ST Visual Develop IDE

Kuv siv GPIO thiab cov tsev qiv ntawv cuam tshuam sab nraud los sau peb qhov kev pab cuam. Lub software muaj pub dawb. Koj tuaj yeem txuas ntxiv cov cai thiab ntxiv koj tus kheej cov haujlwm ib yam. Xav paub ntau ntxiv, thov txheeb xyuas cov vis dis aus YouTube.

[4] Sib dhos thiab Xeem

Daim duab 9 qhia txog daim nqi ntawm cov khoom siv. Tsis muaj dab tsi tshwj xeeb txog kev siv tshuaj txhuam. Qhov tsawg tshaj plaws yog 0805 cov khoom siv tsis zoo uas koj tuaj yeem siv tau yooj yim siv lub 0.4mm cov hlau txuas thiab cov hlau zoo tib yam.

Kauj Ruam 9: Daim duab 9: Cov Nqi Khoom

Daim duab 9: Cov Nqi Khoom
Daim duab 9: Cov Nqi Khoom

Ceev faj txog LEDs qhov zoo thiab tsis zoo sib txawv. Sim yuav txhua Blue thiab Red LEDs los ntawm tib lub chaw tsim khoom, txwv tsis pub, koj yuav tsis tau txais lub teeb zoo ib yam thiab zoo ib yam rau txhua lub LEDs.

Muaj qee tus neeg dhia dhia ntawm lub rooj tsavxwm. Tsis txhob hnov qab ua kom muaj kev sib txuas zoo siv ob peb xoom ohm resistors thiab zoo sib xws. Txuas koj tus programmer STM (nrog rau kev txhawb nqa SWIM) thiab xaiv cov ntaub ntawv tsim nyog los ntawm "Tso Tawm" nplaub tshev thiab teeb tsa lub nti. Los ntawm kev nias lub laub-khawm, qhov kev cuam tshuam hloov pauv. Koj tuaj yeem ntxiv koj tus kheej qhov kev ua haujlwm flashing thiab ua haujlwm rau chip.

Pom zoo: