GridEye (I2C thermal camera) --> Now connected to LabView!
Rayman
Posts: 14,744
Got a GridEye thermal camera working with P2
The resolution isn't as good as the Flir Lepton, but the price is a lot better and it is simpler.
The resolution is 8x8.
There are modules from Adafruit and Sparkfun.
You read the data over I2C.
Current code displays the readings over VGA in 1080p resolution.
Also prints the temperature in each box.
Grayscale looks the best so far, but there are a couple other palettes to try...
Update: See post #9 below for LabView files.
Comments
Here's the code, it's in Flex C (with some .Spin2). The main file is GridEye.c, just open that up in FlexProp to program P2 with it.
Pin settings are in Platform.h.
The GridEye interface is adapted from the Sparkfun library on Github.
Very nice Ray! Your vision projects for the P2 should get some good recognition,.
This is great, Ray
I'm intrigued that the second bottom row of 77's have slightly different shades, so guess you're resolving to a fraction of a degree, but just rounding to two digits for the text
There are some slightly higher res versions in between this and the Flir, 16x12 or 32x24 resolution, made by MLX
@Tubular Thanks! That sensor has a lot more pixels for just a bit more money.
Only issue I see is that all the drivers I can find have an Apache 2.0 license whereas I'm trying to keep all my stuff with MIT license as much as possible.
I'm tempted to get one. The GridEye doesn't really have enough pixels to make out an object. But, it is good for basic measurements and sensing.
I think the resolution of GridEye 1/4 degree Celsius, but the accuracy is 2.5 degrees Celsius.
Anyway, all my code does is find the max value and make it white and find the min value and make it black and then interpolate in between values.
I started drivers for both of those, but never got around to adding the calculated temp support to them because of the amount of math involved (actually due more to the difficulty of implementing it in spin).
MIT licensed https://github.com/avsa242/mlx90621-spin ... looks like I didn't upload the 90640 code yet though.
Vid of the (simple) VGA P2 demo:
Thats a great little demo avsa
Thanks...I wish it had things like image interpolation, or most importantly, the aforementioned calculated offsets so it could display real temperatures rather than just "this pixel is warmer than that pixel", but it's a bit much for me, at my skill level. That's why I figured maybe if Ray is unable to find suitably licensed existing code to write his own driver, he could use this as a basis.
Cheers
Just got this working with LabView 2020 (Community Edition) at 921600 baud.
LabView does a much better job and displaying the data.
Having interpolation actually helps identify things.
Can make out how many fingers am holding out now (two in screenshot below).
Anyway, here's the FlexProp C code and the LabView Vi that make it work.
I'm definitely a Labview fan, but you need a working version to open up your VI's.
I'm trying to relearn LabView... Been a while...
@DigitalBob What do you mean by "working version"?
I was just using the free "community" version...
Actually, I guess one can now compile these .exe format now.
Maybe I should post that...
If you have a 2018 version it won't open VI's on the 2020 version. But 2020 will open 2019,2018 Vi's etc.
You want the full pro version, all the others are watered down. I think it's a $5K purchase, but you can get a one week trial.
Think need to find a way for LabView to share the serial port with loadp2.exe...
Seems one cannot load a new P2 program while LabView is running. Guess it's NI's VISA interface that somehow takes exclusive control of the port. Also seems that if you can get control of the port then LabView's serial port doesn't work until you close it all out and then restart.
Maybe what is really needed here is a second serial port...
Wait... Seems my LabView code was in an infinite loop and never got to the Visa->Close block.
Changed so it does get to Visa->Close and now loadp2.exe can use the serial port again.
This is a better situation. Only trouble here is that Visa->Close seems to reset the P2...