New Products Flash Sale
Thread Tools
Old Jun 15, 2016, 12:56 AM
momo5400 is offline
Find More Posts by momo5400
Registered User
Joined Jan 2015
195 Posts
Help!
system of flapping wings

Hello,
I would like to make a flapping wing system for my angry birds with a servo but I can not find electronic scheme to make go back with variable speed. not to steal my angry birds, just to move the wing tips for visual and fun.
quelq'un have an idea, a sketch or a commercial connection to this system (my remote control does not has this feature (TGY i6)
momo5400 is offline Find More Posts by momo5400
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 19, 2016, 04:47 AM
Acetronics is offline
Find More Posts by Acetronics
"MAYONNAISE"
Acetronics's Avatar
Le Treport, France
Joined Jun 2004
1,504 Posts
Hi, Yves ( eh ... yesss ! )

that could be achieved through a little 8 pins Pic µP and a piece of PCB ...
size approaching that of a post stamp.

BUT ... that will need 2 good servos to safely withstand such a working scheme ...

say around 60 grams @ minimum for the package ...

you also might consider wing strenthening around the hinges/servos.

let's say a total of 100 grams to be true ....

still doable ??? ( thinking you have a very bad weigh/thrust ratio with your existing hardware .... )

Alain
Acetronics is offline Find More Posts by Acetronics
Reply With Quote
Old Jun 20, 2016, 01:49 AM
momo5400 is offline
Find More Posts by momo5400
Registered User
Joined Jan 2015
195 Posts
merci

Quote:
Originally Posted by Acetronics View Post
Hi, Yves ( eh ... yesss ! )

that could be achieved through a little 8 pins Pic µP and a piece of PCB ...
size approaching that of a post stamp.

BUT ... that will need 2 good servos to safely withstand such a working scheme ...

say around 60 grams @ minimum for the package ...

you also might consider wing strenthening around the hinges/servos.

let's say a total of 100 grams to be true ....

still doable ??? ( thinking you have a very bad weigh/thrust ratio with your existing hardware .... )

Alain
bonjour Alain,

oui c'est jouable (j'ai changé l'hélice par une GWS 8045 et ça vole pas mal maintenant). ou est ce que je pourrai trouver ce pic programmé car je n'ai pas le matos pour (depuis que je fait de l'aéromodélisme je n'ai garder que le strict minimum de mon matériel électronique car les zincs ça prend de la place)

merci pour ta réponse

Yves

Hello Alain,

yes it is playable (I changed the propeller by GWS 8045 and it flies a lot now). or is it that I can find this programmed PIC because I do not have the gear for (since I made model airplanes I keep only the bare minimum of my electronic equipment for aircraft that takes up space)

Thank you for your answer
momo5400 is offline Find More Posts by momo5400
Reply With Quote
Old Jun 20, 2016, 07:25 PM
Ron van Sommeren is offline
Find More Posts by Ron van Sommeren
homo ludens modellisticus
Ron van Sommeren's Avatar
Netherlands, GE, Nijmegen
Joined Feb 2001
13,711 Posts
Standard RC controller, motor (, gear reduction) plus an excentric mechanism?

Vriendelijke groeten Ron
Ron van Sommeren is offline Find More Posts by Ron van Sommeren
Reply With Quote
Old Jun 20, 2016, 07:38 PM
coriolan is online now
Find More Posts by coriolan
"Unnecessary Necessity"
coriolan's Avatar
Canada
Joined Sep 2006
7,304 Posts
Some inspiration here Yves:
http://www.rcgroups.com/forums/showthread.php?t=1911073
Servo-Flap Ornithopter (2 min 1 sec)
coriolan is online now Find More Posts by coriolan
Reply With Quote
Old Jun 22, 2016, 03:58 AM
momo5400 is offline
Find More Posts by momo5400
Registered User
Joined Jan 2015
195 Posts
system with 12F675

Hello,
I think to mount a base PIC 12F675 and a single servo swash (waiting to make the assembly from the PIC TTiny475 whose oscillation speed is controlled by the remote control). installation will be controlled by an auxiliary channel and a switch mounted on this path, the speed of oscillation of the wings will be adjusted with a potentiometer on the map before flight
Following the next post
momo5400 is offline Find More Posts by momo5400
Reply With Quote
Old Jun 22, 2016, 04:47 AM
hmeijdam is offline
Find More Posts by hmeijdam
Registered User
hmeijdam's Avatar
Netherlands, GE, Barneveld
Joined Mar 2010
46 Posts
Last year I created a "flapping wings" module for one of the members of the Dutch RCGroups equivalent.

It reads the servo signal from your RC receiver and translates the servo position in the flapping speed of the wings. This video demonstrates it, when I connect a servo tester. It always starts and stops in the center position.
Variable speed (PWM servo signal driven) 180 degrees wiper (0 min 33 sec)


It is based on an Attiny85 microprocessor and a resistor/capacitor filter to clean up the power to the Attiny85. It might work with just the attiny85 and no other components, but usually it is better to add the power filter. So for all my Attiny85 RC projects I created below universal Attiny85 breakout board that has the power filter implemented.
In this case only 2 of the 5 connections would be used.



The code for the "flapping wings" module (a.k.a. servo wiper) is below.

Code:
/*
ATTiny85 PWM directed servo wiper.
Code by Hans Meijdam, February 2015.
Servo wipes between 0 and 180 degrees at a variable speed, directed by PWM input.
Servo connected to Pin 1  (=physical pin 6)
and servo input to Pin 3 (=physical pin 2)

                  ATtiny25/45/85
                      +-\/-+
              RESET  1|    |8  VCC
               3/A3  2|    |7  2/A1
               4/A2  3|    |6  1
                GND  4|    |5  0
                      +----+
*/
int pos = 0;
int input = 3; //Input pin 3 (physical pin 2)
long ch1;      // servo input channel value
long wait;     // one degree pause value in microseconds

#include <TinyServo.h>
const byte SERVOS = 1; // how many servos do you have? up to 5 on ATTiny85 and 8 on ATtiny84/2313
const byte servoPin[SERVOS] = {1}; // what pins are your servos on?
// you have the option to give your servos nice names. 0 refers to the first servo pin above, 1 to the second, etc
#define SERVO1 0

void setup(){
pinMode(input,INPUT_PULLUP);
setupServos();
}

void loop(){
ch1 = pulseIn(input, HIGH, 25000); // Read the pulse width of servo signal connected to input pin
wait = map(ch1,2000,1000,2000,9000); // map servo signal to reversed range of 2000-8000 microseconds

if (wait < 8000) { // acts as off switch beyond 8000
  for(pos = 90; pos < 180; pos += 1)  // goes from 90 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    moveServo(SERVO1, pos);
    delayMicroseconds(wait);                       // waits for the servo to reach the position 
  } 
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    moveServo(SERVO1, pos);
    delayMicroseconds(wait);                       // waits for the servo to reach the position 
  } 
  for(pos = 1; pos < 90; pos += 1)  // goes from 0 degrees to 90 degrees 
  {                                  // in steps of 1 degree 
    moveServo(SERVO1, pos);
    delayMicroseconds(wait);                       // waits for the servo to reach the position 
  } 
}
else moveServo(SERVO1, 90);
}
(Today I would not use PulseIn anymore for the input reading, but a non blocking servo library)


The final result of the Angry Bird with the module is here.
Vleugel test Angry Bird (0 min 29 sec)


If you need the module, completely built or as DIY kit, send me a PM.

Hans
hmeijdam is offline Find More Posts by hmeijdam
Reply With Quote
Old Jun 22, 2016, 01:00 PM
phil_g is offline
Find More Posts by phil_g
Who let the dogs out?
phil_g's Avatar
Pontefract, Yorkshire, UK
Joined Jul 2007
1,548 Posts
Quote:
Originally Posted by hmeijdam View Post
The code for the "flapping wings" module (a.k.a. servo wiper) is below.
At the fastest speed, you're sending a pulse to the servo every 2ms, that is far too frequent for an analogue servo, every 20ms being typical
phil_g is offline Find More Posts by phil_g
Reply With Quote
Old Jun 22, 2016, 03:37 PM
hmeijdam is offline
Find More Posts by hmeijdam
Registered User
hmeijdam's Avatar
Netherlands, GE, Barneveld
Joined Mar 2010
46 Posts
Quote:
Originally Posted by phil_g View Post
At the fastest speed, you're sending a pulse to the servo every 2ms, that is far too frequent for an analogue servo, every 20ms being typical
That is a good point. I have a logic analyzer now, so I will have a look at that first and probably move it to a non blocking RC library (written by rcnavy).
hmeijdam is offline Find More Posts by hmeijdam
Reply With Quote
Old Jun 23, 2016, 10:13 AM
hmeijdam is offline
Find More Posts by hmeijdam
Registered User
hmeijdam's Avatar
Netherlands, GE, Barneveld
Joined Mar 2010
46 Posts
If I hookup the sketch to the logic analyzer at the highest flapping speed the servo pulses still get generated only every 20ms. So I looked in the source code of the Tinyservo library and observe that it takes care of the pulsetiming via interrupts.



I reconfirmed this with a test where I call the servopositioning only ten times a second, but the pulses keep coming out with the same dutycycle at every 20ms.
hmeijdam is offline Find More Posts by hmeijdam
Reply With Quote
Old Jun 23, 2016, 11:31 AM
hmeijdam is offline
Find More Posts by hmeijdam
Registered User
hmeijdam's Avatar
Netherlands, GE, Barneveld
Joined Mar 2010
46 Posts
One Flappy Bird module is ready to fly to France.
I used angular pins to make the footprint of the module as small as I could.
The dimensions are 22x20x10mm and weighs 3,3 grams



The bottom row is the servo signal input from the RC Receiver. It directs on/off and flapping speed.
The middle row is the flapping wing output to the flapping servo.
The top row is a reversed flapping wing output to an optional second flapping servo.
So if you have two separate flapping servo's, one for each wing, the module can support that as well.

The module requires an ESC with a decent BEC that provides 5Volt. Attiny85 will brown out below 4,3 Volt, so connecting the module to an old NIMH pack will give just a jittering servo, despite the filter.

The code with the second servo channel implemented is below.

Code:
/*
 ATTiny85 PWM directed servo wiper.
 V1 Code by Hans Meijdam, initial, February 2015.
 V2 Code by Hans Meijdam, changed pinout to support PCB, added 2nd reversed channel, June 2016.
 Servo wipes between 0 and 180 degrees at a variable speed, directed by PWM input.
 Servo connected to Pin 1  (=physical pin 6)
 and servo input to Pin 3 (=physical pin 2)
 
     ATtiny25/45/85
         +-\/-+
 RESET  1|    |8  VCC
  3/A3  2|    |7  2/A1
  4/A2  3|    |6  1
   GND  4|    |5  0
         +----+
 */
int pos = 0;
int input = 0; //Input pin 0 (physical pin 5)
long ch1;      // servo input channel value
long wait;     // one degree pause value in microseconds

#include <TinyServo.h> // This library takes care of the 20ms servo pulse timing via interrupts.
const byte SERVOS = 2; // how many servos do you have? up to 5 on ATTiny85 and 8 on ATtiny84/2313
const byte servoPin[SERVOS] = {3,4}; // what pins are your servos on?
// you have the option to give your servos nice names. 0 refers to the first servo pin above, 1 to the second, etc
#define SERVO1 0
#define SERVO2 1

void setup(){
  pinMode(input,INPUT_PULLUP);
  setupServos();
}

void loop(){
  ch1 = pulseIn(input, HIGH, 25000); // Read the pulse width of servo signal connected to input pin
  wait = map(ch1,2000,1000,2000,9000); // map servo signal to reversed range of 2000-8000 microseconds

  if (wait < 8000) { // acts as off switch beyond 8000
    for(pos = 90; pos < 180; pos += 1)  // goes from 90 degrees to 180 degrees 
    {                                  // in steps of 1 degree 
      moveServo(SERVO1, pos);
      moveServo(SERVO2, (180-pos));
      delayMicroseconds(wait);                       // waits for the servo to reach the position 
    } 
    for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees 
    {                                
      moveServo(SERVO1, pos);
      moveServo(SERVO2, (180-pos));
      delayMicroseconds(wait);                       // waits 15ms for the servo to reach the position 
    } 
    for(pos = 1; pos < 90; pos += 1)  // goes from 0 degrees to 180 degrees 
    {                                  // in steps of 1 degree 
      moveServo(SERVO1, pos);
      moveServo(SERVO2, (180-pos));
      delayMicroseconds(wait);                       // waits 15ms for the servo to reach the position 
    } 
  }
  else {
    moveServo(SERVO1, 90);
    moveServo(SERVO2, 90);
  }
}
hmeijdam is offline Find More Posts by hmeijdam
Last edited by hmeijdam; Jun 23, 2016 at 11:33 AM. Reason: Typo
Reply With Quote
Old Jul 07, 2016, 01:35 PM
momo5400 is offline
Find More Posts by momo5400
Registered User
Joined Jan 2015
195 Posts
Quote:
Originally Posted by hmeijdam View Post
One Flappy Bird module is ready to fly to France
[/CODE]
the module work very well. look at my yellow angry birds

angry birds flapping wing /mon angry birds bat des ailes (2 min 38 sec)
momo5400 is offline Find More Posts by momo5400
Reply With Quote
Old Jul 08, 2016, 08:57 AM
hmeijdam is offline
Find More Posts by hmeijdam
Registered User
hmeijdam's Avatar
Netherlands, GE, Barneveld
Joined Mar 2010
46 Posts
Nice work and glad the module does it's job for you.
hmeijdam is offline Find More Posts by hmeijdam
Reply With Quote


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Flaps and wing section. bogbeagle Modeling Science 14 Mar 27, 2016 12:25 PM
Discussion Installing flaps at the mid part of the wing DYORD Fuel Warbirds 5 Jan 26, 2016 11:50 AM
Cool Bi-directional flap system tommytow Control Line 4 Jan 17, 2016 08:40 PM
Sold JART-LT. Molded wings with flaps. agarchitect Aircraft - Sailplanes (FS/W) 3 Oct 05, 2015 02:10 PM