This project is basically a variation of my last LED heart project which was published back in 2018.
This time I'm using an MLX temperature sensor to blink the LEDs when the heart is put in the palm of your hand. It is done by continuously checking if the temperature falls within 31-36° C.
The project is divided in three parts:
- Electronics
- Assembly
- Software
Lets get started!
Electronics:- MLX90614
The MLX90614 is the key component of this project. It uses IR to read the temperature of an object in front of it. The sensor uses I2C protocol to communicate with the microcontroller.
- Neopixel LEDs
I am using a custom LED heart PCB I had designed for last project. It has a microcontroller inbuilt, so you won't need an external driver circuit which saves the space.
- Powersupply
I used 950 mAh lipo to power everything. The Pololu step up converter boosts 3.7v from lipo to 5v for Arduino, MLX and Neopixel PCB. The booster can boost voltage to 5v from ~1v so you get the most of the juice from the battery.
For this project, I used a Christmas/party decoration plastic heart box. I had some remaining from the last project.
The MLX sensor cannot measure temperature through the acrylic, so we make a hole in the bottom side of the heart box. A ~5mm hole is enough to make the IR part stick out of the bottom.
When put on the hand, MLX sensor gets very close the the palm skin and thus can measure temperature without much variance.
This how it looks when glued and painted.
I used foam-core board cut in a heart shape template to hold components. The board is easy to cut through and has the strength to hold the substantial amount of weight without bending.
I divided the container's base into two sections: the MLX sensor + Lipo battery in the bottom and on the top I put Arduino + boost converter + Neopixel PCB.
All assembled.
For the temperature sensor, I am using Adafruit's MLX library. To read temperature per 10ms, I changed the I2C speed to 400Kbps.
Temperature reading is added to a Circular buffer which then continuously calculates the moving average of 100 samples.
If the average temperature within the 31-36 degree Celsius, It assumes that heart is placed on the hand and starts LED animation for 5 seconds. After that, buffer is cleared and whole process repeated.
And that's it folks! Thanks for reading and Happy Valentine's Day!
Comments
Please log in or sign up to comment.