Cov txheej txheem:

Wifi Ob Triac Dimmer Board: 7 Kauj Ruam
Wifi Ob Triac Dimmer Board: 7 Kauj Ruam

Video: Wifi Ob Triac Dimmer Board: 7 Kauj Ruam

Video: Wifi Ob Triac Dimmer Board: 7 Kauj Ruam
Video: Умный ZigBee выключатель Somgoms без нулевой линии – на симисторе автоматизация дома 2024, Hlis ntuj nqeg
Anonim
Wifi Ob Triac Dimmer Board
Wifi Ob Triac Dimmer Board

Cov lus qhia no yog rau ARMTRONIX WIFI Ob Triac Dimmer Board V0.1

Armtronix Wifi ob lub triac dimmer yog pawg IOT. Nws yog tsim los rau tsev automation. Cov yam ntxwv ntawm pawg thawj coj yog:

  1. Wireless tswj
  2. Daim ntawv me me
  3. On board AC rau DC fais fab tuag suppy1 230VAC rau 5V DC.
  4. DC virtual hloov
  5. Ob txoj hauv kev (ib qho rau ntawm thiab tawm lwm qhov rau dimming)

Qhov loj ntawm pawg thawj coj yog 84mmX39mm thiab nrog lub thawv loj 114 mmX44mm, raws li qhia hauv daim duab 1, nws muaj peev xwm tsav mus txog 1 Amp load. Pawg thawj coj muaj Wifi module (Esp 12F) thiab microcontroller (atmega328p) tib yam li uas tau siv hauv Arduino Uno, uas yog siv los tswj lub triac los ntawm HTTP lossis MQTT hom. Lub rooj tsavxwm muaj ob lub DC hloov pauv virtual uas tuaj yeem siv los tswj ob Triacs.

Lub Rooj Tswjhwm Saib kuj tseem muaj Lub Hwjchim Loj (AC rau DC hloov pauv) muaj peev xwm tuav 100-240 VAC raws li kev nkag thiab muab cov zis ntawm 5V 0.6A. Muaj ob lub triac (BT136) thiab Terminal txuas. Muaj Zero hla kev kuaj pom kuj tseem muaj uas yog siv rau dimmig. Muaj ob lub triac siv ib qho rau dimming thiab lwm qhov rau /tawm lub hom phiaj.

Kauj ruam 1: Header Paub meej

Header Paub meej
Header Paub meej
Header Paub meej
Header Paub meej

Daim duab 2 muab cov ntsiab lus ntawm lub taub hau thiab cov davhlau ya nyob twg.

Rau board 230VAC tau siv rau lub davhlau ya nyob twg thaiv thiab thauj khoom tau thov rau lub davhlau ya nyob twg thaiv.

Ntawm lub Rooj Tswjhwm Saib J3 header tau siv rau dc virtual hloov lub taub hau ntxaws tuaj yeem xa mus rau daim duab 4. Thawj tus pin yog vcc-3.3v, tus pin thib ob yog atmega328p gpio pin rau arduino programming peb yuav tsum siv A4 (ON & OFF), tus pin thib peb yog atmega gpio pin rau arduino programming peb yuav tsum siv A5 (DIMMING) thiab tus lej thib plaub yog hauv av. Rau dc virtual hloov peb tab tom siv tus lej thib ob thiab thib peb piv txwv li A4, A5 thiab Plaub tus lej piv txwv li hauv av, qhov no tau hais hauv daim duab 3 rau kev sib txuas ntawm kev hloov pauv virtual.

Kauj Ruam 2: Cov ncauj lus kom ntxaws

Cov ncauj lus kom ntxaws
Cov ncauj lus kom ntxaws
Cov ncauj lus kom ntxaws
Cov ncauj lus kom ntxaws

J1 Header yog

siv los rub cov firmware rau ESP-12F lossis atmega328p los ntawm FTDI Module, cov ntsiab lus ntawm lub taub hau tuaj yeem pom hauv daim duab 4. Txhawm rau upload cov firmware tshiab rau esp siv FTDI

Ua qhov txuas hauv qab no rau ESP12E

1] Txuas RX ntawm FTDI rau TXDE tus pin ntawm J1

2] Txuas TX ntawm FTDI rau RXDE tus pin ntawm J1

3] Txuas RTS ntawm FTDI rau RTSE tus pin ntawm J1

4] Txuas DTR ntawm FTDI rau DTRE tus pin ntawm J1

5] Txuas Vcc5V ntawm FTDI rau VCC5v tus pin ntawm J1

6] Txuas GND ntawm FTDI rau GND tus pin ntawm J1

Thov xa mus rau qhov txuas txuas rau qhov chaws

github.com/armtronix/Wifi-Two-Dimmer-Board

Hauv txoj cai no feem ntau siv HTTP chaw nres nkoj yog 80, peb tuaj yeem hloov tus lej chaw nres nkoj, qhov twg los xij tus neeg siv xav tau siv raws li nws daim ntawv thov, xa hauv qab no

// ##### Qhov xwm txheej tshwm sim #####

MDNSResponder mdns;

ESP8266WebServer server (80);

WiFiClient wifiClient;

PubSubClient mqttClient;

Ticker btn_timer;

Ticker otaTickLoop;

Tom qab ua qhov txuas, txuas mus rau USB chaw nres nkoj, thawj zaug peb xav tau los nruab tus tsav tsheb txhawm rau txheeb xyuas nws txheeb xyuas qhov chaw nres nkoj com, hauv txoj kev no tus neeg siv tuaj yeem ua haujlwm rub tawm lub firmware.

Ib yam li rub cov firmware rau atmega328p ua raws qhov txuas

1] Txuas RX ntawm FTDI rau TXDA tus pin ntawm J1

2] Txuas TX ntawm FTDI rau RXDA tus pin ntawm J1

3] Txuas DTR ntawm FTDI rau DTRA tus pin ntawm J1

4] Txuas Vcc5V ntawm FTDI rau VCC5v tus pin ntawm J1

5] Txuas GND ntawm FTDI rau GND tus pin ntawm J1

Thov xa mus rau qhov txuas txuas rau qhov chaws

github.com/armtronix/Wifi-Two-Dimmer-Board

peb siv 6gpios los tswj ob lub triac dimmer board, ob rau kev tswj triac, ob qho rau kev tswj LED, anther ob rau kev tswj virtual hloov. Gpios yog

// Triac tsis muaj.

#define NON_DIMMABLE_TRIAC 8 // Gpio 8

#define DIMMABLE_TRIAC 9 // Gpio 9

/*Dual xim LED*/

#define DLED_RED 3

#define DLED_GREEN 4

// phau ntawv hloov

#define SWITCH_INPIN1 A5 // hloov 1

#define SWITCH_INPIN2 A4 // hloov 2

Tom qab ua qhov kev sib txuas tus neeg siv tuaj yeem tuaj yeem rub tawm lub firmware rau atmega. Tom qab kev ua haujlwm ob qho tib si ESP thiab Atmega peb yuav tsum tsim kev sib txuas ntawm ESP thiab Atmega los ntawm luv pins 3-4 ntawm J1 header thiab 5-6 ntawm J1 header siv cov chaw dhia.

Kauj Ruam 3: Thaiv Daim Duab

Thaiv daim duab
Thaiv daim duab

Web browser/MQTT

Peb tuaj yeem tswj hwm lub cuab yeej no los ntawm HTTP/MQTT. Tus neeg siv Http xa daim ntawv thov http rau esp8266 raws li http tus qauv, qhia meej cov ntaub ntawv tus neeg siv khoom nyiam khaws los ntawm esp8266. MQTT sawv rau MQ Telemetry Transport. Nws yog lub teeb pom kev zoo tshaj tawm thiab sau npe yuav qhov system uas koj tuaj yeem tshaj tawm thiab tau txais cov lus raws li tus neeg siv khoom. Nws ua rau nws yooj yim heev los tsim kev sib txuas lus ntawm ntau yam khoom siv. Nws yog cov txheej txheem xa xov yooj yim, tsim los rau kev txwv cov cuab yeej thiab nrog qis-bandwidth.

ESP8266

ESP8266 WiFi Module yog tus kheej muaj SOC nrog kev koom ua ke TCP/IP raws tu qauv uas tuaj yeem muab txhua lub microcontroller nkag mus rau koj lub network WiFi. ESP8266 muaj peev xwm tuav tau daim ntawv thov lossis tshem tawm txhua qhov Wi-nkaus kev sib txuas ua haujlwm los ntawm lwm daim ntawv thov txheej txheem. WiFi yog thev naus laus zis uas siv xov tooj cua nthwv dej los muab kev sib txuas hauv network. Kev sib txuas WiFi tau tsim los siv lub tshuab txuas hluav taws xob los tsim cov chaw hotspots nyob ib puag ncig ntawm lub wireless router uas txuas nrog lub network thiab tso cai rau cov neeg siv nkag tau rau cov kev pabcuam internet. Programming rau esp8266 tau piav qhia saum toj no thiab teeb tsa cov ntsiab lus piav qhia hauv qab no.

Atmega328 p

Nov yog 32 tus lej tswj hwm, Cov ntawv thov siv qis, tus nqi qis micro-maub los xav tau. Tej zaum qhov ua tau zoo tshaj plaws ntawm cov nti no yog nyob ntawm qhov kev txhim kho Arduino nrov platform, uas yog Arduino Uno thiab Arduino Nano qauv. Peb siv 6 gpios los ntawm tus tswj no ob rau triac tswj lwm ob rau LED lwm ob gpios yog DC 5v gpios los tswj kev hloov virtual.

Khoom siv

Cov cuab yeej siv hauv tsev zoo li lub teeb thiab kiv cua, pawg thawj coj no muab ob txoj hauv kev ib qho rau kev hloov pauv thiab lwm yam rau kev dim, koj kuj tseem tuaj yeem siv ob txoj hauv kev raws kev hloov pauv, rau daim ntawv thov no peb twb tsim txoj cai lawm, koj kuj tseem tuaj yeem siv ob txoj hauv kev raws qhov dimming rau qhov no. daim ntawv thov koj xav tau hloov peb cov cai. Txog tus lej thov xa qhov txuas no

Kauj Ruam 4: Kho Cov Lus Qhia

Cov Lus Qhia Kho
Cov Lus Qhia Kho
Cov Lus Qhia Kho
Cov Lus Qhia Kho
Cov Lus Qhia Kho
Cov Lus Qhia Kho

_Power lub rooj tsavxwm nrog Lub Tswv Yim nrog 230V AC lub cuab yeej yuav tuav lub chaw nkag raws li qhia hauv daim duab 5, txuas lub xov tooj ntawm tes kom nkag mus tau nrog Armtronix- (mac) EX: Armtronix-1a-65-7 raws li qhia hauv daim duab 6. Tom qab txuas qhib browser thiab ntaus 192.168.4.1 IP chaw nyob hauv qhov browser, nws yuav qhib lub vev xaib raws li pom hauv daim duab 7, sau SSID thiab tus lej nkag thiab xaiv http, yog tus neeg siv xav txuas rau mqtt ces nws yuav tsum yog mqtt xov tooj cua khawm thiab nkag mus rau mqtt broker IP chaw nyob thiab nkag mus rau mqtt tshaj tawm cov ncauj lus thiab mqtt sau npe cov ncauj lus thiab xa.

Tom qab teeb tsa xa ESP 8266 yuav txuas rau lub router thiab router muab tus IP chaw nyob rau ESP. Qhib tus IP chaw nyob hauv qhov browser txhawm rau tswj kev xa mus rau https hom thiab rau mqtt koj yuav xav tau siv R13_On, R13_OFF, Dimmer: xx (xx ntawm no yog tus nqi dimmer xws li 0 txog 99), R14_On, R14_OFF yuav yog cov lus txib kom raug xa mus rau pawg thawj coj ntawm lub ncauj lus koj tau muab rau thaum teeb tsa lub cuab yeej.

Tsis muaj teeb tsa SSID thiab Password peb tuaj yeem tswj hwm Triac los ntawm kev txuas mus rau qhov chaw nkag ntawm lub cuab yeej thiab qhib IP chaw nyob ntawm lub cuab yeej piv txwv li 192.168.4.1 lub vev xaib nplooj ntawv nplooj ntawv yuav qhia qhov txuas nrog lub npe Tswj GPIO raws li qhia hauv daim duab 7 los ntawm nyem qhov txuas no kuj peb tuaj yeem tswj kev xa tawm tab sis cov lus teb yuav qeeb.

Kauj Ruam 5: Kev thaiv kab

Image
Image
Lub thawv thiab PCB Board
Lub thawv thiab PCB Board

Daim duab kab hluav taws xob tau qhia hauv daim duab 3 kom nkag mus rau lub dav hlau thaiv 230VAC Phase (P) thiab Neutral (N) tau muab. Qhov tso tawm tuaj yeem siv ua dimmer rau lub teeb dimmable los tswj kev siv lub teeb thiab tseem tswj kev nrawm ntawm kiv cua.. Cov zis tseem raug tswj los ntawm DC hloov pauv virtual raws li qhia hauv daim duab 3 Gpio A4, A5 ntawm tus thib ob thiab tus lej thib peb ntawm J3 header ntawm atmega tau siv rau kev hloov pauv virtual thiab J3 header plaub tus pin hauv av kuj tseem siv txuas txuas hloov pauv. Rau qhov zoo tshaj plaws dimming tso zis siv 10K lauj kaub.

Kauj Ruam 6: Box thiab PCB Board

Lub thawv thiab PCB Board
Lub thawv thiab PCB Board

Yuav ua li cas ntxig PCB pawg thawj coj hauv lub npov, thov saib ntawm no. saib sab nrauv ntawm ob lub thawv ntawv dimmer thov xa cov duab no.

Kauj Ruam 7: Kev Ceeb Toom Kev Nyab Xeeb

Yog tias koj tab tom txiav txim siab yuav cov khoom no, tej zaum koj twb paub txhua yam no tab sis hauv kev txaus siab rau koj kev nyab xeeb, peb xav tias yuav tsum tau hais qhia txhua yam no kom meej. Yog li siv ob peb feeb los nyeem nws ua ntej yuav khoom.

AC lub hauv paus yog qhov txaus ntshai heev - Txawm tias 50 V AC cov khoom siv ntau dua li txaus los tua koj.

Thov hloov lub ntsiab lus ua ntej ua lossis hloov kev sib txuas, ua tib zoo saib xyuas. Yog tias koj tsis paub meej txog ib yam dab tsi cuam tshuam nrog Ac cov kab xa khoom thov hu rau hluav taws xob nug nws kom pab koj nrog nws.

Tsis txhob sim cuam tshuam rau lub ntsiab lus tshwj tsis yog tias koj muaj kev qhia txaus thiab nkag mus rau cov cuab yeej siv kev nyab xeeb tsim nyog.

Tsis txhob ua haujlwm ntawm qhov hluav taws xob siab thaum koj nyob ib leeg ntawm koj tus kheej. Nco ntsoov xyuas kom koj muaj phooj ywg/koom nrog uas tuaj yeem pom thiab hnov koj thiab leej twg paub yuav kaw lub zog sai li cas thaum muaj xwm txheej.

Siv 1A Fuse ua ntu zus nrog cov tswv yim rau hauv pawg thawj coj los ntsuas kev nyab xeeb.

Daim duab thaiv kab ntawv yooj yim muaj nyob ntawm peb nplooj ntawv qhia thiab github. Thov mus hla nws

Kev Nyab Xeeb Hluav Taws: Ua kev sib txuas tsis raug, kos ntau dua lub zog ntsuas, tiv nrog dej lossis lwm yam khoom siv, thiab lwm yam kev siv tsis raug/siv ntau dhau/ua haujlwm tsis zoo tuaj yeem ua rau muaj cua sov ntau dua thiab muaj kev pheej hmoo pib tua hluav taws. Ntsuam xyuas koj lub Circuit Court thiab ib puag ncig uas nws tau siv kom zoo ua ntej tawm mus nws hloov pauv thiab tsis saib xyuas. Ib txwm ua raws txhua qhov kev tiv thaiv kev nyab xeeb hluav taws.

Pom zoo: