Hacking MLX90640 - Page 1
Forum section: electronics / general

author: artag
author_rank: Super Contributor
timestamp: May 23, 2020, 12:23:32 pm
content: I want to experiment with alternate lenses on the MLX90640 sensor (probably ZnSe as those are most easily available).Gentle persuasion has not succeeded in removing the factory-fitted lens. Has anyone removed it successfully without causing damage ?I'd prefer to preserve both the sensor and the lens and even be able to reassemble it. However, destruction of the lens is an option if that's the only way to do it.

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 12:54:43 pm
content: There has been a teardown of the sensor but sadly it is a chargeable reporthttps://www.systemplus.fr/wp-content/uploads/2019/06/SP19429_Melexis_Far_Infrared_Thermal_Sensor_MLX900640_flyer.pdfHave you sought out the Patent document ? That may provide some detail of construction ?Fraser

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 01:36:51 pm
content: A quick study of available images from Melexis suggests how the module is constructed.It appears to be a standard MLX90xxx sensor capsule with a lens installed over it using a lens tube. That lens tube is likely bonded to the sensor capsule with adhesive. How easy it would be to release that adhesive is not known but expect it to put up a fight !MLX90xxx datasheet. Compare this capsule to the ‘cutaway’ Image and you will see that it is the same MLX90xxx capsule inside the lens barrel.https://www.generationrobots.com/media/MLX90614-product-sheets.pdfFraser

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 01:41:22 pm
content: If I were approaching this disassembly task, I would first try gentle leverage with a knife blade in the interface between the sensor capsule flange and black lens tube, working my way around the whole circumference to see if it will ‘pop’. Be gentle though! If that fails, I would try heating the assembly to a temperature below its maximum storage temperature. I would then repeat the levering approach in the hope that The adhesive softens at elevated temperatures.These sensors are fragile so brute force attacks on the casing are risky !If it was essential to remove the lens barrel I would resort to a slot cutting technique in the outer lens barrel and leverage in the slot to ‘crack’ the adhesive bond. It may be possible to reuse the lens barrel if the disassembly is done carefully. Another tube can be slipped over the slotted barrel or the slots may be covered with an adhesive copper foil tape To make the barrel light tight again.Fraser

author: eri0o
author_rank: Contributor
timestamp: May 23, 2020, 02:58:39 pm
content: If you can do report back. The current lens has a too big angle for the applications I want to use, a much smaller angle like 18o would be useful for me!

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 03:25:59 pm
content: Pictures of the capsule and versions with supplementary lens barrel.Fraser

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 03:39:57 pm
content: Construction of the Melexis standard sensor capsule attached.Fraser

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 03:49:18 pm
content: The exposed thermopile of the MLX90640....... if you get to see this in person, you have gone very wrong in your disassembly efforts !Fraser

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 03:57:13 pm
content: Section 13 of the MLX90640 shows the lens barrel design in figure 25https://www.melexis.com/-/media/files/documents/datasheets/mlx90640-datasheet-melexis.pdfFraser

author: artag
author_rank: Super Contributor
timestamp: May 23, 2020, 04:34:07 pm
content: A fusillade of links ! Thanks Fraser !Unfortunately it's not looking good. Because the outer tube is different I'd assumed that the encapsulated part was the same and the tubes supported different lenses.From the data sheet diagrams (I really ought to have found those myself ..) it appears that, unlike the 90614, the 90640 has a taller sensor capsule for the narrow angle lens. The tube is merely a shield and the lens is also the sensor window. The 'plastic cover' noted there is the panel protecting it in the user's product, and features such as the circular groove near the top of the tube are visible on the device as supplied.I have examples of both types of 90640 and it's possible to see a metal rim ABOVE the lens - more easily on the narrow angle version but still visible on the wide angle.So trying to remove the lens is very likely to show that exposed thermopile.I was half inclined to risk damage and give it a try, but this puts me off. Probably best to assume it's necessary to think in terms of a supplemental lens.On a related note, one of the breakouts I have came from Sparkfun and the other from Pimoroni. The Sparkfun one (wide angle) is soldered low on the pcb but the Pimoroni (narrow angle) appears to have turned-pin sockets and a (perhaps 3d-printed) standoff. It's not easily removable though, I think it's also glued. Both retailers offer both versions - I just happened to buy them in that combination.I also discovered in testing that the mounting orientation differs. The Sparkfun device is mounted (if the silkscreen is right-way-up and the 4-pin connector at the bottom) with a pip on the case at about 5 o'clock as you look at the lens, and the Pimoroni device (silkscreen upwards, connector at left) has the pip at 12 o'clock. If the connector is placed at the bottom the pip is then at 9 o'clock.Since I initially mounted the Pimoroni on the same site as the Sparkfun with the connecting pins downward (though the pinout differs), this resulted in a 90 degree rotation of the image. Actually, a little more than 90 degrees - I hadn't previously noticed that the Sparkfun sensor has the pins offset from grid by a small angle.From the datasheet, it appears that Sparkfun have it correct : the device is offset.https://www.digikey.com/en/product-highlight/p/pimoroni/mlx90640-thermal-camera-breakouthttps://www.sparkfun.com/products/14843

author: artag
author_rank: Super Contributor
timestamp: May 23, 2020, 04:54:47 pm
content: Possibly relevant patents (I'll try to comment on this list as I read through them)https://patents.justia.com/patent/10345154https://patents.justia.com/patent/10337926https://patents.justia.com/patent/10217874https://patents.justia.com/patent/10178331https://patents.justia.com/patent/9989405https://patents.justia.com/patent/9909924https://patents.justia.com/patent/9851253https://patents.justia.com/patent/9791319https://patents.justia.com/patent/9620656https://patents.justia.com/patent/9534959https://patents.justia.com/patent/9267847https://patents.justia.com/patent/9239267https://patents.justia.com/patent/9184330

author: Fraser
author_rank: Super Contributor
timestamp: May 23, 2020, 05:00:53 pm
content: I was a little surprised to see the two heights of sensor capsule used in the differing fields of view but this does make sense if the silicon window is part of the lens system. The very wide FOV of the short body capsule would lead to vignetting and the lens tube barrel temperature being within the sensors field of view.I attach pictures of the common Melexis longer capsule formats. I am wondering why the MLX90640 does not look like these though. Why encase it in an outer lens battle ? Aesthetics or a design requirement.From the pictures I thought the sensor capsule had its own silicon window to hermetically seal the capsule and the lens sat outside the capsule, within the black lens barrel. I guess we will never know until someone does a full teardown of such a sensor.Fraser

author: artag
author_rank: Super Contributor
timestamp: May 23, 2020, 05:18:16 pm
content: Another thing that's notable - I think it's just visible in the last two of Fraser's images but doesn't seem to occur in 3534AF13-C35C-4516-8576-7FEFF83A128F.jpeg - is that the wide-angle 'AA' sensor has a flat visible surface to the lens but the narrow 'AB' sensor lens surface is visibly curved.It isn't just that the AA sensor doesn't have as much curvature - it's clear by reflecting light off the surface that it's very close to flat. Perhaps the lower surface is curved.