smARTMAKERS Hannah: Temperature Logger example code -> "I2C Read Failure"

Hmm, the part is pre-calibrated so shouldn’t need any adjustment (ie, no offset and no changing the 0.0625 constant).

How often are you reading the sensor? If you’re reading it constantly, you may find it’s self-heating due to the activity - try slowing down the readings to no more than one every 10 seconds?

Im reading every 15 seconds, have not considered that to be too often…

Its still showing far off…

That should be just fine. Very strange, I’ve not got one of these new hannah’s myself but we have TMP112’s on some other designs and they didn’t seem to be inaccurate.

Im getting a temp-sensor for my Gadgeteer board next week, I managed to get Xively data upload working myself, and will try to draw temp-curves for the two boards in different scenarios.

Our fridge will be full of electronics, my wife is now completely certain that there is something wrong (with me).

Even some more expensive sensors are off by a few degrees.
I wish I could understand why it is so difficult to design.

Ok, I did some reading on this…interesting thread here: http://e2e.ti.com/support/other_analog/temperature_sensors/f/243/t/217020.aspx

as I see it, the temp-sensor is maybe placed too close to the imp-card, although it is pretty free from copper around it…

How much heat does the imp generate?

I don’t think that’s it. <1mw when sleeping. 20mw when SetPowersave.

I think youre right. After having it turned off for a day, and then turning it on. It does not get hotter. The reading 5 seconds after turning on, is the same reading as after 30 minutes.

What is it then?

Hi, I’m getting the same I2C read error on Hannah rev3, although I’ve updated the I2C addresses according to REV3 datasheet.

…I’ve tried the Hannah ColorBlink example program “as is”, and got the I2C read error message.

I’ve changed the I2C address to any address in the 8 bit range - none worked.

Could anyone tell me what can be wrong?

Thanks,

  • Yizhar.

what happens if you try this?

Thanks for the answer,

I’m getting the same “i2c read fail” messages, followed by “Hannah Test Failed: Can’t Read Temp Sensor” message.

I’ve using a new REV3 Hannah board, with nothing attached to it, connected to my laptop with USB.

Thanks,

  • Yizhar.

Are you sure you have run above code instead of the HannaTest??
In above code there is no “Hannah Test”

Thanks, probably my mistake before. :slight_smile:

Now I’m getting:

/11/2013 2:15:29 PM: Device configured to be "Hannah Color Control"
7/11/2013 2:15:29 PM: pot - potLevel: 255
7/11/2013 2:15:29 PM: 1 pot: 255
7/11/2013 2:15:30 PM: pot - potLevel: 0

And the last two messages repeat endlessly.

I guess that means i2c is fine (?)

yes, you are fine as long you use the constants used in the “Hannah.Rev3.SelfTest”:

const i2c_ioexp = 0x7C;
const i2c_temp = 0x92; // this device is new in the Rev3
const i2c_als = 0xE8;
const i2c_accel = 0x30; // this device is new in the Rev3

Sorry - I guess we’re not fine in here. I’ve missed the beginning of the log, here the whole of it from boot:

7/11/2013 9:22:34 PM: Device booting
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: i2c read fail
7/11/2013 9:22:34 PM: Device configured to be "Hannah Color Control"
7/11/2013 9:22:34 PM: pot - potLevel: 255
7/11/2013 9:22:34 PM: 1 pot: 255
7/11/2013 9:22:35 PM: pot - potLevel: 0
7/11/2013 9:22:35 PM: 1 pot: 255
7/11/2013 9:22:36 PM: pot - potLevel: 0
7/11/2013 9:22:36 PM: 1 pot: 255
7/11/2013 9:22:37 PM: pot - potLevel: 0
7/11/2013 9:22:37 PM: 1 pot: 255
7/11/2013 9:22:38 PM: pot - potLevel: 0
7/11/2013 9:22:38 PM: 1 pot: 255
7/11/2013 9:22:39 PM: pot - potLevel: 0
7/11/2013 9:22:39 PM: 1 pot: 255
7/11/2013 9:22:40 PM: pot - potLevel: 0

…Which means I2C indeed not working!

I’ve noticed that all the calls to ioexp_read routine failed.

BTW: I’ve got another Hannah rev 3 board with me - it fails too in I2C read calls, however it puts valid values in the Potentiometer.

Have you tried “Hannah.Rev3.SelfTest”?
I remenber with past i2c read fails that unpugging the Hannah from power for at least 1 minute might help. Hanah keeps it register values for quite a while without power.
So just ejecting the Imp would not help, because the extender keeps powered then

Thanks, I’ve tried it before and now again, it fails again on I2C:

7/11/2013 10:16:00 PM: i2c read fail
7/11/2013 10:16:00 PM: i2c read fail
7/11/2013 10:16:00 PM: Hannah Test Failed: Can’t Read Temp Sensor

I’ve also tried before after a long time gap, and now did it again - it failed again.

BTW: I’m using USB for power, attached to my laptop. Is that OK?

Yes that should work.
Looks like a serious hardware problem. Maybe Dimitri can help

Thanks, how do I contact Dimitri? (I’m newbie here)

Same I2C problem on the two brand new REV3 Hannah boards.