Cov txheej txheem:

PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox: 6 Cov Kauj Ruam (nrog Duab)
PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox: 6 Cov Kauj Ruam (nrog Duab)

Video: PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox: 6 Cov Kauj Ruam (nrog Duab)

Video: PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox: 6 Cov Kauj Ruam (nrog Duab)
Video: Remote Robot finger playing Vintage AMI Jukebox 2024, Kaum ib hlis
Anonim
PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox
PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox
PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox
PlotClock, WeMos thiab Blynk Ua Si Vintage AMI Jukebox

Plaub qhov kev hloov pauv tshiab tau ua txoj haujlwm no ua tau: 1977 Rowe AMI Jukebox, PlotClock cov cuab yeej siv caj npab, WeMos/ESP 8266 microcontroller thiab Blynk App/Cloud service.

NCO TSEG: Yog tias koj tsis muaj Jukebox ntawm tes - tsis txhob tsum nyeem! Txoj haujlwm no tuaj yeem siv tau yooj yim los tswj ntau yam tswj hwm los ntawm tib neeg cov ntiv tes. Ib qho piv txwv tuaj yeem yog tus neeg siv ntiv tes ua si Xylophone ib txwm - tej zaum qhov qhia tau los ntawm koj!

Kuv 40 xyoo Rowe AMI R-81 Jukebox tseem ua haujlwm tau zoo ua si nkauj yas yas yas qub los ntawm 60's, 70 'thiab 80's. Qhov hnyav tshaj 160 kg (360 lbs) tus neeg ua si no tsis yooj yim nqa raws li mp-players niaj hnub no, tab sis nyob hauv internet lub sijhawm, tam sim no muaj peev xwm nqa lub jukebox thiab 200 cov ntaub ntawv yas hauv koj lub hnab tshos-zoo li ntawm chav kawm! Thiab koj tseem tuaj yeem siv koj tus kheej cov playlists khaws cia hauv microcontroller!

Amazing PlotClock neeg hlau yog xub tsim los qhia lub sijhawm tam sim no los ntawm kev kos lub sijhawm tus lej ntawm daim ntawv tshem tawm. Kuv qhov kev hloov pauv rau PlotClock yog siv nws los ua tus ntiv tes neeg hlau rau nyem Jukebox nkauj xaiv cov nyees khawm.

Plotclock "ntiv tes" tau tsav los ntawm 3 servos tswj los ntawm WeMos microcontroller. Qhov kev xav tsis txaus no yog (yuav luag) Arduino Uno sib xws thiab muaj peev xwm WiFi, yog li nws tuaj yeem tswj hwm lub jukebox wirelessly los ntawm txhua qhov chaw hauv ntiaj teb.

Cov nplaum ntawm lub ncuav mog qab zib los ntawm qhov yooj yim tsis txaus ntseeg los siv Blynk App thiab lawv Blynk Cloud Server muab lub xov tooj zoo/ntsiav tshuaj tus neeg siv sib cuam tshuam nrog kev txav mus los.

Kauj ruam 1: Kho vajtse

Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse

Jukebox

Qhov project jukebox yog 1977 Rowe AMI R-81. Txhua lub jukebox qub nrog xaiv cov nyees khawm yuav ua - sau tseg ob peb qhov kev txwv los ntawm PlotClock: PlotClock tus thawj caj npab tsim tuaj yeem npog thaj tsam li 5 x 12 cm yog li lub pob ntawv jukebox (thaj chaw suav nrog txhua lub khawm xaiv) yuav tsum yog txog qhov loj me. Cov nyees khawm ntawm cov laus jukeboxes yuav xav tau lub zog thawb ntau dua PlotClock servos tuaj yeem muab tau.

AMI R-81 muaj lub cim xeeb uas nws tuaj yeem khaws txhua 200 qhov kev xaiv. Kev xaiv raug ua si raws qhov kev txiav txim uas lawv tau khaws cia hauv cov ntawv xov xwm (hom carousel), tsis yog qhov kev txiav txim uas lawv tau xaiv. Ntau qhov kev xaiv rau ib daim ntawv tsuas yog ua si ib zaug.

PlotClock

Plotclock yog cov khoom lag luam DIY suav nrog cov khoom siv tshuab, 3 servos, Arduino Uno R3, Arduino Extension board thiab USB cable. Txog ib ncig 30 USD qhov no yog qhov yuav zoo (piv txwv li. Banggood.com). Arduino, txuas ntxiv thiab USB cable tsis siv rau txoj haujlwm no.

Muaj ntau qhov internet zoo/YouTube qhia rau kev sau Plotclock - piv txwv li. qhov no: PlotClock cov lus qhia

static1.squarespace.com/static/52cb189ee4b012ff9269fa8e/t/5526946be4b0ed8e0b3cd296/1428591723698/plotclock_final_instructions.pdf

WeMos

WeMos D1 R2 yog ESP8266 raws microcontroller. Nws tuaj yeem tsim kho siv Arduino IDE thiab muaj peev xwm WiFi yog li nws yog ib qho khoom siv zoo tshaj plaws rau txoj haujlwm no.

Kauj ruam 2: Calibration

Calibration
Calibration

Kev ntsuas ntsuas yog lub luag haujlwm txhawm rau nrhiav lub kaum ntse ntse kom raug rau lub kaum ntse ntse servo (nruab nrab ntawm 0 txog 180 degrees) kom haum rau lub cev txoj haujlwm rau xaiv cov nyees khawm. Cov txiaj ntsig ntawm lub kaum sab xis tuaj yeem pom los ntawm trigonometry arithemitics lossis siv CAD software. Kuv tau txais kwv yees qhov txiaj ntsig los ntawm kuv tus phooj ywg uas paub siv AutoCad.

Txawm li cas los xij, qhov ntsuas ntsuas zaum kawg yuav tsum tau ua los ntawm kev sim thiab ua yuam kev. Siv lub pob teeb tsa kos rau ntawm daim ntawv Nws yog qhov ua tau los ua "ntsuas lub desktop" txhawm rau nrhiav qhov tseeb qhov tseem ceeb.

Kauj ruam 3: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Thaiv

Kev sib txuas los ntawm Plotclock servos rau Wemos tau ua tiav nrog 5 xov hlau: +5, GND, D4, D5 thiab D6. Saib cov ntsiab lus hauv cov duab thiab cov cai.

Txhim kho ntawm Jukebox

Kuv tsis xav ua ib lub qhov ntsia hlau rau 40 xyoo jukebox uas tau muaj sia nyob ntev tsis muaj kev puas tsuaj loj. Siv cov roj hmab muag muag Kuv tau kho ib daim ntawm txhuas lub kaum sab xis hauv qab lub jukebox console. Roj hmab foob ua kom nruj thiab tuaj yeem tshem tawm yam tsis muaj qhov cim tseg. PlotClock lub cev xav tau ob lub kaum me me txhuas los pab ua kom haum nws ntawm cov phaj acrylic. Cov phaj acrylic yog tom qab haum rau daim ntawv teev npe nrog ob lub caij nplooj ntoo caij nplooj ntoo hlav tawm hauv qhov ua tau los ua qhov kev hloov kho zaum kawg ntsug thiab kab rov tav.

Kauj ruam 4: Blynk

Blynk
Blynk

Blynk yog app pub dawb rau kev tswj hwm ntau hom microcontrollers nyob deb. Nrog Blynk koj tuaj yeem yooj yim tsim cov neeg siv zoo siv ntau hom widgets. Tsuas yog ib lub cuab yeej xav tau rau txoj haujlwm no: Cov lus sib tham.

Kauj ruam 5: Software

App ntawm Blynk

Yog tsis muaj coding ntawm sab app. "Kev sib tham" ntawm lub app (Blynk) thiab microcontroller (WeMos) tau ua los ntawm "Cov pins virtual" uas qhov tseem ceeb yog cov channel rau xa thiab tau txais cov ntaub ntawv ntawm ob. Tus lej pin yog piv txwv siv los xa kab lej ntawm cov nkauj xaiv los ntawm Blynk app rau WeMos, thiab Wemos ua haujlwm tas li, piv txwv li. xa cov lus txib rau Plotclock servos.

WeMos code

/**************************************************************

Rooj widget ntawm V2 ********************************************** ****************/ #define BLYNK_PRINT Serial #include #include #include char auth = "--YUS AUTH CODE--"; // Jukebox project char ssid = "--YUS SSID--"; char pass = "--YUS WIFI PASSWORD--"; sib c [50]; // Array rau Jukebox kaw cov haujlwm (100-299) Servo myservo1; // nqa Servo myservo2; // sab caj npab Servo myservo3; // sab caj npab int pos1 = 0; int pos2 = 0; int pos3 = 0; btn = np. teeb tsa tsis muaj dab tsi () {myservo1.attach (2); // pin D4, nqa myservo2.attach (14); // pin D5, sab laug myservo3.attach (12); // tus pin D6, txoj cai myservo1.write (140); myservo2.write (90); myservo3.write (90); Serial.begin (115200); Blynk.begin (auth, ssid, dhau); // ceeb toom tam sim thaum pib // String msg = "Jukebox WeMos txuas nrog rau:"; //Blynk.notify(msg + ssid); // tshem tawm cov lus thaum pib Blynk.virtualWrite (V2, "clr"); populateTable (); } BLYNK_WRITE (V2) // Txais cov lus txib los ntawm Table widget V2 {String cmd = param [0].asStr (); // param [0] = "xaiv" lossis "tsis xaiv", param [1] = kab Serial.print ("\ nTable: BLYNK_WRITE (V2) cmd:"); Serial.print (cmd); int xaiv = c [param [1].asInt ()]; // Xaiv kab lej yog nyob rau hauv param [1] Serial.println ("\ nSelection:"); Serial.println (xaiv); process_selection (xaiv); } tsis muaj dab tsi populateTable () {int i = 0; Serial.println ("Populating table …"); Blynk.virtualWrite (V2, "ntxiv", 0, "Ua Kuv Tus Menyuam - Tus Thawj Coj", 112); c [kuv] = 112; Blynk.virtualWrite (V2, "ntxiv", 1, "Number One - Jerry Williams", 176); kuv ++; c [kuv] = 176; Blynk.virtualWrite (V2, "ntxiv", 2, "Txhua Yam Kuv Nyiam - The Beatles", 184); kuv ++; c [kuv] = 184; Blynk.virtualWrite (V2, "ntxiv", 3, "Thaum Lub Caij Ntuj Sov - Mungo Jerry", 236); kuv ++; c [kuv] = 236; Blynk.virtualWrite (V2, "ntxiv", 4, "Black Cloud - Chubby Checker", 155); kuv ++; c [kuv] = 155; Blynk.virtualWrite (V2, "ntxiv", 5, "Mamy Blue - Pop -Tops", 260); kuv ++; c [kuv] = 260; Blynk.virtualWrite (V2, "ntxiv", 6, "Nws Yuav Mus Zoo - Gerry & Pacemakers", 145); kuv ++; c [kuv] = 145; Blynk.virtualWrite (V2, "ntxiv", 7, "Kuv Txoj Kev - Tom Jones", 193); kuv ++; c [kuv] = 193; Blynk.virtualWrite (V2, "ntxiv", 8, "San Bernadino - Christie", 149); kuv ++; c [kuv] = 149; Blynk.virtualWrite (V2, "ntxiv", 9, "Tus Twist - Chubby Checker", 169); kuv ++; c [kuv] = 169;

ncua (1000);

} void process_selection (int selection) {// parse 3-digit xaiv (piv txwv li. 178) rau 3 nyees khawm: int btn1 = int (xaiv/100); // thawj khawm Serial.println ("\ nBtn1:"); Serial.println (btn1); yog (btn1 == 1 || btn1 == 2) // thawj lub pob yuav tsum yog 1 lossis 2 - txwv tsis pub rov pib dua {push_button (btn1); xaiv = xaiv - (btn1 * 100); int btn2 = int (xaiv/10); // thib ob khawm Serial.println ("\ nBtn2:"); Serial.println (btn2); push_button (btn2); xaiv = xaiv - (btn2 * 10); int btn3 = int (xaiv); // thib peb khawm Serial.println ("\ nBtn3:"); Serial.println (btn3); push_button (btn3); } lwm {push_button (11); // rov pib khawm} // rov pib ua haujlwm servo thaum txhua qhov ua tiav qeeb (2000); myservo1.write (140); myservo2.write (90); myservo3.write (90);} tsis muaj dabtsis push_button (int btn) {// qhov no hu ua 3 zaug rau txhua qhov xaiv // qhov khawm khawm thawb yog ua tiav tom qab txhua khawm (nrhiav 'khawm tiag') hloov (btn) {rooj plaub 1: set_servo_angles (134, 136); // 1 tawg; rooj plaub 2: set_servo_angles (128, 110); // 2 tawg; rooj plaub 3: set_servo_angles (112, 88); // 3 tawg; rooj plaub 4: set_servo_angles (89, 68); // 4 tawg; rooj plaub 5: set_servo_angles (62, 55); // 5 tawg; rooj plaub 6: set_servo_angles (172, 131); // 6 tawg; rooj plaub 7: set_servo_angles (163, 106); // 7 tawg; rooj plaub 8: set_servo_angles (140, 83); // 8 tawg; rooj plaub 9: set_servo_angles (104, 58); // 9 tawg; rooj plaub 0: set_servo_angles (75, 36); // 0 tawg; rooj plaub 11: set_servo_angles (36, 30); // 11 tawg; } // kawg hloov} void set_servo_angles (int pos2, int pos3) {myservo2.write (pos2); myservo3.write (pos3); // Servo cov haujlwm npaj tau - ua lub pob nyem tiag: ncua (500); myservo1.write (60); // qis qeeb (500); myservo1.write (140); // nce ncua (500); } tsis muaj dab tsi voj () {Blynk.run (); }

Kauj Ruam 6: Cov Txheej Txheem Yav Tom Ntej

Video widget - nyob vis dis aus & tso suab rau Blynk App (twb tau sim - ua haujlwm)

Webhook widget - playlist ntawm qhov xav tau rub tawm los ntawm huab (twb tau sim - ua haujlwm)

Cov lus rooj - qee qhov kev txhim kho me me rau cov widget tau txais tos (cov lus qhia xa mus rau Blynk cov tsim tawm)

Pom zoo: