| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| delene 
 
 
 Joined: 13 Oct 2003
 Posts: 32
 
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Mon Jul 21, 2008 1:17 pm |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				| help |  
				|  Posted: Mon Jan 12, 2009 11:12 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				| Driver For SHT75 Temperature & Humidity Sensor |  
				|  Posted: Wed Jan 21, 2009 4:29 am |   |  
				| 
 |  
				| 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: 1660
 Location: Perth, Australia
 
 
			        
 
 | 
			
				| Re: Driver For SHT75 Temperature & Humidity Sensor |  
				|  Posted: Wed Jan 21, 2009 8:09 am |   |  
				| 
 |  
				|  	  | 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Jan 23, 2009 12:26 pm |   |  
				| 
 |  
				| 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: 1660
 Location: Perth, Australia
 
 
			        
 
 |  | 
	
		|  | 
	
		| crocu 
 
 
 Joined: 02 Nov 2009
 Posts: 5
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Nov 02, 2009 4:49 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Nov 19, 2009 5:57 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				| LCD to use |  
				|  Posted: Wed Nov 25, 2009 8:38 pm |   |  
				| 
 |  
				| 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
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sun Feb 28, 2010 1:48 pm |   |  
				| 
 |  
				|  	  | 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
 
 
 
			    
 
 | 
			
				| Re: Driver For SHT75 Temperature & Humidity Sensor |  
				|  Posted: Tue Jul 13, 2010 8:07 am |   |  
				| 
 |  
				| Hello can you send me the code you use to LCD? Thanks.
 |  | 
	
		|  | 
	
		| stijn023 
 
 
 Joined: 28 Sep 2010
 Posts: 49
 
 
 
			    
 
 | 
			
				| program |  
				|  Posted: Tue Sep 28, 2010 4:45 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Nov 01, 2010 6:42 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Mar 01, 2011 8:50 pm |   |  
				| 
 |  
				|  	  | 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
 
 
 
			      
 
 | 
			
				| pic16f877a sht75 |  
				|  Posted: Mon Apr 11, 2011 9:55 am |   |  
				| 
 |  
				| 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.
 |  | 
	
		|  | 
	
		|  |