Send your valentine a note through the net! This DIY electronics project uses a small vibrating motor to gently wave a tissue paper heart and flash an LED when it receives instructions over the internet from another device. I built two versions of the ESP8266 wifi circuit, also equipped with two buttons for triggering the two commands. The devices talk over the Adafruit IO cloud data service to communicate with each other from anywhere with wifi, and I’ll show you how to activate your valentine with the API gateway service IFTTT as well, in case you only want to build one valentine circuit.
This is a pretty easy Internet of Things project! Before you dive in, you should have a workable knowledge of the Arduino software and electronics soldering. Try my beginner Arduino Class and/or Randy Sarafan’s basic Electronics Class to get up to speed!
What You’ll Need
For this project I created two devices that communicate with one another, but this project works fine with just one device, triggered over the internet with your phone or computer (we’ll cover that later). Regardless of the number of transceivers you’re making, I highly recommend creating one solderless breadboard prototype and duplicating it with a new set of parts in soldered form, rather than disassembling the working prototype. It makes building and troubleshooting the final board much easier.
For each device:
- Shadowbox picture frame
- Adafruit Huzzah Feather or ESP8266 Huzzah breakout board (with FTDI cable & lipoly charging board)
- Lipoly battery and USB cable
- Solderless breadboard and perma-proto board
- Breadboard prototyping wires
- Two momentary pushbuttons
- Mini vibrating motor
- NPN transistor such as PN2222
- Diode such as 14N001
- 100-1K ohm resistor
- LED (any you like, such as 5mm red, LED sequin, or illuminated pushbutton)
- Stranded wire
- Heat shrink tubing
- Terminal blocks (optional)
- Red tissue paper
- Poster board
Gather the following tools:
- Cutting mat
- Utility/craft knife
- Sewing machine
- Hot glue gun
- Rotary tool (Dremel, etc.) (optional)
- Soldering iron
- Wire strippers
- Flush wire snips
- Third hand tool
- A heat gun or lighter
- Multimeter (optional but extremely handy)
- Thin wire (I used .2mm steel binding wire)
Create/log in to accounts on the following sites:
To keep up with what I’m working on, follow me on YouTube, Instagram, Twitter, Pinterest, and subscribe to my newsletter. As an Amazon Associate I earn from qualifying purchases you make using my affiliate links.
As an Amazon Associate I earn from qualifying purchases you make using my affiliate links.
I’ve Got Your Code
The circuit for this project uses an ESP8266 wifi chip, either in a Huzzah wifi breakout board or Adafruit Feather Huzzah board. If using the breakout board, an FTDI cable is also required to program the board, and a lipoly charger to add battery power. Thoroughly read the product documentation with your chosen board to better understand its pinouts and special features. It may be possible to use other ESP9266 boards for this project, but I haven’t tried them.
Circuit diagrams for both versions are provided above. Both circuits connect pushbuttons through ground to pins 4 and 14, an LED connected to pin 15, and a transistor circuit driving a small vibrating motor connected to pin 5.
Before you can program ESP8266 boards with Arduino, you’ll have to add board support to the software. Use the boards manager to add support for these boards and upload a blink test program before proceeding. Remember that with the Huzzah breakout board, you must use a combination of button presses to put the board into bootloader mode before uploading new code.
Build your circuit on a solderless breadboard according to the diagram.
Create a new feed in your Adafruit IO account called “command.” Find your AIO key (on the Settings page).
Download the project code attached to this step and open it with the Arduino IDE, then update the settings in config.h to match your Adafruit IO username and key as well as your wifi network name and password. Be sure you have the Arduino libraries “Adafruit IO Arduino” “ArduinoHttpClient” and “Adafruit MQTT” installed. Then upload the code to your board.
Awl Through the Middle
Cut out a piece of sturdy art board to match your shadowbox frame (mine is 4×6 inches) using a metal ruler, cutting mat, and utility/craft knife. Be careful not to cut your fingers! Pierce with an awl in the upper middle area, and wiggle awl to open hole to about 3/16″ (4-5mm). This will allow the wires for the mini vibrating motor to pass through the board.
Wound Up Like a Spring
The trick to getting the paper heart to wiggle is to mount it on something that can move easily, like a spring. Use some thin wire to create a coil by wrapping around a chopstick or similar small object. Leave tails on both ends of the spring, and thread one through the hole in your board. Tape it at the back to hold the spring in place.
If you don’t have a suitable wire, improvise with what you’ve got. Perhaps a small ziptie, hair clip, or other item could be substituted for the mounting spring.
To make layered tissue paper hearts, sew a straight stitch through a new, still-folded packet of tissue paper. Fold along the sewn line and sketch out a half-heart shape with a pencil, then cut out the shape and unfold the heart. Clean up any rough edges with your scissors.
Connected Through Wires
Extend the reach of your motor’s wires by soldering on pieces of stranded wire and insulating the connections with heat-shrink tubing. Do the same with an LED.
Thread the motor’s wires through the spring (collapsing it first can help) and hot glue it to the spring’s wire tail and the back of a paper heart, double checking the wire does not bridge the motor’s electrical connections. Hook up the motor to your breadboard prototype and activate the motor to test it’s springiness. Adjust the length of the spring or type of wire until desired movement is achieved.
Backlit With Love
I chose to illuminate the board behind my paper heart by hot gluing a small LED sequin to the back of the motor, but you can put your LED wherever you like, or omit it entirely.
During prototyping, I powered my breadboard circuits through the USB cable I was using to program them. To move to a more final design, I wanted to add lipoly battery power/recharging so that the valentines could be moved about the house and handled without having to be plugged in 100% of the time. On the Feather Huzzah, the power connection must be moved to the BAT pin, if it wasn’t there already. On the Huzzah breakout, power connects to the pin labeled VBat, and an additional charging board is required for lipoly batteries (connect BAT to + and GND to -).
This design is not meant to have an on/off switch, but rather to be plugged in most of the time and perched on your desk or wall. If you want to be able to toggle power to the device, add a switched USB cable to your Feather Huzzah board, or add a switch between GND and EN pins to power down the wifi board. If you’re using the Huzzah breakout board, you could interrupt one of your power supply leads with a tactile on/off switch.
In Its Final Form
Begin soldering your final circuit on a perma-proto board. If using the Huzzah breakout, double check the programming headers don’t make contact with the conductive pads on the circuit board.
With Felt Buttons
I’ve had these felt pushbuttons for several years and never found a good use for them, until now! I had used a felting needle and wool roving to encase momentary pushbuttons in fuzzy needlefelted fiber. Whatever buttons you use, solder them to your circuit board at a comfortable spacing.
Based on Your Own Working Prototype
As I mentioned in the Supplies step, I highly recommend duplicating a working solderless breadboard prototype when creating projects like this. You can verify your wire connections against both the circuit diagram and your working breadboard, which will decrease your likely hood of making a mistake. As I soldered up the circuit, I very carefully tucked components close to one another to save space.
To make the valentine easier to assemble, I used screw terminal blocks for power connections, which will come through the back of the shadowbox. If you used a Feather Huzzah board, you’ll simply pass the battery wire through and plug it into the board’s JST port.
Do a dry fit to see and mark how your circuit board will fit in the frame. Use a hot glue gun to make standoffs at the corners, to elevate your circuit a bit. This brings the buttons closer to the front of the shadowbox and also provides room for the wires passing to power, motor, and LED.
Use your awl to create another hole, this time behind where your circuit board will go. Pass the power and ground wires, and the wires for the motor and LED.
Into a Shadowbox
I also used terminal blocks to connect the motor and LED, but soldering to the board would have worked fine too. I mounted the lipoly charging board and battery to the backing plate and assembled the shadowbox.
The device both sends and receives commands from the buttons, so you can test it easily by just pressing the buttons– the heart will buzz and light up when it receives the commands from the internet.
Triggered by IFTTT
To trigger your valentine from your phone, or to automate your valentine based on your social media activity, physical location, and many more actions, set up an account on IFTTT, an API gateway service. You can put together a simple recipe that contributes commands to your Adafruit IO feed that controls the valentine.
Android/iOS button widget: Create a new applet and pick “Button widget” as the trigger. Pick Adafruit as the output, and send the number 1 or 2 to the “command” feed on Adafruit IO. After saving the applet, add a new IFTTT widget to your mobile device’s home screen. I made two widgets, one for each button on the valentine.
Or Another Remote
I built two electrically-identical circuits to act as two-way valentine communicators. The second device I built has a more compact, remote-like design. I harvested an old RadioShack project box and installed an illuminated pushbutton, whose LED serves as sequin does in the shadowbox version. The paper heart stands at the end of a single piece of solid core wire, and I cut a hole in the side of the enclosure for the USB cable to plug in.
For My Valentine
I’d like to dedicate this project to my partner Smokey, for whom the step titles form an attempt at a poem.
I hope you glean something for your own IoT projects and I look forward to your feedback in the comments (about anything but the poem)!
If you like this project, you may be interested in the other IoT projects in the series: