Cov txheej txheem:

Super Easy PC Control ntawm 110 Vac Siv Crydom Solid-State Relay: 3 Cov Kauj Ruam (nrog Duab)
Super Easy PC Control ntawm 110 Vac Siv Crydom Solid-State Relay: 3 Cov Kauj Ruam (nrog Duab)

Video: Super Easy PC Control ntawm 110 Vac Siv Crydom Solid-State Relay: 3 Cov Kauj Ruam (nrog Duab)

Video: Super Easy PC Control ntawm 110 Vac Siv Crydom Solid-State Relay: 3 Cov Kauj Ruam (nrog Duab)
Video: Overview of Syncopal Disorders 2024, Kaum ib hlis
Anonim
Super Easy PC Control ntawm 110 Vac Siv Crydom Solid-State Relay
Super Easy PC Control ntawm 110 Vac Siv Crydom Solid-State Relay

Kuv tau npaj los sim kuv txhais tes ntawm kev ua qee cov phaj kub yaj. Yog li ntawd, kuv xav tau txoj hauv kev los tswj 110Vac ntawm kuv lub PC. Cov lus qhia no qhia yuav ua li cas thiaj tswj tau yooj yim 110Vac los ntawm cov chaw nres nkoj tso tawm ntawm lub PC. Qhov chaw nres nkoj uas kuv siv yog hom USB. Txhua tus qauv chaw nres nkoj yuav tsum ua haujlwm. Qhov tswv yim yog txhawm rau txuas DTR (cov ntaub ntawv dav hlau npaj txhij) tus pin los ntawm PC chaw nres nkoj mus rau Crydom solid-state relay. Crydom relay lees txais lub teeb liab tswj ntawm 3 txog 32 volts txhawm rau qhib lub zog-xeev xa tawm. Crydom relay tseem tuaj yeem ua haujlwm txog -32 volts ntawm kev tswj cov tswv yim rau kev xa tawm. Saib daim ntawv txuas nrog. Kev ib txwm muaj xwm txheej DTR teeb liab hloov ntawm +10 volts thiab -10 volts. Qhov no ua haujlwm zoo tshaj plaws rau Crydom relay. Crydom relay tig rau ntawm ib yam dab tsi saum 3 volts. Txhua qhov hluav taws xob qis dua 1 volt tau lees tias yuav tua lub relay. Yog li, siv +10 txog -10 volts ntawm DTR teeb liab yog qhov zoo tshaj. Crydom relay muaj qhov siab tshaj ntawm 2mA ntawm DTR teeb liab. Hloov DTR hauv kev tswj hwm txoj haujlwm tseem yog qhov yooj yim heev. Kuv tau txuas me me Python tsab ntawv uas toggles DTR tus pin txhua ob peb feeb. Python tsab ntawv tsuas yog 16 kab ntev! Txhawm rau kom Python code ua haujlwm koj yuav tsum tau ntxiv pob me me ntxiv rau Python hu ua PySerial. Kuv kuj tseem txuas lub qhov rais teeb tsa rau PySerial rau qhov kev qhia no. Nrog kev tshawb nrhiav Google sai, koj tuaj yeem pom PySerial ntawm Source Forge yooj yim heev.

Kauj ruam 1: Txuas Crydom

Txuas Crydom
Txuas Crydom

Ceev faj! Nco ntsoov tias koj txheeb xyuas txhua yam thaum ua haujlwm nrog 110Vac. Cov xov hluav taws xob tsis tuaj yeem yooj yim dua qhov no! Crydom block tsuas yog kab nrog sab kub ntawm 110Vac kab. Sab nruab nrab hla txoj cai hla. Dhau hauv av dhau lawm. Tab sis, kuj tseem txuas hauv av rau lub rhaub dej kub/Crydom thaiv rau hauv av. Kuv paub, kuv paub, cov hlua kuv siv ntawm sab AC yog me me. Kuv tau txais qhov loj tshaj Crydom relay (40 Amps!) Yog li kuv yuav tsum muaj qee tus niam loj xov hlau. Kuv lub tsev muaj 15 amp breakers yog li #12 thaiv yuav zoo. Kuv nyuam qhuav tuav tus qub PC qaum thiab hnov qab cov xov hlau me me li cas. Kuv xav tias kuv txoj kab hluav taws xob sab AC yog #18. Txog tam sim no kuv nyuam qhuav tau ua si nrog lub teeb 100 watt, yog li tsis muaj teeb meem. Kuv yuav rov ua dua ua ntej ntsaws rau hauv lub phaj kub loj.

Kauj ruam 2: Python Test Code

Hauv qab no yog khawv koob Python code. Ntxiv dua thiab, tsis tuaj yeem yooj yim dua qhov no. Kuv kuj tau txuas cov cai hauv cov ntawv hu ua "Test.py".import sys, serialfrom lub sij hawm ntshuam sleepCOM_PORT = 7BAUD = 9600ser = serial. Serial (COM_PORT-1, BAUD, timeout = 0.5, rtscts = 0)# Toggle DTR tus pin rau 15 vib nas this, tom qab ntawd kaw rau 5 vib nas this. (1): luam "On" ser.setDTR (1) pw (15) luam "Off" ser.setDTR (0) pw (5)

Kauj Ruam 3: Ceev faj

Ceev faj
Ceev faj

Ua ntej kuv siv qhov Solid-State relay Kuv yuav nce qee Plexiglas hla AC sab ntawm qhov txuas. 110Vac tuaj yeem yaum tau tiag tiag yog li ceev faj! Vam tias qhov no yuav pab - Ua tsaug, Jim

Pom zoo: