|
1 | 1 | # ServoFlappingControl |
2 | 2 | This Arduino sketch is the servo controller for an RC ornithopter (Flapping MAV) powered and controlled by two servos. Each servo is connected to a wing and flapped independently. |
3 | 3 |
|
4 | | -The program is designed to receive 3 PWM inputs from an RC receiver operating in [MODE 2](https://www.rc-airplane-world.com/rc-transmitter-modes.html) and outputs 2 PWM signals for off-the-shelft hobby servos. The aileron (1) and elevator (2) channels are used to bias the dihedral angle of each wing, with the aileron rotating the wings in unison, while the elevator changes the dihedral angle. The throttle channel (3) control the amplitude of a fixed-frequency oscillation. |
| 4 | +The program is designed to receive 4 PWM inputs from an RC receiver operating in [MODE 2](https://www.rc-airplane-world.com/rc-transmitter-modes.html) and outputs 4 PWM signals for off-the-shelft hobby servos. Two servos control the wings and two servos control a V-tail. |
5 | 5 |
|
6 | | -There are 3 wave-forms the user can select: sine wave, triangle wave, and saw wave. The controller also is equipped with a low-voltage cutoff routine. This will dissable the throttle channel to prevent over-discharging a battery. The routine uses an analog-pin to read the input voltage via a voltage-divider. |
| 6 | +The aileron (1) and elevator (2) channels are used to modify the motion of the wings and to control the tail. The dihedral angle of the wings is altered in unison with elevator, while the aileron rotates them in opposite directions. Simultaneously, the frequency of the wing-oscillation can be modulated, such that the wings move faster during the downstroke or during the uptroke. Depending on whether this is done symmetrically or assymetrically, one can obtain pitch or roll control. At the same time, the throttle channel (3) control the amplitude of a fixed-frequency oscillation, while the rudder channel (4) assymetrically varies the amplitude of the wings. |
7 | 7 |
|
8 | | -The program was written for an Arduino Nano but it should be compatible with other boards. |
9 | | -It requires the [PinChageInterrupt](https://www.arduino.cc/reference/en/libraries/pinchangeinterrupt/) library. |
10 | | -For more information on the controller, please see this [RCgroups post](https://www.rcgroups.com/forums/showpost.php?p=41325203&postcount=69). |
| 8 | +The program was written for an Arduino Nano but it should be compatible with other boards. See the attached schematic for an example of the required circuit: |
11 | 9 |
|
12 | | -See the attached schematic for an example of the required circuit: |
| 10 | +<img src = "schematic.png" width = "80%"> |
13 | 11 |
|
14 | | -<img src = "ReceiverServoFlap_VoltCutoff.png" width = "80%"> |
15 | | - |
16 | | -This video shows what the controller and how it works: |
| 12 | +This video shows what the does controller and how it works: |
17 | 13 | [<img src="https://img.youtube.com/vi/T6NfZD_iuEs/maxresdefault.jpg" width="50%">](https://youtu.be/T6NfZD_iuEs) |
18 | | - |
19 | | -Lastly, here is an example of the kind of aircraft this code was writen for: |
20 | | - |
21 | | -<img src = "/example_pics/servo_body_res.jpg" width = "30%"></img> |
22 | | -<img src = "/example_pics/bottom_view_res.JPG" width = "30%"></img> |
23 | | -<img src = "/example_pics/side_view_res.JPG" width = "30%"></img> |
24 | | - |
25 | | -<img src = "/example_pics/flap_motion.gif" width = "30%"></img> |
26 | | -<img src = "/example_pics/roll_motion.gif" width = "30%"></img> |
27 | | -<img src = "/example_pics/pitch_motion.gif" width = "30%"></img> |
0 commit comments