5,596,354 Members 38,901 Now Online
XDA Developers Android and Mobile Development Forum

Building a real Thermal Imaging addon for Android Smartphones

Tip us?
 
CommanderROR
Old
#1  
Senior Member - OP
Thanks Meter 25
Posts: 348
Join Date: May 2008
Service Building a real Thermal Imaging addon for Android Smartphones

Hi everyone,

Thermal imaging has been a long-time dream for me, and I guess for many other as well. However, even the most simple TI cameras tend to be too expensive to justify if you want then just for private use.


It seems like their might be a way out of that now...

A Company called Melexis has released a cheap and low-resolution Thermopile Array (Melexis MLX 90620), that could be the ideal base for an extremely basic Thermal Camera. It's 16x4 Pixel Sensor won't win any prizes for building inspection or detailed thermal analysis, but it is cheap (if you buy a single unit it's around 60$ from Digikey or Futureelectronics, should be in stock this week at Futureelectronics according to Melexis) and comes complete with built-in signal amp, RAM, EEPROM and digital I2C output.

I came across this idea through the Kickstarter Project "Sensordrone" that gives you an easy way to hook up Sensors to your Smartphone via Bluetooth. They are planning to build this TI Sensor as an addon Module to their Sensordrone, but they need somebody to help build the app that turns the raw data coming from the sensor into colourful pixels...
Connecting the Thermopile Array to the Sensordrone is as easy as connecting the 4 pins to the Addon Connector pins. Adding a simple Silicon Diode to reduce the power from 3.3v down to the recommended 2.6v is the only additional step.

You could also hook the Thermopile Array up to a standard Arduino or the Android ADK board I guess if you don't want to go for the Sensordrone.

So it all comes down to Software, and this is where I hope somebody in this fantastic community might help. If you would like to see this happen and (unlike me) have the required coding skills, just go ahead, contact the Sensorcon Team (developers of the Sensordrone) or build your own ADK kit with Thermal Imaging.

TecSpecs for the Melexis MLX90620 can be found on their website together with a demo video. The Sensordrone can be found on Kickstarter (just enter the name) and specs for their unit are available there or on the Sensorcon forums.


I hope somebody takes this up and makes my (and I hope many others') long time dream real! Once the cheap and low-res version works, going for the more high-resolution Heimann Thermopile arrays with 32x31 and 64x62 might be the next step to an affordable Smartphone Thermocam.
The Following User Says Thank You to CommanderROR For This Useful Post: [ Click to Expand ]
 
Mardaso
Old
#2  
Junior Member
Thanks Meter 9
Posts: 29
Join Date: Sep 2010
I had the same idea and ordered the sensor a few days ago.
Got a message from Future electronics that they get the sensor on the 23rd and than it will take 5 to 7 days for me to receive it.
So I will have to wait a little bit longer and than start programming.
I have some ideas to combine it with the phone camera to make it a real thermographic camera.
I don't know if i will use the Sensordrone or a standalone bluetooth solution. With the later I have more control over the firmware.
The Following User Says Thank You to Mardaso For This Useful Post: [ Click to Expand ]
 
CommanderROR
Old
#3  
Senior Member - OP
Thanks Meter 25
Posts: 348
Join Date: May 2008
Thanks for replying Mardaso.

The idea of combining it with the smartphone cmos camera is great, I had thought about that as well, but am not sure how it could be achieved. You'd either have to synchronize the FOV, which is pretty much impossible given the parameters of the Melexis module or you'd have to track the area the sensor is "scanning" with the smartphone and overlay the image then. This might work with LEDs or laser dots, but it would be difficult.
But maybe I'm missing something here and it might not be that complicated after all.

My idea for increasing the effective resolution was in using motion sensors and "image stitching" to create a larger and more detailed image with the low-resolution sensor. This would work much like the "panoramic" feature in Android smartphones. It works perfectly for my Nexus. This might be rather challenging to program though...but maybe also worth a try.

I think this would maybe all be relevant for later on if/when the basic functionality is there...

I'm hoping you'll give the Sensordrone a try since I ordered one and would like to see Theraml Imaging on it ASAP...or if you go with a standalone Bluetooth module, would you provide your sourcecodes for the app so that it can be easily adapted for use with the Sensordrone?
The main advantage of the Sensordrone from a dev. point of view is that it takes care of the low-level stuff for you. You'd get the required raw data from the sensor easily and could concentrate on the features of the app...

Maybe you could contact Sensorcon, the creators of the Sensordrone, and see whether you'd like to work with them on this project. They are really nice guys. Are you going to do the initial work on an Arduino based ADK btw?
Whatever you do, I'm glad that you're picking this up. Your work will be useful in bringing a "world's first thermal imaging device" to the Smartphone. Since the Sensorcon folks are also in contact with Heimann Sensors for a later-to-come higher resolution version of the the TI module there is definitely a future for this and your software could be the basis for all that...

I'd like to offer my assisitance, but since I am absolutle yno good at programming I'll probably not be able to do anything useful...
 
KRAZYADROIDMASTER
Old
#4  
KRAZYADROIDMASTER's Avatar
Senior Member
Thanks Meter 77
Posts: 1,428
Join Date: Feb 2011
That would be really cool!!!

Can the Bluetooth handle that much data???

Sent from my LG-P999 using xda premium
LG LGP999 G2X DARK ALE
MADE IN: KOREA
MANUFACTURE DATE 04/19/2011

STOCK

SANDISK: 4 GB CLASS 4 MICRO SD CARD.
 
CommanderROR
Old
(Last edited by CommanderROR; 19th July 2012 at 12:48 PM.)
#5  
Senior Member - OP
Thanks Meter 25
Posts: 348
Join Date: May 2008
Bluetooth should not be a problem. Even BT 2.1 has about 3Mbps capacity. With the low resolution of the Thermopile arrays that is a non-issue.


@Mardaso

which FOV option die you order? 40 degree or 60?
 
Mardaso
Old
#6  
Junior Member
Thanks Meter 9
Posts: 29
Join Date: Sep 2010
Quote:
Originally Posted by CommanderROR View Post
Bluetooth should not be a problem. Even BT 2.1 has about 3Mbps capacity. With the low resolution of the Thermopile arrays that is a non-issue.


@Mardaso

which FOV option die you order? 40 degree or 60?
I ordered: MLX90620ESF-BAB-000-TU so the 60 degree version. They had only this one listed and the evaluation board.
I want to start programming asap. So when the sensors arrive I will start first with a controller (arduino or pic(32)) sending data serial to a PC.
After that go for bluetooth and an android app.

When looking at the data sheet there is a lot of calculation to be done before you get the actual temperature. These calculations could be handled by the Pic32 processor. But we could always use the sensordrone as a gateway for the serial data.

I want to use the motion sensors from the phone to "stitch" the data.
Maybe we will need some kind of holder to align the thermo sensor and the camera pictures so you won't need an extra laser or manual alignment. Just some thoughts.
 
CommanderROR
Old
(Last edited by CommanderROR; 20th July 2012 at 10:10 AM.)
#7  
Senior Member - OP
Thanks Meter 25
Posts: 348
Join Date: May 2008
Futureelectronics seems to have the 40 deg sensor listed now. I'm not sure, but I think that might be better for image stitching...not sure though.

Aligning the sensor with the phone for motion sensor useage...I'd probably go with a bit of double-sided sticky tape...
At least for initial trials that could work well. It would not overlay the "real" image with the Thermal image but would create a more high-res thermal image. That might be easier as a start.

About the calculations...I read that data sheet too, but I'm not sure what is done in the sensor itself and what you have to do in software. It's rather confusing in some passages...
As far as I can tell, calibration values are stored in the EEPROM and can be changed (but I would leave those well alone) and the 65 data packages are written to RAM from where they can be read. 64 temp readings for T(Object) and 1 for T(Case). I'll try to figure out what I can from the Spec sheet, but it's not exaclty my field of expertise...^^
If it gets really complicated you could always ask Melexis for advice. They are really helpful.

The Output from the Sensor should be handled as I2C, that would be easiest and would also be the way the Sensordrone receives data. I'm thinking about getting an Arduino ADK board and a breadboard so that I can at least help with testing, but I'll wait a bit...not sure whether it's worth the money if the Sensordrone comes in October and can do the same and more...



I just reread the spec-sheet, and it seems that the calculations really are not done internally but have to be performed each time you read data from the sensor.
I'd suggest doing those calculations in the app rather than in the microcontroller since that would make things fully compatible with the Sensordrone which as far as I know only passed the data through.

Btw...have you thought about refresh rates? The default is 1Hz (1fps) which is ok for tryouts, but probably not very satisfying for actual use. I' suggest something like 12Hz for general use, maybe more for "painting" a larger image with the "stitching" method. However, I do not know how much the accuracy suffers then...
 
CommanderROR
Old
(Last edited by CommanderROR; 22nd July 2012 at 10:24 AM.)
#8  
Senior Member - OP
Thanks Meter 25
Posts: 348
Join Date: May 2008
OK...the Sensors and Evaluation Boards are now listed "in Stock", so you should receive yours soon.

I'm looking forward to following your progress.

If I understand correctly, you'd need to initiate a PTAT read and a Full Frame read to get the raw data from RAM. In addition, you'd have to read the Constants from EEPROM since you need them for calculation.
One constant is set to 25C, I'm not sure whether the others have to be read each or if they can be stored somewhere in the app and read from there after the first initialization (since they are constants they should not change).

Values are sotred in two's format, so you have to convert them to "real" numbers before using them...my god this is complicated. I think I'll make lunch and leave the calculating bit to somebody who knows what they are doing...
 
Mardaso
Old
#9  
Junior Member
Thanks Meter 9
Posts: 29
Join Date: Sep 2010
Quote:
Originally Posted by CommanderROR View Post
OK...the Sensors and Evaluation Boards are now listed "in Stock", so you should receive yours soon.

I'm looking forward to following your progress.
Yes! got an email that they have been shipped.
 
CommanderROR
Old
(Last edited by CommanderROR; 22nd July 2012 at 02:59 PM.)
#10  
Senior Member - OP
Thanks Meter 25
Posts: 348
Join Date: May 2008
Great news!

Post when it arrives, will you? And don't hook it up to 5V...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes