Cov txheej txheem:

Cov Menyuam MP3 Music Box: 6 Kauj Ruam (nrog Duab)
Cov Menyuam MP3 Music Box: 6 Kauj Ruam (nrog Duab)

Video: Cov Menyuam MP3 Music Box: 6 Kauj Ruam (nrog Duab)

Video: Cov Menyuam MP3 Music Box: 6 Kauj Ruam (nrog Duab)
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Cov Menyuam MP3 Music Box
Cov Menyuam MP3 Music Box
Cov Menyuam MP3 Music Box
Cov Menyuam MP3 Music Box

Thaum nrhiav qee qhov tshiab DIY cov phiaj xwm ib puag ncig arduino Kuv pom qee cov tswv yim zoo ntawm RFID raws li MP3 player rau Cov Menyuam. Thiab muaj ib lub thawv khoom ua si zoo tshaj plaws nyob rau tom khw - cov hais mav no yog txoj cai. Lawv tau ua lag luam zoo los ntawm lawv lub tswv yim ntse. Txheeb tawm - koj yuav pom lawv nplooj ntawv!

Raws li kuv ob tus menyuam tau nkag mus mloog audiobooks thiab suab paj nruag, ntau thiab ntau ntxiv, thiab tseem tab tom siv cov pob zeb zoo qub qub nrog txhua qhov kev tuav tuav, kuv txiav txim siab tsim lub thawv MP3 player nrog qee qhov zoo los ua kom nws yog tus neeg zoo khoom ua si rau lawv. Tom qab kuv nyuam qhuav yuav kuv thawj 3D tshuab luam ntawv txoj haujlwm no zoo li yog qee qhov chaw ua si zoo rau dhia mus rau 3D luam ntawv.

Yog li kuv pib mus rau theem tswvyim - yam twg uas kuv xav siv - RFID, MP3 Player, WLAN (tso tseg tom qab), IMU tswj, tso saib LCD, Tswb moos, them nyiaj wireless … Yuav tsum tau ua qee qhov kev tshawb fawb, yam khoom kuv xav tau. Cov khoom twg kuv tuaj yeem siv tau? Kuv tseem muaj IMU, LCD module, qee qhov Arduino nanos.

Nrog qee qhov kev paub dhau los hauv kev ntsuas thiab ntsuas lub rooj sib dhos ua tau tsis pub dhau 1-2 tom qab kev ua haujlwm.

Kev luam ntawv ntawm Lub Thawv, suav nrog lub hauv paus, phaj npog thiab chaw nres tsheb them nyiaj, siv sijhawm me ntsis (12+ teev nyob ntawm lub tshuab luam ntawv thiab cov chaw txiav), tab sis kuv tau ua qhov ntawd thaum lub sijhawm siv tshuaj txhuam.

Kauj Ruam 1: Cheeb Tsam

Cheebtsam
Cheebtsam

Cov khoom siv yog lub ntsiab lus tseem ceeb tib lub sijhawm. Nov yog cov npe ntawm cov khoom kuv siv rau txoj haujlwm no.

1. LCD Zaub 1602 2x16 Cov Cim Loj 5 V 122*44 MM xiav

2. RFID nyeem ntawv- NFC RFID-RC522 RF IC

3. MP3 Player - DFPlayer Mini MP3 Player Module MP3 Voice Decode Board Rau Arduino Txhawb TF Card U- Disk IO/Serial Port/AD

4. Loudspeaker- 4 ohm 3Watts 53MM Square Speaker 36MM Sab Nraud Sib Nqus Ua Npuas Ncauj Ntug Silvery Cap

5. Micro SD Card 8GB

6. MPU6050 3 Axis Analog Gyroscope Sensor

7. MINI USB NANO V3.0 CH340 5 V 16 Mt Atmega328 Micro Controller Board (yuav luag txhua tus pins siv!)

8. DS3231 Precision RTC - Alarmclock module

9. Powerbank JETech 3400 mAh

10. Universal DIY PCBA Qi Wireless Charger Txais Tus Qauv - Xiav + Dub

11. Tsab Ntawv PCB Board Protoboard Tinned Universal Breadboard Prototyping Solderless FR4 PCB Ob Tog Ob Tog 5x7 cm 50x70mm FR4

12. 1x 2N 3904: Transistor NPN TO-92 40V 0, 2A 0, 5W

13. 1x1kOhm resistor txhawm rau txwv lub hauv paus tam sim no, 3x220Ohms 0, 5 w (sib npaug! Kom tau txais lub zog wattage - ib tus tuaj yeem siv qhov tshwj xeeb tiv thaiv ntau dua, Kuv muaj cov no) rau tam sim no thauj khoom nruab nrab ntawm emitter thiab sau. 2x1kOhms rau TX thiab RX kab ntawm Arduino thiab DFplayer los tua lub suab nrov - Kuv tsis muaj teeb meem ntawm no.

14. Qee tus qauv DIY cov khoom siv hluav taws xob - cov hlau txuas, kab laug sab, clipper, txuas, txuas …

14. Lub zog ntau thiab ob peb teev los sib sau ua ke:)

Tus nqi tag nrho rau cov khoom siv saum toj no ~ 30-35 € - feem ntau los ntawm aliexpress.com thiab dx.com. Kev xa khoom siv qee lub sijhawm, tab sis tus nqi yog qhov zoo.

Kauj Ruam 2: Kev Sib Txuas Hluav Taws Xob

Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob

Kuv tsis tau kos tus qauv, thiab kuv tsis tau siv cov cuab yeej siv tau zoo li Fritzing lossis zoo sib xws. Tej zaum ntawm lub sijhawm tom ntej hauv lub sijhawm. Cov lus piav qhia hauv qab no qhia txog kev sib txuas. Txhua tus pin uas tsis tau hais tsis txuas nrog.

Thaum lub sij hawm soldering Kuv khaws ntsuas kev sib txuas ntawm cov kab, kawg kos nrog cov khoom sib txuas tau ua tiav. Tsis muaj dab tsi cuam tshuam ntau dua li saib mus rau ib qho kev sib txuas tsis zoo tom qab txhua qhov tau sib sau ua ke. Kev saib xyuas feem ntau ntawm GND thiab qhov hluav taws xob +.

Tus pin teeb tsa ntawm ib qho kev tivthaiv muaj nyob hauv google.

LC Zaub

LED ---- NCO

LED+--- Ntawm 220Ohm rau 5V lub txhab nyiaj

DB7 --- Arduino D2

DB6 --- Arduino D3

DB5 --- Arduino D7

DB4 --- Arduino D8

E --- Arduino A1/Pin 15

R/W --- GND

RS --- Arduino A0/Pin 14

V0 --- 10Kohm potentiometer Rx (los kho qhov sib txawv)

VDD --- Powerbank +5V

NWS-GND

DFPlayer MP3 neeg uas ua ntawv

VCC ---+5V Powerbank

RX --- software serial Arduino D5 (muaj peev xwm ntawm 1kOhm resistor thaum muaj teeb meem suab nrov)

TX --- software serial Arduino D9 (muaj peev xwm ntawm 1kOhm resistor thaum muaj teeb meem suab nrov)

SPK1 --- Hais lus +

GND --- Powerbank GND

SPK2 --- Hais lus-

Tsis khoom --- Arduino A7

GND --- NCO

NFC522 RFID nyeem ntawv

3.3V --- Arduino 3.3V

GND --- NCO

MISO --- Arduino D12

MOSI --- Arduino D11

SCK --- Arduino D13

SDA --- Arduino D10

IMU 6050 gyro sensor

VCC --- Arduino 3.3V

GND --- GND Powerbank

SCL --- Arduino A5/SCL

SDA --- Arduino A4/SDA

ADO ---+3.3V (Lub teeb liab) rau I2C chaw nyob 0x69

DS3231 Lub sijhawm tiag tiag

3, 3V --- Arduino 3.3V

SDA --- Arduino A4/SDA

SCL --- Arduino A5/SCL

GND --- NCO

Tam sim no load Trigger

2N3904 tus xa tawm - GND

2N3904 puag - ntawm 1kOhm rau Arduino D6

2N3904 tus neeg sau khoom - ntawm 3x220Ohms (sib dhos!

Powerbank

V+ thiab GND kab ntawm Powerbank txuas nrog los ntawm tus poj niam USB txuas rau lub hwj chim txuas ntawm lub nkoj thiab txuas rau Vin/GND ntawm Arduino). Lub txhab nyiaj tau hloov pauv ntawm microswitch hauv phaj npog. Kuv tau siv lub tshuab me me rau V+ los ntawm kev tiv thaiv kev thauj mus rau GND los sim ua lub xeev thauj khoom thiab hloov nws. Tom qab ntawd qhov kev thauj khoom tam sim no ua rau nws tsis txhob tawm mus.

+5V - Lub hwj chim txuas ntawm lub nkoj +5V

GND -Lub hwj chim txuas ntawm lub nkoj GND

+5V ntawm powerbank - thauj khoom tiv thaiv - microswitch Pin A

GND - microswitch tus pin B.

Kauj Ruam 3: Cov Khoom Siv Hluav Taws Xob

Electronics los ua ke
Electronics los ua ke
Electronics los ua ke
Electronics los ua ke
Electronics los ua ke
Electronics los ua ke

Cov khoom siv hauv pawg thawj coj - MP3 player, RTC, IMU, Arduino tau teeb tsa hauv qhov chaw. Xaiv thiab nce/nqis cov yuam sij, RFID, LCD thiab lub zog txuas nrog ntawm tus kheej soldered 'band cables' ntev txaus kom haum rau hauv lub thawv tom qab.

Microswitch txhawm rau hloov ntawm lub txhab nyiaj tau tsau daim npog - tsis qhia hauv pcitures.

Kuv siv lub hwj chim ruaj khov los sim teeb tsa.

Thaum sib dhos kuv sim txhua qhov kev tivthaiv ib tus zuj zus -> piv txwv Arduino sketches rau cov khoom siv tau pab tau heev ntawm no.

Raws li lub powerbank muaj qhov pib-hloov-tawm khiav nrog qhov tsawg tam sim no Kuv suav nrog transistor tswj lub zog thauj khoom txhua txhua 15 vib nas this rau 100 ms ntawm 70 Ohm resistor (ua tau 3 sib npaug 220 Ohms kom txaus rau wattage txaus, nws tsuas yog lub ncov luv xwb tab sis peb tus neeg tawm tsam yuav qhia tawm tam sim no thiab yog li tsis ua haujlwm siab dua qhov tshwj xeeb).

Tom qab ntawd nws hloov tawm tias Mini DFPlayer tab tom rub> 70mA tsis tu ncua. Raws li kuv tau siv lub powerbank pib-hloov-tawm tseem rau kev hloov pauv ntawm lub npov (los ntawm tsis ua rau lub nra tam sim no ntxiv lawm) tam sim no kuv yuav tsum rov xav dua qhov no.

Tseem muaj teeb meem nrog hom pw tsaug zog ntawm Arduino thiab DFplayer kom tsav tsheb tam sim no - tam sim no tsis poob qis dua qhov pib kom qhib kev tawm. Tswv yim txais tos

Nco tseg: rau lub thawv thib ob Kuv yuav tsum tau xaj lwm lub txhab nyiaj ntxiv vim tias kuv tua hluav taws xob ntawm kuv thawj zaug. Thiab saib ntawm no - lub txhab nyiaj hluav taws xob no hloov tawm 10 vib nas this tom qab kuv nres qhov ua rau lub load tam sim no -> hloov tawm ua haujlwm tam sim no.

Lub wireless charging receiver tau txuas rau lub powerbank them usb. Lub hauv paus them nyiaj yog tsim rau hauv lub thawv them nyiaj, luam tawm nrog kuv lub tshuab luam ntawv 3D.

Kauj ruam 4: Software

Software
Software

Software muaj nyob ntawm github

Txoj haujlwm yog kev lom zem, Kuv nyiam pib nrog cov keeb kwm nrawm ntawm cov piv txwv thiab txhim kho ntxiv mus. Raws li kuv tsis tau ua tiag tiag specs tshwj xeeb, nta kev npaj thiab teeb tsa cov phiaj xwm phiaj xwm Kuv xaus nrog qee qhov ua haujlwm tab sis tsis yog tus lej tiag tiag. Qhov no yog ib txwm ua -> mus ntxiv rau hauv cov khoom, cais hauv. H thiab.cpp …

Txawm li cas los xij kuv xav kom tau txais yam ua haujlwm sai yog li hauv ntau qhov xwm txheej kuv tau mus txog qhov tsis muaj txoj hauv kev zoo tshaj plaws.

Tab sis qhov zoo tshaj plaws yog - sai li sai tau HW tab tom ua haujlwm ib tus tuaj yeem pib ua txhua yam.

Kuv siv arduino IDE, ob peb lub tsev qiv ntawv xav tau - yooj yim ua nrog arduino IDE tus thawj tswj tsev qiv ntawv.

Yog li kuv qhov software tam sim no txhawb nqa:

Lus txais tos

Ntim (duh)

Sab laug/sab xis qaij ntawm lub npov kom hloov mus rau zaj nkauj yav dhau los/tom ntej thiab yog tias RFID deactivated rau lwm daim nplaub tshev dhau los rov qab thiab tawm.

Ncua/Ua Si (duh)

Pib ua ntej, kawm RFID tshiab - daim ntawv tais ceev tseg tau muab rau raws li RFID tom ntej tom ntej SD daim npav. Cov ntaub ntawv khaws tseg hauv Arduino EEPROM

Ua cov ntawv tais ceev tseg rau RFID-ua haujlwm RFID-rau-nplaub tshev los ntawm kev ua haujlwm

Thauj khoom thiab txuag qhov ntsuas kom pab teeb tsa tau txais kev cawmdim. Lub Hoobkas pib dua:)

Moog thiab teem hnub tim.

Hloov rau/tawm lub tswb, teeb tsa lub tswb teev thiab feeb, ua si nkauj ruaj rau tswb.

Hloov tawm RFID - ua si mp3 yam tsis muaj nws.

Qee qhov tswv yim ntxiv ntawm kuv cov npe - tseem yuav tsum tau ua

Qhia qhov kub thiab txias (RTC tuaj yeem ua qhov ntawd - nws ntsuas qhov ntsuas kom them nyiaj rau qhov cuam tshuam rau lub quartz)

Pib luag thaum luag, Teem nkauj rau tswb

Xaiv cov ntawv twg uas tau muab rau RFID hauv hom kawm

Khaws daim ntawv tais ceev tseg thiab zaj nkauj kawg ua si ntawm RFID nti - rov siv tau ntawm cov thawv (Kuv tab tom tsim dua - ob tus menyuam nco qab….?)

pab hloov -tawm -qhov no tsis ua haujlwm tam sim no yam tsis txuas nrog USB -> thauj khoom tam sim no los ntawm Powerbank tau txo qis hauv qhov teeb tsa no.

Cov ntaub ntawv ntawm cov txheej txheem ntawm daim npav SD

Kuv muaj qee qhov mp3 audiobooks thiab nkauj rau kuv cov menyuam khaws cia. Yog li kuv tau siv qee cov ntawv sau linux los hloov cov nkauj kom raug lub npe raug. Cov ntawv tais ceev tseg yuav tsum muaj npe ua ntu zus ob tus lej (piv txwv li "00", "01", "02" …). Cov nkauj nyob ntawd yuav tsum muaj npe ua ntu zus peb tus lej (piv txwv li "001.mp3", "002.mp3", …).

Kuv hloov-rau-txais tos mp3 ("Nyob zoo, Kuv yog koj lub thawv khoom ua si …") yog khaws cia hauv nplaub tshev "99" raws li "001.mp3".

Tsab ntawv tsis yog pov thawj ruam thiab yuav tsum siv tsuas yog hauv phau ntawv 'theej' thiab tsis yog ntawm qhov pib.

#!/bin/bashlet i = 1 rau cov ntawv hauv *.mp3 ua yog (($ i <10)); ces mv "$ file" "00 $ {i}.mp3" elif (($ i <100)); ces mv "$ file" "0 $ {i}.mp3" lwm mv "$ file" "$ {i}.mp3" fi cia kuv ++ ua tiav

Kauj Ruam 5: Luam Ntawv thiab Sib Sau Lub Thawv

Luam Ntawv thiab Sib Sau Lub Thawv
Luam Ntawv thiab Sib Sau Lub Thawv
Luam Ntawv thiab Sib Sau Lub Thawv
Luam Ntawv thiab Sib Sau Lub Thawv
Luam Ntawv thiab Sib Sau Lub Thawv
Luam Ntawv thiab Sib Sau Lub Thawv

Yog li tam sim no HW thiab SW tab tom ua haujlwm - Kuv xav tau lub BOX!

Qhov chaw zoo pib nrog yog Tinkercad - Kuv nyiam nws! Yooj yim siv thiab koj tau txais txhua yam koj xav tau. Tsim lub zej zog loj thiab ntau tus piv txwv zoo los ntawm ntse "Tinkerers".

Ib tus tuaj yeem yooj yim nkag mus rau qhov no mus ib txhis - ntawm no ib qho kev hloov pauv, muaj qhov nce tshiab, lub qhov,… kev tsim qauv tshiab,….

Tab sis thaum kawg kuv zoo siab nrog lub thawv tsim tam sim no. Kuv kuj tau tsim lub hauv paus lub thawv rau lub roj teeb kom tso lub thawv mp3 rau… them. saib ntawm no

Kev luam ntawv yuav siv nws lub sijhawm (~ 8-12 teev thiab ntau dua) thiab kuv tau sim nrog cov kab sib txawv tuab, Thaum kawg kuv tseem nyob ntawm cov qauv luam ntawv. Rau cov thawv tam sim no kuv tab tom siv tus qauv (thawj zaug luam tawm raws li cov qauv qub), txawm li cas los xij qhov kev tsim qauv tshiab muaj qee qhov tshiab, nce, tag nrho uas ua rau lwm yam khoom ntawm kuv daim ntawv yuav tsum ua.

Thiab ib qho tseem ceeb heev tseem yuav tsum tau ua: tau txais qee cov khaub ncaws zoo rau lub thawv - tab sis qhov no yuav yog kuv tus poj niam lub npe - tos ntsoov rau cov khaub ncaws tshiab ntawm lub thawv - yuav los sai sai no …

Sai li qhov luam tawm tau txias dua thiab lub hauv paus ntawm cov khoom siv hluav taws xob tau ua tiav sab nraum lub thawv qhov kev sib dhos zaum kawg yuav tsum ua tiav.

Kuv siv cov kua nplaum kub los kho qhov chaw - Hloov me me, LCD thiab RFID tus txais tau tsau rau ntawm lub phaj npog. Kuv tau siv qee daim kab xev ob tog los kho ua ntej cov khoom thiab tom qab ntawd siv cov kua nplaum kub los tso qee qhov kawg kho cov ntsiab lus hauv.

Tib yam nrog lub hauv paus thawv. Ua ntej txhim kho lub phaj them nyiaj rau lub hauv paus ntawm lub npov - ob daim kab xev ua haujlwm tau zoo ntawm no - yuav tsum tau hloov kho mus rau nruab nrab ntawm lub hauv paus kom ze txaus rau them lub kauj thaum tso lub thawv rau saum lub hauv paus them nyiaj.

Tom qab ntawd lub txhab nyiaj, rov kho dua ua ntej nrog ob tog, tom qab ntawd muab qee cov kua nplaum kub rau 'cov tswv yim' cov ntsiab lus. Lub suab nrov tuaj yeem kho nrog qee cov ntsiab lus zoo ntawm cov khoom npaj - zoo thiab nruj.

Thaum kawg lub Rooj Tswjhwm Saib - Kuv suav nrog qee qhov me me ntim rau hauv 3D luam ntawv tsim, yog li lub rooj tsav xwm tau ua kom zoo nrog - dua - qee qhov phiaj xwm kub kua nplaum cov ntsiab lus. Kev sib tw yuav tsum tsis txhob muab cov khoom sib nrug - yog li kuv tau muab qhov no mloog.

Thiab thaum kawg siv qee qhov muaj cov ntsia hlau me me (kuv cov ntawv luam tawm suav nrog qee qhov 3M ntsia hlau ntsia, tab sis lawv qhov twg tsis zoo heev rau cov ntsia hlau tiag)

Kauj Ruam 6: Tiav Lub Thawv - Tseem Tsis Muaj Khaub Ncaws

Image
Image
Tiav Lub Thawv - Tseem Tsis Muaj Khaub Ncaws
Tiav Lub Thawv - Tseem Tsis Muaj Khaub Ncaws
Tiav Lub Thawv - Tseem Tsis Muaj Khaub Ncaws
Tiav Lub Thawv - Tseem Tsis Muaj Khaub Ncaws

Thiab ntawm no yog ob lub thawv tiav rau kuv cov menyuam. Lawv twb tau ua qee qhov kev sim beta thiab pom qee qhov software kab;-).

Kuv kuj tau yuav 20 pob ntawm RFID M3 cov ntawv nplaum.

Tam sim no kuv xav sau tag nrho cov peev xwm me me thiab ua rau lawv ua si tokens rau lub thawv MP3. Kev lom zem rau txiv thiab menyuam:)

Pom zoo: