Cov txheej txheem:

Tone Generator "Jimikky Kammal" Siv Arduino Pro Mini: 5 Kauj Ruam
Tone Generator "Jimikky Kammal" Siv Arduino Pro Mini: 5 Kauj Ruam

Video: Tone Generator "Jimikky Kammal" Siv Arduino Pro Mini: 5 Kauj Ruam

Video: Tone Generator
Video: Electronics Engineer's version of "Jimikky Kammal" 2024, Kaum ib hlis
Anonim
Image
Image

Nov yog lub suab tsim hluav taws xob yooj yim uas siv Arduino Pro Mini. Ib feem ntawm super hit nkauj "Jimikky Kammal" ntawm zaj yeeb yaj kiab "Velipadinte Pusthakam" tau tsim nyob rau hauv monotonic.

Cov suab paj nruas sau tau tshwm sim zoo li du thiab ntxig rau sinusoidal nthwv dej. Hauv txoj haujlwm no, tsis txhob siv lub suab sine du, peb yuav tsim lub suab nrog cov duab plaub fab. Square tsis tsim cov suab tab sis nws yog nkig thiab xim hlau ntau dua li ib txwm sine yoj. Cov suab paj nruag tuaj yeem tsim los ntawm kev tsim zaus. Txhua zaus muaj lub suab txawv. Ntawm no Arduino tau siv los tsim qhov kev tsis txaus ntseeg no.

Kauj ruam 1: Teeb Kho Vajtse

Kho vajtse teeb
Kho vajtse teeb
Kho vajtse teeb
Kho vajtse teeb
Kho vajtse teeb
Kho vajtse teeb

Nws yog ib qho yooj yim heev rau teeb kho vajtse. Txhawm rau tsim txoj haujlwm no peb xav tau

  • Arduino Pro Mini
  • Hais lus
  • FTDI USB rau Serial Adapter (rau rub tawm Txoj Haujlwm rau Arduino Pro Mini)

Interface FTDI USB rau Serial adapter rau Arduino Pro Mini rau Programming raws li pom hauv daim duab kos. Txuas ib tus pin ntawm tus hais lus rau tus lej digital 11 (koj tuaj yeem hloov tus lej tus lej hauv Txoj Haujlwm) ntawm Arduino Pro Mini thiab Lwm tus rau hauv av.

Hauv qhov kev sib tham no, peb tsis ntxiv ib qho Circuit Court amplifier, yog li lub ntim yuav qis heev. Koj tuaj yeem ntxiv txhua lub suab hais lus hauv Circuit Court yog li, koj yuav tau txais lub suab ntau rau qhov tso tawm lossis koj tuaj yeem siv PC hais lus muaj lub ntim tswj tau.

Kauj Ruam 2: Kev Txhim Kho Software

Cov ntawv sau nkauj tuaj yeem tsim los ntawm kev tsim kev sib hloov hauv Arduino. Zaus ntawm qhov oscillation yog lub suab ntawm lub suab nrawm ntawm cov suab paj nruag sau ua si Beats yog lub sijhawm ntawm txhua qhov qhib ua si. Yog li, peb yuav tsum ua lub suab meej, ntaus, nrawm rau txhua qhov cim suab paj nruag.

Hauv txoj haujlwm no, peb tsis tsim txhua zaus rau txhua lub suab. Tsuas yog lub suab xav tau rau lub suab paj nruag "Jimikky Kammal" ntxiv.

impacttechnolabz.com/fd1_jk.html

Peb yuav tsum hloov pauv cov zaus no mus rau lub sijhawm kom Arduino yuav tau txais lub sijhawm qhib thiab OFF tus lej digital. Kev suav ntawm cov tones tau ua tom qab kev ua lej:

timeHigh = 1 / (2 * toneFrequency) = sijhawm / 2

xws li:

Txhawm rau tsim 100 Hz oscillations, i.e. Sijhawm Sijhawm = 1/100 S = 0.01 S = 10000 uS

Yog li peb yuav tsum ua tus pin HIGH rau 5000 uS thiab LOW rau 5000 uS

xws li timeHigh = 1/(2*100)

= 0.005 TZS

= 5000 TZS

Download Full Code

Kauj Ruam 3: Simulation

Simulation
Simulation

Peb tau tsim kev sim sim nrog kev pab ntawm Proteus Proffessional software teeb tsa hauv Windows PC, yog li lub suab tso tawm tuaj yeem txheeb xyuas hauv PC ntawm daim npav suab. Koj yuav tsum tau qhia meej ntxiv Arduino Library rau Proteus.

Kauj ruam 4: Code

Download Full Code

Pom zoo: