Cov txheej txheem:

Acoustic Levitation Nrog Arduino Uno Step-by Step (8-kauj ruam): 8 Kauj Ruam
Acoustic Levitation Nrog Arduino Uno Step-by Step (8-kauj ruam): 8 Kauj Ruam

Video: Acoustic Levitation Nrog Arduino Uno Step-by Step (8-kauj ruam): 8 Kauj Ruam

Video: Acoustic Levitation Nrog Arduino Uno Step-by Step (8-kauj ruam): 8 Kauj Ruam
Video: Making a &#!$%ing Button 2024, Kaum ib hlis
Anonim
Image
Image
Txuas cov Ultrasonic Transducers rau L298N Cov Khoom 1 & 2 Zoo li Qhov no
Txuas cov Ultrasonic Transducers rau L298N Cov Khoom 1 & 2 Zoo li Qhov no
  • ultrasonic suab transducers
  • L298N
  • Dc poj niam adapter
  • fais fab mov nrog tus txiv neej dc tus pin
  • Arduino UAS
  • Cov qhob cij

Qhov no ua haujlwm li cas: Ua ntej, koj xa cov cai rau Arduino Uno (nws yog lub microcontroller nruab nrog digital thiab analog chaw nres nkoj los hloov cov cai (C ++) rau hauv kev ua tiav). uas yog txhua yam teeb tsa hauv "teeb tsa ()" (Nws yog ib kauj ruam los teeb tsa txhua qhov kev hloov pauv) theem hauv Arduino IDE software. Qhov sib txawv hauv cov cai tau teeb tsa txoj haujlwm los cuam tshuam kev cuam tshuam (qhov no yog txhawm rau hloov cov chaw sib piv) ntawm 80Khz. Txhua lub sijhawm cuam tshuam tau cuam tshuam cov chaw nres nkoj sib piv tau thim rov qab uas yuav tshem tawm 80khz uas yog sib npaug 40khz sib npaug rau hauv lub voj voog puv ntawm 40khz (uas peb xav tau los tsim nws mus rau hauv lub suab ultrasonic). 40khz sib npaug yog nyob rau hauv hluav taws xob mem tes tab sis peb xav tau ultrasonic suab tsis. Peb tuaj yeem hloov pauv hluav taws xob mus rau hauv ultrasonic suab tsis los ntawm ultrasonic transducers (hloov hluav taws xob mem tes rau hauv ultrasonic suab tsis). Txhawm rau levitate peb xav tau ib lub nthwv dej sawv thiab peb tuaj yeem levitate yam hauv "nodes" (nws tsis yog ib feem ntawm qhov sawv ntawm nthwv dej) hauv qhov yoj sawv. Tab sis peb yuav tsum faib tib lub 40khz hluav taws xob mem tes rau ob qho ntawm cov hloov pauv, peb tuaj yeem ua tau los ntawm "L298N" (pawg thawj coj hauv Circuit no zoo li tus choj uas muab ob qho txiaj ntsig ntawm tib lub zog hluav taws xob) uas muab ob qho hloov pauv tib yam hluav taws xob mem tes. Yog li yog tias peb lub zog Arduino txuas nrog L298N thiab nws tau txuas nrog cov hloov pauv tam sim no cov hloov pauv tsim lub tsaj sawv ntsug thiab peb tuaj yeem levitate ib yam khoom me me hauv qee qhov xwm txheej hauv nws qhov ntawm nws.

Kauj ruam 1:

Ua ntej tshaj, Tshaj tawm cov cai rau Arduino:

byte TP = 0b10101010;

void teeb () {DDRC = 0b11111111; noInterrupts (); TXC1A = 0; TXC1B = 0; TCNT1 = 0; OCR1A = 200; TCCR1B | = (1 << WGM12); TCCR1B | = (1 << CS10); TIMSK1 | = (1 << OCIE1A); cuam tshuam (); } ISR (TIMER1_COMPA_vect) {PORTC = TP; TP = ~ TP; } void voj () {}

Kauj Ruam 2: Txuas Ultrasonic Transducers rau L298N Cov Khoom 1 & 2 Zoo li Qhov no:

Kauj ruam 3:

Duab
Duab

txuas A0 tus pin hauv ntu sib piv ntawm Arduino mus rau Lub Tswv Yim 1 hauv L298N thiab txuas A2 rau tus pin hauv Arduino mus rau L298N rau cov tswv yim 2 hauv L298N.

Kauj ruam 4:

Duab
Duab

Txuas 12v cov tswv yim hauv L298n mus rau + kab hauv kab ntawv tais thiab txuas Gnd (Hauv av) tus pin mus rau - kab.

Kauj ruam 5:

Duab
Duab

Txuas tus pin "vin" hauv ntu fais fab ntawm Arduino mus rau + kem hauv lub khob cij thiab GND (hauv av) tus pin hauv Arduino mus rau - kem hauv lub khob cij.

Kauj Ruam 6:

Duab
Duab

Txuas ob daim GND pins rau nws - kem ntawm lub khob cij thiab V + tus pin rau + kem ntawm lub khob cij

Kauj ruam 7:

Duab
Duab

Txuas lub hwj huam hluav taws xob rau tus poj niam Dc tus pin thiab teeb hluav taws xob rau 12.5v.

Pom zoo: