Animated WiFi Doll

by cabuu in Circuits > Electronics

7227 Views, 57 Favorites, 0 Comments

Animated WiFi Doll

Instructables-Cover3.jpg

I made an animated doll with lights and sounds, controllable with my phone over WiFi and triggered by a motion sensor for Halloween. Here I will show you how to create your own using readily available components, some 3D-printed parts and a Wemos D1 mini micro-controller.

Further details are available on the website idly.cabuu.com more projects like this at cabuu.com

Parts Required

Parts-List.jpg

To build your own doll, the main parts you will need are:

You will also need...

  • Various length M2 screws
  • Jumper Wires
  • Micro-USB Cable
  • Solder and Soldering Iron
  • Glue gun
  • Micro-USB Cable
  • Solder and Soldering Iron
  • Glue gun
  • A Dremel multi-tool (or similar)
  • A 3D-printer (or access to one)

A basic version can be created to provide motion and lights alone. For this you do not need the PIR sensor, transistors or either resistor.

Eye Mechanism

P1030442.JPG
Eye Parts.jpg
Servo Bracket.jpg
HeadServoAttach.jpg
EyeHolderInPlace.jpg
ArmwithSrews.jpg
ServoArminPlace.jpg
AttachEyes.jpg
SolderLED.jpg
GlueLED.jpg
3d printedservoHolder2.jpg
SawHead.jpg
RemoveEyes.jpg
HotGlueInsideOfHead.jpg
InsideHeadView.jpg

To construct the eyes...

  1. First print the five 3d-printed parts, these are available from thingiverse. You will also need 1 x SG90 servo (complete with rotor arms and screws), 2 eyes and various length M2 screws.
  2. Next attach the servo brackets to the top and bottom of the servo ensuring the thin part is at the top so there is sufficient room for the eye holders to move. Secure with a M2 screw.
  3. Place the eye holder over the bracket and feed through an appropriate length M2 screw, ensure that the eye holder can move freely and repeat for the second eye
  4. Attach M2 screws to either end of the long arm
  5. Position the arm screws within the eye holders and attach to the servo using the provided screw
  6. Attach eyes to the eye holders using hot glue, ensure that the mechanism moves freely
  7. Solder 3 wires to the input side of the LED
  8. Use hot glue to secure the LED to the centre of the eye mechanism
  9. The optional 3D-printed servo holder may be used to help position the eye mechanism within the head.
  10. Create an opening at the back of the dolls head using a Dremel
  11. Remove the existing eyes
  12. Position the mechanism within the head and secure in place with hot glue, adjusting the position before the glue sets if required
  13. Use plenty of hot glue but be sure to avoid the moving portions of the eye mechanism

Construct the Head

HeadServoAttach.jpg
HeadServoAttachHead.jpg
HeadServoTwist.jpg

To construct the head...

  1. Find the centre of the second servo and attach the ‘double’ arm using the provided screw
  2. Attach the servo to the head using M2 screws
  3. Check the head moves freely in both directions
  4. Use hot glue to secure the head servo holder within the body
  5. Use plenty of hot glue!
  6. Feed through the wire and slot the head servo into the holder

Electronics

Animated-Internet-Doll-Schematic-Lite.jpg
Animated-Internet-Doll-Schematic.jpg

I have created two versions of this project, a simple one with movement and lights only and a more advanced version that uses a PIR sensor for motion activation and a feature to activate a speaker and/or additional devices.

The simple version is connected as shown in the first schematic.

The simple version can also be useful for diagnosis if you are having problems using the advanced circuit.

The advanced version is connected as shown in the second schematic.

Using a Custom PCB

CustomPCBFeature.jpg
P1030404.Still024.jpg
P1030404.Still025.jpg
P1030404.Still026.jpg
P1030404.Still027.jpg

The wiring can be simplified and compacted using a custom made PCB. They are available to purchase here. Funds from any sales will help support future projects like this one so thank-you!

If using a custom PCB...

Position and solder components in the indicated locations and orientation

Solder male and female headers, you can solder the D1 mini directly to the board if you prefer.

Trim any excess wire

Install the D1 mini and connect the servos, LED, speaker and PIR (if using), note the positions of the positive and negative pins using a multi-meter

Connecting the Speaker

P1030404.Still029.jpg
P1030404.Still028.jpg

Connecting the speaker very much depends on the type used, the voltage supply required etc. The doll I used is available to purchase here and contained its own speaker within the doll itself.

For mine it was connected as shown in the photo.

Arduino Sketch

Arduino-Tool-Settings.jpg

Download the latest Arduino IDE and the latest Arduino sketch which can be found here.

Ensure you have the following libraries installed. These can be installed using the libraries manager from within the Arduino IDE if not. Newer versions may work but have not been tested.

  • FastLED v3.3.2
  • Blynk v0.6.1
  • Servo v 1.1.5

The following library must be installed manually by moving its contents into the Arduino libraries folder:

Open the sketch in the Arduino IDE. Change the 3 lines shown below to reflect your own WiFi credentials and your Blynk Auth Token (see Blynk App section to locate this).

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YOUR WIFI SSD HERE";
char pass[] = "YOUR WIFI PASS HERE";

// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon).
char auth[] = "YOUR AUTH TOKEN HERE";

You may wish to adjust settings for both the head and eye servos to fine tune the extent of motion.

int MotionDetectTurnAngle = 180; //Angle at which to turn head on motion activate, default to 180
int CurrentHeadAngle = 90;
int CurrentEyeAngle = 90;

Connect the D1 Mini to the PC using a micro-USB, ensure that the settings shown are used, the correct COM Port is set and upload the sketch.

The doll should now reboot and connect to your WiFi network. It will become controllable via your own mobile Blynk app after following the next section. To troubleshoot any faults, with the D1 mini connected to the PC, use the Serial monitor in the Arduino IDE to help diagnose.

Downloads

Blynk Mobile App

Screenshot_20191014_220814_cc.blynk.jpg
clone_607000183.png

The doll is controlled using a Blynk web app. Blynk is an IoT platform free for prototyping/non-commercial use.

Begin by downloading Blynk from the Android Play or Apple App Store.

Create an account and Scan the QR-code above from within the app.

Under the project settings locate the projects Auth Token by emailing to your account or using the Copy all feature.

Copy the auth token to the android sketch, upload and you should be good to go!