Cov txheej txheem:

Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub: 10 Kauj Ruam (nrog Duab)
Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub: 10 Kauj Ruam (nrog Duab)

Video: Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub: 10 Kauj Ruam (nrog Duab)

Video: Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub: 10 Kauj Ruam (nrog Duab)
Video: Часы G Shock до 100 долларов-15 лучших часов Casio G Shock до 100 дол... 2024, Hlis ntuj nqeg
Anonim
Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub
Raspberry Pi Box ntawm Cooling FAN Nrog CPU Qhov Ntsuas Kub

Kuv tau qhia txog raspberry pi (Hauv qab no yog RPI) CPU ntsuas qhov ntsuas hluav taws xob hauv qhov haujlwm dhau los.

Lub Circuit Court tsuas yog qhia RPI 4 sib txawv CPU kub raws li hauv qab no.

- Ntsuab LED qhib thaum CPU kub nyob hauv 30 ~ 39 degree

- Daj LED qhia qhov kub tau nce ntxiv ntawm 40 txog 45 degree

- Peb Liab Liab qhia CPU ua rau kub me ntsis los txog 46 ~ 49 degree

- Lwm Liab LED yuav ntsais thaum kub ntau tshaj 50 degree

***

Thaum qhov kub siab tshaj 50C, yuav tsum muaj kev pab rau me ntsis RPI tsis txhob nyuab siab ntau.

Raws li cov ntaub ntawv kuv pom ntawm ntau lub vev xaib uas tau tham txog qhov siab tshaj qhov ntsuas kub ntawm RPI, cov kev xav muaj ntau yam xws li ib tus neeg hais tias ntau dua 60C tseem zoo heev thaum siv cua sov.

Tab sis kuv tus kheej kev paub hais qee yam sib txawv uas xa mus rau server (siv RPI nrog cua sov-dab dej) ua qeeb thiab thaum kawg ua zoo li zombie thaum kuv tig nws rau ob peb teev.

Yog li no qhov txuas ntxiv thiab txias FAN tau ntxiv rau kev tswj hwm CPU kub hauv qab 50C rau kev txhawb nqa kev ua haujlwm ruaj khov ntawm RPI.

***

Kuj tau qhia yav dhau los CPU ntsuas qhov ntsuas hluav taws xob (hauv qab no raws li INDICATOR) tau koom ua ke txhawm rau txhawb kev ntsuas kub yooj yim yam tsis ua "vcgencmd ntsuas_temp" hais kom ua ntawm lub davhlau ya nyob twg.

Kauj Ruam 1: Npaj Schematics

Npaj Schematics
Npaj Schematics

Hauv ob txoj haujlwm yav dhau los, Kuv tau hais txog kev rho tawm tag nrho ntawm cov khoom siv hluav taws xob ntawm RPI thiab cov khoom siv sab nrauv.

Nyob rau hauv qhov txias ntawm FAN, kev siv hluav taws xob ywj pheej yog qhov tseem ceeb heev li DC 5V FAN (lub cev muaj zog) yog qhov hnyav thiab muaj suab nrov thaum ua haujlwm.

Yog li ntawd, cov kev txiav txim siab hauv qab no tau hais txog rau kev tsim cov phiaj xwm no.

- Opto-couplers tau siv los cuam tshuam nrog RPI GPIO tus pin kom tau txias txias FAN qhib lub teeb liab

- Tsis muaj lub zog rub los ntawm RPI thiab siv cov xov tooj sib txuas ntawm tes rau lub zog ntawm qhov Circuit Court no.

- Qhov ntsuas LED tau siv los qhia rau kev ua haujlwm txias txias

- 5V kev xa xov yog siv los qhib cua txias FAN raws li kev siv tshuab

***

Lub voj voog no yuav cuam tshuam nrog CPU ntsuas qhov ntsuas hluav taws xob (hauv qab no tus cim) los ntawm kev txhais ntawm kev pab cuam sej.

Thaum INDICATOR pib ntsais muag (qhov kub siab tshaj 50C), qhov cua txias FAN Circuit yuav tsum pib ua haujlwm.

Kauj Ruam 2: Npaj Tshooj

Zoo li lwm cov phiaj xwm yav dhau los, cov khoom siv sib xws tau siv los ua cua txias FAN Circuit raws li teev hauv qab no.

- Opto-coupler: PC817 (SHARP) x 1

- 2N3904 (NPN) x 1, BD139 (NPN) x 1

TQ2-5V (Panasonic) 5V xa tawm

1N4148 diode

- Resistors (1/4Watt): 220ohm x 2 (txwv tam sim no), 2.2K (Transistor switching) x 2

- LED x 1 po

- 5V txias FAN 200mA

- Lub rooj tsav xwm thoob ntiaj teb ntau dua 20 (W) los ntawm 20 (H) qhov loj (Koj tuaj yeem txiav txhua qhov loj ntawm lub rooj tsav xwm thoob ntiaj teb kom haum rau Circuit Court)

- Cov hlau xaim (Thov xa mus rau kuv qhov "Raspberry Pi kaw qhov ntsuas" qhov haujlwm tshaj tawm kom paub ntau ntxiv txog kev siv hlau xaim)

- Cable (liab thiab xiav ntau ib leeg xaim cable)

- Txhua lub xov tooj ntawm tes them 220V cov tswv yim thiab 5V tso zis (USB hom B txuas)

- Pin taub hau (3 tus pin) x 2

***

Txias FAN lub cev qhov ntev yuav tsum yog me me txaus los teeb tsa saum RPI.

Txhua hom kev xa xov tuaj yeem siv tau thaum nws tuaj yeem ua haujlwm ntawm 5V thiab muaj ntau dua ib qho kev sib cuag.

Kauj Ruam 3: Ua PCB Teeb Duab

Ua PCB Teeb duab
Ua PCB Teeb duab

Raws li tus naj npawb ntawm cov khoom siv me me, xav tau PCB qhov loj me tsis loj.

Thov saib xyuas tus pin polarity layout ntawm TQ2-5V raws li qhia hauv daim duab saum toj no. (Tsis sib thooj rau kev xav ib txwm muaj, qhov tseeb ntxiv/kev teeb tsa hauv av tau hloov pauv)

Tus kheej kuv muaj teeb meem tsis tau xav txog tom qab siv tas vim yog qhov rov qab nyob (Thaum piv nrog lwm cov khoom xa tawm) cov kab ncaj ncaj ntawm TQ2-5V.

Kauj ruam 4: Soldering

Soldering
Soldering

Raws li Circuit Court nws tus kheej yog qhov yooj yim heev, cov qauv thaiv tsis nyuaj ntau.

Kuv tabtom thawb "L" cov duab sib dhos txhawm rau txhim kho PCB raws txoj kev ncaj.

Raws li koj tuaj yeem pom tom qab, acrylic chassis uas txhim kho txhua yam yog qhov me me me me.

Yog li ntawd, nqaim taw kev sau ntawv yog qhov tsim nyog raws li cov chassis acrylic muaj neeg coob heev nrog PCBs thiab lwm qhov chaw.

LED nyob rau sab xub ntiag kom pom tau yooj yim FAN kev ua haujlwm.

Kauj Ruam 5: Ua thiab Mounting Cooling FAN HAT

Ua thiab Mounting Cooling FAN HAT
Ua thiab Mounting Cooling FAN HAT

Kuv tab tom xav tias PCB thoob ntiaj teb yog qhov muaj txiaj ntsig zoo uas tuaj yeem siv rau kev siv ntau lub hom phiaj.

Cooling FAN tau teeb tsa ntawm PCB thoob ntiaj teb thiab teeb tsa thiab tsau nrog cov ntsia hlau thiab txiv ntoo.

Txhawm rau tso cai huab cua ntws, Kuv tab tom ua qhov loj los ntawm kev khawb PCB.

Tsis tas li kom yooj yim ntsaws cov kab hluav taws xob txuas, GIPO 40 pins cheeb tsam tau qhib los ntawm kev txiav PCB.

Kauj Ruam 6: Sib sau PCBs

Sib dhos PCBs
Sib dhos PCBs

Raws li tau hais los saum no, Kuv tau npaj los sib sau ua ob kab sib txawv rau hauv ib chav.

Yav dhau los ua CPU ntsuas qhov ntsuas hluav taws xob sib txuas nrog cov cua txias tshiab FAN Circuit raws li qhia hauv daim duab saum toj no., Txhua yam tau ntim ua ke rau hauv pob tshab thiab qhov loj me ntawm (15cm W x 10cm D) acrylic chassis.

Txawm hais tias kwv yees li ib nrab ntawm cov chassis qhov chaw tsis muaj thiab muaj, cov khoom siv ntxiv yuav raug muab tso rau hauv qhov chaw seem tom qab.

Kauj Ruam 7: Txuas RPI Nrog Cov Hluav Taws Xob

Txuas RPI Nrog Cov Hluav Taws Xob
Txuas RPI Nrog Cov Hluav Taws Xob

Ob qhov kev sib txuas tau txuas nrog RPI raws li kev sib cais siv opto-couplers.

Tsis tas li tsis muaj lub zog rub los ntawm RPI raws li sab tes tes-xov tooj them lub zog xa mus rau cov khoom siv hluav taws xob.

Tom qab ntawd koj yuav paub hom kev sib cais sib cuam tshuam no tau them nyiaj ntau dua thaum cov khoom sib xyaw ua ke ntau dua rau cov chassis acrylic tom qab.

Kauj Ruam 8: Txoj Haujlwm Python Tswj Txhua Lub Hauv Paus

Python Program Tswj Txhua Lub Hauv Paus
Python Program Tswj Txhua Lub Hauv Paus

Tsuas yog qhov ntxiv me me ntawm cov cai yog xav tau los ntawm qhov chaws ntawm CPU ntsuas qhov ntsuas hluav taws xob.

Thaum qhov kub siab tshaj 50C, nees nkaum (20) rov ua dua ntawm FAN rau 10 thib ob thiab tua 3 thib ob yog pib.

Raws li lub cav me me ntawm FAN xav tau qhov siab tshaj 200mA ntawm tam sim no thaum lub sijhawm ua haujlwm, PWM (Pulse Width Modulation) hom kev ua kom lub cev muaj zog siv rau qhov tsis muaj lub nra hnyav tes tuav lub xov tooj.

Hloov kho qhov chaws yog zoo li hauv qab no.

***

#-*-coding: utf-8-*-

##

ntshuam subprocess, teeb liab, sys

ntshuam lub sij hawm, re

ntshuam RPi. GPIO li g

##

A = 12 hli

IB = 16

FAB = 25

##

g.setmode (g. BCM)

g.setup (A, g. OUT)

g.setup (B, g. OUT)

g.setup (FAN, g. OUT)

##

def signal_handler (sig, thav duab):

print ('Koj nias Ctrl+C!')

g.output (A, Cuav)

g.output (B, Cuav)

g. tawm (FAN, Tsis tseeb)

f.close ()

sys.exit (0)

signal.signal (signal. SIGINT, signal_handler)

##

thaum Muaj Tseeb:

f = qhib ('/home/pi/My_project/CPU_temperature_log.txt', 'a+')

temp_str = subprocess.check_output ('/opt/vc/bin/vcgencmd ntsuas_temp', plhaub = Tseeb)

temp_str = temp_str.decode (encoding = 'UTF-8', yuam kev = 'nruj')

CPU_temp = re.findall ("\ d+\. / D+", tem_str)

# rho tawm CPU kub tam sim no

##

current_temp = ntab (CPU_temp [0])

yog current_temp> 30 thiab current_temp <40:

# kub tsawg A = 0, B = 0

g.output (A, Cuav)

g.output (B, Cuav)

sijhawm.sleep (5)

elif current_temp> = 40 thiab current_temp <45:

# kub nruab nrab A = 1, B = 0

g.output (A, Tseeb)

g.output (B, Cuav)

sijhawm.sleep (5)

elif current_temp> = 45 thiab current_temp <50:

# kub siab A = 0, B = 1

g.output (A, Cuav)

g. tawm (B, Tseeb)

sijhawm.sleep (5)

elif current_temp> = 50:

# CPU txias yuav tsum tau siab A = 1, B = 1

g.output (A, Tseeb)

g. tawm (B, Tseeb)

rau kuv hauv ntau (1, 20):

g.output (FAN, Tseeb)

sijhawm.sleep (10)

g. tawm (FAN, Tsis tseeb)

sijhawm.sleep (3)

current_time = sijhawm.time ()

formated_time = time.strftime ("%H:%M:%S", time.gmtime (tam sim no_time))

f.write (str (formated_time)+'\ t'+str (current_temp)+'\ n')

f.close ()

##

Raws li cov laj thawj kev ua haujlwm ntawm tus nab npawb nab npawb no yuav luag zoo ib yam nrog CPU ntsuas qhov ntsuas kub hauv Circuit Court, Kuv yuav tsis rov hais dua cov ntsiab lus ntawm no.

Kauj Ruam 9: FAN Circuit Ua Haujlwm

FAN Circuit Kev Ua Haujlwm
FAN Circuit Kev Ua Haujlwm

Thaum saib ntawm daim duab, qhov kub tshaj 50C yam tsis muaj FAN Circuit.

Nws zoo li qhov nruab nrab CPU kub nyob ib puag ncig 40 ~ 47C thaum RPI ua haujlwm.

Yog tias cov txheej txheem hnyav xws li ua si Youtube ntawm lub vev xaib raug siv, feem ntau qhov kub nce sai txog 60C.

Tab sis nrog FAN Circuit, qhov kub yuav poob qis dua 50C hauv 5 vib nas this los ntawm kev ua haujlwm txias FAN.

Raws li qhov tshwm sim, koj tuaj yeem qhib RPI txhua hnub thiab ua haujlwm uas koj nyiam yam tsis muaj kev txhawj xeeb txog cua sov.

Kauj Ruam 10: Kev Txhim Kho Ntxiv

Kev Txhim Kho Ntxiv
Kev Txhim Kho Ntxiv

Raws li koj tuaj yeem pom, ib nrab ntawm acrylic chassis tseem tshuav.

Kuv yuav muab cov khoom ntxiv tso rau ntawd thiab nthuav tawm qhov kev thaiv yooj yim ntawm RPI lub thawv rau qee yam muaj txiaj ntsig dua.

Tau kawg ntau ntxiv txhais tau tias nce me ntsis ntxiv rau qhov nyuaj.

Xijpeem kuv tabtom muab ob lub voj voog tso rau hauv ib lub thawv hauv qhov haujlwm no.

Ua tsaug rau kev nyeem zaj dab neeg no.

Pom zoo: