Cov txheej txheem:
- Kauj Ruam 1: Yuav Tsum Kho Vajtse:
- Kauj ruam 2: Khoos phis tawj sib txuas:
- Kauj Ruam 3: Txoj Cai ntsuas Kub thiab Vaum:
- Kauj Ruam 4: Cov ntawv thov:
Video: Ntsuas Kub thiab Vaum Siv HDC1000 thiab Particle Photon: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
HDC1000 yog lub ntsuas cua digital nrog cov ntsuas kub sib xyaw uas muab qhov ntsuas tau zoo heev ntawm lub zog qis heev. Cov cuab yeej ntsuas cov av noo raws li lub peev xwm tshiab sensor. Cov av noo thiab qhov ntsuas kub tau tsim los ntawm lub Hoobkas. Nws ua haujlwm tsis pub dhau -40 ° C txog +125 ° C kub ntau.
Hauv qhov kev qhia no kev cuam tshuam ntawm HDC1000 sensor module nrog cov duab photon tau piav qhia. Txhawm rau nyeem qhov ntsuas kub thiab qhov av noo, peb tau siv cov khoom me me nrog I2c adapter. Qhov I2C adapter ua rau kev txuas mus rau lub ntsuas qhov ntsuas tau yooj yim thiab ntseeg tau ntau dua.
Kauj Ruam 1: Yuav Tsum Kho Vajtse:
Cov ntaub ntawv uas peb xav tau kom ua tiav peb lub hom phiaj suav nrog cov khoom siv hauv qab no:
1. HDC1000
2. Particle Photon
3. I2C Cable
4. I2C Shield rau particle photon
Kauj ruam 2: Khoos phis tawj sib txuas:
Tshooj khoos phis tawj sib txuas ntu piav qhia qhov txuas txuas txuas uas xav tau ntawm lub sensor thiab cov duab photon. Ua kom muaj kev sib txuas raug yog qhov tseem ceeb xav tau thaum ua haujlwm ntawm ib qho system rau qhov xav tau cov zis. Yog li, qhov xav tau kev sib txuas yog raws li hauv qab no:
HDC1000 yuav ua haujlwm dhau I2C. Nov yog qhov piv txwv kab hluav taws xob daim duab, qhia txog yuav ua li cas xaim txhua lub interface ntawm lub sensor.
Tawm-ntawm-lub thawv, lub rooj tsavxwm tau teeb tsa rau I2C interface, zoo li peb pom zoo siv qhov kev sib txuas no yog tias koj tsis ntseeg lwm yam.
Txhua yam koj xav tau yog plaub lub xov hlau! Tsuas yog plaub qhov kev sib txuas xav tau Vcc, Gnd, SCL thiab SDA tus pin thiab cov no txuas nrog kev pab ntawm I2C cable.
Cov kev sib txuas no tau qhia hauv cov duab saum toj no.
Kauj Ruam 3: Txoj Cai ntsuas Kub thiab Vaum:
Cia peb pib nrog cov lej me me tam sim no.
Thaum siv lub ntsuas qhov ntsuas nrog qhov me me, peb suav nrog application.h thiab lub tsev qiv ntawv spark_wiring_i2c.h. "application.h" thiab lub tsev qiv ntawv spark_wiring_i2c.h muaj cov haujlwm uas pab txhawb kev sib txuas lus i2c ntawm lub sensor thiab cov khoom me me.
Tag nrho cov cai hauv qab no tau muab rau hauv qab no kom yooj yim ntawm tus neeg siv:
#suav nrog
#suav nrog
// HDC1000 I2C chaw nyob yog 0x40 (64)
#define Ntxiv 0x40
ob cTemp = 0.0, fTemp = 0.0, av noo = 0.0;
int temp = 0, hum = 0;
void teeb tsa ()
{
// Teem sib txawv
Particle.variable ("i2cdevice", "HDC1000");
Particle.variable ("av noo", av noo);
Particle.variable ("cTemp", cTemp);
// Pib I2C kev sib txuas lus
Hlau.begin ();
// Initialise Serial Communication, teeb baud tus nqi = 9600
Serial.begin (9600);
// Pib I2C Kev Kis
Wire.beginTransmission (Addr);
// Xaiv cov npe sau npe
Hlau.write (0x02);
// Kub, ua kom cov av noo, daws teeb meem = 14-ntsis, rhaub rau
Hlau.write (0x30);
// Nres I2C Kev Kis
Wire.endTransmission ();
ncua (300);
}
void lub voj ()
{
unsigned int cov ntaub ntawv [2];
// Pib I2C Kev Kis
Wire.beginTransmission (Addr);
// Xa cov lus ntsuas ntsuas ntsuas
Hlau.write (0x00);
// Nres I2C Kev Kis
Wire.endTransmission ();
ncua (500);
// Thov 2 bytes ntawm cov ntaub ntawv
Wire.requestFrom (Addr, 2);
// Nyeem 2 bytes ntawm cov ntaub ntawv
// temp msb, kub lsb
yog (Wire.available () == 2)
{
cov ntaub ntawv [0] = Wire.read ();
cov ntaub ntawv [1] = Wire.read ();
}
// Hloov cov ntaub ntawv
temp = ((cov ntaub ntawv [0] * 256) + cov ntaub ntawv [1]);
cTemp = (temp / 65536.0) * 165.0 - 40;
fTemp = cTemp * 1.8 + 32;
// Pib I2C Kev Kis
Wire.beginTransmission (Addr);
// Xa cov lus ntsuas ntsuas av noo
Hlau.write (0x01);
// Nres I2C Kev Kis
Wire.endTransmission ();
ncua (500);
// Thov 2 bytes ntawm cov ntaub ntawv
Wire.requestFrom (Addr, 2);
// Nyeem 2 bytes ntawm cov ntaub ntawv
// temp msb, kub lsb
yog (Wire.available () == 2)
{
cov ntaub ntawv [0] = Wire.read ();
cov ntaub ntawv [1] = Wire.read ();
}
// Hloov cov ntaub ntawv
hum = ((cov ntaub ntawv [0] * 256) + cov ntaub ntawv [1]);
av noo = (hum / 65536.0) * 100.0;
// Tso tawm cov ntaub ntawv rau dashboard
Particle.publish ("Tus txheeb ze Vaum:", Txoj hlua (av noo));
ncua (1000);
Particle.publish ("Kub hauv Celsius:", String (cTemp));
ncua (1000);
Particle.publish ("Kub hauv Fahrenheit:", String (fTemp));
ncua (1000);
}
Particle.variable () muaj nuj nqi tsim cov kev hloov pauv kom khaws cov zis tawm ntawm lub sensor thiab Particle.publish () muaj nuj nqi qhia cov zis ntawm lub dashboard ntawm lub xaib.
Cov zis sensor tau pom hauv daim duab saum toj no rau koj siv.
Kauj Ruam 4: Cov ntawv thov:
HDC1000 tuaj yeem ua haujlwm ua cua sov, tso cua thiab cua txias (HVAC), Ntse Thermostats thiab Chav Saib Xyuas. Qhov ntsuas no tseem pom nws daim ntawv thov hauv Cov Tshuab Luam Ntawv, Cov Ntsuas Hluav Taws Xob, Cov Khoom Siv Kho Mob, Kev Thauj Khoom Nkoj nrog rau Automotive Windshield Defog.
Pom zoo:
Siv Smartphone Raws Li Tsis Siv Tus Kheej Ntsuas Kub / Tus Ntsuas Ntsuas Kub: 8 Kauj Ruam (nrog Duab)
Siv Smartphone Raws Li Tsis Siv Tus Kws Ntsuas Kub / Tus Ntsuas Kub Portable: Ntsuas lub cev kub nrog qhov tsis sib cuag / tsis sib cuag zoo li rab phom thermo. Kuv tsim txoj haujlwm no vim tias Thermo Gun tam sim no kim heev, yog li kuv yuav tsum tau txais lwm txoj hauv kev los ua DIY. Thiab lub hom phiaj yog ua nrog cov peev txheej qis .SuppliesMLX90614Ardu
Kev Ntsuas Kub thiab Vaum Siv HDC1000 thiab Arduino Nano: 4 Cov Kauj Ruam
Kev Ntsuas Kub thiab Vaum Siv HDC1000 thiab Arduino Nano: HDC1000 yog lub ntsuas hluav taws xob digital nrog cov ntsuas kub ua ke uas muab ntsuas tau zoo heev ntawm lub zog qis heev. Cov cuab yeej ntsuas cov av noo raws li lub peev xwm tshiab sensor. Cov av noo thiab qhov ntsuas kub tau yooj yim
Kev Ntsuas Kub thiab Vaum Siv SHT25 thiab Particle Photon: 5 Kauj Ruam
Kev Ntsuas Kub thiab Vaum Siv SHT25 thiab Particle Photon: Tsis ntev los no peb tau ua haujlwm ntau yam haujlwm uas xav tau kev ntsuas kub thiab av noo thiab tom qab ntawd peb tau pom tias ob qhov kev ntsuas no tau ua lub luag haujlwm tseem ceeb hauv kev kwv yees ntawm kev ua haujlwm tau zoo ntawm lub system. Ob leeg ntawm indus
Kev Ntsuas thiab Kev Ntsuas Kub Siv HIH6130 thiab Particle Photon: 4 Cov Kauj Ruam
Kev ntsuas cov av noo thiab ntsuas kub siv HIH6130 thiab Particle Photon: HIH6130 yog qhov ntsuas cua thiab ntsuas kub nrog cov zis digital. Cov ntsuas no muab qib raug ntawm ± 4% RH. Nrog kev lag luam-ua kom muaj kev ruaj ntseg mus sij hawm ntev, qhov tseeb kub-them nyiaj digital I2C, Kev lag luam ua rau muaj kev ntseeg siab, Kev siv hluav taws xob
Kev Ntsuas thiab Kev Ntsuas Kub Siv HTS221 thiab Particle Photon: 4 Cov Kauj Ruam
Kev Ntsuas Cov Ntsuas thiab Kub Siv HTS221 thiab Particle Photon: HTS221 yog lub ntsuas hluav taws xob me me uas muaj peev xwm ntsuas tau qhov txheeb ze thiab qhov kub thiab txias. Nws suav nrog lub hauv paus ntsiab lus thiab cov teeb liab sib xyaw daim ntawv thov tshwj xeeb kev sib txuas (ASIC) los muab cov ntaub ntawv ntsuas los ntawm cov lej