Cov txheej txheem:

Portable Instant Pi Camera: 6 Kauj Ruam (nrog Duab)
Portable Instant Pi Camera: 6 Kauj Ruam (nrog Duab)

Video: Portable Instant Pi Camera: 6 Kauj Ruam (nrog Duab)

Video: Portable Instant Pi Camera: 6 Kauj Ruam (nrog Duab)
Video: ЛЮБОВЬ С ДОСТАВКОЙ НА ДОМ (2020). Романтическая комедия. Хит 2024, Kaum ib hlis
Anonim
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab
Portable Instant Pi Lub Koob Yees Duab

Fusion 360 Cov Haujlwm »

Kuv tau nyob hauv lub siab lub tswv yim ntawm kev tsim cov duab uas tau tshoov siab los ntawm lub hnub nyoog kub ntawm polaroid thiab kev yees duab sib xws. polaroid thiab pib tua.

Lub tswv yim no tsis yog hom tshiab, twb muaj ob peb lub koob yees duab yees duab siv Raspberry Pi thiab lub tshuab luam ntawv cua sov. Tab sis rau lub koob yees duab no kuv xav ua nws ntawm kuv tus kheej txoj kev. Yog li kuv tau txais kev tshoov siab los ntawm txhua qhov haujlwm no thiab kuv tau hloov qee yam.

Txhua lwm qhov haujlwm zoo sib xws uas kuv tau pom ua ntej, lawv siv Raspberry Pi 2 thiab lub lens dav (saib xyuas) lub koob yees duab rau Pi.

Txog lub koob yees duab no kuv tau mus rau Raspberry Pi Zero W thiab lub nruab nrab-loj focal ntev lens.

Pi Zero W muaj cov hneev taw zoo ib yam li Pi Zero thawj, uas yog qhov me me thiab qhov ntawd zoo heev. Tab sis W version, suav nrog lub koob yees duab chaw nres nkoj thiab onboard Wifi nrog rau ntau yam ntxiv.

Feem ntau ntawm Pi lub koob yees duab modules los nrog lub qhov muag dav. Kuv xaiv M12 lub lens, nrog rau thaj tsam pom ntawm 40 ° uas yuav zoo ib yam li ~ 45 hli focal ntev nyob rau hauv lub koob yees duab thav duab tag nrho, vim tias cov duab yuav zoo nkauj dua li tsis muaj qhov cuam tshuam thiab zoo ib yam rau kev yees duab qub.

BTW, ua tsaug rau kev sib txuas wifi kuv tuaj yeem tua hluav taws.

Kauj Ruam 1: Cov Khoom Siv thiab Cov Khoom

Cheebtsam thiab qhov chaw

  • 1x Raspberry Pi Zero W raspberrypi.org/raspberry-pi-zero-w
  • 1x Mini TTL Thermal Tshuab Luam Ntawv dafruit.com/product/597
  • 1x Raspberry Pi Lub Koob Yees Duab
  • 1x Mini Camera (CSI) 15 pin Cable shop.pimoroni.com/cable-raspberry-pi-zero-edition
  • 1x M12 Lub Koob Yees Duab Lens (txhua qhov chaw nyob nrug koj xav tau)
  • 1x M12 Board Lens Holder m12lenses.com/M12-Lens-Holder-Plastic-p
  • 1x Push lub pob
  • 1x 5v / 3.5A Power bank (min 3A) amazon.de/RAVPower5v3A
  • 1x 4700uF Electrolytic Capacitor
  • 1x USBAdapter Txoj Cai Lub Kaum Ib Tug Txiv Neej Rau Ib Tug Poj Niam
  • 1x 2.1mm Jack Adapter rau USB
  • 1x Adapter - 2.1mm jack rau ntsia hlau davhlau ya nyob twg thaiv adafruit.com/368

Txuas xov

  • 1x Tshem tawm-tawm pluaj MALE header
  • 1x Rhuav tshem-tawm tus poj niam lub taub hau
  • 3x 2 tus pin txuas (Kuv siv Dupont Connector)
  • Perfboard
  • Cov xov hlau

Los ua ke

  • 2x Ntsia Hlau M3 x 6mm (6mm ~ 10mm)
  • 2x Square Ceev (M3 1, 8mmx5, 5mm)
  • 2x Ntsia Hlau M2 x 6mm (6mm ~ 10mm)

Luam Ntawv

Thermal ntawv Rolls (57mm)

Ntxiv

  • 8GB SD daim npav (rau raspberrypi)
  • Mini HDMI adapter (rau txuas Zero W rau tus saib)
  • Mini USB rau USB (rau txuas Zero W rau cov keyboard)
  • 5v USB Charger

Siv Cov Cuab Yeej

  • Software

    • Fusion 360 autodesk.com/fusion-360
    • Raspbian Jessie Lite raspberrypi.org/downloads/raspbian
    • ImageMagick www.imagemagick.org
    • zj-58 CUPS los ntawm adafruit github.com/adafruit/zj-58
  • Kho vajtse

    • Prusa i3 mk3 prusa3d.com/original-prusa-i3-mk3
    • Cable crimper (SN-28B)
    • Hlau Stripper cuab tam
    • Cov Caliper
    • Ntau tus ntsia hlau

Kauj ruam 2: Teeb Software thiab Code

Software teeb thiab Code
Software teeb thiab Code
Software teeb thiab Code
Software teeb thiab Code
Software teeb thiab Code
Software teeb thiab Code
Software teeb thiab Code
Software teeb thiab Code

Rau cov kauj ruam no koj yuav xav tau USB keyboard thiab tus saib HDMI. Koj tseem yuav pab txhim kho lub koob yees duab rau hauv Raspberry Pi yog li koj tuaj yeem sim thiab tshuaj xyuas txhua yam ua haujlwm.

Teeb System

Khiav qhov kev pabcuam raspi-config:

$ sudo raspi-teeb tsa

Rau qhov haujlwm no yuav tsum muaj cov kev xaiv no:

  • Kev cuam tshuam kev xaiv -> Pab kom Lub Koob Yees Duab
  • Kev cuam tshuam kev xaiv -> Lov tes taw Serial
  • Advanced Options -> Nthuav Cov Ntaub Ntawv System

Siv raspi-teeb tsa los teeb tsa Wi-nkaus txuas. Koj yuav xav tau kev sib txuas hauv network txhawm rau txhim kho qhov system thiab rub tawm cov software uas xav tau.

Kev Xaiv Network -> Wi -nkaus

Koj tseem tuaj yeem Pab kom SSH nkag mus rau lub kaw lus thiab hloov pauv sai.

Kev cuam tshuam kev xaiv -> Pab kom SSH

Nruab Software

Cov txheej txheem rau cov theem no tau ua raws qhov kev qhia no:

kawm.adafruit.com/instant-camera-using-raspberry-pi-and-thermal-printer

$ sudo apt hloov tshiab

$ sudo apt nruab git khob wiringpi tsim-qhov tseem ceeb libcups2-dev libcupsimage2-dev

Nruab ib lub lim lim rau CUPS los ntawm adafruit github

$ git clone

$ cd zj-58

$ ua $ sudo./install

Nruab thiab teeb cov ntawv luam tawm ua ntej ntawm CUPS system. Hloov tus nqi "baud" mus rau 9600 lossis 19200 raws li xav tau rau koj lub tshuab luam ntawv. (Kuv yog 19200)

$ sudo lpadmin -p ZJ -58 -E -v serial:/dev/ttyAMA0? baud = 19200 -m zjiang/ZJ -58.ppd

$ sudo lpoptions -d ZJ -58

Lub koob yees duab tsab ntawv

$ sudo apt-tau nruab imagemagick

Siv cov duab imagemag txhawm rau txhim kho qhov sib piv thiab teeb tsa qhov sib piv ua ntej thiab ci ntawm lub koob yees duab, qhov kev txiav txim siab zoo li:

raspistill -t 200 -co 30 -br 75 -w 512 -h 388 -n -o -| hloov - -grayscale Rec709Luminance -contrast jpg: - | lp pab

Nov yog qhov ntsuas uas kuv pom ua haujlwm zoo tshaj plaws rau kuv rooj plaub, tab sis koj yuav nyiam hloov kho cov txiaj ntsig no.

Kuv siv tib lub pob nyem rau kev tua aphot thiab thiab tua lub kaw lus Cov ntawv sau cais ib zaug los ntawm kev nias ntev (+4 sseconds) nkaus.

lub koob yees duab.sh

#!/bin/tsoo

SHUTTER = 20 # Pib ua GPIO xeev gpio -g hom $ SHUTTER thaum: ua # Txheeb rau khawm kaw yog [$ (gpio -g nyeem $ SHUTTER) -eq 0]; ces # Yuav tsum tau tuav rau 4+ vib nas this ua ntej kaw haujlwm… pib = $ (hnub +%s) thaum [$ (gpio -g nyeem $ SHUTTER) -eq 0]; ua yog [$ (($ (hnub tim +%s) -starttime)) -ge 5]; tom qab kaw -h tam sim no ncha "fais fab tuag" # Tos rau cov neeg siv tso lub pob ua ntej rov pib dua thaum [$ (gpio -g nyeem $ SHUTTER) -eq 0]; ua txuas ntxiv mus; ua tiav tiav yog tias [$ (($ (hnub +%s) -starttime)) -lt 2]; ces ncha "Nyem kaw" raspistill -t 1800 -co 30 -br 75 -w 512 -h 388 -n -o -| hloov --grayscale Rec709Luminance -contrast jpg: -| lp # date +" %d %b %Y %H: %M" | lp fi pw 1 fi pw 0.3 ua tiav

Teeb tus ntawv sau cia kom pib thaum lub kaw lus kaw lus. Modify cov ntaub ntawv /etc/rc.local thiab cov lus txib hauv qab no ua ntej qhov kawg "tawm 0" kab:

sh /home/pi/camera.sh

Siv txoj hauv kev uas koj tau khaws cov ntawv sau.

Raspberry Pi Zero W pab kom muaj kev sib haum xeeb

pi3-miniuart-bt hloov pauv Raspberry Pi 3 thiab Raspberry Pi Zero W Bluetooth ua haujlwm kom siv mini UART (ttyS0), thiab rov ua haujlwm UART0/ttyAMA0 rau GPIOs 14 thiab 15.

Txhawm rau xiam onboard Bluetooth thiab rov UART0/ttyAMA0 hla GPIOs 14 & 15, hloov kho:

$ sudo vim /boot/config.txt

Ntxiv rau qhov kawg ntawm cov ntawv

dtoverlay = pi3-disable-bt

Nws kuj tseem yuav tsum tau kaw qhov kev pabcuam system uas pib lub modem yog li nws tsis siv UART:

$ sudo systemctl qhib hciuart

Koj tuaj yeem nrhiav cov ntaub ntawv ntau ntxiv ntawm:

Kauj Ruam 3: 3D Luam Ntawv Case

3D Luam Case
3D Luam Case
3D Luam Case
3D Luam Case
3D Luam Case
3D Luam Case

Cov ntaub ntawv ntawm lub koob yees duab tau tsim los kom ua kom me me hneev taw me me nyob qhov twg cov khoom sib dhos haum thiab sib dhos ua ke kom tsis muaj cov ntsia hlau ntau ua haujlwm rau nws.

Tus qauv tsim tau muab faib ua 3 ntu:

  • Lub hauv paus, qhov uas lub txhab nyiaj tau faib.
  • Lub npov tseem ceeb, qhov twg Pi board, lub tshuab luam ntawv thiab feem ntau ntawm cov cabling tshwm sim.
  • Lub khob hliav qab, uas tuav lub koob yees duab lens.

Lub thawv loj thiab lub khob hliav qab tau ua kom zoo rau kev luam ntawv thiab tsis xav tau kev txhawb nqa. Lub hauv paus, hloov pauv, yog luam tawm ntawm ib daim uas siv cov khoom txhawb nqa sab hauv. Kuv xav tsim ib qho muaj zog los txhawb nqa lub koob yees duab qauv.

Kuv suav nrog cov ntaub ntawv stl, yog li koj tuaj yeem luam nws lossis hloov kho qhov tsim.

Kauj Ruam 4: Txuas Nws

Hlau Nws Up
Hlau Nws Up
Hlau Nws Up
Hlau Nws Up
Hlau Nws Up
Hlau Nws Up

Thawj qhov uas yuav tsum tau ua yog siv tus txiv neej tus pin txuas rau IO cov chaw nres nkoj ntawm Raspberry Pi.

Thaum koj tau ua tiav koj tuaj yeem mus tom ntej thiab ntsaws tus pi rau hauv lub khob cij thiab koj yuav npaj txhij los sim teeb tsa.

Txhawm rau txuas cov khoom sib txuas, Kuv tau faib cov kev sib txuas siv 2 tus pin crimp cov tsev nyob. Yog li thaum lub sijhawm txheej txheem sib dhos, cov khoom tuaj yeem ua tus kheej txuas rau rooj plaub thiab txuas nrog tom qab yam tsis muaj teeb meem. Kuj tseem pab hloov qhov chaw thaum puas tsuaj lossis rau kev kho dua tshiab kho vajtse.

Nqa lub tog raj txuas thiab txuas 4700uF lub tshuab hluav taws xob mus rau + thiab - cov dav hlau. Qhov no yuav pab ua kom qhov hluav taws xob ruaj khov thaum lub tshuab luam ntawv thermal ua haujlwm. Nco ntsoov tias qhov tsis zoo (luv dua) ceg ntawm lub capacitor tau txuas rau tus ncej tsis zoo ntawm lub davhlau ya nyob twg thiab tsis yog lwm txoj hauv kev.

Txuas mus rau lub tog raj kheej thiab lub tshuab hluav taws xob, cov xov txuas rau lub tshuab luam ntawv lub zog thiab Raspberry Pi Zero W.

Txhawm rau pub Pi, Kuv tau siv +5V rau PP1 thiab hauv av los ntawm lub zog xa mus rau PP6 nyob rau sab nraum qab ntawm lub rooj tsavxwm, sab xis hauv qab lub zog USB.

Kuv nqa ib daim perfboard thiab muag ntawm nws 2 kab txaij ntawm poj niam tus pin headers yog li ua ntej Pi IO pins. Ntawm tus perftboard koj tuaj yeem txuas lub khawm thiab lub tshuab luam ntawv cov ntaub ntawv xov hlau.

Txuas lub laub khawm mus rau hauv av GND (tus pin 34) thiab BCM 20 (tus pin 38)

Rau lub tshuab luam ntawv ua raws qhov kev txiav txim no:

  • Tshuab Luam Ntawv GND -> Raspberry Pi GND (tus pin 6)
  • Tshuab Luam RX -> Raspberry Pi TXD (pin 8, BCM 14, UART Transmit)
  • Tshuab Luam TX -> Raspberry Pi RXD (tus pin 10, BCM 15, UART Tau Txais)

Txheeb xyuas Raspberry Pi IO kom paub ntau ntxiv:

Kauj ruam 5: Sib dhos

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

Cov txheej txheem sib dhos yog ncaj.

Lub txhab nyiaj fais fab haum rau lub hauv paus ntawm rooj plaub thiab tsis txav mus. Tab sis tuaj yeem tshem tawm tau yooj yim kom raug them lossis hloov pauv.

Kuv tau luam ob peb tus pin los txuas rau Raspberry Pi pawg thawj coj rau rooj plaub thiab txuas lub lens tuaj rau ntawm rooj plaub tas li thiab.

Tsis muaj chav nyob ntau rau txhua cov kab thiab cov khoom siv. Koj yuav tsum npaj qhov chaw, tab sis txhua yam haum rau sab hauv.

Txog kev kaw rooj plaub, lub hauv paus thiab lub npov tseem ceeb muaj ob lub tab ntawm sab nraub qaum uas haum rau ib leeg. Hauv ntej, muaj lub hau ntswj kom ruaj ntseg kho lub thawv.

Kauj ruam 6: Thaum kawg! Tua Tua Tua Tua …

Pom zoo: