Introduction: Beating LED Heart
It's been 5 wonderful years since I married my wife. I am giving her this electronic heart. It can sense the excitement. It beats according to the holder's heartbeat. She's been supporting me on many of my crazy quests.
Like all of my creations, I went a bit artistic here and made the heart shape out of brass wire mesh. All the electronics are safely hidden inside the heart and powered by LiPo battery.
Step 1: Material & Tools
- Brass wire 1mm
- Brass wire 0.8mm
- Soldering paste Solder
- 3D printed heart template
- Arduino NANO (Aliexpress)
- LiPo Battery charger (Aliexpress)
- LiPo battery (Aliexpress)
- MAX30102 Heart rate sensor (Aliexpress)
- Micro USB breakout board (Aliexpress)
- 9x WS2812B RGB LEDs (Aliexpress)
- Mini switch (MSK-12C02)
- soldering station with 3mm tip
- wire cutting pliers
- double-sided tape
- steady hands
Step 2: Getting the Template Ready
Heart sculpture is built and soldered around a 3D printed heart template. So let's print the template yourself to have it ready for the next step - soldering the mesh. The heart is slightly bigger than the original model, the dimensions are 100x84x49.5 mm.
There is no need for high precision or nice smooth output. My 3D printer setup is PLA speed profile with 0.30mm layer. It won't look pretty, but for a disposable template, it is good enough. You will save time and filament.
If you have Prusa i3 MK3S you can use my GCode file right away for the best result.
Original model by VARRG
Step 3: Soldering the Outer Shell
Warm-up your soldering station to 270°C, get your solder and brass wire ready. It is time to start building an outer shell on top of the plastic template printed in the previous step. It is gonna take a long time, don't hurry. If you get tired, take a break for a day.
Pick one side of the heart and start by putting a single wire on a single edge of the template. Double-sided tape is a great friend that will help you keep the wire in place. Add second wire and solder these together. Add third wire and create the first triangle. Use soldering paste to make smooth soldering points.
Continue putting wires until all edges on one side are covered with wires. Stop when the wires will start to bend to the other side. You won't be able to pull the brass mesh out of the template.
Turn the template upside down and start over on the other side of the heart. Continue until you meet the wires from the other side. Do not solder these two sides together. When finished you can take the wire mesh down from the template and be proud of yourself.
Step 4: Electronic Schematics & Components
Do you have your brass outer shell ready? Now it's time to make a "brain" of this beautiful heart. The core is an Arduino Nano microcontroller that reads pulse data from a MAX30102 Heart rate sensor module via an I2C bus. Visual effects are created by a set of 9 addressable WS2812b RGB LEDs controlled by Nano. The power supply is maintained by a TP4056 battery charged module which can both supply the Arduino with 5V from a LiPo battery and charge the battery from the USB port.
Even though both TP4056 and Arduino Nano feature a USB port there is an extra USB presented. It breaks the USB lines into power lines handled by TP4056 and data lines handled by Arduino. Otherwise, the power lines would be mixed and the circuit won't work.
Step 5: LED Inner Heart
Let's light the thing up! We gonna make the inner RGB LEDs heart. It's pretty simple. So don't hesitate to solder it together to be ready for the final assembly part.
What you gonna need:
- paper template
- WS2812b RGB LEDs (9x)
- 0.8mm brass wire
- Print out the template and cover the red spots with double-sided tape.
- Place the RGB LEDs on the red spots on the template upside down. The four leads should point to you. It's wise to maker the GROUND and VCC pins to make sure you solder them correctly. Face the GROUND pin to the outer ring of the heart.
- Bend and solder the outer ring of the heart to the GROUND pins of the LEDs.
- Bend and solder the inner ring of the heart to the VCC pins of the LEDs.
- Connect LEDs into the chain - Each LED has DATA-IN and DATA-OUT pin. If you connect the first LED data-out pin to the next LED data-in pin you will create a chain that can be controlled with just one wire. Use short wires between each of the LEDs. The data-in pin is located on the same side as GROUND.
- Clean up the heart with some alcohol.
This will be the hardest part of all because it will require some electronics knowledge.
Powering the Arduino NANO
The circuit I've implemented is not the easiest to perform but it was the most elegant for the heart itself. If you found it too hard you can check out the other variants at the end of this section.
Let's start with powering up the Arduino Nano with the LiPo battery. If you check out the schematics you can see that the power line from USB does not connect directly to Arduino Nano but is rather bypass via a TP4056 battery charge module. This ensures that the battery can be properly charged and the heart can be turned off by the switch. Unsolder the USB connector from Arduino Nano and add the micro USB breakout board. Connect data lines and ground line back to the Arduino NANO as can be seen in the picture. Put the breakout board center aligned with the Arduino NANO so it looks pretty.
Take the TP4056 battery charge board and solder it with two wires on the bottom side of the Arduino Nano - connect OUT+ with 5V on the Arduino board and OUT- to GND. I made a space between the Arduino Nano and the battery charge board to fit the 500mA LiPO battery. Now connect the power from the USB breakout board to IN+ on the battery charge board and finally IN- to GND. Solder battery leads to the B+ (red wire) and B- (black wire) pads on the battery charge board via power switch. You can now try to power up the board for the first time. Hope it works!
Tip: Also unsolder the power LED from the Arduino UNO. It always on light is disturbing for the heart.
Variant 1: You can also use the USB build on the Arduino NANO board. If you unsolder the rectifier diode which is on the bottom of the board you can solder use the 5V from mini USB and it will not power the board any longer.
Variant 2: Your heart can have two USBs - one for programming and one for charging the battery. Both Arduino Nano and TP4056 battery charge module have it's one USB, you can use them. It's not elegant but pretty simple to do.
Variant 3: If you don't need a battery-powered heart you can omit the extra USB board and power charge circuit.
Step 7: Embedding the Brain Into the Heart
Solder the inner heart into the lower half of the heart shell. The outer wire of the inner heart is GND and the shell itself will be GND as well. So use some short brass wires to put it into the exact center of the heart as can been seen in the pictures.
Now take the Arduino with battery prepared above and solder it into the inner heart. Use as many wires as needed to make sure it will hold inside the heart. Again use GND pins on the boards and shell of the USB as a point where to solder it to the outer shell of the heart. Do not solder it to the inner wire of the inner heart! The inner wire is 5V for the LEDs.
Connect the inner wire of the inner LED heart to the 5V of the Arduino Nano and DATA-IN of the first RGB LED to pin D12.
Step 8: Installing the Heartbeat Sensor
MX30102 sensor measures heartbeats and blood pressure when touched with a finger. Solder the board on the upper half of the heart shell. Use a small opening on the sides of the board. These are GND and since heart shell will be GND as well it is perfect. Make sure you can touch the small little black component on the board - that's the sensor.
Take 3 flexible wires - I've used .3mm insulated transformer cooper wire in form of a spring. And solder them to SCL, SDA and VIN pins on the MAX30102 board as follows:
- SCL to A5 pin
- SDA to A6 pin
- VIN to 5V pin
That's all electrical connections that are needed. Before you solder upper and lower shells together. You should test whether it works. It would be hard to repair afterward.
Step 9: Uploading the Sketch and Testing
Connect Arduino to the computer and upload the sketch attached to this post. The power switch has to be turned on. After it is uploaded the small red LED on the heartbeat sensor should light up. If you touch it, LEDs should start blinking according to your heartbeats. It can take up to 15s to measure the heartbeats properly so don't be desperate if it's not instant.
Step 10: Final Touch
Works? Good! Solder upper shell and lower shell together and clean up the whole heart with some alcohol-based cleaner to remove the remaining flux.
You are done! Let me know if it works for you and post pictures of how your heart turned out. I am really interested!
Like this article. Also, consider supporting me on Patreon.
I am Jiri Praus.
First Prize in the