DIY Thermal Imaging - Page 1
Forum section: electronics / projects

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 01:50:09 am
content: Always wanted a thermal camera, but they are much more expensive than what I can justify spending on something I will not use very often.So, I've been experimenting a bit lately and come up with a working prototype setup.I wouldn't call it a camera, it's more like a scanner. Anyway, it's based on one of these super cheap (<$15) thermal guns.I had a look at sampling the sensor directly, but I decided it wasn't worth the trouble, so instead I hook into the LCD directly and decode it to read the shown values. (see this thread for details:https://www.eevblog.com/forum/projects/hooking-into-segmented-lcd-display-to-read-displayed-values/)Test setup, a bit messy:Couple of servo motors (sorry old RC car, you'll get your servo back soon), the innards of the thermal gun, USB interface and a micro.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 01:53:07 am
content: More details on the circuits, very simple really, just scan and read the thermal device display, then use a 50Hz "PWM" to control the absolute position of the servo motors and finally write some software to generate some pretty images.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 01:58:31 am
content: Temporary test construction of the scanning head and mechanics (yeah double sided tape gets you far)Not very linear or precise movement when put together like this, but good enough for initial testing and confirming whether it will work or not.I'll 3D print some nice brackets and mounts at a later point.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 02:04:56 am
content: And the output from my very first scan:Not great, but it does show that it works. Yeah, it's a scan of my oscilloscope, the scanner is not very movable as it looks like in the first pictures, so very limited what I can scan

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 02:08:48 am
content: Got the alignment improved a bit, and it starts looking pretty good.Heat sink with a power resistor mounted on it:

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 02:20:34 am
content: A warm cup of coffee: (added a scale too with some auto scaling functionality)And just to give an idea of what the setup looked like:

author: EEVblog
author_rank: Unknown
timestamp: August 13, 2013, 04:20:17 am
content: Nice. Image quality is about on par with the new Fluke VT02

author: Corporate666
author_rank: Unknown
timestamp: August 13, 2013, 04:34:24 am
content: Very cool.Expect a call from someone @ Mu

author: BravoV
author_rank: Super Contributor
timestamp: August 13, 2013, 04:35:35 am
content: Excellent thread, subscribed and thank you for sharing !Quote from: Corporate666 on August 13, 2013, 04:34:24 am

author: pickle9000
author_rank: Super Contributor
timestamp: August 13, 2013, 04:41:39 am
content: How long does a scan take?

author: MacAttak
author_rank: Unknown
timestamp: August 13, 2013, 05:10:41 am
content: Congratulations, you've already outperformed muOptics!

author: EEVblog
author_rank: Unknown
timestamp: August 13, 2013, 05:21:26 am
content: Quote from: MacAttak on August 13, 2013, 05:10:41 amYes, they have a $280K in cash and haven't been able to post a thermal image yet

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 05:26:20 am
content: Quote from: EEVblog on August 13, 2013, 04:20:17 amThanks.. yeah, not bad for ~$30 in components. Of course the Fluke is slightly more portable (my table is pretty heavy) and this one doesn't do FPS, it's more like Seconds/Minutes per frame depending on resolution.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: August 13, 2013, 05:26:44 am
content: Awesome hack, love it!

author: Lightages
author_rank: Unknown
timestamp: August 13, 2013, 05:51:43 am
content: Very nice interesting project. One could say that this is really "cool".

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 06:01:26 am
content: Quote from: Corporate666 on August 13, 2013, 04:34:24 amGood oneIt would have been great if those guys and their $300 camera was for real.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 06:43:54 am
content: Since it's working reasonably well, I'll go ahead and make it into something that will fit on a tripod.I was considering just powering the whole thing from USB, but unfortunately the start current for the servo motors is much too high when they rapidly move to one of the extremes:So I think I will try see if I can print something that allows me to easily plug in one of these batteries:For communication, I'm thinking of using this little bluetooth module, would be nice not having to worry about wires.Also maybe add a cheap little camera to get a more precise view of the objects being scanned.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: August 13, 2013, 09:37:37 am
content: Gentlemen,I believe we are witnesses to a historic moment. This is where the sonic screwdriver is born.

author: tom66
author_rank: Super Contributor
timestamp: August 13, 2013, 09:44:16 am
content: How fast to scan a whole image?I've been playing (mentally) with the idea of using piezo-transducers to rapidly scan a small sensor at around 15-20fps 80x60 or 160x120. I reckon it's doable to scan that, but the limitation will be thermal response of the sensor. If it takes too long to sample a temperature, the image will be blurry.

author: casper.bang
author_rank: Frequent Contributor
timestamp: August 13, 2013, 10:17:15 am
content: Very cool. Thought of doing this myself, but now it should be so much easier!What are the scan times? I find there's a big difference between the temperature guns and for this sort of stuff you obviously want as fast as possible. Thought of moving a mirror instead? Have you tried interpolating?

author: Experimentonomen
author_rank: Regular Contributor
timestamp: August 13, 2013, 10:45:42 am
content: Doesent the flir cameras use a CCD or similar sensor array for the sensor ?

author: AndyC_772
author_rank: Super Contributor
timestamp: August 13, 2013, 10:48:54 am
content: I'd be very interested to know what spatial resolution you can achieve this way, especially as the cheap IR thermometers tend to have quite a large spot-to-distance ratio. Can you usefully perform any high pass filtering to improve detail if you have a number of adjacent measurements to compare?

author: Erwin Ried
author_rank: Regular Contributor
timestamp: August 13, 2013, 05:29:23 pm
content: Really nice! Did you measured the response time of the thermometer after each measure? (maybe you can hack the thermometer board and read the raw values directly from the sensor?)

author: SArepairman
author_rank: Frequent Contributor
timestamp: August 13, 2013, 05:30:08 pm
content: there was a better version of this somewhere on the forum, much higher res pictures.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 08:56:14 pm
content: Quote from: tom66 on August 13, 2013, 09:44:16 amThe exact scan times of course depend on the size of the area and resolution, I haven't yet recorded any precise scan times, but we are talking minutes for the coffee cup scan I posted earlier, probably 2-3 minutes (just guessing from memory). The limiting factor is not so much moving the sensor, it's more that since I tap into the display signal, the display update rate is really what decides the speed vs resolution. Luckily the update rate on this model is pretty fast.I'll implement a progressive scan pattern, so it will at first deliver a low res image and then progressively improve the detail over time.Quote from: AndyC_772 on August 13, 2013, 10:48:54 amThe sensor in this device (probably one of the cheapest thermal guns available) looks like this:And a quick drawing:The ratio is 12:1 meaning at 1000mm the spot size is 83mm, so not great at long distance. In reality as the scan is higher resolution than the spot size, it will be averaged, meaning that the resolution is higher, but the recorded temperature will be less accurate for hot/cold spots smaller than the spot size.I have made the ratio slightly better by extending the tube by ~10mm, something to experiment with I guess. It can easily pick up a naked light bulb at 6m distance (furthest I could get it from my setup), but as the bulb is probably smaller than the spot size at that distance the temperature will read lower than what it really is.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 13, 2013, 09:39:34 pm
content: Quote from: Erwin Ried on August 13, 2013, 05:29:23 pmThanksI did have a quick look at reading the sensor directly, but it's very high impedance, so just trying to measure how to read it already radically change the output, even just extending the sensor wires seem to change the output. The unit also appears to hold some calibration. Not sure if it's really calibrated (as it's so cheap) but it does appear to give fairly accurate readings close to it's spec of something like +/- 1C accuracy and 0.1C resolution, as long as what is being measured is larger than the spot size.I'd be interested if anyone got experience in sampling one of these sensors directly. Not sure what the settle time is, but I believe it could drastically improve resolution/speed.

author: tom66
author_rank: Super Contributor
timestamp: August 13, 2013, 10:37:47 pm
content: What would be required to get a say... 1000:1 spot ratio? Very long tube? Different sensor? Which would allow for 10mm pixel size @ 1m distance (quite usable for basic imaging)I would be interested in what type of sensor these use. Wonder what response time is?

author: echen1024
author_rank: Super Contributor
timestamp: August 13, 2013, 11:15:23 pm
content: A relative newbie to MCU's, so I have a few questions:1: Can you post the code? I might try to port it to Python and use it on a Raspberry pi.2. Is the servo absolutely necessary? I think I should just be able to use the sensor and scan it.Thanks.

author: lewis
author_rank: Frequent Contributor
timestamp: August 13, 2013, 11:40:30 pm
content: Very interesting project, keep up the good work.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 14, 2013, 12:58:31 am
content: A small experiment on the resolution and precision vs distance. All scans at what I would call medium speed and covering a smaller area than the previous scans, to speed up the process.I took a small 1/8W resistor, 47R I think, and hooked it up to a power supply to create a small heat source. Approximately 2x4mm in size.Then I did a few scans at different distances (ignore the backgrounds, not at a stable temperature)First at ~50mm distance, reaching 54.7C, that is probably very close to the actual temperature.And at ~100mm, it's down by ~5C150mm, down by ~13CAnd finally at 250mm distance it's still clearly visible, but down by 18C.The resistor is visible out to about 500mm, after that it's no longer visible.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 14, 2013, 02:08:17 am
content: Quote from: tom66 on August 13, 2013, 10:37:47 pm100:1 should do it.. Based on my resistor experiment I believe that it will easily pick up an isolated 10x10mm heat source at 1m distance with the current ~12:1 ratio, as long as the delta temperature is more than ~5-10C from the surroundings, but it will report a reading lower than the actual temperature when the source is significantly smaller than the spot size.From what I can gather (pure speculation, I'm no expert in this) the ratio is easy to calculate based on the diameter and length: (my unit says 12:1 so that is where I got the number from)The focus part of the construction appear very simple like this:with a small fresnel lens at the bottom, so based on diameter and length it should be possible to get a fairly accurate ratio. Do note there are some small ribs inside the tube, most likely to prevent reflections from making it all the way to the lens.

author: MacAttak
author_rank: Unknown
timestamp: August 14, 2013, 03:03:32 pm
content: The ribs are baffles - same thing used in telescopes. Yes, to reduce reflections (which add noise). The inner edges of the baffles need to be machined properly - burrs or other irregularities will just cause more harm than good. The alternative is to just use a good blackbody coating on the inner surface of the tube (or at least something highly absorptive of the wavelengths you are collecting).Good baffling helps produce higher contrast and sharper measurements.

author: MatCat
author_rank: Frequent Contributor
timestamp: August 14, 2013, 03:44:43 pm
content: To get better line scan resolution I recommend either a good digital servo like those used on helicopter tails, or a good resolution stepper motor. Looks awesome though, making me contemplating a trip to harbor freight for one of those temp guns! (I actually have one but I don't want to take it apart hehe).

author: edavid
author_rank: Super Contributor
timestamp: August 14, 2013, 03:52:47 pm
content: Quote from: MacAttak on August 14, 2013, 03:03:32 pmRegular black won't work, since it re-emits IR. Is there a paint that will absorb IR in the passband (but not anything above that) and emit it at even lower frequencies?

author: MacAttak
author_rank: Unknown
timestamp: August 15, 2013, 04:15:49 am
content: These folks make a number of products specifically designed for IR absorption. No idea if you can actually get any of it, nor how expensive it might be. But it sure looks like the bee's knee's when it comes to IR and optical sensor stray light control.http://www.acktar.com/edit:Actually, it looks like you can buy some sample coated foil for about $100 or so:http://www.acktar.com/category/Sample_OrderThey don't seem to offer any samples of the coating in liquid form (one of the sample sets includes metal that has been pre-coated)

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 25, 2013, 04:57:37 pm
content: Quote from: MacAttak on August 14, 2013, 03:03:32 pmThanks for detailed explanation.. I was just guessing based on common sense, also it makes sense that the actual surface of the baffles should be irregular to make the noise as minor and random as possible. Anyway, this is from a <$15 device, so I don't really expect any attention to that level of detailI guess some kind of fairly random open foam would work as well inside the focusing tube.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 25, 2013, 05:03:52 pm
content: Quote from: MatCat on August 14, 2013, 03:44:43 pmYeah the slack in the servo gears did cause some problems, easily to see if you look in the first couple of pictures, but I found that if you only scan from one side the accuracy is much improved, as in scan from x to x + 100, then instead of scanning on the way back from x + 100 to x, just move the servo back to x and restart scan at x to x + 100.It's just kind of a fun little project, but actually somewhat useful for thermal imaging of where you don't need great resolution and you got a few minutes to do a scan.

author: jaxbird
author_rank: Frequent Contributor
timestamp: August 25, 2013, 05:13:03 pm
content: Quote from: MacAttak on August 15, 2013, 04:15:49 amThanks man.. that is interesting, but the $100 kind of ruins the very low budget of this experiment..That money would probably be better spent on just buying a precision sensor.I looked around a bit, and this is actually not a new idea, someone even made a business out of it:http://www.cheap-thermocam.net/They recommend this sensor:http://www.futureelectronics.com/en/Technologies/Product.aspx?ProductID=MLX90614ESFDCIMELEXIS3003055I might just get one of those, it's got digital and PWM output, surely a lot easier to deal with than the elaborate display hacking I did for this one