Cov txheej txheem:

Raspberry Pi Infrared Game Camera: 6 Kauj Ruam
Raspberry Pi Infrared Game Camera: 6 Kauj Ruam

Video: Raspberry Pi Infrared Game Camera: 6 Kauj Ruam

Video: Raspberry Pi Infrared Game Camera: 6 Kauj Ruam
Video: Raspberry PI: XBMC Home Media Player - Adding IR Remote Control 2024, Kaum ib hlis
Anonim
Raspberry Pi Infrared Game Game Lub Koob Yees Duab
Raspberry Pi Infrared Game Game Lub Koob Yees Duab
Raspberry Pi Infrared Game Game Lub Koob Yees Duab
Raspberry Pi Infrared Game Game Lub Koob Yees Duab

Kuv nyuam qhuav pib tshawb fawb Raspberry Pi thiab xav paub nrog Pi lub koob yees duab infrared module. Kuv nyob hauv thaj chaw me me nyob deb thiab tau pom cov cim ntawm ntau yam tsiaj nyaum nyaum ncig ncig lub tsev hmo ntuj.

Kuv muaj lub tswv yim tsim lub koob yees duab game hmo ntuj siv Raspberry Pi NoIR Lub Koob Yees Duab Board nrog lub PIR lub suab ntsuas thiab sab nraud IR LED tsom teeb kom pom qhov chaw tso cai rau IR lub koob yees duab txhawm rau thaij duab.

Kuv pib nrog qee yam yooj yim, tab sis zoo li txhua tus kws tsim khoom, kuv khaws ntxiv ntau thiab ntau ntxiv. Yog li ntawm no yog nws ua haujlwm li cas:

Txoj haujlwm no siv Raspberry Pi teeb tsa nrog WiFi hauv lub taub hau hom. Kuv tuaj yeem muaj kuv lub koob yees duab nyob deb hauv WiFi ntau li ib zaug txuas nrog kuv tuaj yeem pib qhov haujlwm thiab khaws cov vis dis aus kaw. Muaj ntau cov lus qhia on-line ua qhov no yog li kuv yuav tsis sim rov hais dua ntawm no. Kuv kuj tau teeb tsa lub koob yees duab Raspberry Pi ua raws cov lus qhia hauv online ib yam. Ntsuas lub taub hau (yog tias qhov no yog yam koj xav tau) thiab lub koob yees duab kom paub tseeb tias txhua yam ua haujlwm.

Txoj haujlwm no siv Raspberry Pi NoIR Lub Rooj Tswjhwm Saib Lub Koob Yees Duab (duab hluav taws xob) rau hmo ntuj kaw cov vis dis aus thaum pom qee yam. Pi NoIR Lub Rooj Tswjhwm Saib Lub Koob Yees Duab kuj tseem tuaj yeem siv thaum nruab hnub tab sis txij li IR lim raug tshem tawm, cov xim tau ntxhua me ntsis. Kuv tau tsim sab nrauv IR LED tsom teeb uas tau qhib thaum lub suab pom kom pom qhov pom pom thaum pom cov vis dis aus. Thaum qhov kev xaiv lub sijhawm yees duab tiav IR LED tsom teeb tau muab tua. Tus qauv tsim kuj muaj LDR Circuit kom paub seb nws yog hnub lossis hmo ntuj. Yog tias nws yog hmo ntuj thiab pom cov lus tsa suab, IR LED qhov chaw tau qhib thiab thaum nruab hnub nws tau xiam. Kev txuas sab nrauv IR LED tsom teeb pom kev zoo ib puag ncig tus pin kom paub yog tias lub teeb txuas nrog lub koob yees duab. Yog tias sab nrauv IR Spotlight tsis pom, teeb lub teeb tawm tsis zoo. Tom qab PIR kuaj pom, yog hmo ntuj, GPIO tus pin 22 qhib lub relay uas tsav lub siab tam sim no IR LED's (Yog txuas nrog).

Kev ntes cov vis dis aus kuj tuaj yeem siv me ntsis ntawm qhov chaw disk thiab tuaj yeem sau nrawm. Kuv pom ib zaug kuv tau sau tag nrho qhov chaw disk thiab tsis muaj peev xwm nyob rau hauv thiab Pi yuav tsis khau raj. Txhawm rau kho qhov no kuv ntxiv qee qhov chaws txhawm rau ntsuas qhov chaw disk thiab rho tawm txoj haujlwm yog tias qhov chaw disk tsis ua haujlwm.

Txaus siab rau!

Kauj Ruam 1: Daim Ntawv Teev Npe

Raspberry Pi:

Raspberry Pi

NoIR Lub Koob Yees Duab Board

WiFi dongle (yog tias xav tau)

Cov ntaub thaiv npog:

Humble Pi Shield proto board

SN75468D

Kev xa tawm DS2E-L-5V

1M hwj chim potentiometer

100K ohm resistor

1K ohm tiv thaiv

LED

2N3904 transistor

LDR

100K ohm resistor

Misc IO tus pin txuas, raws li xav tau

Sib txuas xov hlau, raws li xav tau

Cov ntaub ntawv:

Kev kaw rau lub tsev Pi thiab daim thaiv

Interface connectors, raws li xav tau

IR teeb:

20 siab tam sim no IR LED's

47 ohm, 5W resistors (qty 2)

Cov ntaub thaiv lub teeb (Kuv siv lub thawb nres tsheb)

Kauj ruam 2: Tsim Shield

Tsim cov ntaub thaiv npog
Tsim cov ntaub thaiv npog

Kuv tau tsim daim ntaub thaiv los txhawm rau txhawm rau tshaj tawm, xa tus neeg tsav tsheb, PIR interface, LDR Circuit, IR LED Teeb sensor thiab lwm yam IO.

Kuv siv Humble Pi Shield:

Kuv khawb ib ncig ntawm kuv qhov chaw sib txawv thiab siv 75468, qhov hluav taws xob siab, qhov siab tam sim no, Darlington transistor array. Txhua yam koj xav tau yog qee tus neeg tsav tsheb uas muaj cov tsav tsheb txaus los teeb tsa/rov pib dua. Kuv kuj txuas nrog Visio cov ntaub ntawv los qhia seb kuv tso cov khoom li cas thiab ntxiv cov xov hlau txuas nrog rau cov txheej txheem (hom dav dawb hau).

Kuv tau siv qee lub qhov ntsaws ntsaws ntsaws ntsaws thiab ua kom luv me me los ua txuas rau IO los ntawm pawg thawj coj mus rau cov khoom sib txuas, PIR thiab LDR.

Kauj Ruam 3: Ua kom lub qhov rooj kaw

Kuv pom lub thawv ntim khoom seem hauv kuv lub thawv ntim khoom seem. Ib yam dab tsi yooj yim, tab sis yav tom ntej kuv yuav hloov nws nrog lub thaiv dej tsis sib haum thiab sim nrog roj teeb/roj teeb rov los.

Kuv txiav ib lub qhov rau hauv lub thawv kom lub PIR sensor yuav tawm thiab teeb nws mus rau hauv lub thawv. Kuv kuj siv lub vaj huam sib luag-mount LED grommet los tuav lub LDR.

Kuv txiav lwm qhov rau Pi Lub Koob Yees Duab. Kuv tau kaw lub qhov rais Plexiglas hla lub koob yees duab los tiv thaiv lub lens.

Kuv tau teeb tsa DB-9 hom txuas rau sab nrauv IR LED tsom teeb.

Kuv tau teeb tsa lub hwj chim txuas los txuas lub zog rau txhua yam.

Vim tias kuv siv lub thawv ntim khoom uas kuv muaj ntawm tes, lub thawv ntawv no tsis tso cai nkag tau yooj yim rau SD Card thiab WiFi dongle. Tab sis thaum koj tau txais txhua yam ua haujlwm, koj yuav tsis xav tau qhov ntawd tshwj tsis yog tias muaj qee yam tawg.

Kauj Ruam 4: Ua IR LED tsom teeb

Ua IR LED tsom teeb
Ua IR LED tsom teeb
Ua IR LED tsom teeb
Ua IR LED tsom teeb

IR LED tsom teeb tau yooj yim haum. Kuv pom qee qhov pheej yig lub zog hluav taws xob IR LED's ntawm EBAY spec'd ntawm 700 mA ncov. Kuv tsim 4 txoj hlua ntawm 5 LED's wired in serial (saib schematic). Kuv xaim ob txoj hlua sib txuas thiab txuas 47 ohm, 5W resistor rau txhua txoj hlua. Kuv pom lub ntsaws sab nraud hauv lub hwj chim uas muab txog 17 VDC. Kuv xaiv tus tiv thaiv kom txwv qhov tam sim no yog li kuv tsis hlawv cov LED. Koj yuav tsum xam tawm qhov tshwj xeeb ntawm koj li LED, pes tsawg qhov koj xav tau, qhov khoom siv twg siv rau LED tsav tam sim no thiab suav qhov txwv tsis pub tiv thaiv. Tsis muaj txoj hauv kev Pi tuaj yeem tsav cov no los ntawm nws tus kheej. Lub Shield Lub Koob Yees Duab siv kev sib txuas yog li nws tsis muaj teeb meem dab tsi koj siv. Tsuas yog xyuas kom koj tsis txhob tsav tsheb ntau dua li cov tuaj yeem siv tau lossis cov hlua uas koj siv.

Koj tseem yuav pom lub voj xaim ntawm tus pin 8 thiab 9. Kuv siv qhov no txhawm rau txheeb xyuas yog tias lub teeb txuas nrog. CAM daim ntaub thaiv muaj qhov rub tawm qhov txuas nrog rau raspberry. Thaum txoj hlua txuas nrog txoj kab kev nkag siab rub qis, thaum tsis txuas txoj kab kev nkag siab tau rub siab.

Kuv kuj tau tshawb pom tias los ntawm kev siv lub tsheb nres lub teeb nyob hauv lub bezel liab ua haujlwm zoo hauv kev faib IR "nqaj" kom pom qhov dav dua. Cov LED kuv tau txais muaj nqaj nqaim. Yog tsis muaj lub bezel, LED's muab lub nqaj nruj.

Kauj Ruam 5: Tshaj Tawm Txoj Haujlwm

Txuas nrog yog cov ntaub ntawv nab nab kuv tsim (Kuv tseem tab tom sim txiav txim siab GitHub).

Cov vis dis aus tau khaws tseg nrog a.h264 txuas ntxiv. Kuv siv FTP program txhawm rau rub cov vis dis aus rau kuv lub khoos phis tawj. Koj tuaj yeem siv VLC media player los saib cov vis dis aus.

Kuv txuas ob peb daim vis dis aus. Ib tug yog bobcat thiab lwm tus yog miv.

Kuv ntxiv ob peb yam ntxiv rau raspberry kev ua haujlwm los ua kom yooj yim dua. Kuv tsis muaj lub sijhawm tiag tiag yog li txhua lub sijhawm kuv ua zog raspberry pi Kuv xav tau los teeb tsa hnub thiab sijhawm. Kuv tau ua qhov no nrog Sudo hais kom teeb hnub thiab sijhawm ntawm Raspberry:

sudo date -s "Mon Aug 12 20:14:11 PST 2014"

Kuv kuj xav xiam lub Raspberry Pi lub koob yees duab LED yog li nws yuav tsis ceeb toom txhua yam uas kuv tau sau tseg. Txhawm rau kaw lub koob yees duab LED, hloov kho: /boot/config.txt Thiab ntxiv kab hauv qab no:

disable_camera_led = 1

Kuv tau xav ua kom tag nrho cov khoom siv roj teeb yog li kuv tau pom tias kuv tuaj yeem txuag ~ 20mA los ntawm kev tua PAL/HDMI tawm los ntawm kev hloov kho config.txt los ntawm kev ntxiv:

opt/vc/bin/tvservice -tawm

Kauj Ruam 6: Xav Sau

Kuv muaj ob peb lwm lub tswv yim los txhim kho lub koob yees duab. Kuv yuav ua haujlwm ntawm qee qhov no thiab kuv yuav hloov kho raws li kuv hloov kho…

1. Txuag video ua tus qauv ntau dua (mpg, thiab lwm yam)?

2. Xa cov ntaub ntawv los ntawm WEB server

3. Siv qhov kev qhia txav mus los kom pom hnub. Tsab ntawv tsa suab pom kev txav los ntawm kev saib rau pixel hloov pauv. Koj tseem tuaj yeem tsom mus rau thaj chaw tshwj xeeb tshwj xeeb. Qhov no yuav pab nrhiav pom thaum nruab hnub. Lub PIR ntes tau ua haujlwm zoo thaum hmo ntuj, tab sis tuaj yeem ua rau me ntsis nkag siab thiab tuaj yeem ua rau tsob ntoo txav los ntawm cua, lossis lwm yam kev txav chaw koj yuav xav tsis quav ntsej (xws li tsheb ntawm txoj kev, thiab lwm yam). Koj tuaj yeem hloov kho koj lub PIR lub ntsuas hluav taws xob, tab sis Tsab ntawv tsa suab yuav zoo nkauj heev.

4. Ua kom zoo dua tus lej - Siv kev hu xov tooj rau cov haujlwm rov ua dua (pib/nres video, disk loj, thiab lwm yam)

5. Siv MUX los pauv lub koob yees duab ntawm ib hnub mus rau hmo ?? Qhov ntawd puas tuaj yeem ua haujlwm?

6. Nws yuav siv dab tsi los ua kom lub roj teeb ua haujlwm?

7. Ntxiv lub sijhawm teev sijhawm (yog tias tsis muaj peev xwm txuas rau internet)

8. Ntxiv qhov program kom rov txuas rau wifi thaum nws txuas

9. Muaj qhov program tau pib thaum pib (thaum koj thov lub zog).

Pom zoo: