CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Driver For SHT75 Temperature & Humidity Sensor
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> Code Library
View previous topic :: View next topic  
Author Message
delene



Joined: 13 Oct 2003
Posts: 32

View user's profile Send private message Send e-mail

PostPosted: Mon Jul 21, 2008 1:17 pm     Reply with quote

My code also returns -4.6 and -39.9... :(

I have tried the suggestions above and still no joy
Any other suggestions???
tony-montana



Joined: 12 Jan 2009
Posts: 1

View user's profile Send private message

help
PostPosted: Mon Jan 12, 2009 11:12 am     Reply with quote

hello. I have a problem with the sensor sht1xx and I'm using the same program that I was going to sht75 temperature and gives me a very rare. Can you help me thanks.
Code:
void sensor ()
(
sht_rd (restemp, truehumid) / / measure and calculate
lcd_gotoxy (1.1) / / write in 1.1
printf (lcd_putc, "Temp:% 3.1f% cC" restemp, 223); / / sensor
printf (lcd_putc, "\ nRH:%%% 3.1f" truehumid); / / sensor
)
Pol



Joined: 07 Sep 2006
Posts: 1

View user's profile Send private message

Driver For SHT75 Temperature & Humidity Sensor
PostPosted: Wed Jan 21, 2009 4:29 am     Reply with quote

Hello, i have a problem with this driver , i use 18f1320 @ 8mhz : i don't have answer from sensor, but if tune up the pic-clock (to 16mhz) the sensor start to answer me.... where is the clock-dependent sub of this cod ??? Thanks...
_________________
----------------------------------------------------
To boldly go where no one has gone before...
----------------------------------------------------
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Driver For SHT75 Temperature & Humidity Sensor
PostPosted: Wed Jan 21, 2009 8:09 am     Reply with quote

Pol wrote:
Hello, i have a problem with this driver , i use 18f1320 @ 8mhz : i don't have answer from sensor, but if tune up the pic-clock (to 16mhz) the sensor start to answer me.... where is the clock-dependent sub of this cod ??? Thanks...


Sound like you might be missing the pull up resistors.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Diego Oliveira



Joined: 10 Aug 2008
Posts: 3

View user's profile Send private message

PostPosted: Fri Jan 23, 2009 12:26 pm     Reply with quote

Someone has a library of SHT75 to PIC18F, I have already commented on the changes in the forum but none solved.

Grateful for the attention.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Jan 23, 2009 12:39 pm     Reply with quote

Diego Oliveira wrote:
Someone has a library of SHT75 to PIC18F, I have already commented on the changes in the forum but none solved.

Grateful for the attention.


I sell a driver for the SHT75 - if interested check out: http://www.brushelectronics.com/index.php?page=software#SENSIRION
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
crocu



Joined: 02 Nov 2009
Posts: 5

View user's profile Send private message

PostPosted: Mon Nov 02, 2009 4:49 am     Reply with quote

Well, some of you you say that read temperature is too high.

Can someone confirm that sht75 code works fine ?

Can you post a sht75 code that works well with any PIC familly ?
+ electronic schematic ?

( Hex file would be also much appreciated )

I would like to display on a LCD, temperature and humidity.

Many thanks for your help.
Nun



Joined: 19 Nov 2009
Posts: 1

View user's profile Send private message

PostPosted: Thu Nov 19, 2009 5:57 am     Reply with quote

Hi!

Mi sht71 sensor is giving me this temperature and humidity results. Can it be a problem of constants when it calculates the real temp &humid? or is it another problem?

T=-11.930000 & H=79.984183
T=592.229974 & H=-1185.778036
T=103.270001 & H=286.722098
T=195.430003 & H=300.089928
T=-11.930000 & H=79.984183
T=592.229974 & H=-1185.778036
T=103.270001 & H=286.722098
T=195.430003 & H=300.089928

I used the library at the beggining of the topic, just changing the values of this function according the datasheet I downloaded from sensirion's web page


Code:
void calculate_data (int16 temp, int16 humid, float & tc, float & rhlin, float & rhtrue)
{
 float truehumid1, rh;

 //calculate temperature reading
 tc = ((float) temp * 0.04) - 40.1;

 //calculate Real RH reading
 rh = (float) humid;

 rhlin = (rh * 0.0367) - (rh * rh * 0.0000015955) - 2.0468;

 //calculate True RH reading
 rhtrue = ((tc - 25.0) * (0.01 + (0.00008 * rh))) + rhlin;
}
kizuc



Joined: 25 Aug 2009
Posts: 6

View user's profile Send private message

LCD to use
PostPosted: Wed Nov 25, 2009 8:38 pm     Reply with quote

Thanks for the driver because I have been able to use it with 18f4550. But I have a problem with the display. Kindly recommend an LCD that can work well with this setup. Or how can I use a 7 segment display for this code ? Especially getting the driver for the 7 segment display.

Thanks
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Sun Feb 28, 2010 1:48 pm     Reply with quote

delene wrote:
My code also returns -4.6 and -39.9... :(

I have tried the suggestions above and still no joy
Any other suggestions???



I know this is an old topic, but I thought I'd post for future readers...

I had a similar problem after laying out a new board and accidentally swapping the data and clock lines. Got them squared away and it works fine.

So, double check your pin defines in the driver file.
n_barroca



Joined: 13 Jul 2010
Posts: 2

View user's profile Send private message

Re: Driver For SHT75 Temperature & Humidity Sensor
PostPosted: Tue Jul 13, 2010 8:07 am     Reply with quote

Hello can you send me the code you use to LCD?
Thanks.
stijn023



Joined: 28 Sep 2010
Posts: 49

View user's profile Send private message

program
PostPosted: Tue Sep 28, 2010 4:45 am     Reply with quote

Hi,
I'm using one of these sensors you used.
But my question is which c program do you used to program it?

Thanks in advance
pisisik44



Joined: 01 Nov 2010
Posts: 1

View user's profile Send private message

PostPosted: Mon Nov 01, 2010 6:42 am     Reply with quote

Hi. If I use 16F84A at 32 KHz or 4 MHz, does it occur any problem?

Thanks for help.
atai21



Joined: 30 Dec 2010
Posts: 31

View user's profile Send private message

PostPosted: Tue Mar 01, 2011 8:50 pm     Reply with quote

Code:
#include <18F4550.h>

#fuses HS,NOWDT,PUT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_B0,stream=ser)
#use rs232(baud=9600, xmit=PIN_B1,stream=ser1)


#include<lcd.c>
#include<sht75.c>

#byte PORTB = 0xf81
#byte PORTC = 0xf82

#define      fanA      PIN_C2
#define      fanB      PIN_C5
#define      buzzer    PIN_C6
#define      nozzle    PIN_C7

void main()
{
 float tempC, humidRH;
 lcd_init();
 sht_init();
printf(lcd_putc, "\b~WELCOME~ ",);
printf(lcd_putc, "\bTEMP&RH READER  ",);

 while(1)
 {
  sht_rd (tempC, humidRH);
  lcd_gotoxy(1,1);
  printf(lcd_putc, "Temp : %3.1f %cC   ", tempC, 223);
  printf(lcd_putc, "\nRH   : %3.1f %%   ", humidRH);
output_high(fanA);
}
 if (tempC>25)
{
output_high(fanA);
output_high(fanB);
}
else if (tempC>35 && humidRH<=50)
{
output_high(fanA);
output_high(fanB);
}

else if (tempC>90 && humidRH<=15)
{

output_high(fanA);
output_high(fanB);
output_high(nozzle);
output_high(buzzer);
printf(lcd_putc, "WARNING!!! ",);
delay_ms(500);        //delay 500 ms between reading to prevent self heating of sensor
}
{

}


}




Hi all,
i use this code for 18f4550 and sht75.the problem is my LCD did not display anything.may i know what is wrong?
microman



Joined: 11 Apr 2011
Posts: 1

View user's profile Send private message MSN Messenger

pic16f877a sht75
PostPosted: Mon Apr 11, 2011 9:55 am     Reply with quote

Hey the code works initially but the temperature never increases or decreases. I checked the clock signal and there is no clock signal. I am really struggling can anybody help please.

n.b. I am using a 4mhz crystal.

The code is exactly the same as previously just changed the pin definition.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> Code Library All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group