The goal of this project was to create a stuffed animal that plays music from a computer by squeezing its paws. The user presses the front left paw to pause and play the songs. The user presses the front right paw to switch to the next song; the user can only switch songs while the music is currently playing. Force sensors are used to detect the squeezing of the paws. The ESP32 is used for collection of sensor data and serial communication. Processing is used to produce the audio.
To learn more, take a look at my blog post.
This tutorial from ESP32 I/O helped guide my materials selection, code, and wiring.
- ESP32 TTGO T-display
- Force Sensors
- Clincher Connectors
- 10kΩ Resistors
- Half-Size Breadboard
- M-M Header Pins
- Wires
- Heatshrink
- Stuffed Animal
-
Follow the Fritzing diagram above when wiring the components.
-
Before attaching the force sensors to the breadboard, you should solder extension wires and M-M header pins to the clincher connectors. Add heatshrink over these new connections to strengthen them. Then attach the clincher connectors to the force sensors. This is so that the force sensors can be placed inside the stuffed animal's paws. I would also recommend adding tape every about half inch so that the extended wires do not get tangled; the image below is from before I added the tape and as you see the wires are a bit messy and can easily get tangled.
-
Download the forcesensor.ino file from the Arduino-Sleepy-Stuffy folder. Upload this program onto your ESP32.
-
Download the files from the Sleepy-Stuffy folder. Note you may have to change line 60 in SleepyStuffy.pde so that it reflects the correct port name for your ESP32. Make sure all audio files are in the same folder as the pde file.
-
Procure a medium sized stuffed animal. You are going to need to place the breadboard inside it, so I would recommend one that has a zipper on its side. Also make sure the paws are big enough to fit the circular part of the force sensors.
-
Place the electronics inside the stuffed animal. You may need to remove some stuffing. Feed the wires attached to the clincher connectors through so they are sticking out where the paws used to be attached. I found that disconnecting the clincher connectors from the force sensors was helpful for this step. Once the wires were sticking out, I then again attach the clincher connectors to the force sensors.
-
Zip up the side where the breadboard is placed leaving a bit of space so that you can plug in the USB-C cable.
-
Remove the sticker back from the force sensors and stick them to the inside of the paws.
To watch a demo of the project, check out this link!