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

Simple Guide: Build a Reverse Geolocator with Raspberry Pi Pico W and GPS Module

Simple Guide: Build a Reverse Geolocator with Raspberry Pi Pico W and GPS Module

Back to blog

Leave a comment

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