Cov txheej txheem:

Bluetooth-Enabled Planetarium/Orrery: 13 Kauj Ruam (nrog Duab)
Bluetooth-Enabled Planetarium/Orrery: 13 Kauj Ruam (nrog Duab)

Video: Bluetooth-Enabled Planetarium/Orrery: 13 Kauj Ruam (nrog Duab)

Video: Bluetooth-Enabled Planetarium/Orrery: 13 Kauj Ruam (nrog Duab)
Video: Galaxy Star Projector Light with Bluetooth Speaker Review 2024, Kaum ib hlis
Anonim
Bluetooth-Enabled Planetarium/Orrery
Bluetooth-Enabled Planetarium/Orrery

Cov lus qhia no tau tsim los ua kom tau raws txoj haujlwm xav tau ntawm Makecourse ntawm University of South Florida (www.makecourse.com).

Nov yog kuv 3 ntiaj chaw planetarium/orrery. Nws tau pib tawm tsuas yog ib txoj haujlwm ntev-semester rau Makecourse, tab sis los ntawm lub sijhawm kawg ntawm lub semester dov ib ncig, nws tau dhau los ua kev kawm muaj txiaj ntsig zoo. Tsis yog tsuas yog kuv tau kawm cov hauv paus ntawm microcontrollers, tab sis nws tseem qhia kuv ntau yam nthuav txog C thiab C ++, Android platform, soldering, thiab hluav taws xob ua haujlwm feem ntau.

Lub luag haujlwm tseem ceeb ntawm Planetarium yog qhov no: qhib ib lub app ntawm koj lub xov tooj, txuas rau Planetarium, xaiv hnub tim, ntaus xa, thiab saib Planetarium txav Mercury, Venus, thiab Lub Ntiaj Teb mus rau lawv cov txheeb ze heliocentric longitudes ntawm hnub ntawd. Koj tuaj yeem rov qab mus deb li 1 AD/CE, thiab deb li deb mus txog 5000 AD/CE, txawm hais tias qhov tseeb yuav poob qis me ntsis thaum koj mus tom ntej lossis thim rov qab ntau dua 100 xyoo los yog li ntawd.

Hauv Cov Lus Qhia no, kuv yuav piav qhia yuav ua li cas sib sau ua ke lub ntiaj teb, cov iav uas ua rau lawv, lub rooj sib tham hauv Circuit Court uas txuas txhua yam ua ke, thiab Android thiab C ++ (Arduino) code uas tswj hwm lub ntiaj teb.

Yog tias koj xav dhia ua ntej rau txoj cai, txhua yam nyob ntawm GitHub. Tus lej Arduino nyob ntawm no thiab Android tus lej nyob ntawm no.

Kauj Ruam 1: Qhov Chaw thiab Cov Cuab Yeej

Lub cev

  • 1 DC -47P DC Series Heavy Duty Electronics Enclosure - $ 9.58
  • 0.08 "(2mm) Acrylic/PMMA ntawv, tsawg kawg 6" x 6 "(15cm x 15cm) - $ 2.97
  • 3 28BYJ -48 Unipolar Stepper Motors - $ 6.24
  • Glow in the Dark Planets - $ 8.27 (Saib daim ntawv 1)
  • Glow in the Dark Stars - $ 5.95 (Tsis teb los tau)

Electronics

  • 3 ULN2003 Stepper Tsav Tsheb - $ 2.97
  • 1 Atmel ATMega328 (P) - $ 1.64 (Saib daim ntawv 2)
  • 1 HC -05 Bluetooth rau Serial Module - $ 3.40
  • 1 16MHz Crystal Oscillator - $ 0.78 rau 10
  • 1 DIP-28 IC Socket $ 0.99 rau 10
  • 1 daim Stripboard (suab = 0.1 ", qhov loj = 20 kab ntawm qhov ntev 3.5") - $ 2.48 rau 2
  • 1 Vaj Huam Sib Luag Mount DC Muab Jack, Poj Niam (5.5mm OD, 2.1mm ID) - $ 1.44 rau 10
  • 2 22pF 5V capacitors - $ 3.00 rau 100 (saib daim ntawv 3)
  • 2 1.0 μF capacitor - $ 0.99 rau 50
  • 1 10kΩ resistor - $ 0.99 rau 50

Cov cuab yeej

  • Spare Arduino lossis AVR ISP - Koj yuav xav tau qhov no los teeb tsa ATMega nti
  • Ntsia Hlau - rau tshem tawm cov khoom ATMega los ntawm Arduino
  • Multimeter - lossis tsawg kawg yog ntsuas ntsuas txuas ntxiv
  • Rauj - rau kev kho txhua yam uas tsis tau ua Txoj Cai Zoo ™
  • Laum nrog 5/16 ", 7/16" thiab 1 3/8 "laum ntsis
  • Snips me me - rau kev txiav cov khoom ua rau
  • 22 AWG tso tseg tooj liab hlau (Tus nqi zoo thiab ntau qhov kev xaiv ntawm no)
  • Solder - Kuv siv 60/40 nrog cov tub ntxhais rosin. Kuv tau pom tias nyias (<0.6mm) cov laug ua rau ntau yam yooj yim dua. Koj tuaj yeem pom qhov muag nyob qhov twg, tab sis qhov no yog ib qho uas kuv tau ua tiav nrog.
  • Flux - Kuv nyiam cov cwj mem no heev, tab sis koj tuaj yeem siv tau txhua yam ntawm cov dej ntws, tsuav nws tsis muaj kua qaub.
  • Soldering Hlau/Chaw Nres Tsheb - Koj tuaj yeem tau txais cov no rau qhov pheej yig zoo nkauj ntawm eBay thiab Amazon, txawm hais tias yuav ceeb toom: kev ntxhov siab sib txawv sib txawv nrog tus nqi. Kuv pheej yig ($ 25) Stahl SSVT siv sijhawm tas mus li kom sov, yuav luag tsis muaj peev xwm ua kom sov, thiab muaj lub suab 60 Hz nrov nrov uas tawm los ntawm cov cua sov. Tsis paub meej tias kuv xav li cas txog qhov ntawd.
  • Pab txhais tes - Cov no yog cov cuab yeej muaj txiaj ntsig uas yuav luag tsim nyog rau kev siv tshuaj tua kab, thiab lawv pab thaum nws los txog rau gluing lub ntiaj teb mus rau cov kab acrylic.
  • Epoxy - Kuv siv Loctite Epoxy rau Plastics, uas ua haujlwm tau zoo. Thaum kuv poob ib qho ntawm cov ntiaj chaw caj npab (txuas rau lub ntiaj chaw) ntawm kev ua yuam kev, epoxy tsis tuav ob ntu ua ke. Tab sis tom qab ntawv ntxiv, Kuv tsuas yog muab nws txog 15 ntawm qhov pom zoo 24 teev kom kho tau zoo. Yog li tej zaum nws yuav tsis tau sib nrug lwm yam, tab sis kuv tsis tuaj yeem hais. Txawm li cas los xij, koj tuaj yeem siv tsuas yog hais txog cov nplaum lossis kua nplaum uas siv sijhawm ntev dua li ob peb feeb los kho, vim tias koj yuav xav tau kho kom zoo me ntsis tom qab koj thov cov nplaum.
  • Cov tshuaj txhuam hniav - Koj yuav xav tau cov no (lossis ib qho khoom siv pov tseg pov tseg) rau epoxy lossis ib qho 2 -ntu nplaum, tshwj tsis yog nws los nrog cov ntawv thov uas sib tov ob feem rau koj.
  • 3D Tshuab Luam Ntawv - Kuv tau siv cov no los luam tawm qee qhov ntawm cov txheej txheem iav (cov ntaub ntawv suav nrog), tab sis yog tias koj tuaj yeem tsim cov ntu no siv lwm txoj hauv kev (tej zaum tsis tub nkeeg), qhov no tsis tsim nyog.
  • Laser Cutter - Kuv siv qhov no los ua kom pom tseeb cov caj npab uas tuav lub ntiaj teb. Zoo li cov ntsiab lus yav dhau los, yog tias koj tuaj yeem ua ntu ntu siv lwm txoj hauv kev (lawv tuaj yeem txiav tau yooj yim siv lwm txoj hauv kev), qhov no tsis tsim nyog.

Software

  • Koj yuav xav tau Arduino IDE, lossis ib leeg ib leeg ntawm AVR-GCC thiab AVRDude
  • Android Studio, lossis Android Cov Cuab Yeej rau Dab noj hnub (uas tau tsis pom zoo lawm). Qhov no yuav yog qhov xaiv tau sai, vim tias kuv yuav tso cov ntaub ntawv ua ke APK rau Play Store

Tus Nqi Tag Nrho

Tus nqi tag nrho ntawm txhua qhov (rho tawm cov cuab yeej) yog kwv yees li $ 50. Txawm li cas los xij, ntau tus nqi teev npe rau ntau dua 1 yam khoom txhua. Yog tias koj tsuas suav ntau npaum li cas ntawm txhua qhov khoom siv rau txoj haujlwm no, tus nqi siv tau zoo yog kwv yees li $ 35. Cov khoom kim tshaj plaws yog lub thawv ntawv, yuav luag ib feem peb ntawm tag nrho cov nqi. Txog MAKE Course, peb yuav tsum tau muab lub npov tso rau hauv peb qhov kev tsim qauv, yog li nws yog qhov xav tau. Tab sis yog tias koj tab tom nrhiav txoj hauv kev yooj yim los txiav tus nqi ntawm txoj haujlwm no, tom qab ntawv txheeb xyuas koj lub khw muag khoom lub thawv loj hauv zos; lawv yuav muaj kev xaiv zoo ntawm cov thawv uas pheej yig dua li koj li "cov khoom siv hluav taws xob". Koj tseem tuaj yeem ua koj tus kheej lub ntiaj teb (ntoo kheej kheej yog dime kaum os) thiab pleev xim rau cov hnub qub es tsis txhob siv yas yas ua ntej. Koj tuaj yeem ua tiav txoj haujlwm no nrog tsawg dua $ 25!

Sau ntawv

  1. Koj tseem tuaj yeem siv txhua yam koj xav tau ua "ntiaj chaw". Koj tuaj yeem pleev xim koj tus kheej!
  2. Kuv paub tseeb tias ob qho no tsis tau tuaj ua ntej nrog Arduino R3 bootloader zoo li lawv tau hais tias lawv tau ua, lossis yuav tsum muaj qee qhov kev ua yuam kev. Txawm li cas los xij, peb yuav hlawv lub bootloader tshiab hauv qib tom ntej.
  3. Kuv xav pom zoo kom khaws cov khoom ntim ntau yam/ntau yam ntawm cov khoom tiv thaiv thiab cov khoom siv hluav taws xob (ceramic thiab electrolytic). Nws yog qhov pheej yig dua li no, thiab koj tseem tuaj yeem pib qhov haujlwm sai sai yam tsis tas yuav tos tus nqi tshwj xeeb kom tuaj txog.

Kauj Ruam 2: Tsim Cov Txheej Txheem iav

Txhim Kho Cov Txheej Txheem Iav
Txhim Kho Cov Txheej Txheem Iav
Txhim Kho Cov Txheej Txheem Iav
Txhim Kho Cov Txheej Txheem Iav
Txhim Kho Cov Txheej Txheem Iav
Txhim Kho Cov Txheej Txheem Iav

Qhov tseem ceeb, txhua kab hollow zes hauv ib leeg thiab nthuav tawm lawv lub zog ntawm qhov siab sib txawv. Tom qab ntawd txhua tus stepper motors tau muab tso rau ntawm qhov siab sib txawv, txhua tus tsav tsheb sib txawv. Kev faib cov iav yog 2: 1, txhais tau tias txhua tus neeg tsav tsheb yuav tsum ua ob txoj kev sib hloov ua ntej nws cov kab ua ib qho.

Rau txhua tus qauv 3D, Kuv tau suav nrog STL cov ntaub ntawv (rau kev luam ntawv) nrog rau cov neeg tsim khoom ib feem thiab cov ntawv sib dhos (yog li koj tuaj yeem hloov kho lawv dawb). Los ntawm cov ntawv xa tawm, koj yuav tsum tau luam tawm 3 lub zog loj, thiab 1 ntawm txhua yam ntxiv. Cov ntu tsis xav tau kev daws teeb meem zoo tshaj plaws z-axis, txawm hais tias lub txaj qib yog ib qho tseem ceeb kom lub zog stepper ua kom haum haum, tab sis tsis nruj heev uas nws tsis tuaj yeem nkag thiab tawm. Sau nyob ib ncig ntawm 10% -15% zoo li ua haujlwm tau zoo xwb.

Thaum txhua yam luam tawm, nws yog lub sijhawm los sib dhos cov khoom. Ua ntej tshaj, teeb tsa lub zog stepper mus rau lub tshuab hluav taws xob. Yog tias lawv nruj me ntsis, Kuv pom tias maj mam kov lawv nrog rauj ua haujlwm tau zoo dua li thawb nrog kuv tus ntiv tes xoo. Thaum ua tiav lawm, thawb lub cav rau hauv peb lub qhov hauv lub hauv paus. Tsis txhob thawb lawv txhua txoj hauv kev, vim tias koj yuav xav tau kho lawv qhov siab.

Thaum lawv nyob nyab xeeb hauv lawv tus tuav, tso Mercury kem (qhov siab tshaj plaws thiab qhov qis tshaj) mus rau hauv qab kem, tom qab ntawd Venus thiab Lub Ntiaj Teb. Kho cov steppers kom lawv sib raug zoo nrog txhua ntawm peb lub zog loj dua, thiab yog li ntawd lawv tsuas yog hu rau lub iav uas tsim nyog.

Kauj Ruam 3: Laser Txiav thiab Gluing Acrylic Bars

Laser Txiav thiab Gluing Acrylic Bars
Laser Txiav thiab Gluing Acrylic Bars
Laser Txiav thiab Gluing Acrylic Bars
Laser Txiav thiab Gluing Acrylic Bars

Txij li thaum kuv xav kom kuv lub hnub qub saib zoo nyob rau hauv lub teeb lossis hauv qhov tsaus ntuj, Kuv txiav txim siab mus nrog cov kab ntshiab acrylic tuav lub ntiaj teb. Txoj kev no, lawv yuav tsis cuam tshuam los ntawm lub ntiaj teb thiab cov hnub qub los ntawm qhov cuam tshuam koj qhov kev pom.

Ua tsaug rau qhov chaw tsim khoom txaus ntawm kuv lub tsev kawm ntawv, DfX Lab, Kuv muaj peev xwm siv lawv li 80W CO2 laser txiav los txiav tawm cov acrylic tuav. Nws yog txheej txheem ncaj ncaj. Kuv xa tus neeg tsim khoom kos duab ua pdf, thiab tom qab ntawd qhib thiab "luam tawm" pdf rau Retina Engrave tshuab luam ntawv tsav tsheb. Los ntawm qhov ntawd, Kuv hloov qhov loj thiab qhov siab ntawm tus qauv (TODO), teeb tsa lub zog teeb tsa (2 hla @ 40% lub zog ua haujlwm) thiab cia lub tshuab txiav laser ua tus so.

Tom qab koj tau txiav koj cov acrylic tuav, lawv yuav xav tau qee qhov kev txhuam. Koj tuaj yeem txhuam lawv nrog tshuaj ntxuav iav (tsuas yog xyuas kom nws tsis muaj cov tshuaj uas teev tseg nrog "N" ntawm no) lossis xab npum thiab dej.

Thaum qhov no ua tiav, koj yuav tsum tau lo cov kab rau txhua ntawm lub ntiaj teb. Kuv tau ua qhov no nrog Loctite Epoxy rau Plastics. Nws yog 2-ntu epoxy uas teev nyob ib ncig ntawm 5 feeb, feem ntau kho tom qab ib teev, thiab kho tau zoo tom qab 24 teev. Nws yog lub sijhawm zoo tshaj plaws, txij li thaum kuv paub tias kuv yuav xav hloov kho txoj haujlwm ntawm cov khoom me ntsis tom qab kuv tau siv cov tshuaj epoxy. Tsis tas li, nws tau hais tshwj xeeb rau acrylic substrates.

Cov kauj ruam no ncaj ncees. Cov lus qhia ntawm pob tau ntau tshaj qhov txaus. Tsuas yog tshem tawm qhov sib npaug ntawm cov tshuaj thiab tawv rau qee cov ntawv xov xwm lossis ntawv phaj, thiab sib tov kom huv nrog ntoo txhuam hniav. Tom qab ntawv thov lub dab me me mus rau qhov luv luv ntawm acrylic bar (ua kom lub tsho me me nyob deb ntawm lub bar) thiab dab me me rau hauv qab ntawm lub ntiaj chaw.

Tom qab ntawd tuav ob qho ua ke thiab kho ob qho tib si kom txog thaum koj xis nyob nrog lawv li cas. Txog qhov no, Kuv tau siv tes pab tuav lub acrylic bar nyob rau hauv qhov chaw (Kuv muab ib daim ntawv xuab zeb nruab nrab ntawm ob, txhuam sab tawm, txhawm rau tiv thaiv tus nab kuab los ntawm khawb qhov bar) thiab cov xov ntawm cov laug kom tuav lub ntiaj chaw tseem.

Thaum cov tshuaj epoxy tau kho zoo tag lawm (Kuv tsuas muaj sijhawm muab nws li 15 teev los kho, tab sis 24 teev yog qhov uas tau pom zoo) koj tuaj yeem tshem lub rooj sib txoos los ntawm tes pab thiab ntsuas qhov haum hauv kab hauv ntiaj teb. Lub tuab ntawm cov ntawv acrylic uas kuv siv yog 2.0mm, yog li kuv tau ua qhov sib luag qhov nyob hauv cov ntiaj chaw kab. Nws yog qhov haum nruj heev, tab sis hmoov zoo, nrog me ntsis ntawm cov xuab zeb, Kuv muaj peev xwm xaub kab hauv.

Kauj Ruam 4: Siv AT Cov Lus Hais kom Hloov Bluetooth Module Chaw

Siv AT Cov Lus Hais kom Hloov Bluetooth Module Chaw
Siv AT Cov Lus Hais kom Hloov Bluetooth Module Chaw

Cov kauj ruam no yuav zoo li me ntsis ntawm qhov kev txiav txim, tab sis nws yooj yim dua yog tias koj ua qhov no ua ntej siv HC-05 bluetooth module mus rau ntawm lub rooj tsavxwm.

Thaum koj tau txais koj li HC-05, koj yuav zoo li yuav hloov qee lub chaw teeb tsa, xws li lub npe ntaus ntawv (feem ntau "HC-05"), tus lej zais (feem ntau yog "1234"), thiab tus nqi baud (kuv tuaj yeem ua haujlwm ntawm 9600 baud).

Txoj hauv kev yooj yim tshaj plaws los hloov cov teeb tsa no yog los cuam tshuam ncaj qha nrog tus qauv los ntawm koj lub khoos phis tawj. Rau qhov no, koj yuav xav tau USB rau TTL UART hloov pauv. Yog tias koj muaj ib tus dag ib ncig, koj tuaj yeem siv qhov ntawd. Koj tseem tuaj yeem siv qhov uas los nrog cov laug cam uas tsis yog USB Arduino (Uno, Mega, Diecimila, thiab lwm yam). Ua tib zoo ntxig lub taub hau me me ntswj ntsia hlau ntawm ATMega nti thiab nws lub qhov (socket) ntawm Arduino board, thiab tom qab ntawd ntxig lub taub hau ncaj ntawm lwm sab. Ua tib zoo nqa cov nti me ntsis ntawm txhua sab kom txog thaum nws xoob thiab tuaj yeem rub tawm ntawm lub qhov (socket).

Tam sim no bluetooth module mus rau hauv nws qhov chaw. Nrog lub arduino txuas los ntawm koj lub computer, txuas Arduino RX rau HC-05 RX thiab TX rau TX. Txuas Vcc ntawm HC-05 txog 5V ntawm Arduino, thiab GND rau GND. Tam sim no txuas lub Xeev/Tus lej tus lej ntawm HC-05 dhau los ntawm 10k resistor rau Arduino 5V. Rub tus Key tus pin siab yog dab tsi tso cai rau koj tawm AT cov lus txib kom hloov chaw ntawm bluetooth module.

Tam sim no, txuas lub arduino rau koj lub khoos phis tawj, thiab rub lub Serial Monitor los ntawm Arduino IDE, lossis TTY los ntawm kab hais kom ua, lossis lub davhlau ya nyob twg emulator program zoo li TeraTerm. Hloov koj li baud tus nqi rau 38400 (lub neej ntawd rau AT kev sib txuas lus). Qhib CRLF (hauv kab ntawv saib qhov no yog qhov "Ob CR thiab LF" xaiv, yog tias koj siv kab hais kom ua lossis lwm txoj haujlwm, saib seb yuav ua li cas). Tus qauv sib txuas lus nrog 8 cov ntaub ntawv me me, 1 nres me ntsis, tsis muaj qhov sib luag, thiab tsis muaj kev tswj ntws (yog tias koj siv Arduino IDE koj tsis tas yuav txhawj txog qhov no).

Tam sim no ntaus "AT" ua raws los ntawm kev xa rov qab thiab kab ntawv tshiab. Koj yuav tsum tau rov qab teb "OK". Yog tias koj tsis ua, txheeb xyuas koj cov thaiv thiab sim cov nqi sib txawv.

Txhawm rau hloov lub npe ntawm hom ntaus ntawv "AT+NAME =", lub npe nyob qhov twg koj xav kom HC-05 tshaj tawm thaum lwm cov cuab yeej sim ua khub nrog nws.

Txhawm rau hloov tus password, ntaus "AT+PSWD =".

Txhawm rau hloov tus nqi baud, ntaus "AT+UART =".

Rau tag nrho cov npe ntawm AT cov lus txib, saib cov ntawv no.

Kauj Ruam 5: Tsim Tus Qauv Circuit

Tsim Circuit Court
Tsim Circuit Court

Kev tsim hluav taws xob tau yooj yim haum. Txij li Arduino Uno tsis mus rau hauv lub thawv nrog cov txheej txheem iav, Kuv txiav txim siab muab txhua yam tso rau hauv ib lub rooj tsavxwm, thiab tsuas yog siv ATMega328 yam tsis muaj ATMega16U2 usb-to-uart hloov pauv uas nyob ntawm Uno boards.

Muaj plaub ntu tseem ceeb rau cov txheej txheem (tsis yog qhov pom tseeb microcontroller): lub zog siv hluav taws xob, siv lead ua oscillator, tus tsav tsheb tsav lub cev muaj zog, thiab bluetooth module.

Hwj chim Mov

Lub zog xa khoom los ntawm 3A 5V lub zog xa khoom Kuv tau yuav los ntawm eBay. Nws xaus nrog 5.5mm OD, 2.1mm ID ID ntsaws ntsaws, nrog cov lus qhia zoo. Yog li cov lus txuas txuas rau 5V cov khoom siv, thiab ntiv nplhaib rau hauv av. Kuj tseem muaj 1uF decoupling capacitor kom du tawm suab nrov los ntawm lub zog siv. Daim ntawv ceeb toom tias 5V cov khoom siv txuas nrog VCC thiab AVCC, thiab hauv av txuas nrog GND thiab AGND.

Crystal Oscillator

Kuv siv 16MHz siv lead ua oscillator, thiab 2 22 pF capacitors raws li cov ntawv teev tseg rau ATMegaXX8 tsev neeg. Qhov no txuas nrog XTAL1 thiab XTAL2 pins ntawm lub microcontroller.

Stepper Tsav Tsav Tsheb

Tiag tiag, cov no tuaj yeem txuas nrog txhua tus pin. Kuv xaiv cov no vim tias nws ua rau kev teeb tsa nruj tshaj plaws thiab yooj yim tshaj plaws thaum nws los txog sijhawm muab txhua yam tso rau hauv lub rooj tsav xwm.

Bluetooth Module

HC-05's TX txuas nrog lub microcontroller's RX, thiab RX rau TX. Qhov no yog li txhua yam uas tau xa mus rau bluetooth module los ntawm cov cuab yeej siv deb yuav raug xa mus rau lub microcontroller, thiab lwm nqe. KEY tus pin tau raug txuas txuas txuas kom tsis muaj qhov yuam kev rov teeb tsa ntawm qhov chaw ntawm tus qauv.

Sau ntawv

Kuv tso 10k rub tawm tus tiv thaiv ntawm tus pin rov pib dua. Qhov no yuav tsis tsim nyog, tab sis kuv xav tias nws yuav tiv thaiv qhov tsis zoo uas tus pin rov pib dua qis dua ntev dua 2.5us. Tsis yuav, tab sis nws yog lawm.

Kauj Ruam 6: Npaj Txoj Haujlwm Stripboard

Kev npaj ntawm Stripboard Layout
Kev npaj ntawm Stripboard Layout

Cov kab txaij teeb tsa tsis nyuaj ib yam nkaus. Lub ATMega nyob hauv nruab nrab, nrog cov tsav tsheb tsav tsheb thiab lub tshuab bluetooth kab nrog cov pins uas lawv xav tau txuas nrog. Cov siv lead ua oscillator thiab nws cov capacitors zaum nruab nrab ntawm Stepper3 thiab HC-05. Ib qho kev txiav tawm lub tshuab hluav taws xob nyob ntawm qhov chaw uas lub hwj chim nkag los rau hauv pawg thawj coj, thiab ib qho lus dag ntawm Steppers 1 thiab 2.

X cim rau ntawm qhov chaw uas koj yuav tsum tau siv lub qhov ntiav kom tawg qhov sib txuas. Kuv tau siv 7/64 laum me ntsis thiab siv qhov drilled tsuas yog kom txog thaum lub qhov dav li qhov me ntsis txoj kab uas hla. Qhov no ua kom ntseeg tau tias cov tooj liab tau faib tag nrho, tab sis nws zam qhov tsis tsim nyog drilling thiab ua kom ntseeg tau tias lub rooj tsavxwm nyob ruaj khov.

Kev sib txuas luv luv tuaj yeem ua tau siv tus choj txuas, lossis los ntawm kev siv cov khoom me me, tsis muaj cov tooj liab tooj liab rau txhua kab. Kev dhia loj dua yuav tsum tau siv cov xaim hluav taws xob nyob hauv qab lossis saum lub rooj tsavxwm.

Kauj ruam 7: Soldering

Soldering
Soldering
Soldering
Soldering
Soldering
Soldering
Soldering
Soldering

Faj seeb: Qhov no yuav tsis yog kev qhia ntawm kev siv tshuaj yaj yeeb. Yog tias koj tsis tau muag dua ua ntej, YouTube thiab Cov Lus Qhia yog koj cov phooj ywg zoo tshaj plaws ntawm no. Muaj ntau ntau qhov kev qhia zoo nyob rau ntawd uas qhia cov hauv paus thiab cov ntsiab lus zoo dua (Kuv tsis tau thov kom paub cov ntsiab lus zoo dua; txog li ob peb lub lis piam dhau los, Kuv nqus ntawm qhov muag).

Thawj qhov kuv tau ua nrog tus tsav tsheb tsav lub cev thiab lub tshuab bluetooth tau desolder khoov txiv neej lub taub hau thiab cov laug ntawm cov txiv neej ncaj lub taub hau rau sab nraub qaum ntawm pawg thawj coj saib. Qhov no yuav tso cai rau lawv kom tiaj tus ntawm kab txaij.

Cov kauj ruam tom ntej yog txhawm rau tshem tawm txhua lub qhov uas xav tau txhawm rau sib txuas yog tias koj tsis tau ua.

Tom qab ua tiav lawm, ntxiv ib qho xov tooj uas tsis muaj hlua txuas rau saum lub rooj tsavxwm. Yog tias koj xav kom lawv nyob hauv qab, koj tuaj yeem ua qhov no tom qab.

Kuv tau muab tso rau ntawm IC qhov (socket) ua ntej muab cov ntsiab lus siv rau cov khoom seem. Nco ntsoov koj nco ntsoov cov lus qhia ntawm lub qhov (socket)! Ib nrab ntawm qhov kev nkag nkag yuav tsum nyob ze rau 10k resistor. Txij li nws tsis nyiam nyob hauv qhov chaw ua ntej nws tau muag, koj tuaj yeem (thov ua ntej ua ntej ntawm chav kawm) tin ob lub kaum sab xis rov qab, thiab thaum tuav lub qhov (socket) nyob rau hauv qhov chaw los ntawm sab hauv qab, rov ua cov tinning. Tam sim no lub qhov (socket) yuav tsum nyob hauv qhov chaw yog li koj tuaj yeem txuas tus so ntawm tus pin.

Rau cov ntu nrog cov coj (cov khoom siv hluav taws xob thiab cov neeg tawm tsam hauv qhov no), tso cov ntu thiab tom qab khoov cov coj me ntsis yuav tsum ua kom lawv nyob hauv qhov chaw thaum siv cov laug.

Tom qab txhua yam tau muab tso rau hauv qhov chaw, koj tuaj yeem siv cov snips me me (lossis txij li kuv tsis muaj ib puag ncig, cov ntsia hlau qub txiab) los txiav cov coj.

Tam sim no, qhov no yog qhov tseem ceeb. Kos, kos ob zaug, thiab triple kos txhua qhov kev sib txuas. Mus ncig lub rooj tsavxwm nrog lub ntsuas ntsuas txuas mus kom ntseeg tau tias txhua yam txuas nrog uas yuav tsum tau txuas nrog, thiab tsis muaj ib yam txuas nrog uas yuav tsum tsis yog.

Ntxig lub nti rau hauv lub qhov (socket), ua kom ntseeg tau tias qhov ib nrab ntawm qhov kev nkag nkag nyob ntawm ib sab. Tam sim no ntsaws lub hwj chim rau ntawm phab ntsa, thiab tom qab ntawd mus rau dc lub hwj chim txuas. Yog tias lub teeb ntawm tus tsav tsheb nres teeb, tshem lub hwj chim thiab tshawb xyuas txhua qhov kev sib txuas. Yog tias ATMega (lossis ib feem ntawm pawg thawj coj saib, txawm tias lub xaim hluav taws xob xa hluav taws xob) tau kub heev, tshem tawm lub hwj chim thiab txheeb xyuas txhua qhov kev sib txuas.

Nco tseg

Soldering flux yuav tsum tau rov muaj npe ua "Literary Magic". Tiag tiag, flux ua rau tej yam yees siv. Thov ua siab dawb pub txhua lub sijhawm ua ntej koj yuav laug.

Kauj Ruam 8: Hlawv Bootloader ntawm ATMega

Hlawv Bootloader ntawm ATMega
Hlawv Bootloader ntawm ATMega

Thaum kuv tau txais kuv lub ATMegas, vim qee qhov lawv yuav tsis tso cai kos duab los rub rau lawv, yog li kuv yuav tsum rov hlawv lub bootloader dua. Nws yog txheej txheem yooj yim. Yog tias koj paub tseeb tias koj twb muaj Arduino/optiboot bootloader ntawm koj lub nti, koj tuaj yeem hla cov kauj ruam no.

Cov lus qhia hauv qab no tau coj los ntawm kev qhia ntawm arduino.cc:

  1. Rub tawm ArduinoISP kos duab rau koj lub Arduino board. (Koj yuav tsum xaiv lub rooj tsavxwm thiab chaw nres nkoj txuas los ntawm Cov Ntawv qhia zaub mov uas haum rau koj lub rooj tsavxwm)
  2. Hlau txuas rau Arduino board thiab microcontroller raws li qhia hauv daim duab rau sab xis.
  3. Xaiv "Arduino Duemilanove lossis Nano w/ ATmega328" los ntawm Cov Cuab Yeej> Pawg ntawv qhia zaub mov.(Los yog "ATmega328 ntawm lub khob cij (8 MHz lub moos sab hauv)" yog siv qhov teeb tsa me me piav qhia hauv qab no.)
  4. Khiav Cov Cuab Yeej> Hlawv Bootloader> w/ Arduino li ISP. Koj yuav tsum tsuas yog yuav tsum hlawv lub bootloader ib zaug. Tom qab koj tau ua tiav, koj tuaj yeem tshem cov jumper xov txuas nrog tus pin 10, 11, 12, thiab 13 ntawm Arduino board.

Kauj Ruam 9: Arduino Sketch

Txhua yam ntawm kuv tus lej muaj nyob ntawm GitHub. Nov yog Arduino kos duab ntawm GitHub. Txhua yam yog cov ntaub ntawv tus kheej, thiab nws yuav tsum yooj yim to taub yog tias koj tau ua haujlwm nrog Arduino cov tsev qiv ntawv ua ntej.

Qhov tseem ceeb, nws lees txais txoj kab kev nkag ntawm UART interface uas muaj cov phiaj xwm txoj haujlwm rau txhua lub ntiaj teb, hauv qib. Nws yuav siv cov haujlwm no, thiab ua rau lub tshuab hluav taws xob txav mus rau txhua lub ntiaj chaw mus rau nws txoj haujlwm.

Kauj Ruam 10: Tshaj Tawm Arduino Sketch

Uploading Arduino Sketch
Uploading Arduino Sketch

Cov hauv qab no feem ntau yog theej los ntawm ArduinoToBreadboard ntawm arduino.cc site:

Thaum koj lub ATmega328p muaj Arduino bootloader rau nws, koj tuaj yeem rub cov program rau nws siv USB-rau-serial hloov pauv (FTDI nti) ntawm Arduino board. Txhawm rau ua, koj tshem lub microcontroller los ntawm Arduino board kom FTDI nti tuaj yeem tham nrog lub microcontroller ntawm lub khob cij. Daim duab saum toj no qhia yuav ua li cas txuas RX thiab TX kab los ntawm Arduino board rau ATmega ntawm lub khob cij. Txhawm rau program microcontroller, xaiv "Arduino Duemilanove lossis Nano w/ ATmega328" los ntawm Cov Cuab Yeej> Pawg ntawv qhia zaub mov. Tom qab ntawv rub tawm li qub.

Yog tias qhov no ua pov thawj ntau dhau ntawm txoj haujlwm, tom qab ntawv kuv tau ua dab tsi tsuas yog ntxig lub ATMega rau hauv DIP28 lub qhov (socket) txhua lub sijhawm kuv xav tau los ua haujlwm, thiab coj nws tawm tom qab. Tsuav koj tau ceev faj thiab ua siab zoo nrog cov pins, nws yuav tsum zoo.

Kauj ruam 11: Android App Code

Ib yam li tus lej Arduino, kuv tus lej Android yog nyob ntawm no. Ib zaug ntxiv, nws tau sau nws tus kheej, tab sis ntawm no yog cov lus luv luv.

Nws siv sijhawm hnub los ntawm tus neeg siv thiab suav qhov twg Mercury, Venus, thiab Lub Ntiaj Teb tau/yog/yuav nyob rau hnub ntawd. Nws kwv yees ib tag hmo kom ua kom yooj yim dua, tab sis tej zaum kuv yuav ntxiv sijhawm txhawb nqa sai. Nws ua cov kev suav no siv lub tsev qiv ntawv Java txaus los ntawm lub npe AstroLib, uas tuaj yeem ua tau ntau dua qhov kuv siv nws rau. Thaum nws muaj cov kev tswj hwm no, nws xa tsuas yog qhov ntev ("txoj haujlwm" uas koj ib txwm xav txog thaum hais txog lub ntiaj chaw orbits) mus rau bluetoooth module rau txhua lub ntiaj teb. Nws yog qhov yooj yim!

Yog tias koj xav tsim txoj haujlwm koj tus kheej, koj yuav tsum xub tso koj lub xov tooj rau hauv hom tsim tawm. Cov lus qhia rau qhov no yuav nyob ntawm koj lub xov tooj lub chaw tsim khoom, tus qauv ntaus ntawv nws tus kheej, yog tias koj tab tom khiav tus qauv kev cai, thiab lwm yam; tab sis feem ntau, mus rau Chaw -> Txog Xov Tooj thiab coj mus rhaub rau "Tsim Tus lej" 7 zaug yuav tsum ua nws. Koj yuav tsum tau txais daim ntawv ceeb toom toast hais tias koj tau qhib kev tsim tawm hom. Tam sim no mus rau Chaw -> Kev Tsim Kho Kev Xaiv thiab qhib USB Debugging. Tam sim no ntsaws koj lub xov tooj rau koj lub computer siv tus nqi + cov ntaub ntawv USB cable.

Tam sim no rub tawm lossis clone txoj haujlwm los ntawm GitHub. Thaum koj muaj nws nyob hauv ib cheeb tsam, qhib nws hauv Android Studio, thiab ntaus Khiav (khawm ua si ntsuab ntawm lub cuab yeej saum toj kawg nkaus). Xaiv koj lub xov tooj los ntawm cov npe thiab ntaus OK. Hauv koj lub xov tooj, nws yuav nug yog tias koj ntseeg lub computer koj txuas nrog. Ntaus "yog" (lossis "ib txwm ntseeg lub khoos phis tawj no" yog nws yog koj li, tshuab ruaj ntseg). Lub app yuav tsum suav sau, nruab rau hauv koj lub xov tooj, thiab qhib.

Kauj ruam 12: Siv App

Kev siv lub app yog yooj yim haum.

  1. Yog tias koj tsis tau ua khub HC -05 nrog koj lub xov tooj lawm, ua li ntawd hauv Chaw -> Bluetooth.
  2. Ntaus "txuas" los ntawm cov ntawv qhia zaub mov xaiv nyob rau sab xis saum toj.
  3. Xaiv koj lub cuab yeej los ntawm daim ntawv teev npe
  4. Tom qab ob peb feeb, koj yuav tsum tau txais ntawv ceeb toom tias nws tau txuas nrog. Yog tias tsis yog, xyuas tias Planetarium tau qhib, thiab tsis yog hluav taws.
  5. Xaiv hnub tim. Scroll nce thiab nqis ntawm lub hli, hnub, thiab lub xyoo combo pickers, thiab siv cov xub khawm kom dhia rov qab lossis mus tom ntej los ntawm 100 xyoo nyob rau ib lub sijhawm.
  6. Ntaus xa!

Koj yuav tsum pom Planetarium pib txav nws lub ntiaj teb ntawm qhov no. Yog tsis yog, xyuas kom nws tau qhib.

Kauj Ruam 13: Cov Lus Cim Kawg

Ua kuv thawj qhov haujlwm tseem ceeb, nws yog qhov tsis txaus ntseeg hais tias kuv tau kawm ntau yam. Tiag tiag, nws tau qhia kuv ntau txog txhua yam los ntawm kev kho kho tus lej, txhawm rau txhawm rau txhawm rau txhawm rau phiaj xwm phiaj xwm, txhawm rau kho cov vis dis aus, txhawm rau ua qauv 3D, microcontrollers, rau … Zoo, Kuv tuaj yeem mus ntxiv.

Lub ntsiab lus yog, yog tias koj mus rau USF (Go Bulls!), Thiab txaus siab rau yam khoom no, kawm MAKE Course. Yog tias koj lub tsev kawm ntawv muaj qee yam zoo sib xws, coj mus. Yog tias koj tsis nyob hauv tsev kawm lossis tsis muaj chav kawm zoo ib yam, tsuas yog ua qee yam! Qhov tseeb, qhov no yog kauj ruam nyuaj tshaj plaws. Tau txais tswv yim yog qhov nyuaj. Tab sis thaum koj muaj lub tswv yim, khiav nrog nws. Tsis txhob hais tias "huag, qhov ruam" lossis "huag kuv tsis muaj sijhawm". Tsuas yog xav txog dab tsi yuav ua rau lub tswv yim txaus thiab ua nws.

Tsis tas li, google ncig saib seb puas muaj chaw hackers nyob ze koj. Yog tias koj txaus siab ua cov phiaj xwm kho vajtse thiab software, tab sis tsis paub pib qhov twg, qhov no yuav yog qhov chaw zoo pib.

Kuv vam tias koj txaus siab rau Cov Lus Qhia no!

Pom zoo: