Touchscreen Controlled Marionette

by MikeArduino in Circuits > Arduino

8051 Views, 78 Favorites, 0 Comments

Touchscreen Controlled Marionette

image00.jpg
Touchscreen Controlled Marionette

We are going to have a little fun with the Intel® Galileo development board. This time around, we’ll make a simple puppet control system. We’ve put together a “running robot” marionette with a simple mechanism that uses a continuous servo. We’ll be use a touchscreen interface to control various outputs using sliders and switches.

As always, you can modify the designs to suit your needs. We will teach you how to incorporate touchscreens, and make the interface necessary for controlling the Intel® Galileo Gen 2 board.

So, let’s start the puppet show!

Here is a video of the completed project.

This tutorial was originally published on Intel Communities here.

Needed Components

A-Materials----Intel-Galileo-G2.jpg
Screenshot 2015-01-26 15.12.39.png
Screenshot 2015-01-26 19.19.46.png
  1. Intel Galileo Gen 2
  2. Arduino Protoshield
  3. Galileo power supply
  4. Adafruit TFT touch screen
  5. LED
  6. 300 Ohm resistor
  7. Continuous servo motor
  8. Colored single core wires

Needed Tools

Screenshot 2015-01-26 14.47.51.png
A-Materials---Sewing-eye-hooks.jpg
Screenshot 2015-01-26 19.21.57.png
Screenshot 2015-01-26 14.48.54.png
Screenshot 2015-01-26 19.36.30.png
Screenshot 2015-01-23 18.47.42.png

  1. Enamel wire (0.2 mm thick)
  2. 4 mm MDF components - lasercut according to drawing
  3. 6 mm MDF components - lasercut according to drawing
  4. Plexiglas components - lasercut according to drawing
  5. Eyehooks used in sewing (can be substituted with bent wire if needed)
  6. Fluted pins used in woodwork (6 mm x 30 mm)
  7. Fishing line
  8. Stiff wire
  9. Wood glue
  10. Hot glue sticks
  11. Magnets
  12. Business card (or any stiff paper – used as a spacer)
  13. Nuts and bolts
  14. Lasercutter
  15. Mallet/Hammer
  16. Screwdriver
  17. Soldering iron
  18. Hot glue gun
  19. Needlenose pliers
  20. Scissors
  21. Wirecutters

Downloads

Sort the Lasercut Pieces for Easier Construction

Step+1.jpg

Sort all the pieces according to the image

Make Rotation Joint

Screenshot 2015-01-26 14.50.13.png

  1. Glue together 2 Part J rings
  2. Hammer a fluted dowel into the hole until one side is flush
  3. Make 4 units

Assemble Lower Leg

Screenshot 2015-01-26 14.50.46.png
Screenshot 2015-01-26 19.25.06.png

  1. Glue Part H4, H5, and H6 together
  2. Insert an eyehook into the gap
  3. Glue Part H3, H2, and H1 to the assembly
  4. Make the left and right lower leg (they are identical)

Assemble Upper Leg

Screenshot 2015-01-26 14.51.30.png
Screenshot 2015-01-23 18.21.14.png
Step-4d.jpg
Screenshot 2015-01-23 18.22.16.png

  1. Cut small rectangles from a business card to be used as a spacer
  2. Glue a paper spacer between Part G1 and G2
  3. Glue Part G3 to the assembly
  4. Insert a rotation joint (like before)
  5. Glue Part G4 and G5 to the assembly
  6. Glue a paper spacer to the assembly
  7. Hammer a fluted dowel into the hole until one side is flush

Attach the Lower Leg Assembly

Screenshot 2015-01-26 14.52.15.png
Screenshot 2015-01-23 18.23.10.png
Step-4j.jpg

  1. Glue and gently hammer Part G6 to assembly to complete the leg. The larger hole should be over the rotation joint so that it moves freely.
  2. Make the opposite leg (they are NOT identical, but rather a reflected assembly).

Assemble Lower Arm

Step-5a.jpg
Screenshot 2015-01-26 14.54.47.png
Screenshot 2015-01-23 18.24.04.png
Step-5e.jpg
  1. It is very important that Part B1 and B6 are placed correctly so thatthe joint is able to move correctly. Though not shown in this instruction, it is suggested that you wait until after previous steps to glue these pieces on.
  2. Glue Part B1, B2, and B3 together
  3. Insert an eyehook into the gap
  4. Glue Part B4, B5, and B6 to the assembly
  5. Make the left and right lower arm (they are identical)

Note: The arm on the right side of the image is INCORRECT. As stated earlier, if the parts are glued this way, the rotation of the arm is limited and will not work properly. We fixed this later in the instruction.

Assemble Upper Arm

Screenshot 2015-01-26 14.55.43.png
Screenshot 2015-01-26 19.30.01.png
Screenshot 2015-01-26 14.56.24.png

  1. Glue a paper spacer between part A6 and A5
  2. Glue Part A4 to the assembly
  3. Insert a rotation joint (like before)
  4. Glue part A3 and A2 to the assembly
  5. Hammer a fluted dowel into the hole until one side is flush
  6. Glue a paper spacer to the assembly

Attach the Lower Arm Assembly

Screenshot 2015-01-26 14.57.05.png

Note: It is important to check the rotation of the arm at this point. It should move similar to your own arm.
At this point, if you have not glued on Part B1 and B6, do so now. Look final image in this step to ensure this is done correctly.

  1. Glue and gently hammer Part A1 to assembly to complete the arm. The larger hole should be over the rotation joint so that it moves freely
  2. Make the opposite arm (they are NOT identical, but rather a reflected assembly)

Note: In this picture, the arm on the right side of the image is incorrect. The eyehook should be placed on the other side. We corrected this in later images.

Assemble Head

Step-7a-1.jpg
Screenshot 2015-01-26 19.33.34.png

  1. Glue Part I4 and I5 together
  2. Glue on Plexiglass eye covers
  3. Glue Part I3, I2, and I1 to the assembly
  4. Insert fluted dowel into base of the head

Note: If you want to include an LED in the head, do not glue on Part I1 until you have installed one.

Assemble Chest Frame

Step-8a-1.jpg
Screenshot+2015-01-23+18.28.46.png
  1. Slot together Part K2, K5, K6, and K9. (Note the orientation of Part K5 and K6)
  2. Insert Part K10 and K11
  3. Slide on Part K12
  4. Place Part K1, K4 and K7. (Note the orientation of the parts)

Place the Plexiglas Heart Cover

Step-8e.jpg
Screenshot 2015-01-23 18.29.19.png

Hot glue Part K8 onto the assembly

Assemble the Body Parts

Screenshot 2015-01-23 18.35.03.png

Gently the arms, legs, and head onto the chest frame

Assemble the Electronics Housing

Step-10a.jpg
Screenshot 2015-01-23 18.30.38.png

  1. Insert nuts into the slots provided in Part L4, L5, L6, and L7
  2. Slot Part L4, L5, and L6 into L3 and secure with bolts

Assemble the Stand Supports

Screenshot 2015-01-26 15.01.02.png
  1. Bolt together Part L1 and L8
  2. Bolt together Part L2 and L9
  3. Attach those supports to the electronics housing
  4. Attach Part L7 between the supports

Assemble the Turning Mechanism

Screenshot 2015-01-26 15.02.33.png
Screenshot 2015-01-26 15.03.59.png
  1. Glue together Part M1 and M2 to make a large wheel
  2. Hammer a fluted dowel into one hole
  3. Hammer another fluted dowel into center hole on electronics housing
  4. Attach the continuous servo motor from the back. (Note: Do not insert it through the hole, as this will place the wheel too far from the face of the housing)
  5. Insert the turning arm into the large wheel
  6. Attach the large wheel to the continuous servo motor
  7. Hammer a fluted dowel into one hole of Part M3
  8. Push down 2 Part J (rings) onto the dowel on the electronics housing
  9. Place on Part M3 and secure with Part J (ring)
  10. Push down Part J (ring) onto the dowel on the large wheel
  11. Use Part M4 to connect Part M3 dowel and the large wheel dowel and secure with Part J (ring)

Secure Marionette to Electronics Housing

Screenshot 2015-01-26 16.04.17.png

  1. Cut two long pieces of stiff wire and weave them through the three holes on the back of the marionette
  2. Slide the wires through Part K3 and secure the wires to the bottom of the electronics housing
  3. Adjust the wires until the marionette is positioned under the turning mechanism

Note: At this time, you can attach magnets to the back panel to make it easily removable. The same can be done with the head if not already glued into place.

Attach the Marionette to the Turning Mechanism

Screenshot 2015-01-26 15.06.23.png

  1. Turn the large wheel until the armature reaches the highest point
  2. Raise the arm opposite it and secure it with fishing line to the armature
  3. Raise the leg on the same side as the raised armature and secure with fishing line
  4. Turn the large wheel until the armature reaches the highest point on the other side
  5. Repeat steps for the remaining limbs

Solder the Electronics

Step+15.jpg

Use the schematic to solder the electronic components together

Attaching the Electronics to the Electronics Housing

Screenshot 2015-01-26 15.07.47.png

  1. Place the Galileo Gen 2 in the housing
  2. Attach the Protoshield
  3. Attach the touchscreen
  4. Attach the motor
  5. Insert the LED into the back of the marionette

Whew! We’re done with that part! Now lets move on to the preparing the electronics.

Download the Sketch and Libraries

Look for TouchScreenMarionette from the attachment and place it in the sketchbook folder

Download the libraries. There’re 3 libraries used in this example:

  1. Adafruit GFX
  2. Adafruit ILI9341
  3. Adafruit TouchScreen

You can find the libraries in the attachment. The ILI9341 library and Adafruit TouchScreen library are specially modified to fit for Intel Galileo.

Install the Libraries

Place the library folders under hardware/x86/libraries/ in your Intel Arduino IDE installation. They can be as well put under sketchbook folder/libraries, but the libraries specifically made for Galileo may confuse regular Arduino installations.

How to Run the Robot

  1. Plug in the power supply
  2. Wait until it says “Calibrating...” on the TFT screen
  3. Perform the calibration as directed on the screen by pressing the white rectangle on the corners. (See video)
  4. The interface will appear once calibration is complete. There are three different components:
    1. a slider
    2. a button
    3. a checkbox
  5. The Slider is for adjusting the servo speed (equivalent to 0 to 180 as servo.write())

  6. The button is for turning on/off the servo

  7. The checkbox is for turning on/off the LED inside the robot

The User Interface

A simple UI library is built to work with the touch screen. Library files can be found under in the sketch folder, util.h and util.cpp. Looking into the library files will give you an idea about how to customize the components or how to make your own components.

The size of all three components - slider, button and checkbox - can be configured. The initialization function, begin(), accepts four parameters: x, y, width, height. The width and height parameter has default values, which you can override by passing different values.