How to Connect MLX90614 Infrared Thermometer to Raspberry Pi Pico W: MicroPython Tutorial!

In this blog post, we’ll guide you through connecting the MLX90614 infrared temperature sensor to a Raspberry Pi Pico W using MicroPython. The MLX90614 sensor allows for non-contact temperature measurements, making it ideal for various applications. We’ll provide a step-by-step tutorial, including wiring, code, and testing.

Before we delve into the topic, we invite you to support our ongoing efforts and explore our various platforms dedicated to enhancing your IoT projects:

  • Subscribe to our YouTube Channel: Stay updated with our latest tutorials and project insights by subscribing to our channel at YouTube — Shilleh.
  • Support Us: Your support is invaluable. Consider buying me a coffee at Buy Me A Coffee to help us continue creating quality content.
  • Hire Expert IoT Services: For personalized assistance with your IoT projects, hire me on UpWork.

ShillehTek Website (Exclusive Discounts):

https://shillehtek.com/collections/all

ShillehTekAmazon Store for MLX90614 Pre-Soldered:

ShillehTek Amazon Store — US

ShillehTek Amazon Store — Canada

ShillehTek Amazon Store — Japan

Components Needed

  • Raspberry Pi Pico W
  • MLX90614 Infrared Temperature Sensor
  • Breadboard (optional)
  • 4 Jumper wires

Wiring Diagram

Connect the MLX90614 to the Raspberry Pi Pico W as follows:

  1. MLX90614 VIN to Pico W 3.3V
  2. MLX90614 GND to Pico W GND
  3. MLX90614 SCL to Pico W GP1 (SCL)
  4. MLX90614 SDA to Pico W GP0 (SDA)

Library Code

Save the following library code in a file named mlx90614.py and upload it to your Raspberry Pi Pico W.

https://github.com/shillehbean/youtube-p2/blob/main/mlx90614.py

Running the Code

https://github.com/shillehbean/youtube-p2/blob/main/mlx_main.py

  1. Upload both mlx90614.py and main.py to your Raspberry Pi Pico W.
  2. Run the main.py script using Thonny IDE or another suitable MicroPython environment.

Checking the Output

After running the script, you should see the ambient and object temperatures printed in the console every second. Ensure the temperatures are within realistic ranges to confirm the sensor is working correctly. You can point it at your skin closely to see if it changes the temperature reading. Goodluck on your project!

Conclusion

By following this guide, you can easily connect the MLX90614 infrared temperature sensor to your Raspberry Pi Pico W and read temperature data using MicroPython. This setup allows for non-contact temperature measurements, which can be useful in various projects. Do not forget to subscribe or book a consulting slot on buymeacoffee if you have any questions!

Create a free account to access full content.

All access to code and resources on ShillehTek.

Signup Now

Already a member? Sign In

Explore More on Our Blog

Controlling an LED with a Snap Using the KY-037 Sound Sensor and Raspberry Pi

Controlling an LED with a Snap Using the KY-037 Sound Sensor and Raspberry Pi

Discover how to set up, code, and activate the LED based on detected sound with the Raspberry Pi...

Getting Started with the KY-037 Sound Sensor and Raspberry Pi: Detecting Sound Using Python

Getting Started with the KY-037 Sound Sensor and Raspberry Pi: Detecting Sound Using Python

In this tutorial, I’ll guide you through setting up the KY-037 sound sensor with a Raspberry Pi using...

How to Post to Reddit Using Python

How to Post to Reddit Using Python

Post to reddit automatically using a Python script.

How to Create a Time-Lapse Video with a Raspberry Pi Camera

How to Create a Time-Lapse Video with a Raspberry Pi Camera

Learn how to make a timelapse with your Raspberry Pi in Python.

How to Integrate the MPU6050 with the STM32 Blue Pill

How to Integrate the MPU6050 with the STM32 Blue Pill

Learn how to measure acceleration with the STM32 and the MPU6050 in the Arduino IDE.

Getting Started with STM32 Blue Pill in Arduino IDE Using a USB to TTL Converter — Write Your First Program

Getting Started with STM32 Blue Pill in Arduino IDE Using a USB to TTL Converter — Write Your First Program

This comprehensive tutorial will guide you through the process of setting up and programming the STM32 Blue Pill...

Automate Task Scheduling in AWS with Lambda, Step Functions, and CloudWatch

Automate Task Scheduling in AWS with Lambda, Step Functions, and CloudWatch

In this tutorial, I'll show you how to automatically schedule tasks in AWS at regular intervals using AWS...

Implementing Google reCAPTCHA in a Simple React and Node.js App

Implementing Google reCAPTCHA in a Simple React and Node.js App

Learn how to protect your React applications from bots and spam with Google reCAPTCHA integration! This step-by-step tutorial...

AWS Lambda Tutorial: Using Selenium with Chromedriver in Python

AWS Lambda Tutorial: Using Selenium with Chromedriver in Python

In this tutorial, I will guide you through the process of running Selenium with ChromeDriver inside an AWS...

How to Connect MLX90614 Infrared Thermometer to Raspberry Pi Pico W: MicroPython Tutorial!

How to Connect MLX90614 Infrared Thermometer to Raspberry Pi Pico W: MicroPython Tutorial!

Learn how to use the MLX90614 with the Raspberry Pi Pico W and get infrared values in MicroPython.

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.