Cov txheej txheem:

Arduino Retro Style MP3 Player !: 8 Kauj Ruam (nrog Duab)
Arduino Retro Style MP3 Player !: 8 Kauj Ruam (nrog Duab)

Video: Arduino Retro Style MP3 Player !: 8 Kauj Ruam (nrog Duab)

Video: Arduino Retro Style MP3 Player !: 8 Kauj Ruam (nrog Duab)
Video: And You, How Would You Lift A BMW R 1250 GS? Criminel Rider #shorts #bmw 2024, Hlis ntuj nqeg
Anonim
Image
Image

Mp3 player yuav zoo li qub dhau lawm. Smartphones tuaj yeem ua tau zoo dua li qhov no! Nrog rau tag nrho cov apps thiab cov kev pabcuam streaming, koj tsis tas yuav rub cov nkauj lossis nkauj.

Tab sis thaum kuv ntsib DFplayer module nws ua rau kuv zoo siab heev nrog cov pawg ntawm cov yam ntxwv. Los ntawm kev tswj ntim, 3W lub tshuab ua kom nrov, sib npaug, muaj peev xwm ua si tshaj tawm ntawm cov ntaub ntawv mp3, thiab ntau ntxiv. Kuv xav tshawb xyuas txhua cov yam ntxwv no thiab ua rau lawv siv tau zoo hauv ib lub cuab yeej. Yog li no MP3 player yog qhov kev xaiv zoo tshaj.

Qhov khoom kawg tau nthuav heev los siv nrog cov yam ntxwv hauv qab no:

  • Kev hloov kho EQ
  • Tswj Volume
  • Pause/play MP3 files
  • Tom ntej/yav dhau los
  • 2 screen navigation
  • roj teeb rov qab tau

Khoom siv

Nov yog cov npe ntawm ntu uas kuv tau siv hauv txoj haujlwm no (txuas txuas nrog):

  • Arduino rau mini
  • DFPlayer
  • 1.3 nti OLED
  • Pushbuttons
  • Suab nkaus
  • TP4056
  • Roj teeb lipo
  • Swb hloov
  • PCB

Kauj Ruam 1: Teeb tsa OLED Zaub

Teeb DFPlayer
Teeb DFPlayer

1.3-nti OLED thiab 0.96-nti OLED yuav zoo ib yam, tab sis lawv tsis koom nrog tib tus tsav tsheb, Yog li yog koj sim siv lub tsev qiv ntawv zoo li Adafruit SSD1306, cov zaub yuav tsis ua haujlwm vim tias 1.3inch OLED zaub muaj Sh1106 tso saib tsav tsheb.

Yog li, peb yuav siv lub tsev qiv ntawv U8g2. Koj tuaj yeem rub tawm lub tsev qiv ntawv no rau koj Arduino IDE nrog qhov txuas no lossis mus rau koj tus thawj tswj tsev qiv ntawv thiab teeb tsa qhov tseeb ntawm U8g2.

Lub tsev qiv ntawv no muaj ntau qhov hloov pauv tau thaum piv rau lwm lub tsev qiv ntawv, piv txwv li, koj tuaj yeem ua tib txoj cai rau ntau yam ntawm cov lus nrog hloov pauv tus lej tsawg heev thiab qhov tseem ceeb muab rau koj ntau yam fonts thiab qhib cov cim los siv hauv koj qhov project.

Lub 1.3-nti zaub muaj 4 tus pin VCC, GND, SDA, thiab SCL. Txij li cov zaub txhawb nqa I2C kev sib txuas lus, txuas VCC thiab GND rau +5V thiab GND ntawm Arduino pro mini thiab txuas SDA thiab SCL rau A4 thiab A5 ntawm Arduino pro mini.

Koj tuaj yeem sim cov zaub ib qho los ntawm kev khiav cov duab kos uas tuaj nrog u8g2 lub tsev qiv ntawv lossis koj tuaj yeem suav sau thiab khiav kuv daim duab uas nyob hauv Soundpod.rar cov ntaub ntawv lossis siv Github txuas.

Kauj Ruam 2: Teeb DFPlayer

DFplayer yog tus qauv MP3 me me thiab pheej yig nrog cov lus yooj yim uas tuaj yeem txuas ncaj qha rau tus hais lus yam tsis muaj lub suab nrov.

Nta

  • 24 -ntsis DAC
  • Txhawb nqa FAT16, FAT32 file system
  • Mus txog 32GB SD daim npav txhawb nqa
  • Built-in 3Watt Amplifier
  • txhawb 100folders, txhua daim nplaub tshev tuaj yeem txhawb nqa txog 1000songs
  • 5 qib ntawm EQ hloov kho thiab 30 qib ntawm kev hloov ntim

Circuit Court

Cov qauv no tuaj yeem siv tus kheej nrog lub roj teeb txuas, hais lus & laub khawm lossis tuaj yeem siv nrog Arduino lossis lwm yam microcontroller. Nws siv UART/kev sib txuas lus txuas rau kev xa thiab txais cov lus txib rau microcontrollers. Yog li peb tuaj yeem siv Arduino cov ntawv nyeem/sau ua haujlwm los tswj cov qauv no.

Txuas 4 nias lub pob rau tus pin 2, 3, 4 ntawm Arduino rau kev tswj hwm lub ntim/pib/nres thiab txuas tus pin Rx thiab Tx pin ntawm DFplayer rau Arduino tus pin 10 thiab 11. Thaum kawg, txuas tus hais lus rau spk+, spk- ntawm DFplayer, thiab txuas +5v muab rau VCC thiab GND rau GND ntawm DFplayer.

Koj tuaj yeem sim koj tus lej nrog cov lej uas nyob hauv daim nplaub tshev 'DFPlayer'. Cov lus qhia no yuav pab koj yooj yim dua pib nrog Arduino thiab DFPlayer.

Kauj Ruam 3: Npaj Cov Cheeb Tsam

Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam
Npaj Cov Cheeb Tsam

Koj yuav tau pom qhov kawg ua tau zoo li tsis zoo thiab koj yuav xav tias nws yuav yog txoj hauv kev zoo dua los luam tawm PCB. Kuv pom zoo tag nrho! Tab sis qhov no yog qhov piv txwv lom zem dua thiab tus kheej lawv zoo nkauj heev los saib ib yam. Xijpeem, Kuv yuav tso qhov txuas uas koj tuaj yeem siv qhov Circuit Court uas twb muaj lawm thiab tsim PCB.

Txij li muaj cov khoom siv ntau dhau los siv, 2 sab PCB yuav yog qhov zoo tshaj plaws haum. Tom qab ntawd txiav 2 tog PCB hauv txoj hauv kev uas kab rov tav nws muaj 14 qhov thiab ntsug 21. Tom qab ntawd tso lub laub khawm uas yuav pab peb hauv kev taw qhia, ncua, thiab ua si ntawm zaj nkauj. Thaum tso lwm cov khoom koj yuav tsum tau ua tib zoo saib xyuas qhov twg koj tso lawv thiab pes tsawg tus pin txhua qhov muaj. Los ntawm kuv qhov kev paub tsim lub tsev no ob zaug, khaws tsuas yog cov pins uas tau siv thiab txiav lawv tas, Nws yuav daws teeb meem ntau ntxiv hauv txoj kev. Koj tuaj yeem xa mus rau daim duab kab hluav taws xob no thiab txiav cov pins uas tsis tsim nyog.

Kauj Ruam 4: Muab Cov Khoom Siv

Muab cov Cheebtsam
Muab cov Cheebtsam
Muab cov Cheebtsam
Muab cov Cheebtsam
Muab cov Cheebtsam
Muab cov Cheebtsam

Muab cov pins digital ntawm Arduino ze rau cov nyees khawm thiab cov lej sib piv taw qhia rau sab saum toj ntawm lub rooj tsavxwm yog li nws yuav yooj yim txuas rau OLED zaub. Tom qab ntawd ua cov txheej txheem tib yam rau DFplayer, tso tus qauv nyob rau hauv ib txoj hauv kev uas SD daim npav qhov tau taw qhia sab hauv, thiab tseem tshem tawm qhov sib cais dub los ntawm lub taub hau, yog li DFplayer muaj qhov tsim nyog haum hauv pawg thawj coj nrog rau Arduino.

Kuv xav khiav DFplayer nrog lub peev xwm tag nrho, yog li kuv ntxiv lub zog me me hloov pauv 3.7 volts los ntawm lub roj teeb lithium rau 5V. Tab sis thaum kawg, tus qauv no tsis tuaj yeem muab tam sim no txaus los khiav DFPlayer. Thiab kuv xav tias nws ua tau zoo dua nrog 3.7-volt roj teeb ib leeg Yog li ntawd, thaum kawg, kuv pov tseg lub zog hloov pauv (ntsuab PCB module nyob ib sab ntawm Arduino pro mini).

Thaum kawg, kom ua tiav nws tawm sab nraum qab ntawm PCB teeb tsa lub swb hloov pauv thiab 3.5mm lub mloog pob ntseg.

Kauj Ruam 5: Txhuam Txhua Yam Ua Ke

Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke
Soldering Txhua Yam Ua Ke

Ua raws daim duab qhia chaw thiab muab cov khoom sib txuas sib txuas ua ke, qhov uas koj tuaj yeem sib txuas ob txoj kev sib txuas tau yooj yim, thiab sim zam kev siv xov hlau. Hloov chaw, siv cov hlua ib leeg liab qab los ua qhov sib txuas thiab xyuas kom koj tsis txhob kov ib qho ntawm cov khoom siv hauv qab ib yam nkaus. Thiab Kuv Muab 2 txoj hlua hluav taws xob ib leeg tso rau ntawm lub rooj tsavxwm, qhov no yuav siv tom qab los txuas lub TP4056.

Kauj Ruam 6: Ntau Soldering

Ntau Soldering!
Ntau Soldering!
Ntau Soldering!
Ntau Soldering!
Ntau Soldering!
Ntau Soldering!

Tso tus TP4056 tus qauv, uas peb yuav siv los them peb lub MP3 player nrog micro-USB. Kuv siv daim kab xev ob tog los tso lub roj teeb Lithium polymer nyob ib sab ntawm tus qauv them nyiaj. Qhov no yog 300Mah tus qauv uas haum zoo hauv PCB. Yog tias koj tsim ib qho loj dua, Koj tuaj yeem nthuav lub roj teeb tau yooj yim yam tsis muaj kev hloov pauv mus rau qhov tam sim no.

Thaum kawg, muab cov OLED tso rau kom tiav nws tawm, Yog tias koj tuaj yeem ua raws daim duab qhia chaw thiab tso cov khoom sib koom ua ke ib yam nws yuav yooj yim dua rau ua haujlwm nrog.

Kauj Ruam 7: Tshaj Tawm Txoj Cai thiab Ua Touches

Uploading Txoj Cai thiab Tiav Touches
Uploading Txoj Cai thiab Tiav Touches
Uploading Txoj Cai thiab Tiav Touches
Uploading Txoj Cai thiab Tiav Touches
Uploading Txoj Cai thiab Tiav Touches
Uploading Txoj Cai thiab Tiav Touches

Tom qab ntawd kuv tau muab qee qhov kov kawg, los ntawm muab nws qee lub ntsej muag sib npaug thiab kuv tau ua lub qhov nyob rau ntawm lub ces kaum saum toj kawg nkaus yog li kuv tuaj yeem siv qhov no los ua qhov tseem ceeb!

Tam sim no, peb tuaj yeem saib mus rau hauv qhov kev ua haujlwm ib feem!

Cov lus qhia rau kev teeb tsa cov tsev qiv ntawv xav tau thiab yuav siv lawv li cas yog muab hauv Readme cov ntaub ntawv ntawm kuv qhov chaw cia khoom ntawm qhov haujlwm no. Tsuas yog ua raws cov lus qhia thiab siv FDTI tus qauv rau qhov program uas yog hauv cov ntaub ntawv soundpod.rar rau Arduino pro mini. Peb tab tom siv FDTI tus qauv vim tias Arduino pro mini tsis txhawb USB rau qhov program nws.

Thaum kawg, Kuv tshem lub teeb los ntawm Arduino pro mini thiab DFplayer kom txuag tau qee lub roj teeb thiab kev cuam tshuam uas nws tau ua thaum ua nkauj.

Kauj Ruam 8: Ua tiav Txoj Haujlwm

Tiav Project!
Tiav Project!
Tiav Project!
Tiav Project!

Yog tias koj qhib lub Circuit Court tom qab xa cov cai, koj tuaj yeem pom Arduino khau looj plab hlaub thiab OLED npo ua haujlwm. Ua ntej dhia hauv thiab pom txhua tus yam ntxwv ntawm tus qauv MP3 no, luam qee cov ntaub ntawv suab paj nruag rau SD. Txog qhov no, koj yuav tsum ua raws qee qhov kev cog lus rau npe, qhov twg koj cov npe yuav tsum muaj npe 01, 02,..etc thiab koj cov ntaub ntawv hauv txhua daim nplaub tshev yuav tsum muaj npe 001, 002, 003..etc.

Yog li txhawm rau ua txhua yam yooj yim Kuv muaj tsab ntawv nab nab hauv GitHub repo nrog rau cov cai rau txoj haujlwm no. Tsuas yog sau tsab ntawv hauv qhov hais kom ua sai sai thiab koj yuav tsum tau txais GUI interface uas koj tuaj yeem xa cov ntaub ntawv mus rau koj daim npav SD hustle dawb rau koj DFPlayer.

Ntawm no koj tuaj yeem tsim ntau daim nplaub tshev raws li koj xav tau, thiab koj tuaj yeem ntxiv ntau npaum li cov ntaub ntawv raws li koj xav tau hauv cov ntawv teev npe. Koj tseem tuaj yeem tshem cov nplaub tshev thiab cov ntaub ntawv tsis xav tau (Qhov kev zov me nyuam tau tsim los zoo li software los ntawm kaum xyoo dhau los yog li nws phim peb mp3 tsim). Ntxig daim npav SD thiab qhib lub pob ntseg (Qhov ntawd yog lub npe kuv tau muab rau kuv li MP3 player XD).

Koj tuaj yeem pom kev ua haujlwm ntawm lub suab nrov no hauv cov vis dis aus tshaj tawm saum toj no!

Pom zoo: