Ok I must admit.. I used to think valentines day was too commercial and never did anything serious about it. Although I always looked curious into my mailbox, but was always a bit disappointed when it was filled with even more bills and advertisement magazines… However this year everything will be different,  and I’ll present my girl a small token of love. SMDprutser style off course.

My girlfriend persuaded me to start this hobby side project and as a favor I made her this blinky heart. I don’t want to buy a standard trumpery from the shop, so I locked myself up into my mancave and started to solder and code as a monkey. I put a MAX7219 8×8 LED matrix, a PIC16f1823, a CR2032 coin cell with holder and a vibration switch together. Most of the stuff I had already lying around so I started immediately.

Somewhere on the web I found a small tutorial how to use the MAX7219 with the buspirate. That made it really simple for me to test the display for faults and get myself familiar with the command set. After getting the display to work with the buspirate I connected it to the microcontroller SPI bus and tried to replicate the buspirate commands. It turned out it needed I had to wait a bit after powering the MAX7219 before sending commands, but otherwise it went OK.

I found an excellent online dot matrix editor and created the needed valentine icons for my sweety. The used microcontroller has plenty of FLASH available so I hardcoded all the animations as separate subroutines. Next thing was to get it to work on work on the CR2032 battery. A typical CR2032 supplies 3V and has a capacity of about 200mAh. The microcontroller displays a bit of animation and goes to sleep to conserve the precious energy. A vibration switch is connected to the INT pin and GND and is used to wake up the microcontroller when it is shaked. During startup the amount of interrupts are count and will determine which animation is displayed.

valentine_inside

A bit of hot glue is used to tack the switch down and the holder is snugly fit between the pins of the LED matrix. That make the battery accessible when the display locks up (probably is a counterfeit chip or a reject).

Happy valentine’s day, Darling!

Share this
  • 3
    Shares