Electronic Heart. Valentine's Day Gift

by dybarsky in Circuits > Microcontrollers

168 Views, 0 Favorites, 0 Comments

Electronic Heart. Valentine's Day Gift

assembled-2.png

Hello everyone!

Welcome to my very first Instructuble. Hope you enjoy reading and making it.

Below you can find a video of this project.


History

I was browsing through Instructables and found several beatiful PCBs in shape of hearts. These two projects (one, two) got me very inspired right before Valentine's Day, so I decided to make one for my girlfriend. I didn't have required components and I also wanted a unique look for my gift. Therefore I came up with my own design.


About

The core of this project is MSP430G2553 mictrocontroller by Texas Instruments and two SN74HC595N 8-bit shift registers. Each 8-bit shift register controls 8 3mm red LEDs. Also resistors, capacitors, a slide switch, a tacticle button, DIP sockets, a Li-ion akku 3.7V, a JST connector.


Source Files

This project is Open Source and Open Hardware. All source files are published under MIT license on my github:

https://github.com/dybarsky/valentines-leds

Supplies

parts-2.png

Tools

  1. Solder iron
  2. Narrow soldering tip (I used 900M-T-I)
  3. Solder
  4. Flux
  5. Knips
  6. Tweezers
  7. Cutting mate (or other surface for work)


Components

  1. 1x Microcontroller MSP430G2553
  2. 2x 8-bit shift registers SN74HC595N (or similar)
  3. 16x 3 mm LEDs (I used red)
  4. 16x 100 Ohm resistors (or other value depends on your LEDs)
  5. 2x 10 KOhm resistors
  6. 2x 0.1 uF electrolytic capacitors
  7. 1x 20 pin DIP socket
  8. 2x 16 pin DIP sockets
  9. 1x 100 uF electrolytic capacitor
  10. 1x slide switch 3 pin 2.5 mm pitch (SS12D00G3 or similar)
  11. 1x tact button 6 x 6 mm 2 pin 5 mm pitch (Youmile GR-YM-096 or similar)
  12. 1x Li-ion akku 3.7V (I used 75 mAh because of its size)
  13. 1x JST 2 pin connector 2.5 mm pitch (for akku)

Designing Hardware

Screenshot 2025-02-15 at 23.50.19.png
pcb.png
nets.png

I used KiCad to create schematics and design PCB. It's free but very powerful software. You can find all project files in my github repository by the link above, including Gerber files, which were used for PCB produciton.

Here are images of schematic and PCB designs. Also with colored nets for better readability.

I used JLCPCB.com service to print the physical circuit. They have fair prices comparing to other similar services and many options for customizations, including color of the board. Red fits best for this project. Also quality of the board is very good and final look of this project made me and my girlfried very sastisfied.

You can try to use laser-iron method (LUT) to make PCB at home, if you wish. Here is a link with details instruciton.

Also, I have removed text on top of PCB and replaced Ukrainian text with English

Writing Firmware

Screenshot 2025-02-16 at 00.13.27.png

Firmware for this project was written in pure C, operating with IC registers directly (without platformio or any other ports of arduino libraries). It requires some deeper knowledge of MSP430G2553 datasheet and hardware communication protocols, but drastically reduces binary size. It's only 14 KB!

There are 6 different patterns of LEDs blinking. They are store in 2 dimensional arrays of bytes.

Timer intrruptions are configured to be called every 0.1 second. IC goes over array and sends data to 8-bit shift register. Communication between the microcontroller and 8-bit shift registers is done via SPI protocol. When IC is not busy, it goes to low power mode.

I am using MSP430-GCC toolchain to compile, link and flash firmware.

Attaching all source files here, but I encourage you to go to my github repository, where you can find a Makefile, which makes it much easier to build.

Crafting

Electronic Heart - Valentine's Day Gift

This is how final project looks like. It took me around two days to design hardware, write the code and assemble all together (not counting PCB production and delivery). A little bit of time, patience and soldering skills and you can create a beatiful present for your lovely one.


Thank you for reading. Any feedback is welcome.