

- #Drone thermal camera raspberry pi programming how to
- #Drone thermal camera raspberry pi programming software
- #Drone thermal camera raspberry pi programming code
There«s even a special mode when the board sends frames to the Pi automatically 4 times per second. The temperature value is in degrees Celsius multiplied by 100 (a 2-byte number). Turned out that the board understand 6 basic commands, including one for requesting the current frame via a COM port.Įvery pixel of the matrix is essentially a reading of the object«s temperature. Thanks to Google Translate and a healthy dose of copy-pasting, around 90 minutes later the protocol has been decoded.
#Drone thermal camera raspberry pi programming software
The famous Chinese marketplace offers this majestic piece of software for accessing the GY-MCU90640:Īpparently there also has to be some description of the communication protocol used to access the microcontroller, and after a short chat with the seller (big respect to him), I had said protocol in my hands. The board has to be mounted on the other side of the Pi (example is in the header photo). I«d also add that you could connect it similarly while using option 1, but you«ll have to be extremely careful and proficient in soldering. The board has a 5V-3V converter built in, so the delicate Rx and Tx outputs of the Pi aren«t in any danger. Thanks to Chinese ingenuity (or luck), the output configuration on the board turned out to be very convenient:Īll I needed to do was to insert the board into Raspberry«s port. It turned out to be a bit convoluted, but still manageable. But you«ll have to describe all the calibration procedures manually, which I find excessively hard.
#Drone thermal camera raspberry pi programming how to
The datasheet explains how to extract a frame out of it. There appears to be a couple of Python libraries (here and here), but neither worked out of the box for me.Īdvanced Pythonists could theoretically write their own controller driver. Humble Pythonists could also use the first option.
#Drone thermal camera raspberry pi programming code
If you code in C++, you«re probably better off ignoring the extra controller, short the pins and use the manufacturer«s API, found here. Leave the pins be and use the STM32F103 controller through RS-232 or similar interface.Short the «SET» pins on the board and use the I2C protocol to control the MLX90640 microcontroller directly.We can control the thermal camera in two ways: But I don«t have one, so later on I«ll be talking about the wider-angled A model. It can be turned in place (manually or via a drive) to make combined images way more detailed than its 32×24 resolution. The datasheet says it«s also less noisy and more accurate.īut for visualization I«d recommend the more «eagle-eyed» B model, for one very important reason. The wider-angle version is best suited for self-driving robots or CCTV systems (since its field of view is better). I haven«t thought about it when choosing. Which one will work best? Unfortunately, I only asked myself this question after the module has been ordered, shipped and received. It looks like this:Īs we can see, there are also two versions of this model, with different sensors The whole unit is called GY-MCU90640, and it costed me around 5000 RUB (roughly $80) in December 2018. Our Chinese fellows also ship the MLX90640 chip with another microcontroller on board (STM32F103), probably for easier matrix control. The case has four outputs - two for power and two for talking to a controller device via I2C. The B model has 55 and 37.5 degrees respectively.

The more grounded A model observes the world with 110 degrees horizontally and 75 vertically. The sensor comes in two versions, the only difference being the case and the camera«s FoV. The matrix is 32×24 pixels, which isn«t a lot, but after interpolation it«s enough to notice general trends. This is a thermal camera matrix with an onboard microcontroller, made by an unknown (to me) company called Melexis. Why not? Especially since I had a Raspberry Pi lying around anyway… The result is down below. So I decided to DIY it up and build a rather exotic and useful thing - a heat visor for the home. And it just turned out a famous Chinese marketplace started to sell cheap thermal camera modules. Winter has arrived, and so I had to check the thermal insulation of my out of town residence dacha.

Making a DIY thermal camera based on a Raspberry Pi 13:49
