Flying Wings With 2 Servos

by SabinaStan in Circuits > Arduino

985 Views, 1 Favorites, 0 Comments

Flying Wings With 2 Servos

IMG_20200417_164337.jpg

I developed a passion for doves and I have an idea that is insisting to come to life. Part of it is the dove moving her wing, so here's how to make wings flapping with Arduino Uno and 2 Servos.

I have made the wings before, but now they move automatically.

Supplies

Arduino Uno
2 servos

You also need:

glue, wire/wood sticks, zip ties, a breadboard, jumper wires.

whatever you make the wings of, for me it's rope
Scissors

Build the Wing

IMG_20200417_160924.jpg
IMG_20200417_160948.jpg
IMG_20200417_160939.jpg
IMG_20200417_160959.jpg
IMG_20200416_162105.jpg
IMG_20200417_175252.jpg
IMG_20200416_180713.jpg
IMG_20200416_180732.jpg

Take two wood sticks of 0.5 cm diameter and 5 cm length and two pieces of wire of 8 cm length.
Roll one edge of each wire (around 2 cm) to one edge of each wood stick and add hot glue over it so it won't fall off.
I covered the remainder of the wire with rope for aesthetics.
Bend the wire so to create the feel of a wing in movement.
The other edge of the wood stick will be fixed to the servo with zip ties. Add hot glue over the ties or else they will fall off when it's moving. I got the idea for it from this instructable.
To see how I nett the rope for the wings see this video.
However you can use anything for the actual wing.
Put the servos back to back and tie them with zip ties.

The Circuit

IMG_20200416_191259.jpg
IMG_20200416_191308.jpg
It's pretty simple. Just two servos connected to an Arduino:
Gnd to Gnd
Vcc to 5V pin on Arduino
Out pin to pin 10/11 in Arduino

The Code

IMG_20200417_164319.jpg

It can have several versions depending on what you want to achieve.


What is common is that the servos need to move in opposite directions. To achieve this they need to be included in the same for function - when a servo's argument is pos the other servo's argument is 90 - pos , for exemple.


The most simple version raises the wings in 10 steps increments (for each run pos = pos + 10) and then it goes down directly to the initial position. It can go down slower or the same as it goes up, but I feel like there should be a difference as it is obviously more difficult to raise a wing then to let it back down. Feels natural.

#include < Servo.h >
Servo servoL;
Servo servoR;

void setup() {
servoL.attach(10);
servoR.attach(11);
}

void loop() {
for (int pos = 90; pos <= 150; pos=pos+10) {
servoR.write(pos);
servoL.write(180 - pos);
delay(500);
}
}

Enjoy!

videotogif_2020.04.17_16.48.06.gif
I will make the body of the bird too as it is part of a bigger project. I will share it when I figure it out. ☺️