Mundarija:
- 1 -qadam: Taymer
- 2 -qadam: tugmachalarni optimallashtirish
- 3 -qadam: LED
- 4 -qadam: Yuqori fayl
- 5 -qadam: Faylni cheklash
- 6 -qadam: PIR harakat sensori ulanishi
- 7 -qadam: Elektron panelidagi LEDni ulash
- 8 -qadam: Boshqaruv kengashining ulanishlari
Video: Harakat seziladigan LED: 8 qadam
2024 Muallif: John Day | [email protected]. Oxirgi o'zgartirilgan: 2024-01-30 13:27
Fon:
Siz darsga yoki ishga ketishdan oldin yoki yotishdan oldin chiroqni o'chirishni unutasizmi? Chiroqlar yonmagan vaqtlar, siz ularni ishlatmayotganingizda, chindan ham xarajatlar va energiyani yo'qotishi mumkin. Masalan, solarcity.com ma'lumotlariga ko'ra, bir hafta davomida tun bo'yi chiroqlarni yoqish elektr hisobingizga 25 dollar qo'shishi mumkin! CPE133 loyihasi uchun biz odamlarga o'z uylarida energiyani tejashga va yorug'likdan samarali foydalanishga yordam beradigan harakat sensori nuri yaratamiz.
Bizning tizim amalda:
Amalda, chiroqlar faqat sensor xonadagi harakatni aniqlagach yonadi. Keyin chiroqlar ma'lum vaqtgacha, taxminan 30 daqiqa yonadi va keyin avtomatik ravishda o'chadi. Aytaylik, siz shunchaki o'tayotgandingiz yoki belgilangan vaqt tugashidan oldin xonadan erta chiqib ketmoqchi edingiz. Bunday holatlarda biz chiroqni qo'lda yoqish yoki o'chirish tugmachasini o'rnatdik. E'tibor bering, chiroqlar qo'lda yoki avtomatik yoqilganda ham (chiroqlar qo'lda o'chmasa) 30 daqiqa yonadi.
Bortdagi simulyatsiya:
Taymer ishlayotganini ko'rish uchun taymerni 1 daqiqaga o'zgartirdik.
Materiallar:
- 1 Basys taxtasi (uni Digilent -dan topishingiz mumkin)
- 1 ta PIR harakat sensori (uni Amazonda topishingiz mumkin)
- 1 ta non paneli va to'plami (biz buni Amazondan foydalanishni taklif qilamiz)
-
Yuqoridagi to'plamdan
- 1 LED
- 3 ta ayol va erkak o'tish kabeli
- 6 erkak va erkak o'tish kabeli
1 -qadam: Taymer
LED 1 daqiqa yonib turishi uchun avval taymer yaratishimiz kerak. Basys 3 platasi 100 MGts chastotali ichki chastotaga ega, shuning uchun 100 million tsikl 1 sekundga teng. Bu keyinchalik "t_cnt" uchun maksimal son vazifasini bajaradigan o'zgaruvchi sifatida ishlatiladi. T_cnt 1 ga oshadi, chunki Basys 3 taxtasi tsiklni yakunlaydi. 100 millionlik belgiga etganida, u tiklanadi va boshqa "sek" o'zgaruvchisi 1 ga oshadi. Bu "sek" o'zgaruvchisi o'tgan soniyalar sonini ifodalaydi va bu o'zgaruvchi 60 ga teng bo'lgach, to'liq daqiqa o'tdi.
Quyidagi kodni Taymer nomli vhdl manba faylga nusxalash.
COUNT_8B obyekti
port (RESET: std_logic -da;
CLK: std_logic -da; T: tashqarida std_logic: = '0');
tugatish COUNT_8B;
COUNT_8B ning my_count arxitekturasi
doimiy max_count: tamsayı: = (100000000); -signal t_cnt: std_logic_vector (7 dan 0 gacha): = "00000000"; signal t_cnt: tamsayı: = (0); jarayonni boshlash (CLK, RESET, t_cnt) o'zgaruvchi sek: tamsayı: = 0; if if (ko'tarilish_ qirrasi (CLK)), keyin agar (RESET = '1') bo'lsa, t_cnt <= (0); - aniq elsif (t_cnt = max_count) keyin- max_count 100 million, bu 1 sekundga teng t_cnt <= (0); - Ichki soatni 0 sekundga qaytaradi: = sek + 1; - "Sekin soatimizni" 1 ga oshiradi, agar (sek = 60), keyin- 60 sekundga yetganda, u maksimal vaqtga yetdi sek: = 0; - "sekin soat" ni 0 T <= '1' ga qaytaradi; tugatish, agar; boshqa t_cnt <= t_cnt + 1; - ichki soatni oshiradi T <= '0'; tugatish, agar; tugatish, agar; jarayonni tugatish; my_count -ni tugatish;
2 -qadam: tugmachalarni optimallashtirish
Basis platalaridagi chastota shunchalik yuqori (100 MGts atrofida), agar siz Basis platasiga qisqa vaqt deb o'ylasangiz, uni 100 000 marta bosgan bo'lar edingiz. Bu yorug'lik yoqilgan va o'chirilgan holat o'rtasida tez miltillashiga olib keladi. Biz miltillashni kamaytirish uchun holat diagrammasini tuzish orqali tugmani optimallashtirishga harakat qildik.
D-flip-floplar har bir holatni ushlab turadi va keyin biz jarayon bayonotida holatning o'tishini aniqlaymiz.
Quyidagi kodni Button nomli vhdl manba faylga nusxalash.
kutubxona IEEE; IEEE. STD_LOGIC_1164. ALL dan foydalaning;
shaxs tugmasi
Port (btn: STD_LOGIC -da; clk: STD_LOGIC -da; E: tashqarida STD_LOGIC); tugatish tugmasi;
Arxitektura tugmachasining xulq -atvori
state_type turi (PRESS, NP); signal PS, NS: state_type: = NP;
boshlash
seq_proc: jarayon (NS, clk) boshlanadi, agar (ko'tarilish_kiri (clk)), keyin PS <= NS; tugatish, agar; seq_proc jarayonini tugatish;
ns_proc: jarayon (btn, PS)
boshlang PS holati NP => if (btn = '1') bo'lsa, NS <= PRESSED; E <= '1'; boshqa NS <= NP; E agar (btn = '0') u holda NS <= NP; E <= '0'; boshqa NS <= PRESSED; E <= '0'; tugatish, agar; oxirgi holat; ns_proc jarayonini tugatish;
xulq -atvorni tugatish;
3 -qadam: LED
LED ikkita holatga ega: OFF (yoki IDLE) va ON. Yuqorida aytilganidek, shtatlar d-flip-flopda saqlanadi. Sensor harakatni aniqlasa (S = 1) yoki tugma bosilganda (E = 1) chiroq yonadi. Agar taymer 1 daqiqaga (T = 1) yoki tugma bosilganda (E = 1) qo'lda bo'lsa, LED avtomatik ravishda o'chadi.
Quyidagi kodni LED nomli vhdl manba fayliga nusxalash.
motion_sensored_light - bu Port (S: STD_LOGIC; - sesnor; Port JA10/Pin G3 E: STD_LOGIC; - qo'lda ishlash uchun tashqi tugma; T tugma markazi STD_LOGIC; - taymer maksimal vaqtga yetganda; Taymer LEDidan: tashqarida STD_LOGIC; - engil TRST: tashqarida STD_LOGIC; - taymer clk: STD_LOGIC da qayta tiklanadi); - flip flop uchun clk, shtatlar tugashini motion_sensored_light;
Arxitektura harakati_sensored_light xatti -harakati
state_type turi (ST0, ST1); --ST0 = IDLE, ST1 = LED HIGH
signal PS, NS: state_type: = ST0; - Hozirgi davlat va keyingi davlat, ST0 IDLE da boshlanadi
boshlash
- flip flopning texnologik bloki- seq_proc soatining yuqoriroq chekkasidagi holatni yangilaydi: jarayon (NS, clk) boshlanadi- d flip flop, agar (ko'tarilish_ qirrasi (clk)), keyin PS <= NS; tugatish, agar; seq_proc jarayonini tugatish;
ns_proc: jarayon (S, E, T, PS)
boshlang PS holati ST0 => LED <= '0' bo'lganda; - bo'sh holat uchun chiqishlar TRST <= '1'; agar (S = '0' OR E = '1') u holda - st0 dan st1 ga o'tishga kirishlar NS <= ST1; boshqa NS LED <= '1'; - TRST holatidagi chiqishlar <= '0'; if (E = '1' OR T = '1') keyin - st1 dan st0 ga o'tishga kirishlar NS <= ST0; boshqa NS <= ST1; tugatish, agar; oxirgi holat; ns_proc jarayonini tugatish;
xulq -atvorni tugatish;
4 -qadam: Yuqori fayl
Endi biz boshqa barcha fayllarni bitta kartaga joylashtiramiz.
Quyidagi kodni Top_File nomli vhdl manba fayliga nusxalash.
kutubxona IEEE; IEEE. STD_LOGIC_1164. ALL dan foydalaning;
Top_File obyekti
Port: S: STD_LOGIC da); - Top_File holatini ushlab turuvchi flip flop uchun clk;
Top_File arxitekturasining xulq -atvori
COUNT_8B komponenti
port (RESET: std_logic: = '0'; CLK: std_logic; T: out std_logic: = '0'); oxirgi komponent; motion_sensored_light komponenti - bu Port (S: STD_LOGIC; - sesnor; Port JA10/Pin G3 E: STD_LOGIC; - qo'lda ishlash uchun tashqi tugma; T tugma markazi STD_LOGIC; - taymer maksimal vaqtga yetganda; Taymer LEDidan: tashqarida STD_LOGIC; - engil TRST: tashqarida STD_LOGIC; - taymerni tiklaydi clk: STD_LOGIC da); - clk for flip flop, shtatlarning oxirgi komponentini ushlab turadi; komponent tugmasi - bu Port (btn: STD_LOGIC; clk: STD_LOGIC; E: tashqaridan STD_LOGIC); oxirgi komponent; signal t_reached_c: std_logic; - signal r_time_c: std_logic; - signal tugmasi_c: std_logic;
boshlash
taymer: COUNT_8B port xaritasi (RESET => r_time_c, CLK => CLK, T => t_reached_c); motion_sensor: motion_sensored_light port xaritasi (S => S, E => button_c, T => t_reached_c, LED => LED, TRST => r_time_c, clk => clk); button_controller: tugma port xaritasi (btn => btn, clk => clk, E => button_c); xulq -atvorni tugatish;
5 -qadam: Faylni cheklash
Endi biz kirish va chiqish taxtasida qaerda bo'lishini aniqlashimiz kerak.
Quyidagi kodni Cheklovlar nomli vhdl cheklovlar fayliga nusxalash.
## Bu fayl Basys3 rev B taxtasi uchun umumiy.xdc ## Uni loyihada ishlatish uchun: ## - ishlatilgan pinlarga mos keladigan chiziqlarni sharhlamaslik ## - ishlatilgan portlarning nomini o'zgartirish (har bir satrda, get_ports dan keyin) loyihadagi yuqori darajadagi signal nomlari
## Soat signali
set_property PACKAGE_PIN W5 [get_ports clk] set_property IOSTANDARD LVCMOS33 [get_ports clk] create_clock -add -name sys_clk_pin -teriod 10.00 -waveform {0 5} [get_ports clk] ## Kalitlar #set_property PACKAGE_PIN {17] set_property IOSTANDARD LVCMOS33 [get_ports {sw [0]}] #set_property PACKAGE_PIN V16 [get_ports {sw [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [1]}] #set_property PACKAGE_PIN W16 [2] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [2]}] #set_property PACKAGE_PIN W17 [get_ports {sw [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [3]}] #set_property PACKAGE_PIN [sw14]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [4]}] #set_property PACKAGE_PIN V15 [get_ports {sw [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [5]}] #set_proper PACKAGE_PIN_14 [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [6]}] #set_property PACKAGE_PIN W13 [get_ports {sw [7]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [7]}] #set_property PACKAGE_PIN V2 [get_ports {sw [8]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [8]}] #set_property PACKAGE_PIN T3 [get_ports {sw [9]}] #SET_proper I LVCMOS33 [get_ports {sw [9]}] #set_property PACKAGE_PIN T2 [get_ports {sw [10]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [10]}] #set_property PACKAGE_PIN R3 [get_ports {sw] [11]} set_property IOSTANDARD LVCMOS33 [get_ports {sw [11]}] #set_property PACKAGE_PIN W2 [get_ports {sw [12]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [12]}] #set_property PACKAGE_PIN U1 [get_ports] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [13]}] #set_property PACKAGE_PIN T1 [get_ports {sw [14]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [14]}] #set_property PACKAGE_PIN [sw_14]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [15]}]
## LEDlar
#set_property PACKAGE_PIN U16 [get_ports {led [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [0]}] #set_property PACKAGE_PIN E19 [get_ports {led [1]}] #set_property IOSTANDARD LVCMOS {1] }] #set_property PACKAGE_PIN U19 [get_ports {led [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [2]}] #set_property PACKAGE_PIN V19 [get_ports {led [3]}] #set_property IOSTANDARD [L_CM] 3]}] #set_property PACKAGE_PIN W18 [get_ports {led [4]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [4]}] #set_property PACKAGE_PIN U15 [get_ports {led [5]}] #set_property IMOS33 led [5]}] #set_property PACKAGE_PIN U14 [get_ports {led [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [6]}] #set_property PACKAGE_PIN V14 [get_ports {led [7]}] #set_property IOMARD get_ports {led [7]}] #set_property PACKAGE_PIN V13 [get_ports {led [8]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [8]}] #set_property PACKAGE_PIN V3 [get_ports {led [9]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [9]}] #set_property PACKAGE_PIN W3 [get_ports {led [10]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [10]}] #set_property PACKAGE_PIN [11]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [11]}] #set_property PACKAGE_PIN P3 [get_ports {led [12]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [12]}] #set_property NAC3 {led [13]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [13]}] #set_property PACKAGE_PIN P1 [get_ports {led [14]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [14]}] #set_proper PAC1 [get_ports {led [15]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [15]}] ## 7 segmentli displey #set_property PACKAGE_PIN W7 [get_ports {seg [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [0]}] #set_property PACKAGE_PIN W6 [get_ports {seg [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [1]}] #set_property PACKAGE_PIN U8 [get_ports {seg [2]}] #set_property IOSTA NDARD LVCMOS33 [get_ports {seg [2]}] #set_property PACKAGE_PIN V8 [get_ports {seg [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [3]}] #set_property PACKAGE_PIN U5 [4_port] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [4]}] #set_property PACKAGE_PIN V5 [get_ports {seg [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [5]}] #set_property PACkAGE_PIN [P_7] }] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [6]}]
#set_property PACKAGE_PIN V7 [get_ports dp]
#set_property IOSTANDARD LVCMOS33 [get_ports dp]
#set_property PACKAGE_PIN U2 [get_ports {a [0]}]
#set_property IOSTANDARD LVCMOS33 [get_ports {a [0]}] #set_property PACKAGE_PIN U4 [get_ports {a [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {a [1]}] #set_property PACKAGE_PIN {4 [get_ports] }] #set_property IOSTANDARD LVCMOS33 [get_ports {a [2]}] #set_property PACKAGE_PIN W4 [get_ports {a [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {a [3]}]
## tugmalar
set_property PACKAGE_PIN U18 [get_ports btn] set_property IOSTANDARD LVCMOS33 [get_ports btn] #set_property PACKAGE_PIN T18 [get_ports btnU] #set_property IOSTANDARD LVCMOS33 [get_ports btnU] #set_property PACKAGE_PIN W19 [get_ports btnL] #set_property IOSTANDARD LVCMOS33 [get_ports btnL] #set_property PACKAGE_PIN T17 [get_ports btnR] #set_property IOSTANDARD LVCMOS33 [get_ports btnR] #set_property PACKAGE_PIN U17 [get_ports btnD] #set_property IOSTANDARD LVCMOS33 [get_ports btnD]
## Pmod sarlavhasi JA
## Sch name = JA1 #set_property PACKAGE_PIN J1 [get_ports {JA [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [0]}] ## Sch name = JA2 #set_property PACKAGE_PIN L2 [get_ports {JA [1] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [1]}] ## Sch name = JA3 #set_property PACKAGE_PIN J2 [get_ports {JA [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [2]}] ## = JA4 #set_property PACKAGE_PIN G2 [get_ports {JA [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [3]}] ## Sch name = JA7 #set_property PACKAGE_PIN H1 [get_ports {JA [4]}] #set LVCMOS33 [get_ports {JA [4]}] ## Sch name = JA8 set_property PACKAGE_PIN K2 [get_ports LED] set_property IOSTANDARD LVCMOS33 [get_ports LED] ## Sch name = JA9 #set_property PACKAGE_PIN H2 [get_ports] J # set_property IOSTANDARD LVCMOS33 [get_ports {JA [6]}] ## Sch name = JA10 set_property PACKAGE_PIN G3 [get_ports S] set_property IOSTANDARD LVCMOS33 [get_ports S]
## Pmod sarlavhasi JB
## Sch name = JB1 #set_property PACKAGE_PIN A14 [get_ports {JB [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [0]}] ## Sch name = JB2 #set_property PACKAGE_PIN A16 [get_ports {JB [1] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [1]}] ## Sch name = JB3 #set_property PACKAGE_PIN B15 [get_ports {JB [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [2]}] ## = JB4 #set_property PACKAGE_PIN B16 [get_ports {JB [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [3]}] ## Sch name = JB7 #set_property PACKAGE_PIN A15 [get_ports {JB [4]}] #set LVCMOS33 [get_ports {JB [4]}] ## Sch name = JB8 #set_property PACKAGE_PIN A17 [get_ports {JB [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [5]}] # #Sch name = JB9 #set_property PACKAGE_PIN C15 [get_ports {JB [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [6]}] ## Sch name = JB10 #set_property PACKAGE_PIN C16 [get_ports {JB [7]}] #set_property ICOM_33 JB [7]}]
## Pmod Header JC
## Sch name = JC1 #set_property PACKAGE_PIN K17 [get_ports {JC [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [0]}] ## Sch name = JC2 #set_property PACKAGE_PIN M18 [get_ports {JC [1] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [1]}] ## Sch name = JC3 #set_property PACKAGE_PIN N17 [get_ports {JC [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [2]}] ## = JC4 #set_property PACKAGE_PIN P18 [get_ports {JC [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [3]}] ## Sch name = JC7 #set_property PACKAGE_PIN L17 [get_ports {JC [4]}] #set LVCMOS33 [get_ports {JC [4]}] ## Sch name = JC8 #set_property PACKAGE_PIN M19 [get_ports {JC [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [5]}] ## Sch name = JC9 #set_property PACKAGE_PIN P17 [get_ports {JC [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [6]}] ## Sch name = JC10 #set_property PACKAGE_PIN R18 [get_ports {JC [7]}] #set_property IOOSANDARD [IOS] QK [7]}]
## Pmod sarlavhasi JXADC
## Sch name = XA1_P #set_property PACKAGE_PIN J3 [get_ports {JXADC [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [0]}] ## Sch name = XA2_P #set_property PACKAGE_PIN L3 [get_port] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [1]}] ## Sch name = XA3_P #set_property PACKAGE_PIN M2 [get_ports {JXADC [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports] {JXADC] = XA4_P #set_property PACKAGE_PIN N2 [get_ports {JXADC [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [3]}] ## Sch name = XA1_N #set_property PACKAGE_PIN K3] [set_port] LVCMOS33 [get_ports {JXADC [4]}] ## Sch name = XA2_N #set_property PACKAGE_PIN M3 [get_ports {JXADC [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [5]}] #_S #nomi #X_ PACKAGE_PIN M1 [get_ports {JXADC [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [6]}] ## Sch name = XA4_N #set_property PACKAGE_PIN N1 [get_ports {JXADC [7]} LVMOST [get_ports {JXADC [7]}]
## VGA ulagichi
#set_property PACKAGE_PIN G19 [get_ports {vgaRed [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaRed [0]}] #set_property PACKAGE_PIN H19 [get_ports {vgaRed [1]}] #SO_VR_porti }] #set_property PACKAGE_PIN J19 [get_ports {vgaRed [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaRed [2]}] #set_property PACKAGE_PIN N19 [get_ports {vgaRed [3] }VMOST {v_R_Sport] 3]}] #set_property PACKAGE_PIN N18 [get_ports {vgaBlue [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaBlue [0]}] #set_property PACKAGE_PIN L18 [get_ports {vgaBlueSP_Prose_Pro_To_L_V_B_R] {1]} # vgaBlue [1]}] #set_property PACKAGE_PIN K18 [get_ports {vgaBlue [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaBlue [2]}] #set_property PACKAGE_PIN J18 [get_OS_problemi {3) get_ports {vgaBlue [3]}] #set_property PACKAGE_PIN J17 [get_ports {vgaGreen [0]}] #set_property IOSTANDARD LVCMOS33 [get_p orts {vgaGreen [0]}] #set_property PACKAGE_PIN H17 [get_ports {vgaGreen [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaGreen [1]}] #set_property PACKAGE_PIN G17 [get_pro_per] {2} LVCMOS33 [get_ports {vgaGreen [2]}] #set_property PACKAGE_PIN D17 [get_ports {vgaGreen [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaGreen [3]}] #set_property PACKAGE_PIN_PST_19 Hsync] #set_property PACKAGE_PIN R19 [get_ports Vsync] #set_property IOSTANDARD LVCMOS33 [get_ports Vsync]
## USB-RS232 interfeysi
#set_property PACKAGE_PIN B18 [get_ports RsRx] #set_property IOSTANDARD LVCMOS33 [get_ports RsRx] #set_property PACKAGE_PIN A18 [get_ports RsTx] #set_property IOSTANDARD LVCMOSTx [get_ports Rports
## USB HID (PS/2)
#set_property PACKAGE_PIN C17 [get_ports PS2Clk] #set_property IOSTANDARD LVCMOS33 [get_ports PS2Clk] #set_property PULLUP true [get_ports PS2Clk] #set_property PACKAGE_PIN B17 [get_ports PSPD2Data
## To'rt SPI Flash
## E'tibor bering, CCLK_0 7 seriyali qurilmalarga joylashtirilmaydi. Siz unga ## STARTUPE2 ibtidoiy yordamida kirishingiz mumkin. #set_property PACKAGE_PIN D18 [get_ports {QspiDB [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {QspiDB [0]}] #set_property PACKAGE_PIN D19 [get_ports {QspiDB [1]} VSport [Pro] }] #set_property PACKAGE_PIN G18 [get_ports {QspiDB [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {QspiDB [2]}] #set_property PACKAGE_PIN F18 [get_ports {QspiDB [3] LV_MS_TM] 3]}] #set_property PACKAGE_PIN K19 [get_ports QspiCSn] #set_property IOSTANDARD LVCMOS33 [get_ports QspiCSn]
6 -qadam: PIR harakat sensori ulanishi
PIR harakat sensori uchta pinga ega: mos ravishda quvvat, gnd va signal (birinchi rasmga qarang). Ushbu yo'riqnomada tavsiya etilgan harakat sensori to'g'ridan -to'g'ri non paneliga ulanishi mumkin. Ammo biz ishlatgan sensor uchun biz simlarni kesishimiz va yirtib tashlashimiz kerak edi, shunda ular ochilmasligi uchun ochiq uchlarini lehimlashimiz kerak edi. Non taxtasida erkak va ayol o'tish simini ketma -ket quvvat va topraklama pinlari bilan, so'ngra signal pimi bilan ketma -ket erkak -erkak o'tish simini ulang (ikkinchi rasmga qarang).
7 -qadam: Elektron panelidagi LEDni ulash
LEDni non paneliga ulang. Qora erkakdan erkakga erkak o'tish kabelini LEDning qisqa simini ketma -ket joylashtiring. Keyin har xil rangdagi erkak va erkak simlarini LEDning uzun simlari bilan ketma -ket ulang.
8 -qadam: Boshqaruv kengashining ulanishlari
PIR harakat sensori ayol uchlarini bazis platasidagi 5 voltli kuchlanish manbaiga ulang. Keyin erkak LEDli topraklama simini yon portning eriga, so'ng PIR harakat sensori signal signaliga va keyin LED kirish simiga ulang (rasmda ko'rinib turganidek).
Tavsiya:
Harakat sensori signalizatsiyasi: 5 qadam
Harakat sensori signalizatori: Siz har doim eshik oldida kim borligini tekshirasizmi? Bu siz uchun eng zo'r element. Eshigim tashqarisida bilmagan odamlar bormi, men doim qiziqardim. Men bu harakat sensori signalizatsiyasini LED chiroqlar bilan yaratdim, bu esa
Ovoz sensori va servo: reaktiv harakat: 4 qadam
Ovoz sensori va Servo: Reaktiv harakat: Avval siz ushbu sxemani birlashtirish uchun tegishli materiallarni to'plashingiz kerak
Harakat yoritgichli DIY portlovchi devor soati: 20 qadam (rasmlar bilan)
Harakatli yoritgichli DIY portlovchi devor soati: Bu ko'rsatma / videoda men sizga asta -sekin ko'rsatma beraman, qanday qilib birlashtirilgan yorug'lik tizimi bilan ijodiy va o'ziga xos devor soatini yasash mumkin. . Men yurganimda
Taymerli harakat sensori faollashtirilgan LED tasmasi: 6 qadam (rasmlar bilan)
Taymerli harakat sensori faollashtirilgan LED tasmasi: hammaga salom! Men hozir yana bir ko'rsatma yozayotganimdan juda xursandman. Bu loyiha bir necha oy oldin men bilan maslahatchi (" @ @ @ducic) bog'lanishganida, dizayndan yordam so'ragan edim. Shunday qilib, asl spetsifikatsiya: & q
Harakat boshqariladigan rozetka - Harakat sezuvchi nurdan: 6 qadam
Harakat boshqariladigan rozetka - Harakat sezuvchi nurdan: Tasavvur qiling, siz hiyla-nayrangchi bo'lib, blokning eng qo'rqinchli uyiga borasiz. Barcha arvohlar, arvohlar va qabristonlardan o'tib, siz oxirgi yo'lga borasiz. Siz oldingizda bir piyola ichida konfetni ko'rishingiz mumkin! Ammo keyin birdaniga gho