LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sensirion sht7x labview

Labjack
I don't have any trouble with the EI1050 with my NI boards PCI-6221 and PCI 6259 (nor with the Labjack U12)   For the NI PCI board, results are consistant when comparing them over several months to those given online by our US weather station located about 2 miles from where I use the sensor/boards (and to temperatures on our digital thermometer located near the EI1050).  The sensor is outside under our eves and well protected from the weather by the large overhang and is covered by a porous filter to eliminate bugs and cobwebs.  I also have a barometric pressure sensor running on the PCI board that gives accurate results compared to the US weather station, although there seems perhaps to be an aging effect with the bp sensor in that the curve drawn several months ago is a bit off (about + 2 units in 1000 compared to results obtained today, for ex. a few minutes ago, bp US = 1027.8; my sensor = 1027.3; T US =4degF. Sensirion = 6.9degF; dig. therm = 8.2degF. H US = 73%; sensir=72%). Part of the difference, esp. in temperature, may be due to the distance from the US station and micro conditions in the area.

Max310
I don't know what the problem is except perhaps the difference in wiring of the EI-050 and the bare sensor that you use?  I checked to see of the vis given here work ok by downloading them back to my computer, moving/renaming my old subdirectories that included the vis and substituting those from this site to see if they work - they perform perfectly with my system.
0 Kudos
Message 41 of 85
(4,248 Views)

First of all, thanks very much to Mario for writing this code... it has been a huge help getting me started with these Sensirion probes.

 

I'm looking to  read from an array of humidity sensors (probably 10 - 20 depending on preliminary data and how many I think I can afford). Does anyone think it would work to use a single clock line to control multiple sensors that would then each get read back on a separate data line? It seems like it might work in theory, as long as every device plays nice.

 

I currently only have 1 SHT71, so I can't try it out, but I'll order more if people think it might work. Otherwise, I'm open to other suggestions. 

 

thanks,

mike

 

0 Kudos
Message 42 of 85
(3,953 Views)

I wanted to post my updated code to this thread. These are essentially the same vi's that Mario wrote.

 

I have cleaned them up slightly and updated them with the new coefficients from the Senserion data sheet version 4.2. For anyone starting a project with these probes now, this version should give you slightly more accurate values. I have also moved the coefficients to the front panel so they are easier to update in the future. 

 

Thanks again, Mario.

0 Kudos
Message 43 of 85
(3,873 Views)

Hi all. I'm sorry for my bad english.

 

I have a Project on automating an invernadero and am trying to use a sht75 and tested your programs but dont work me...I am using a NI 6008 usb. I Wanted to know if you can give me an explicacion about the VI (specially on the fact that how the VI generate the signal of SCK and data) and what changes or adjust i have to do.

Can you help me?

 You have my gratitude

Really apreciate your efforts to unravel the mistery of sht family and NI

Mensaje editado por Manuel Alejandro
Mensaje editado por Manuel Alejandro
0 Kudos
Message 44 of 85
(3,822 Views)

It is not trivial.  You need to have a good understanding of Section 3 of the SHT75 datasheet, and Figure 12 of the datasheet should make complete sense to you.

 

Although the Sensirion sensors do not exactly speak I2C, it is similar to I2C, so a background in I2C is helpful.

 

What problem are you having with the VI?  Do you get an error, bad data, or something else?

 

Common problems:

 

  1)  Don't forget the pull-up resistor shown in  Figure 5 of the SHT75 datasheet, unless your NI device already has a suitable internal pull-up on that line.

 

  2)  The clock line often needs at least a capacitor, if not an RC filter.

 

  3)  Your power-supply for the SHT75 should match the logic-level of your I/O, and the rail the pull-up resistor connects to. 

 

0 Kudos
Message 45 of 85
(3,813 Views)

Hi Manuel,

 

There are a lot of components to this VI, but if you step through it while looking at the Sensiron data sheet, you will see that it makes a lot of sense.

 

Essentially, the routine works -- that is, generates the SCK and DATA signals -- by setting a specified pin on your card to high or low (boolean T or F). You will see that each of the SCK and DATA lines in the data sheet is replicated by a T or F write. 

 

In your case, I'm not positive that the USB-6008 will work because it may not be able to use the same data pin as an input and output (I may be wrong on this; I have the 6009 which can). If that is the problem, then you can go back the Mario's original code where you can set the read and write lines separately. This is how he originally wrote the code; you connect 1 pin to SCK and 2 pins  to DATA and write to one pin and read from the other

 

I hope this help.

 

cheers,

mike

0 Kudos
Message 46 of 85
(3,811 Views)

I wanted to add another bit of code to this thread that may save others some days of frustration:

 

I've re-written Mario's routines so that they can accomodate multiple SHT7XX sensors. They all share a common SCK pin, and read back data to individual DATA pins. This should allow a USB 6009 to accomodate 11 of these probes. NOTE: I only currently own 2 of the SHT75s, so I haven't tested it with more probes than this. It is entirely possible that there is some limit to the number of sensors the SCK pin can drive. 

 

Note also that I've only tried this with the USB-6009. It should work with other cards, but it makes use of the tristate property which might not exist on all cards (including the USB-6008). 

 

There are some weird timing kluges in here that may not be necessary... At some point when things weren't working, I was adding delays all over the place. Now that it works, I haven't bothered to take them all out, but if something looks unneccesary, by all means try getting rid of it. 

 

Hope this helps someone...

 

cheers,

moose

 

Message 47 of 85
(3,808 Views)

"I only currently own 2 of the SHT75s, so I haven't tested it with more probes than this. It is entirely possible that there is some limit to the number of sensors the SCK pin can drive. "

 

From experience, we at LabJack can say the limit is not simple.  It depends on the number of sensors, cable type, length of cable, data rate, and what sort of error handling you have.

0 Kudos
Message 48 of 85
(3,789 Views)

Thanks for sharing your experiences. I sort of felt like that might be the case. For my high-density array, where I will need 12 or so sensors, the cable runs will be very short. I'll probably have them on a PCB, but I'm concerned about having lines interfere with each other.  With 2 sensors, I've successfully used 1 m+ cable runs using shielded twisted pair.

 

I would love to implement the checksum routine in this code, but I find the bit-wise math slightly daunting. It seems like the checksum is slightly dependent on the previous data, all the way back to status when it first gets activated. If anyone has any suggestions for this, I'll probably take a crack at it someday. 

Message 49 of 85
(3,783 Views)

Hello,

I am currently working as an intern at Ford Motor Company. I am not used to Labview, I only know the basic features, and one guy (who also doesnt know much about Labview) asked me, if I could find out, if the sensirion sensors SHxxx will work with Labview. But we have only Labview 7.1 here in the lab. Is it possible that someone uploads the needed files compatbile to labview 7.1 ? That would  be really great. I tried Sensirion_71_RH_probes_42.llb but that didnt work.

Thanks a lot

0 Kudos
Message 50 of 85
(3,459 Views)