Thermal imaging camera (Pyboard D based)
Posted: Sun Jun 16, 2019 5:37 pm
This uses the Adafruit AMG8833 sensor with their 1.5 inch OLED display. The AMG8833 device driver is here.
The display is mounted on a custom PCB with the Pyboard D SF2W in a WBUS-DIP28 adaptor on the rear. The WBUS-DIP28 could be dispensed with and connections made to the D pins, except that I am no longer able to solder pads at such a fine pitch. Power is supplied by USB. I use a USB portable phone charger to power it independently.
Alas the forum is still broken and not displaying images. They can be seen on GitHub.
The device looks better than in the picture, partly owing to my lack of skill as a photographer and partly its small size seems to exaggerate its faults. The display image in particular looks much better than in the picture. The device measures 85x55x25mm.
The momentary action switches enable the temperature range for the image to be adjusted. A long press disables image updates until a switch is next pressed - useful for photography or if working in awkward spaces.
Update rate is just over 2Hz (488ms). The sensor itself updates at 10Hz. The driver performs bicubic interpolation in assembler to produce 1024 points of image data which are displayed as 2x2 pixel rectangles to give a 64x64 pixel image (up from the sensor's 8x8 resolution). The Pyboard, running at 216MHz, therefore has 476μs to perform a bicubic interpolation, map the result to a colour, and draw the rectangle to the framebuf.
In practice I think a 2Hz update rate is an acceptable compromise. Clearly the rate could be improved at the cost of image quality by less ambitious interpolation: a cheaper algorithm or a smaller output array.
The code uses uasyncio to manage the switches. It does not use the Pyboard's WiFi but I plan to add a means of making the raw sensor data available locally, probably via MQTT publication. using my asynchronous driver.
I have not published full design details. My AMG8833 repo has the key software components for handling the sensor data. But if there is any interest I can push the full set of files and the Fritzing PCB design.
The display is mounted on a custom PCB with the Pyboard D SF2W in a WBUS-DIP28 adaptor on the rear. The WBUS-DIP28 could be dispensed with and connections made to the D pins, except that I am no longer able to solder pads at such a fine pitch. Power is supplied by USB. I use a USB portable phone charger to power it independently.
Alas the forum is still broken and not displaying images. They can be seen on GitHub.
The device looks better than in the picture, partly owing to my lack of skill as a photographer and partly its small size seems to exaggerate its faults. The display image in particular looks much better than in the picture. The device measures 85x55x25mm.
The momentary action switches enable the temperature range for the image to be adjusted. A long press disables image updates until a switch is next pressed - useful for photography or if working in awkward spaces.
Update rate is just over 2Hz (488ms). The sensor itself updates at 10Hz. The driver performs bicubic interpolation in assembler to produce 1024 points of image data which are displayed as 2x2 pixel rectangles to give a 64x64 pixel image (up from the sensor's 8x8 resolution). The Pyboard, running at 216MHz, therefore has 476μs to perform a bicubic interpolation, map the result to a colour, and draw the rectangle to the framebuf.
In practice I think a 2Hz update rate is an acceptable compromise. Clearly the rate could be improved at the cost of image quality by less ambitious interpolation: a cheaper algorithm or a smaller output array.
The code uses uasyncio to manage the switches. It does not use the Pyboard's WiFi but I plan to add a means of making the raw sensor data available locally, probably via MQTT publication. using my asynchronous driver.
I have not published full design details. My AMG8833 repo has the key software components for handling the sensor data. But if there is any interest I can push the full set of files and the Fritzing PCB design.