Emotion Sensing Hello Kitty
We took inspiration from the hit reversible octopus plushie and designed a reversible hello kitty that responds to changes in facial emotes.
Supplies
- L298N motor driver
- Linear actuator
- Arduino Nano
- 3D Printer
- DC Power Supply 12v
- Fishing Line
- Reversible Plushie
Configure Emotion Sensing Program
Use this Emotion Sensing Program: https://github.com/atulapra/Emotion-detection
- Change program as needed to run properly on your device
Connect Emotion Sensing Program to Serial Port
Attached file has the updated code for this part for reference
Establish connection to Serial port
- Add "import serial.tools.list_ports" to establish connection between computer and Arduino Nano
Write to data to Serial port
- Convert the program emotion findings into Serial data
- 1 is Happy, any other emotion is 0
- In the video capture loop, add a 1 second delay, "cv2.waitKey(1000)", in each iteration so that the Arduino Nano's serial port has time to process the serial data
- Use "serialInst.write()" to write data to Serial port
Test Connection between Serial port and Arduino Nano Board
- Use Arduino Nano's built in LED to test whether connection works
- If "Happy" is sensed then LED is on
- Else LED is off
Code for testing this part is also attached for reference
Downloads
Set Up Linear Actuator
Hardware
- Attach Linear actuator wires to motor driver board
- Attach motor driver board to Nano and DC power supply
Software
- Follow attached picture to set up the pins to control the motor
- Follow other attached picture to write motor control helper functions
- Use helper functions inside main loop to run as planned
Combine Linear Actuator Controls With Emotion Sensing Program
First, initialize all the variables used inside the loop.
Our approach consists of two states, happy and not happy. In order to account for the time it takes to switch between states, we've attached a state transition diagram depicting how we stabilized and controlled the motor movements.
Downloads
3D Printing the Stand
Buy or make reversible plushie. Add/Remove stuffing as needed for mechanism to move correctly.
Make a model of the stand in Autodesk Fusion360. The important part is having correct measurements so the the linear actuator fits nicely into the stand and has enough room to pull the plushie all the way through to reverse as seen in the attached picture.
Putting It All Together
Attach top of unhappy side of plushie to the linear actuator head with fishing line. Then attach fishing line to holes in top ring and bottom of unhappy side as shown in the picture.
All Done!
You now have a fully functioning Emotion Sensing Plushie!