Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

MechaRaptor controller

The MechaRaptor is a tandem flapping wing system built for my Ph.D. at the University of Liège. The goal of this setup is to conduct experimental analysis of the aerodynamics of tandem flapping wings and better understand the wake dynamics and how it impacts the lift and drag of the aft wing.

The system is actuated by two sets of brushless DC motors (BLDC), each controlled with an Engine Speed Controller (ESC). The ESCs are themselves controlled using an Arduino Uno. The Arduino acts as the brain of the whole system and is the main interface for piloting the setup and logging important metrics.

This repository contains the Arduino code and the wiring schematics for the electrical components of the setup.

Controller features

  • Manual (potentiometer) or automatic (serial) control of the BLDCs.
  • Both BLDCs run at the same speed (same flapping frequency on each module).
  • Phase difference manually set before the experiment by changing the initial position of the wings.

Note: A maximum rotation speed is imposed to the BLDC by the ESC. This value has been manually set for each ESC using the ESC's terminal (JETIBOX).

Usage

Before powering the Arduino, set the ON/OFF switch in the appropriate position:

  • ON: Serial mode (control using a PC)
  • OFF: Manual mode (control using the potentiometer)

Further switch changes during the Arduino runtime will not be accounted for.

Manual mode

In this mode, the potentiometer is used to control the motors. When it is turned at its maximum, the motors run at the maximum RPM allowed by the ESCs (typically 6000 RPM). Turn it all the way down to stop the motors.

Serial mode

In this mode, the Arduino is controlled through the serial port of a computer. If no computer is connected, nothing will happen.

When the serial connection is started, the console will prompt the user for the desired frequency and will use that value to control the motors. The potentiometer is completely bypassed.

To turn off the motor, send 0 to the console at any moment. This will first decrease the RPM to a moderate speed and then turn off completely the motor.

Data logging and visualization

Besides controlling the system, the Arduino also logs the input data and some measurements. The most important data are:

  • ESC input setting
  • Wing angles (for each wing)
  • PSU current and tension

These logged data are transmitted through the serial connection and saved on the computer that controls the Arduino for later analysis.

A json configuration file is provided in order to visualize the output stream in real time with serial-studio. This also allows the automatic logging and retention of all data in csv spreadsheets.

Bill of Materials

Device Reference Usage
BLDC Plettenberg Advance 30
(Discontinued by manufacturer)
Motor
ESC JETI SPIN 75 Pro Opto Motor controller
ESC Terminal JETIBOX Program ESC, motor telemetry
PSU Electroautomatik PSI 8080 - 60 T (1500W)
(Discontinued by manufacturer)
DC power supply
Controller board Arduino uno (Rev 3) Full setup control, data logging
Encoders Broadcom AEAT 6012 Flapping angle measurement
Potentiometer N/A Manual control of RPM
ON/OFF switch N/A Switch between Serial and Manual control
Resistors N/A Voltage divider, noise reduction
Current sensor Allegro SEN0098 PSU current logging

Schematics

To Do (January 2023)