Cov txheej txheem:

Siv LEDS thiab AT Me Nyuam los Tsim Lub Hnub Qub Nrog Piezo Ua Si "Twinkle, Twinkle, Me Me Lub Hnub Qub": 6 Kauj Ruam
Siv LEDS thiab AT Me Nyuam los Tsim Lub Hnub Qub Nrog Piezo Ua Si "Twinkle, Twinkle, Me Me Lub Hnub Qub": 6 Kauj Ruam

Video: Siv LEDS thiab AT Me Nyuam los Tsim Lub Hnub Qub Nrog Piezo Ua Si "Twinkle, Twinkle, Me Me Lub Hnub Qub": 6 Kauj Ruam

Video: Siv LEDS thiab AT Me Nyuam los Tsim Lub Hnub Qub Nrog Piezo Ua Si
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Kaum ib hlis
Anonim
Siv LEDS thiab AT Tiny los Tsim Lub Hnub Qub Nrog Lub Piezo Ua Si
Siv LEDS thiab AT Tiny los Tsim Lub Hnub Qub Nrog Lub Piezo Ua Si

Qhov kev siv hluav taws xob no siv LEDS, AT TINY thiab piezo los ua lub hnub qub ntsais thiab suab paj nruag ntawm "Twinkle, Twinkle, lub hnub qub me" Thov saib cov kauj ruam tom ntej rau thiab saib xyuas ib puag ncig.

Kauj Ruam 1: Txheej Txheem Txheej Txheem

Txheej txheem cej luam
Txheej txheem cej luam

Lub Circuit Court no suav nrog LEDS, ATTINY (2) thiab piezo thiab Arduino. Qhov Arduino yuav muab lub zog thiab cov LEDs yuav ci nrog cov tiv thaiv. Qhov ATTiny yuav ntsais muag qee qhov ntawm LEDS. Qhov piezo hais lus yuav ua si Twinkle, Twinkle, me Star 'yuav Code.

Kauj ruam 2: LEDs

Muaj LEDs hauv Circuit no. Qhov LED sawv rau lub teeb emitting diode.

Cov LED muaj cov semiconductor siv lead ua (p-type thiab n-type). Yog siv lead ua muaj zog los ntawm tam sim no lub semiconductor tso tawm lub teeb.

Muaj kev txiav txim siab tseem ceeb hauv kev siv LEDs. LEDs ua haujlwm hauv ib qho nkaus xwb, Tam sim no mus los ntawm qhov zoo (anode) mus rau qhov tsis zoo (cathode). Nws yog ib qho tseem ceeb uas yuav tsum siv lub resistor los tswj qhov tam sim no. Cov LED muaj qhov tam sim no txwv ntawm 20 mA ib LED.

Cov ceg luv ntawm LED yog cathode (tsis zoo). Lawv ntev ntawm LED yog cov anode (zoo) txhuas.

Ib txwm txuas tus tiv thaiv mus rau anode (zoo) txhuas thiab cathode (tsis zoo) ua rau hauv av.

Lub cim thiab daim duab ntawm LEDs nyob saum toj no.

Kauj Ruam 3: AT TINY

AT TINY
AT TINY

AT TINY yog lub microcontroller nti. Microcontroller tau siv hauv Circuit kom ua ib txoj haujlwm.

Ntau lub tshuab hluav taws xob siv microcontrollers zoo li microwaves, tov khoom thiab lwm yam.

AT TINY tau siv ntawm no los ua lub moos. Peb peb yuav txuas cov LEDs mus rau ATTINY (tus pin5) uas yuav muab lub moos nkag mus. Ib lub moos nkag yog cov khoom siv pulsed. This yuav ua rau LEDs ntsais.

Kauj Ruam 4: Cov Khoom Siv Hluav Taws Xob Siv Hauv Circuit

Cov Khoom Siv Hluav Taws Xob Siv Hauv Circuit
Cov Khoom Siv Hluav Taws Xob Siv Hauv Circuit

Arduino Ib

15 LWD

2 AT TINY 85 daim

12; resistors (daj, violet, xim av)

tus neeg hais lus piezo

xov hlau

Kauj Ruam 5: Piezo Speaker

Piezo Hais Lus
Piezo Hais Lus

Tus hais lus piezo yog cov khoom puag ncig loj dua saum toj no hauv daim duab.

Tus neeg hais lus piezo muaj piezo siv lead ua uas yog nruab nrab ntawm 2 muaju. Thaum siv hluav taws xob hla cov nplais, lawv thawb ib tus neeg coj thiab rub lwm tus. Qhov kev txav thiab rub cov neeg ua haujlwm ua suab.

Txoj Cai tau nyeem los ntawm Arduino thiab tsim cov ntawv sau rau zaj nkauj "Twinkle, Twinkle, lub hnub qub me me".

Nco tseg qhov ua tau zoo ntawm piezo txuas nrog Arduino tus lej pin 11. Cov hlau lead tsis zoo txuas nrog hauv av ntawm cov tsheb nqaj hlau digital ntawm Arduino. Saib duab.

Kauj Ruam 6: Xaus

Xaus
Xaus

Cov phiaj xwm no qhia pom tias koj tuaj yeem siv LEDs, ATTINY thiab cov neeg tawm tsam los tsim hluav taws xob nrog LEDs los ua lub hnub qub ntsais muag.

Kuv tau ua qhov Circuit Court no ntawm Tinkercad. Nws tau sim thiab ua haujlwm.

Kuv vam tias cov phiaj xwm no pab koj kom nkag siab LEDS, AT TINY thiab cov neeg hais lus piezo thiab lawv tuaj yeem siv los tsim qhov muag pom thiab suab paj nruag Circuit.

Ua tsaug

Pom zoo: