My LM75 / DS75 Unit

  • 1
  • 2
  • Page 2 of 2
mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Re: My LM75 / DS75 Unit

 · 
Posted: 24.04.2010 - 22:43  ·  #9
@Harry: I tried the cap near the device - no change.

@Avra: I have replaced the LM75 with a ST DS75 - shoud be a drop in replacement, but it gives only one reading and hangs the I2C Bus (and so my application) after that. Any Idea??

Regards, Michael

PS Tried 100 and 400 kBit of course - no good...
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: My LM75 / DS75 Unit

 · 
Posted: 25.04.2010 - 13:54  ·  #10
Have you tried with both hardware and software I2C driver? You can also try with shortest cable length, and different power supply.

Take a look at these AvrCo demos:
..AVRcoDemosI2CloopI2Cctrl.pas
..AVRcoDemosI2CtestI2Cbus.pas
mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Re: My LM75 / DS75 Unit

 · 
Posted: 25.04.2010 - 16:50  ·  #11
Hello Avra,

I changed from TWIMaster to I2CPort. And - it works now! I had also read in this forum, that according to Gunter Rolf once had mumbled somthing about Atmel's poor implemetation of the I2C on their chips - I can confirm that now. I will repeat the testing of the LM75 and the DS75 now with the Soft I2CPort and see, how the results are. This is really interesting!

Thank you for your hints - very helpful!

Michael
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: My LM75 / DS75 Unit

 · 
Posted: 26.04.2010 - 04:56  ·  #12
I am glad it worked ;-)
mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Re: My LM75 / DS75 Unit

 · 
Posted: 26.04.2010 - 13:22  ·  #13
Hi Avra, hello Neil,

I have shortened the calculations of the LM/DS 75 a little. Since the data comes in in 2-complement, I use an integer for reading in and I suggest the following routine: This way the decimals AND the negative temperatures are covered automatically. (tested it in my fridge..)

Code
Initialize Sequence:

   I2Cout(cLM75adr,1,$00);  // Initialize the DS75 with 
                            // $60 = 12 Bit, $40 = 11 Bit, 
                            // $20 = 10 Bit, $00 = 9 Bit
   I2Cout(cLM75adr,0);      // Set default reading to temperature register



function GetTemperature (lLM75adr : Byte): Float;    // We read the temperature of the I²C chip here
Var
   lTmp : Integer;
Begin
   I2Cinp(lLM75adr,lTmp);    // Load the 2-Complement  directely into an Integer.
   lTmp := Swap (lTmp);      // Now swap Lo- and Hibyte (they come in reverse order)
   Return(float(lTmp)/256);  // and calculate the temperature
End;
mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Re: My LM75 / DS75 Unit

 · 
Posted: 29.04.2010 - 17:03  ·  #14
Finally the results:

I have exchanged the 3 worst LM75 with DS75 and I run those with 9 Bit. The jitters are gone, the temperature readings are stable now. So, in my 10 identical devices I have 3 with the DS75 and 7 with LM75 (which give good stable readings)

The problem were the LM75 chips themselves. So, for future purpose I will use the DS75 instead of the LM75. However, I must use the AVRco Soft I2C Driver now instead of the hardware I2C interface of the ATMega.

Again, thank you all for the support!

Michael
  • 1
  • 2
  • Page 2 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   103   117 · Page-Gen-Time: 0.034277s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI