Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I collect and record data in LabVIEW from Sensirion Temperature/Humidity Sensor connected to myRIO?

The product documentation of the sensor and the datasheet is attached. Also Digilent MXP Breadboard's image is attached.

 

I've connected the sensor to myRIO using the starter kit's MXP breadboard: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,842,1216&Prod=MXP-BB

 

The output of the sensor is in digital. My initial goal is to get digital output in form of 8 or 12 or 14 bits and then convert them to decimal numbers and record them.

 

Pin 1 of sensor is Data, which is connected to myRIO's connector A, DIO1 pin 13.

Pin 3 of sensor is Clock, which is connected to myRIO's connector B DIO5/SPI.CLK pin 21. According to the datasheet of the sensor, if VDD < 4.5V then Clock should be set to 1MHz.

Pin 4 of sensor is Ground, which is connected to Digilent MXP Breadboard GND pin.

Pin 8 of sensor is VDD, which is connected to Digilent MXP Breadboard +3.3V pin. Supply voltage range is 2.4-5.5V and recommended voltage is 3.3V.

 

I need to be able to send the following commands to the sensor from LabVIEW.

Measure temperature: 00000011

Measure relative humidity: 00000101

 

Then, myRIO has to wait for maximum 20 milliseconds (ms) for 8-bit measurement, 80 ms for 12-bit measurement, and 320 ms for 14-bit measurement.

Two bytes of measurement data will then be transmitted. myRIO as microcontroller must acknowledge each byte by pulling the DATA line (pin 13) low. All values are Most Significant Bit (MSB) first. Note that for 8-bit result, the first byte is not used. Finally, myRIO has to terminate the communication after the measurement data Least Significant Bit (LSB) has been received by keeping ACK bit, which is the LSB bit, as high.

0 Kudos
Message 1 of 2
(6,736 Views)

Have you searched the forum?

http://forums.ni.com/t5/LabVIEW/Sensirion-sht7x-labview/m-p/350958/highlight/true#M179022

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 2
(6,723 Views)