Introduction: Moving Headdress Using Arduino/Servo Motor
Here are the steps on making a headdress that moves it wings when you bend a flex sensor.
I am new to the Arduino world, so if you're a beginner no fear! This project is pretty easy and as long as you have patience and a lot of hot glue, you will be flappin around in no time.
Step 1: Tools/Supplies
To get started, you will need to figure out the 'theme' or decorations you want on your headdress. I chose a creepy forest vibe and will list the specific decorations below, along with the link to where I bought them.
My Decor Choices
- Animal Bones/Skulls
- Black feathers on a ribbon or in a string
- Black Ostrich Feathers
- Random fake foliage/flowers (just got a bunch of flowers/ect from AC Moore)
- Fake buddies. I got a fake crow and some dragonflies from AC Moore as well.
Links for Decor I bought
Big Feathers: https://www.amazon.com/gp/product/B00W176GHG/ref=o...
String of Feathers: https://www.amazon.com/gp/product/B00S9PFR42/ref=o...
Bones (Link to Esty shop page): https://www.etsy.com/shop/boomer2563?ref=l2-shophe...
Tools
- Glue gun
- Jewelry wire. I have 16 gauge and wouldn't recommend any less than that because it's pretty bendable
- Galvanized steal wire (used for the base, you can bend it with your hand, but may need pliers)
- Wire cutters/pliers
- Foam head/something to hold your base
- Black Electrical Tape
Links for tools I bought
wire: https://www.amazon.com/gp/product/B001PCYJEA/ref=...
https://www.amazon.com/gp/product/B07169TZ3R/ref=o...
Foam Head: https://www.amazon.com/gp/product/B00LU0GQ0M/ref=o...
Wire Cutters: https://www.amazon.com/gp/product/B005JVJDIA/ref=o...
Arduino/Tech Supplies
- Arduino (obvs) I used an ArduinoUno
- 2 Servo Motors
- Flex Sensor
- Wire to connect the devices. (want it to be bendable but still durable)
- Soldering Iron/Solder
- 100k resistor
- 9V battery connector for Arduino
Links to what I bought
Arduino: https://www.adafruit.com/product/50
Motors (I bought 2): https://www.adafruit.com/product/169
Flex Sensor: https://www.sparkfun.com/products/10264
Soldering Iron: https://www.amazon.com/gp/product/B01HXM7OJW/ref=o...
Battery connectors: https://www.amazon.com/gp/product/B00NIOQN9M/ref=o...
Misc./Optional Materials
- Popsicle sticks
- Felt
- Wooden Skewers
- Norm tape
- Scissors
Step 2: Making a Base
Regardless of your design, you will need a base. You can experiment and find out what works best for your specific sitch, but I will show you exactly what I did for my headdress.
1: Make a headband shape to sit on top of your head and copy that same shape, putting it at the bottom of the head or nape of the neck. (Galvanized/Stiff Wire)
2: Once the general shape is made, strengthen the structure by weaving the softer jewelry wire back and forth between the 'headbands'.
3: Continue this weaving process between the two different headband pieces across the crown of the head to make one solid frame.
*Make sure to put it on your head throughout the process to see if it fits and if you need more support in one place or another*
Step 3: Adding Feathers or Covering to the Wire Base
1: Cut out the length of feathers you need, starting from the bottom, and use hot glue to connect the feathers to the frame.
2: Repeat to make the frame as dense or sparse as you want. You can also just get creative and make it up as you go.
3: Use electrical tape around the top/headband part of the base. This will hide the wire and also make it more durable. It also gives you something to glue the feathers on at the top, since it is the most visible part you want to make it looks nice.
Step 4: Arduino/Servo/Coding Phase
I used the above diagram to set up the flex sensor, motor, and Arduino, which can be found on the link below to the Sparkfun site. I didn't take a picture of the soldered board, but can add one later if anyone wants to see it. I basically had a small piece of circuit board that secured everything to. The only difference between the final product and the breadboard which you see here, was that I added about a foot of wire from the connections on the flex sensor to the board. This let the sensor hang at my shoulder so I could move it easier than reaching up into the headdress.
Here as the sites I used to go over the set and coding aspects of the project.
https://learn.sparkfun.com/tutorials/sik-experimen...
https://circuitdigest.com/microcontroller-projects...
Arduino Code (not my own)
*I did change the ranges of the flex sensor and motor position to fit what I needed it to do*
servoposition = map(flexposition, 180, 200, 0, 180);
servoposition = constrain(servoposition, 0, 110);
// Now we'll command the servo to move to that position:
servo1.write(servoposition);
// Because every flex sensor has a slightly different resistance, // the 600-900 range may not exactly cover the flex sensor's // output. To help tune our program, we'll use the serial port to // print out our values to the serial monitor window:
Serial.print("sensor: "); Serial.print(flexposition); Serial.print(" servo: "); Serial.println(servoposition);
// Note that all of the above lines are "print" except for the // last line which is "println". This puts everything on the // same line, then sends a final carriage return to move to // the next line.
// After you upload the sketch, turn on the serial monitor // (the magnifying-glass icon to the right of the icon bar). // You'll be able to see the sensor values. Bend the flex sensor // and note its minimum and maximum values. If you replace the // 600 and 900 in the map() function above, you'll exactly match // the flex sensor's range with the servo's range.
delay(20); // wait 20ms between servo updates }
Step 5: Making the Moving Wings
1: Line up the wooden skewers and get them cut/arranged in the way you want the feathers to fall.
2: Use hot glue to attach a strip of feathers to each skewer.
3: I covered the first skewer with tape/felt to hide the wood and make it blend in.
4: Reinforce the base of the feathers using a Popsicle stick. I covered mine in black electrical tape again to make it blend in. I also used hot glue to attach this as well.
5: Use large feathers to cover skewers. I had a few left over so I added some to the front as well.
*Keep in mind you can get as creative as you want here, and get crazy with it. Just remember you will need to think of the weight of your materials versus what the motors can move, which is why I used feathers and wooden skewers.*
Step 6: Attaching the Wings N' Things
I didn't take actual pictures, but if anyone wants more detail, let me know and I can add this later! I did put little drawings to better explain how I attached everything.
With the flex sensor, I wrapped the hanging 2 wires in black electrical tape to make it look nice and keep it together, then added some leaves and flowers around the bottom near the sensor to make it look pretty. In hind-sight, I would make the wires extend even further so it could go down my arm and to my hand, making it easier to bend.
With the whole frame being wire and fairly easy to access through the feathers, attaching things is really simple. I just moved them around until I found a nice spot to hide them, then used the soft jewelry wire to secure it to the base. The Arduino, battery, and motors were outside of the headdress, while the board that connected everything was inside. I left the board loose so I could move it around to a comfortable position inside the headdress.
Since I am still a newb in the Arduino world, I just used the same code to control both motors instead of programming them separately. This created a problem because for them to move back and forth in the same way, one needed to go the in reverse. To fix this, I attached one of the wings to the servo 'arm' while securing the 'motor' to the headdress, and attached the other wing to the 'motor', securing the arm to the headdress. To do this, I made an 'L' shape structure with Popsicle sticks, attaching the servo 'arm' to the structure which allowed it to stay still while the 'motor' part moved back and forth. I put wire on the end of the Popsicle sticks and attached them to the headdress, so basically the 'L' is the only thing touching the headdress and the motor itself is just kind of next to the headdress with the arm attached to the L structure.
Keep in mind that on the servo that attaches the motor to the headdress, you will need to put the wings on the side of the arm, not the top. This way the wings move in the same direction on both sides.
I attached the wings to the motor and the motors to the headdress using a mix of hot glue, soft wire, and electric tape.
Step 7: IT BE DONE!!!!!
Here is the video of my first test after it was done!!!!
Keep in mind this was after I was finished the project at about 3am and had hot glue burns all over my hands. The jerky-ness you're seeing is due to me playing around with the amount of flex vs how the wings were moving. It is pretty smooth when you go from no bend in the sensor, to 100% bend. After many many hours, blood, sweat, and tears, IT WAS FINALLY DONE!