Mini Thermal Camera

Build a mini thermal imaging camera with Adafruit PyBadge and MLX90640 IR Thermal Camera breakout. Record and analyze images for revealing the heat in circuits, machines and even humans!

PyBadge & MLX90640

The IR thermal camera sensor uses the STEMMA QT connection so it easily plugs into the Adafruit PyBadge.

An external slide switch is used to power the circuit on and off. A metal ball button is used for reset.

A 3.7V 320mAh battery connects directly making this a portable project with rechargeable USB.

Prerequisite Guide

This learn guide covers the 3D printing of the enclosure and assembly only. Follow the learn guides below to get the PyBadge board setup with code.

Parts

1 x PyBadge
Feather Compatible Dev Board
1 x MLX90640 Breakout
IR Thermal Camera
1 x 420mAh Battery
3.7V Lipoly
1 x Slide Switch
Breadboard Friendly
1 x Metal Ball Button
6mm x 10 pack
1 x Stemma Cable
4-pin jST PH to JST SH cable
1 x Tripod Screw
3/8" to 1/4" screw adapter
1 x Mini Tripod
Portable folding desktop stand
1 x M2.5 Hardware
M2.5 Screw and Nut Kit – 4x M2.5 x 16mm
What's the size of a credit card and can run CircuitPython, MakeCode Arcade or Arduino? That's right, its the Adafruit PyBadge! We wanted to see how much we...
$34.95
In Stock
Are you a maker in the midst of a STEMMA dilemma? This 200mm long 4-wire...
Out of Stock
For those who are fans of our silicone-covered wires, but are always looking to up their wiring game. We now have Silicone Cover Ribbon cables! These may look...
$3.95
In Stock
You can now add affordable heat-vision to your project and with an Adafruit MLX90640 Thermal Camera Breakout. This sensor contains a 24x32 array of IR thermal sensors. When connected...
Out of Stock
Lithium ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery...
$6.95
In Stock
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch...
$0.95
In Stock
Add some steely elegance to your project with these Metal Ball Tactile Buttons. They've got a nice industrial shine to them along with a light blue...
Out of Stock
Whaddya got a screw loose or something?This 3/8" to 1/4" Adapter Screw is super handy if you're building projects that...
Out of Stock

The diagram below provides a visual reference for wiring of the components. This diagram was created using the software package Fritzing.

Adafruit Library for Fritzing

Use Adafruit's Fritzing parts library to create circuit diagrams for your projects. Download the library or just grab individual parts. Get the library and parts from GitHub - Adafruit Fritzing Parts.

Wired Connections

  • Switch to GND
  • Switch to EN
  • SDA from MLX to SDA on PyBadge
  • SCL from MLX to SCL on PyBadge
  • VCC from MLX to VCC on PyBadge
  • GND from MLX to GND on PyBadge
  • Button to RESET 
  • Button to GND

Powering

The Adafruit board can be powered via USB or JST using a 3.7v lipo battery. In this project, a 420mAh lipo battery is used. The lipo battery is rechargeable via the USB port on the board. The switch is wired to the enable and ground pins on the board.

3D Printed Parts

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below.

Screen Bezel

A bezel will help protect the display by keeping it affixed to the PCB. It can be attached to the cover using super glue.

Attach Bezel to Cover

Apply super glue along the rim of the bezel. Be cautious not to apply too much or too little super glue. Place the cover onto the bezel in the correct orientation.

Secured Bezel

Allow the glue to fully set before handling or installing. Avoid leaving parts on surfaces to prevent stains from fumes and hazing.

Slim Right-Angle Jumpers

Each component features a slim right-angle jumper cable for easily connecting to the headers on the PyBadge. These were created using male jumper cables. The pins are carefully bent at a right-angle and trimmed slightly to fit the short headers. Pins are soldered to the ends of each wire. 

Slide Switch

Connect the slide switch to a piece of 2-wire silicone ribbon cable. 50mm (2in) long wire is recommended. Use the middle pin and either the far left or right pin.

Stemma Cable

The stemma cable was shortened in this project is not required. There is enough space in the enclosure for the full length of wire.

Metal Ball Button

Connect the button to a piece of 2-wire silicone ribbon cable. 50mm (2in) is recommended. Use the two pins that are joins on the one side.

Connect Battery

Plug in the JST cable from the battery to the JST port on the PyBadge.

Connect Reset Button

Plug in the jumper cables from the button to the headers on the pybadge. Connect one wire to a GND pin and the other to RESET.

Connect Switch

Plug in the cables from the switch to the headers on the PyBadge. Connect one wire to a GND pin and the other to the EN pin.

Hardware

Use the following hardware to mount the breakout board.

  • 4x 10mm f/f M2.5 standoff
  • 8x M2.5 8mm screws

Install PCB

Secure the four standoffs to the mounting holes on the breakout PCB. Place the standoffs over the four mounting holes on the 3D printed mount. Use 4x M2.5 x 8mm long screws to secure the board to the mount.

Secured PCB

Reference the photo for the correct orientation. The PCB should be facing away from the standoffs.

Connect STEMMA cable

Plug in the STEMMA cable into the input side of the breakout board.

Install PyBadge

Place the PyBadge PCB onto the mount. Fit the posts on the standoffs into the mounting holes.

Connect PyBadge

Reference the photo for the correct orientation. Plug in the STEMMA cable from the IR thermal camera breakout to the STEMMA port on the PyBadge.

Installing Cover

The cover is secured to the mount using hardware screws.

Install Cover

Place the cover on top of the PyBadge and carefully press the buttons through the cover.

Install Switch

The slide switch is press fitted into a built-in holder on the cover. Insert the switch at an angle and firmly press the body of the switch into the holder on the cover.

Install Button

The button is press fitted into a built-in holder on the cover. Insert the button at an angle and firmly press the body of the button into the holder on the cover.

Cover Screws

Use the following hardware screws to secure the cover to the mount.

  • 4x M2.5 x 16mm long screws
  • 4x M2.5 Nuts

Secured Cover

Insert the M2.5 screws through the cover and mount. Install and fasten the nuts tightly.

Cover Body Install

The sides of the enclosure body are fitted onto the rails on the side of the cover.

Install Body

The enclosure body is symmetrical and fits in either orientation.

Tripod Screw (Optional)

Insert the 3/8-16 – 1/4-20 tripod adapter into the screw hole on the bottom cover. 

Tripod Screw Installed

The screw is tightened fastened and counter sinks into the hole.

Bottom Installed

The bottom cover is press fitted onto the bottom side of the enclosure.

Indents

The enclosure features indentations on the side that allow nubs on the covers to snap fit.

Installed Top

Press fit the top cover on to the top side of the enclosure.

Installed Cover

And there you have it! The enclosure is assembled and ready for use.

This guide was first published on Apr 24, 2020. It was last updated on Apr 24, 2020.