Cov txheej txheem:

TimePrntr: 6 Kauj Ruam (nrog Duab)
TimePrntr: 6 Kauj Ruam (nrog Duab)

Video: TimePrntr: 6 Kauj Ruam (nrog Duab)

Video: TimePrntr: 6 Kauj Ruam (nrog Duab)
Video: thaij movie nrog phaj ej tawb 5/6/2022 2024, Kaum ib hlis
Anonim
Image
Image

Puas tau saib ib txheej ntawm Thermal Receipt Printer Guts los ntawm Adafruit tab sis xav paub tias muaj txiaj ntsig dab tsi kuv tuaj yeem ua nrog qhov no? Zoo saib tsis muaj ntxiv: timePrntr yog lub digital/analog lo lus moos uas luam tawm hnub thiab sijhawm tam sim no ntawm kev nias lub pob thiab ua ntu zus ib ntus. Nws yooj yim rau xaim, tsis muaj teeb meem tsim, thiab yooj yim rau program. Koj yuav tsis tas yuav xav txog lub sijhawm nws tau rov ua dua nrog cov ntawv sau ib nrab tas mus li ntawm lub sijhawm!

Kauj Ruam 1: Kauj Ruam 1: Nrhiav Cov Ntaub Ntawv thiab Luam Cov Ntaub Ntawv

Txoj haujlwm no xav tau kev paub me ntsis ntawm Arduino cov phiaj xwm kev paub, qee qhov paub nrog kev tsim qauv thiab ntsuas kev sib tw thiab qee qhov txuj ci yooj yim siv tshuab. Txhawm rau tsim nws tiag tiag lub tshuab luam ntawv 3D kuj tseem muaj txiaj ntsig thiab txawm tias tus qauv qub zoo li kuv Cov Replicator 2 tuaj yeem luam tawm cov ntaub ntawv suav nrog. Cov khoom siv tas li feem ntau muaj los ntawm Adafruit:

Yam Yuav Tsum Tau:

  1. 1XThermal Receipt Printer Guts
  2. 1X DS1307 Lub Sijhawm Sijhawm-Sijhawm Tiag
  3. 1 X Pro Trinket 5v 16MHz
  4. 1X 1/2 Loj Pawg Mov Ci
  5. 1X7.5v 3A DC Fais Fab Khoom
  6. 1X 6mm Square Tactile Hloov
  7. Hookup hlau (24ga)
  8. Txiv neej breakaway header pins
  9. M/F, M/M, F/F jumper xov hlau
  10. 1X 2.1mm Barrel Jack adapter

Yeem Yam: (rau kev teeb tsa)

  1. 1X2.1mm Vaj Huam Sib Luag Mount Barrel Jack
  2. 1XAdafruit Perma-Proto 1/2 Loj Cij Board
  3. 2XShort Header Kit rau Plaub
  4. 3D Luam Ntawv Case (.stl cov ntaub ntawv txuas nrog)
  5. #4 x 1/4 "Flat Head Machine Screws
  6. #2 x 1/4 "Pan Head Sheet Hlau Screws

Cov ntawv luam tawm siv sijhawm li rau teev tag nrho ntawm kuv Cov Replicator 2 yog li tam sim no yuav yog lub sijhawm zoo kom lawv mus thaum koj ua lwm yam khoom siv hluav taws xob ua haujlwm

Kauj Ruam 2: Kauj Ruam 2: Nyeem thiab nkag siab txog Circuit Diagram

Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov
Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov

Nov yog qhov yooj yim Circuit Court uas yuav tsum tsis muaj cov khoom siv ntxiv uas tsis yog cov uas tau teev tseg. Uas tau hais tias, nws tsim nyog koj lub sijhawm los saib cov kab kos hauv kab ntawv txuas thiab nkag siab tias lub cuab yeej tau teeb tsa li cas. Nws yog qhov yooj yim yooj yim thiab yooj yim rau kev kho rau cov uas muaj nrab mus rau kev txawj ntse nrog Arduino.

Cov txheej txheem yooj yim yog zoo li no: Cov cuab yeej siv SoftwareSerial ntawm Pro Trinket ntxiv rau Adafruit's Thermal Printer Library, thiab Adafruit's RTC (Lub Sijhawm Sijhawm) Lub Tsev Qiv Ntawv.

Lub Trinket yuav sib tham nrog lub tshuab luam ntawv cua sov tshaj li siv SoftwareSerial lub tsev qiv ntawv nrog Trinket tus pin 6 txhais tias TX (xa) thiab tus pin 5 txhais tias yog RX (tau txais). Cov pins txuas nrog RX thiab TX pins ntawm lub tshuab luam ntawv cua sov feem. Nco ntsoov tias qhov no yog hla qhov xwm txheej uas Trinket's TX tus pin txuas rau lub tshuab luam ntawv RX tus pin thiab rov ua dua. Adafruit muaj qhov txuas zoo tshaj plaws-phau ntawv qhia rau lub tshuab luam ntawv yog tias koj xav tau qhov tob tob saib ntawm nws lub peev xwm.

Lub sijhawm teev lub sijhawm tiag tiag yog tus saib xyuas lub sijhawm tas li yog li koj lub tshuab luam ntawv yuav paub lub sijhawm txawm tias nws tsis tau ntsaws! Trinket yuav pov npav lub sijhawm los ntawm RTC module ntawm I2C thiab lub tsev qiv ntawv wire.h. Trinket lub neej ntawd I2C SDA thiab SCL pins yog A4 thiab A5 feem. Cov no tau yooj yim txuas rau SDA thiab SCL pins ntawm RTC pawg thawj coj.

Thaum kawg qhov kev hloov pauv tam sim txuas nrog tus pin A2 thiab hauv av thiab pib ua ntej hauv cov cai nrog Input_Pullup.

Lub zog yog yooj yim txaus thiab. Lub tshuab luam ntawv cua sov yuav tsum txuas ncaj qha rau +7.5VDC los ntawm lub zog hluav taws xob thiab hauv av. Nws yog lub cuab yeej tshaib plab thiab 2A yog qhov yuav tsum tau ua. Cov khoom siv ntawm no yog 3A thiab ua haujlwm zoo. Trinket's Bat (roj teeb lossis Vin) tus pin txuas nrog +7.5VDC ib yam. RTC module yuav tau txais nws lub zog los ntawm Trinket's +5V tus pin.

Kauj Ruam 3: Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Ci

Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov
Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov
Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov
Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov
Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov
Kauj Ruam 3: Kuaj Cov Tshuab Luam Ntawv, Ua Lub Circuit Court ntawm Lub Rooj Mov Mov

Cov duab Fritzing yuav pab koj txhim kho thiab ntsuas qhov Circuit Court ntawm lub khob cij uas tsis muaj kuab paug. Cov kauj ruam no yuav xav tau qee qhov kev sib txuas tab sis raws li koj yuav xub ua cov txheej ntawm txiv neej lub taub hau pins mus rau Pro Trinket thiab RTC module. Nco ntsoov taw tes ntev pins ntawm Pro Trinket thiab ntev pins UP ntawm RTC. Thaum lawv tau muag lawm koj tuaj yeem siv M/F M/M tus pin los ua kev sib txuas ntawm lub khob cij. V + thiab Cov kab hauv av nyob rau sab saum toj ntawm lub rooj mov khob cij yuav tsum txuas nrog rau +/- pins feem ntawm 2.1mm chim chim adapter nrog M/M jumper xov hlau.

Ntawm kuv lub rooj noj mov kuv tau siv tus txiv neej ntev lub taub hau taub hau muab rtc thiab lub tshuab luam ntawv cua sov kom yooj yim ntsaws. Qhov no tuaj yeem pom meej dua hauv cov duab tom ntej ntawm lub xov tooj txuas nrog lub perma-proto bread board, yog li saib ua ntej yog nws zoo li tsis meej pem.

Yog tias koj saib ze ntawm daim duab kuv nyiag nyiag txuas txuas rau 5V tus pin ntawm RTC tom qab Pro Trinket. Qhov no tsis tsim nyog tab sis nws ua kom lub rooj tsavxwm huv thiab yooj yim rau taug qab. Tus pin hauv av rau RTC yog txuas rau hauv av xaim ntawm qhov hloov. SDA thiab SCL tus pin rau RTC tus qauv tau hla hla kuv daim duab, uas yog qhov tseeb, tsuas yog xyuas kom lawv tau txuas nrog SDA-SDA thiab SCL-SCL ntawm koj lub khob cij.

Yog tias koj npaj yuav muab cov kab hluav taws xob no txuas rau lub rooj tsav xwm perma-proto thiab teeb tsa nws hauv qhov xwm txheej nws yog qhov tseem ceeb uas koj tso qhov hloov pauv nyob ze ntawm nruab nrab ntawm pawg thawj coj saib! Ua raws daim duab los ntawm Fritzing yuav tso nws kom raug.

Ua ntej koj ua ib qho ntawm no nws raug nquahu kom ua raws Adafruit's Thermal Printer Guide los ntsuas lub tshuab luam ntawv cua sov thiab pom nws yog tus nqi baud. Raws li Adafruit tus nqi no tuaj yeem sib txawv ntawm lub tshuab luam ntawv mus rau lub tshuab luam ntawv!

Thaum nws yog txhua yam sib ntsib thiab ua haujlwm koj tuaj yeem xa cov cai los ntawm cov kauj ruam tom ntej los sim nws!

Kauj Ruam 4: Kauj Ruam 4: Tshaj Tawm Txoj Cai

Tam sim no koj tau npaj rau program Pro Trinket! Ua ntej koj pib, nyeem thiab ua raws ntu USB bootloader ntu ntawm Adafruit's Pro Trinket phau ntawv qhia. Nco ntsoov tias koj tuaj yeem tso Blink code ua ntej mus.

Thaum qhov ntawd ua tiav koj tuaj yeem rub lub sijhawm timePrntr code hauv cov ntawv.zip txuas. Unzip nws rau hauv koj lub tsev qiv ntawv Arduino IDE thiab qhib qhov program. Yuav tsum muaj peb lub tab hauv qhov program nrog ob daim ntawv header rau qee cov duab uas cov cai siv los luam tawm cov cuab yeej qhia. Tshaj tawm cov cai rau Pro Trinket thiab sim koj lub sijhawmPrntr!

Ib qho ntawv tseem ceeb ntawm no: cov cai siv lub sijhawm ua haujlwm ntawm kev sib sau los teeb tsa lub moos ntawm RTC module. Rau qhov no los ua haujlwm RTC tus qauv yuav tsum tau txuas kom raug mus rau Pro Trinket. Yog tias lub sijhawm tsis raug, nws yuav yog tias SDA thiab SCL tus pin tsis txuas nrog.

Kauj Ruam 5: Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto

Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto
Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto
Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto
Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto
Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto
Kauj Ruam 5: Muab cov Cheebtsam tso rau hauv Pawg Thawj Tswj Hwm Perma-Proto

Txhawm rau ua kom lub cuab yeej no ruaj khov thiab npaj tau los teeb tsa hauv 3D-luam ntawv txhua yam koj yuav tsum tau ua tam sim no yog muab txhua yam tso rau ntawm Perma-Proto Board. Kuv tau xaiv lub rooj tsav xwm no rau kuv thawj cov khoom siv hluav taws xob Qhia tau vim tias nws cia koj yooj yim txav ib feem ntawm ib lub rooj noj mov mus rau lwm qhov! Ua raws cov txheej txheem hauv cov duab thiab kab duab yav dhau los raws nraim thiab koj yuav tsis muaj teeb meem haum nws hauv rooj plaub.

Pro Trinket, xov hlau, thiab lub taub hau taub hau rau lub tshuab luam ntawv thiab RTC module yuav zaum ntawm lub rooj tsavxwm pem hauv ntej. Lub khawm yuav raug laug rau sab nraum qab ntawm lub rooj tsavxwm.

Ua ntej kos cim kab uas ob tus 12-pin luv poj niam lub taub hau yuav raug teeb tsa ntawm lub rooj sib tham perma-proto (Kab C thiab G). Cov taub hau no ua rau nws li Pro Trinket tshem tau! Tsis muaj dab tsi ntxiv yuav tsum tau txuas nrog thiab muag hauv cov kab no!

Txiav cov xov hlau kom ntev thiab hle lawv kom lawv tau zoo insulated thiab txuas lawv mus rau lub rooj zaum ib ntus los ntawm kev khoov cov hlau lead nyob rau tom qab ntawm lub rooj tsavxwm. Tso tus swtich, tab sis paub tias nws yuav kawg yuav raug muab pauv mus rau Sab Rov Qab ntawm lub rooj tsavxwm.

Txhawm rau txuas tus txiv neej thiab poj niam lub taub hau tsuas yog siv lub rooj mov me me los tuav cov pins nyob rau hauv qhov chaw thaum koj ua thawj ob peb lub ntsiab lus. Koj kuj yuav tsum tau muab tshuaj txhuam rau ntawm ib lub taub hau taub hau (ncaj lossis 90 yuav ua haujlwm) rau lub hwj chim txuas rau sab saum toj +/- txoj kab ntawm perma-proto. Qhov no yuav tso cai rau koj txuas lub zog nrog ib khub ntawm cov poj niam dhia dhia mus rau lub vaj huam sib luag mount chim jack thaum sib dhos zaum kawg.

Yog tias koj ua raws daim duab 5 tus pin txuas rau lub tshuab luam ntawv yuav ntsaws nrog cov tab uas tig mus rau Pro Trinket. RTC yog xaim raws li qhia nrog F/F jumpers.

Tsis txhob hnov qab sim txhua yam

Kauj Ruam 6: Kauj Ruam 6: Rooj Sib Tham Kawg

Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg
Kauj Ruam 6: Rooj Sib Tham Kawg

Kev txwv txhua qhov teeb meem uas tsis tau pom dua nrog koj cov ntawv luam tawm txhua yam yuav tsum tau npaj mus thaum cov khoom siv hluav taws xob tau ua tiav thiab muag.

Nyob rau sab saum toj ntawm rooj plaub khawm khawm peb lub caij nplooj ntoo hlav tuaj yeem ua tib zoo glued nrog CA kua nplaum rau hauv peb qhov kev sib thooj nkag rau sab hauv ntawm rooj plaub. Sab qhov khawm ntawm lub khawm yuav tsum tig ntsej muag sab nrauv.

Txhawm rau npaj rau kev sib dhos zaum kawg koj yuav tsum ua yog txuas qee cov xov hlau rau koj 2.1mm vaj huam sib luag mount chim chim. Tsuas yog kaw ib qho kawg ntawm ib qho dub thiab ib qho liab F/F lossis M/F jumper xov hlau (6 qhov ntev yuav ua haujlwm, xyuas kom tseeb tias koj tawm ntawm Poj niam kawg ntawm ob qho tib si). Saj qhov txiav kawg thiab muab nws txuas rau tus pin uas tsim nyog chim chim.

Yog tias koj tsis paub meej tias tus pin twg yuav tsum tau siv rau, koj tuaj yeem siv ntau lub ntsuas los nrhiav qhov tsis sib xws nrog tus ncej nruab nrab thiab sab hauv phab ntsa ntawm lub jack. Cov ntawv tshaj tawm sab hauv ntawm lub jack yog +Sab zoo

Thaum qhov ntawd tau muag lawm, ntswj lub thoob lub thoob rau hauv rooj plaub nrog cov txiv ntseej thiab lub tshuab ntxhua khaub ncaws.

Loosely tso cov khoom siv hauv cov haujlwm zaum kawg raws li qhia. Txhua lub xov hlau yuav tsum nyob hauv qab txuas txhua cov xov hlau mus rau lawv cov npe uas tsim nyog.

Ntsia lub tshuab luam ntawv nrog lub me me #2 cov ntsia hlau thiab ntsia hlau lub proto-board hauv nrog #4 lub taub hau yias.

Ntsia RTC nrog ib tus #2 ntsia hlau ntawm sab xis. Lwm qhov yog pinned rau tus ncej.

Xaub lub tshuab luam ntawv tswj mus rau nws lub bracket (nws yog ntsug) thiab cov kab xaum xim av yuav tsum nqes nrog rau sab du ntawm lub rooj tsavxwm mus rau lub tshuab luam ntawv.

Xaub lub perma-proto board rau hauv nws lub bracket nrog khawm tig rau pem hauv ntej. Pro Trinket yuav tsum nyob ntawm sab laug.

Muab sab saum toj rau ntawm rooj plaub thiab ntsia nws ua ke nrog 4X #4 Lub taub hau ncaj lub taub hau rau hauv qab thiab koj tau ua tiav, npaj los luam lub sijhawm thaum nias lub pob!

Clocks Contest
Clocks Contest
Clocks Contest
Clocks Contest

Runner Up hauv Kev Sib Tw Clocks

Pom zoo: