element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Ralph Yamamoto's Blog Wio Terminal Thermal Camera
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 15 Nov 2021 7:11 PM Date Created
  • Views 2892 views
  • Likes 7 likes
  • Comments 10 comments
  • melexis
  • wio_terminal
  • tft_espi
  • thermal camera
  • mlx90640
Related
Recommended

Wio Terminal Thermal Camera

ralphjy
ralphjy
15 Nov 2021

I'm finishing up my rainy day project that I started earlier MLX90640 Thermal Camera on Wio Terminal .

 

I 3D printed a cover for the camera module and cut a small proto PCB to mount a short dual row header to allow me to plug the module into the RPi connector on the rear of the Wio Terminal battery pack.  I thought about using that header to eliminate the external wiring, but I like the flexibility to move the camera to a different position relative to the display.  Of course, moving the camera to the opposite side meant I had to mirror the display and change some of the offsets.  I would have preferred to mount the camera more in the vertical center as it would have been easier to align the object being measured.  I decided to use the camera module with the 55 degree FOV as it seems more useful when looking at smaller objects like components on a PCB.

image

 

I added the battery pack to make the camera portable.  The addition of the battery pack makes the assembly bulkier, but it actually has a better "hand feel".

image

 

Since the Wio Terminal has an SD card interface, I thought it would be a nice feature to be able to save thermal images for documentation purposes.   Unfortunately, this took me down a rat hole.  My idea was to capture the pixel data from the TFT controller and convert it to an image file to write to the SD card.  Seemed like it would be straightforward with the TFT_eSPI library that I was using, but I had not considered the amount of memory that would be required to process that data and I ended up with memory overruns.  I'm sure someone has figured this out, probably use smaller buffers and convert and write the data in small chunks.  I looked around and found a screen capture example from Bodmer who created the TFT_eSPI library - https://github.com/Bodmer/TFT_eSPI/tree/master/examples/Generic/TFT_Screen_Capture .  This example does not write the image to the SD card, but instead sends a serial stream to a host PC and runs a Processing script to render and save the image.  I appropriated the screenSaver function and the processing_sketch to use with my program.  I had some problems with the processing sketch because the latest version changed the data type boolean to bool to fix a deprecation issue and that does not run with the version of Processing (3.5.4) that I am using.  I reverted the data type to boolean and that runs.

 

A short demo of the screen capture.  The image viewer in the background shows the rendering of the captured image on the PC.  I use the "B" button (top middle) to trigger the screen capture.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

And the captured image in .png format.

image

 

Of course, that means that I've lost my portability since I need to be tethered to the PC to do screen captures.  As an alternative, I can save the data from the thermal sensor to the SD card.  That array is only 32x24 and takes less than 5 KB if I save it as a .csv file.  I implemented a "save Snapshot" mode to do that which is triggered by the "A" button (top right).  The image below is rendered as a .png using a Python script.

image

 

I found the temperature difference between the two images interesting.  The top image was taken after I had just come inside after digging holes for my wife who had purchased some native plants for the yard.  The second image was taken a few hours later after doing computer work.  My wife thinks that means I should do more yard work to improve my circulation image.

 

So, where to go from here?  I could do more post-processing in Python to get the raw thermal data to match the format of the TFT display image.  I'd like to add some GUI functionality for file viewing and naming.  But those are projects for another set of rainy days...

  • Sign in to reply

Top Comments

  • fmilburn
    fmilburn over 3 years ago in reply to ralphjy +3
    I put my name on the Zero 2W notification list at Adafruit for when they are back in stock but don’t have one yet. They are an incredible value. A potential issue for me is the higher power requirement…
  • scottiebabe
    scottiebabe over 3 years ago +2
    The upscaled image on the wio terminal look really nice. Do you happen to know if there is some fancy DSP or is it just a basic linear interpolation between pixels? There is a surprising amount of information…
  • fmilburn
    fmilburn over 3 years ago +2
    Hi Ralph, What about sending the raw stream to the PC with WiFi? That isn’t something I’ve tried yet. Are you still happy with the Wio? Maybe I will ask Santa for one :-) Frank
Parents
  • ralphjy
    ralphjy over 3 years ago

    Sounds like you are still thinking about it.  Digikey still has a couple in stock (seems like they always have 2?).  Mine shipped today image.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • ralphjy
    ralphjy over 3 years ago

    Sounds like you are still thinking about it.  Digikey still has a couple in stock (seems like they always have 2?).  Mine shipped today image.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube