-
Thomas Lambert authoredThomas Lambert authored
MechaRaptor controller
The MechaRaptor is a tandem flapping wing system built at the University of Liège during my Ph.D. thesis. The goal of this model is to conduct experimental analysis of the aerodynamics of tandem flapping wings.
The system is actuated by two sets of Brushless DC motors (BLDC), each powered by an Engine Speed Controller (ESC) which is itself controlled through an Arduino Uno.
This repository contains the Arduino code and the wiring schematics for the electrical components of the controller.
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 in order to be saved on a separate laptop and analyzed later.
A json configuration file is provided in order to visualize the output stream in real time with serial-studio. This also allows the logging and retention of all data in csv spreadsheets for future analysis.
Bill of Materials
The system consists in two completely independent sets of wings, powered separately.
A single Arduino board is used to control the entire setup. Its role is to send the commands to the BLDC motors ESCs. It also logs the flapping angle of each wing, which is measured using absolute magnetic rotary encoders.
List of devices
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)