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

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.

Raspberry Pi Pico/Pico W Free Simulator

Raspberry Pi Pico/Pico W Free Simulator

Discover how to simulate Raspberry Pi Pico projects using Wokwi, a free online simulator for Arduino and MicroPython....

Interfacing the MPU6050 with Raspberry Pi Pico W in C++

Interfacing the MPU6050 with Raspberry Pi Pico W in C++

Interface with the MPU6050 using the Raspberry Pi Pico W in C++.

How to Write your First C++ Program on the Raspberry Pi Pico W

How to Write your First C++ Program on the Raspberry Pi Pico W

Write your first C++ Program on the Pico W in a few simple steps.

How to Use ThingSpeak with the Raspberry Pi Pico W

How to Use ThingSpeak with the Raspberry Pi Pico W

Learn how to create a real-time environmental monitoring system with the Raspberry Pi Pico W and ThingSpeak!

How to Use ADS1115 with the Raspberry Pi (Part 1)

How to Use ADS1115 with the Raspberry Pi (Part 1)

Discover how to expand your Raspberry Pi projects by integrating the ADS1115 ADC for precise analog signal reading....

How to Install Pip Packages in AWS Lambda Using Docker and ECR

How to Install Pip Packages in AWS Lambda Using Docker and ECR

Learn how to streamline AWS Lambda deployments by using Docker and Amazon Elastic Container Registry (ECR) to package...

Create Tabular Product Descriptions on Your Shopify Store

Create Tabular Product Descriptions on Your Shopify Store

Enhance your Shopify store's product pages with our comprehensive guide on implementing tabular descriptions. Learn how to add a...

SSH Into Raspberry Pi with Tailscale VPN

SSH Into Raspberry Pi with Tailscale VPN

Effortlessly access and manage your Raspberry Pi from anywhere using Tailscale's secure mesh VPN.

Send Email with Lua and the ESP32

Send Email with Lua and the ESP32

In this tutorial, we delve into sending emails with the ESP32-S3 using Lua, focusing on the Xedge IDE's built-in SMTP...

Back to blog

Leave a comment

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