Cov txheej txheem:
- Kauj Ruam 1: Kev Txuas Hluav Taws Xob
- Kauj ruam 2: Software
- Kauj Ruam 3: Kev Xeem
- Kauj Ruam 4: Xaus Qhov Ntsuas
Video: 4CH Relay-board Tswj Nrog Cov Khawm Push: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Kuv lub hom phiaj yog hloov kho kuv li Anet A8 3D-tshuab luam ntawv los ntawm kev ntxiv lub zog tswj kev tswj hwm los ntawm Octoprint interface. Txawm li cas los xij, Kuv kuj xav kom tuaj yeem pib "ua haujlwm" kuv li 3D-tshuab luam ntawv, lub ntsiab lus tsis siv lub vev xaib tab sis tsuas yog nias lub pob.
Kauj Ruam 1: Kev Txuas Hluav Taws Xob
AC-DC PSU txuas nrog Smart-plug (TP-Txuas) uas tuaj yeem tswj tau los ntawm lub xov tooj ntawm tes (App Kasa) lossis khawm.
PSU lub zog Raspberry Pi 3 B+ los ntawm LM2596 DC -DC Buck Converter Module (12V - 5V). 4-Relay Module 5V nrog Optocoupler Low-Level-Trigger tau txuas ncaj qha rau RPI 3B+ (tsis xav tau 3.3V kho dua).
4 Laub khawm tau txuas nrog "rub tawm tus neeg tawm tsam" rau RPI 3B+.
Rau kev thaiv, tsuas yog saib rau daim duab.
Kauj ruam 2: Software
Txog kev tswj hwm los ntawm kev thawb-khawm, Kuv tau siv Python los sau qhov program, txhawb kuv los ntawm kev nyeem cov xov hauv qab no:
www.raspberrypi.org/forums/viewtopic.php?t…
invent.module143.com/daskal_tutorial/raspbe…
www.hertaville.com/introduction-to-accessin…
www.hertaville.com/introduction-to-accessin…
Txhawm rau pov hwm kev cuam tshuam nrog kev tswj hwm ntawm Octoprint, muaj kev sim los tshuaj xyuas qhov xwm txheej tam sim no ntawm kev xa tawm thiab hloov nws.
Tsab ntawv txuas nrog.
Lus Teb: Raws li Relay 1 tswj lub motherboard, Kuv xav ntxiv kev nyab xeeb los ntawm kev hloov nrog lub laub-khawm. Lub hom phiaj yog kom tswj lub pob nyem thaum 5 vib nas this kom paub meej tias hloov mus. Hmoov tsis zoo, tsab ntawv ua haujlwm tab sis tsis ntseeg tau vim muaj kev thim rov qab. Yog tias koj muaj kev kho kom pom zoo thov qhia tawm pub dawb.
Txhawm rau ua tsab ntawv ua tiav: sudo chmod 777 /home/pi/script/Relay_board_control.pyTo sim cov ntawv:./Relay_board_control.py
Txhawm rau luam tsab ntawv: sudo cp Relay_board_control.py/usr/local/bin
Kom khiav tau cov ntawv thaum pib:
sudo nano /etc/rc.local
ntxiv txoj hauv kev rau tsab ntawv "/home/pi/scripts/Relay_board_control.py &" nruab nrab ntawm fi thiab tawm 0
Txog kev tswj hwm los ntawm Octoprint, nws tau sau tseg zoo hauv lub vev xaib.
Muaj ob theem:
1- Kho cov ntaub ntawv /etc/init.d/octoprint los ntawm kev ntxiv hauv qhov thaiv "do_start ()" tom qab RETVAL = "$?:
gpio export 6 tawm
gpio -g sau 61
gpio xa tawm 13 tawm
gpio -g sau 131
gpio xa tawm 19 tawm
gpio -g sau 191
gpio xa tawm 26 tawm
gpio -g sau 26 1
2- Hloov kho /home/pi/.octoprint/config.yaml cov ntaub ntawv los ntawm kev ntxiv qhov thaiv "System":
system: kev ua:
- kev nqis tes ua: Printer_ON
hais kom ua: gpio -g sau 60
lees paub: cuav
lub npe: Printer_ON
- kev nqis tes ua: Printer_OFF
hais kom ua: gpio -g sau 61
lees paub: Koj tab tom yuav tig_OFF lub tshuab luam ntawv.
lub npe: Printer_OFF
- nqis tes ua: LED-String_ON
hais kom ua: gpio -g sau 13 0
lees paub: cuav
lub npe: LED-String_ON
- nqis tes ua: LED-String_OFF
hais kom ua: gpio -g sau 131
lees paub: cuav
lub npe: LED-String_OFF
- nqis tes ua: LED-Cam_ON
hais kom ua: gpio -g sau 19 0
lees paub: cuav
lub npe: LED-Cam_ON
- nqis tes ua: LED-Cam_OFF
hais kom ua: gpio -g sau 191
lees paub: cuav
lub npe: LED-Cam_OFF
- nqis tes ua: Relay-4_ON
hais kom ua: gpio -g sau 260
lees paub: cuav
npe: Relay-4_ON
- nqis tes ua: Relay-4_OFF
hais kom ua: gpio -g sau 26 1
lees paub: cuav
npe: Relay-4_OFF
Kauj Ruam 3: Kev Xeem
Nws ua haujlwm!
Tus cwj pwm ntawm lub laub-khawm yog qhov nyuaj me ntsis tab sis tom qab ob peb qhov kev sim koj tau txais nws.
Kauj Ruam 4: Xaus Qhov Ntsuas
Tam sim no kuv yuav solder lub laub-khawm ntawm lub perfboard thiab ntxiv 5 tus pin txuas.
Thaum kawg, Kuv tau tsim thiab luam tawm 2 kis:
- ib qho rau RPI 3 B+ thiab relay-board
- ib qho los npog cov thaiv ntawm lub hauv paus ntawm PSU thiab kho LM2596 DC-DC Buck Converter Module.
Koj tuaj yeem nrhiav cov ntaub ntawv *.stl thiab *.gcode ntawm www.thingiverse.com
-
-
Pom zoo:
Tsev Automation WiFi Teeb Hloov Nrog ESP-01 thiab Relay Module Nrog Laub Khawm: 7 Kauj Ruam
Tsev Automation WiFi Teeb Hloov Nrog ESP-01 thiab Relay Module Nrog Laub Khawm: Yog li hauv cov lus qhia dhau los peb tau teeb tsa ESP-01 nrog Tasmota siv ESP Flasher thiab txuas ESP-01 rau peb lub network wifi.Ntawm no peb tuaj yeem pib tsim nws kom qhib/tua lub teeb hloov siv WiFi lossis lub laub khawm
WI-Fi Tswj 4CH Relay Module rau Tsev Automation: 7 Kauj Ruam (nrog Duab)
WI-Fi Tswj 4CH Relay Module rau Automation Hauv Tsev: Kuv tau siv ntau qhov WI-FI Raws li kev hloov pauv yav tas los. Tab sis cov ntawd tsis haum nrog Kuv Qhov Xav Tau. Tias yog vim li cas kuv xav tsim kuv tus kheej, uas tuaj yeem hloov pauv ib txwm Phab Ntsa Hloov qhov tsis muaj kev hloov kho. ESP8266 nti yog Wifi pab tau
AVR Microcontroller. Toggle LED's Siv Push Push Switch. Push Button Debouncing: 4 Kauj Ruam
AVR Microcontroller. Toggle LED's Siv Push Push Switch. Laub khawm Debouncing: Hauv ntu no, peb yuav kawm Yuav ua li cas los tsim cov phiaj xwm C rau ATMega328PU txhawm rau hloov qhov xwm txheej ntawm peb lub LED raws li kev nkag los ntawm lub khawm hloov. Tsis tas li, peb tau tshawb nrhiav qhov kev daws teeb meem ntawm yog 'Hloov Bounce'. Raws li ib txwm, peb wi
Rooj Bluetooth Hais Lus Nrog Pom Pom Lub Suab, Khawm Khawm thiab NFC.: 24 Kauj Ruam (nrog Duab)
Rooj Bluetooth Hais Lus Nrog Pom Pom Suab, Khawm Khawm thiab NFC.: Nyob zoo! Hauv Cov Lus Qhia no Kuv yuav qhia yuav ua li cas kuv thiaj ua Lub Rooj Sib Tham Bluetooth hais lus no uas muaj Lub Suab Pom Zoo Zoo nrog kov cov nyees khawm thiab NFC. Ua tau yooj yim ua ke nrog NFC Enabled cov cuab yeej nrog tsuas yog kov. Tsis muaj lub cev khawm
Micro: ntsis Cov Hauv Paus Kawm: Khawm Khawm: 11 Kauj Ruam
Micro: ntsis Cov Hauv Paus Kawm: Kov Khawm: Ntawm BBC Micro: ntsis, muaj 3 kov footers: pin0, pin1, pin2. Yog tias koj tuav tus GND tus pin nrog ib txhais tes thiab kov tus lej 0, 1, lossis 2 nrog rau lwm qhov, qhov hluav taws xob me me (nyab xeeb) yuav ntws los ntawm koj lub cev thiab rov qab mus rau hauv micro: me ntsis. Qhov no yog