thermopile shield code

I’ve had great success with the example code in the IDE, but have not been able to get the thermopile shield to work (it runs, but does not work). I found this page:
https://openmv.io/docs/openmv/tutorial/thermopile.html

That page suggests that the IDE example code does not work, and that the new code it gives does work, but that code does not seem to compile, it complains about the MLX library not being present.

Any ideas?

Thanks,

Ted

That page is outdated. Sorry, it seems when I uploaded new documentation the old stuff wasn’t deleted.

As for the thermopile shield. It should work right out of the box.

What firmware version are you using? v1.4 I know it works. Ibrahim fixed… the code for v1.5. Never tested if what he did worked.

What kind of behavior are you getting? Just a blue bar? Did you try holding a flame in front of the device? Or an ice cube?

Just deleted the old docs. Too many questions about that.

The example script in the IDE works I just tested it, can confirm it works.

Okay, thanks for testing it. I’m using the V3 Camera that I just got from the kickstarter (IDE says OpenMV2). I just get the blue bar with flame or ice cube). Everything else that I’ve tried with the camera (LCD, several of the demo scripts) all seem to work. I plugged the thermopile in, just like in the pictures and ran the script and got the blue bar, but nothing but blue.

Also, it says that the ta, to_min, and to_max are all NaN.

Mmm, okay, so, do you have a USB protocol analyzer? Or, do you have an I2C device that you can attach to the I2C bus on the camera? I’d like to know if there’s valid I2C data on the link.

If the data is valid and the thermopile shield isn’t responding then I can send a replacement.

Seems like a bad shield, if so we’ll send you a replacement. Do you have a multimeter ? can you test for continuity between the I2C lines on the shield and/or on the camera ?

okay, I’m out of town for a few days, I’ll test it some more when I get back.

I believe I’ve got the same condition. Static blue bar while using the thermo shield (with or w/o using lcd). Roughly 26 Megohms between I2C lines on camera.

Hi, do you see any data moving on the wires? Do you have a protocol analyzer?

Do you have another I2C device? can you test out with that to verify the I2C bus works for another device? please remember at add plug up resistors.

Okay, I was able to test the sensor by hooking it up to an arduino. From the datasheet I see that the sensor contains two chips, the eeprom and the actual sensor chip; each with their own i2c address. The eeprom appears to work correctly, but when I send a read request to the sensor address I get no response, (I did find some arduino code for the sensor, and that code did not work any better than mine,) So, it appears that the PCB is good, it is just the sensor chip that is bad – I did test all the connections and traces on the board, and the board does seem to be okay, other than the sensor.

Sigh… alright, we don’t have QC on these modules since they are so simple. So, I guess something like this can happen.

Please email openmv@openmv.io for what you’d like to do.

I’m sorry the module is not working. We’ve tested our code out on 10 of them and haven’t had any problems. Well, anyway, just one more reason not to sell these things. Random failures are not my kinda product. Maybe the storage temp or something was violated.

You can scan the i2c bus using this script:

from pyb import I2C

i2c = I2C(2, I2C.MASTER) # The i2c bus must always be 2.
print("")
for i in i2c.scan():
    print("%x"%(i))

When I run this with the MLX shield connected, it prints addresses from 0x50 to 0x60

Well, this is our lucky day! I ran the I2c scanner script and it returned addresses from 50 to 60 as expected (not the case when I had it hooked up to my arduino running similar code), so I ran the fir example script and it now works, Go figure?! Anyway, I’m happy now; thanks for all the help!

Ted

I think some pins were not connected, it happened to me a few times before, a pin would just bend to one side of the header.