FPV Quadcopter Drone

Getting Started

This post has information that may be useful orienting yourself to quadcopter/drone building, or if otherwise exploring the dicussed topics. Another helpful resource is Oscae Liang's website which has many tutorials: https://oscarliang.com/

quadcopter

Flight Controllers

There are a number of considerations when choosing a flight controller:

  • Supported firmware. Examples include BetaFlight, iNav, and ArduPilot, among others. Different firmware provides different functionality such as waypoint navigation, performace optimization, and support for different sensors/protocols.

  • Connector style. Options include bare metal pads for soldering or JST quick connectors. Soldering can be a chore and take some practice, however plug-and-play setups may be bulkier, heavier, or otherwise impractical.

  • UART connections. These are dedicated connections that cannot share the same bus, as opposed to some other protocols like I2C. Therefore, the number of ports can be limiting. Generally, UART ports will be occupied by at least the ESC, FPV camera, transmitter, and GPS; thus four UART ports are occupied. Consider space for additional sensors, such as rangefinder/LiDAR and Optical Flow; these can enable low altitude position and altitude hold which is useful prior to GPS initation, in places with GPS interference, or while indoors. When looking at flight controller wiring layouts, these can be identified by the numbered transmit and recieve terminals (e.g., T1, R1, T2, R2, etc.) Of note, some firmware supports remapping of serial ports on the flight controller (e.g. BetaFlight).

  • Integrated sensors. Generally, these will include at minimum a gyroscope and barometer.

  • Aluminum Heatsink/Case. As of the time of writing, this seems to be a less common option. Cons to aluminum casing include added weight. Benefits include physical protection agaist water or other damage, heat disipation, and electromagnetic shielding.

Axis Argus F7 Pro. As of the time of this writing, this flight controller is available in two amperage ratings. It can be purchased as a "stack" with an electronic speed controller (ESC). The "Pro" model includes aluminum casing. Supports BetaFlight and iNav firmware. Quick connect plugs are JST SH 1.0mm.

  • Ingress Code: IP54
  • Input Voltage: 3-6S Lipo
  • BEC: 9V/2A, 5V/2A
  • UART ports: 4
  • Accelerometer: ICM42605
  • Barometer: SPL06
  • Gyro: BMI270

Position and Altitude Hold

Many with interest in FPV racing or freestyle flying will pursue proficiency flying in 'acro' mode. While this flight mode does apply PID control mechanisms, it is akin to a manual flying mode in that altitude and position are completely dependent on the pilots control of the drone. Other flight modes include altitude and position hold, which use sensor input to maintain their respective parameters.

GPS

Sensors used to control these parameters include a barometer and accelerometer, which are commonly integrated into flight controllers. A magnetomer and GPS complete functionality; an example is the Pyrodrone BN-880 Flight Control GPS Module w/ Compass (magnetometer HMC5883). Plenty of other options exist.

However, a common limitation to use of a GPS is signal reception and time-to-first-fix (TTFF). "Every GPS device requires orbital data about the satellites to calculate its position. The data rate of the satellite signal is only 50 bit/s, so downloading orbital information like ephemerides and the almanac directly from satellites typically takes a long time, and if the satellite signals are lost during the acquisition of this information, it is discarded and the standalone system has to start from scratch." (Source: Wikipedia).

Optical Flow and LiDAR

While indoors or without GPS fix, alternative sensors can be used to automatically maintain position/altitude. These include a LiDAR altimeter and optical flow sensor. The optical flow sensor registers changes in position by making comparisons between sequentially captured images beneath the drone. An example is the MTF-01P Optical Flow & Range Sensor. A magnetometer is still required for decent operation.

Firmware Considerations

As of writing, iNav supports optical flow sensors while BetaFlight does not. Ardupilot appears to support opical flow sensors. While BetaFlight supports relatively straightforward serial remapping through software (i.e. "soft serial"), iNav does not appear to. Flight controller firmware support is variable. All this to say, if you want to incorporate both Optical Flow and GPS sensors concurrently, you need to choose the appropriate combination of flight controller and firmware.

Airdrop Payload Release

Adding a servo release mechanism can expand drone functionality beyond photography, videography, and interactive first person flight. If limited by the number of UART ports, one approach is to repurpose the established beeper function. An AirTag is one idea for a beeper alternative, depending on the operating environment, since standard beeper implementation will be disrupted.

Approach

The drop servo & latch used here was purchased on amazon (this "Drone Thrower"). This servo is digital and controlled via a PWM signal (check out hobby servo tutorial). The beeper terminal on flight controllers generally emits a square wave signal, cycling the beeper on and off. A microcontroller can be programmed to receive this square wave and output an appropriate PWM signal to control the servo. Here, we use an Arduino Nano Every microcontroller.

Arduino Microcontroller

Arduino microcontrollers run code termed a "sketch." The code is based on C++ and their file extension is .ino (as in ardino). There are many getting started resources on the arduino website. The Arduino integrated development environment (IDE) is used to debug, compile, and upload the to the board.

Below is an Arduino sketch that opens the air drop servo when the beeper is activated.

    		
/* 
This sketch opens the air drop servo when the beeper is activated and closes the servo when a full beeper cycle has passed without activation. 
*/

#include 

int beeperPin = D21;
int beeperValue;
bool beeperState = false;
int counter = 0;
servo myservo;
unsigned long previousMillis = 0;
const long interval = 250;  // set innterval for reading beeper pin

void setup() {
  serial.begin(9600);  //initialize serial communication between board and computer
  myservo.attach(20);  // set servo control pin
}

void loop() {
  unsigned long currentMillis = millis();

  // read beeper signal
  beeperValue = digitalRead(beeperPin);
  if (beeperValue = HIGH) {
    beeperState = true;
    counter = 0; // restarts counter of how long beeper is inactive
    }

  // count number of cycles passed
  if (currentMillis - previousMillis >= interval) {
    previousMillis = millis();
    counter = counter + 1;
  }

  // determine whether full beeper cycle has passed without activation
  if (counter >= 16) {
    beeperValue = false;
    counter = 0;
  }

  // set servo state
  if (beeperState = true) {
    myservo.writeMicroseconds(2500)
  } 
  else {
    myservo.writeMicroseconds(500)
  }
}
 	   		
    		

More to come in this section, which remains under development.

Troubleshooting Tips

  • GPS connection. Make sure that when connecting UART devices, Rx is connected to TX, and Tx is connected to Rx!

  • GPS, magnetometer, or other sensors aren't recognized while using firmware configuration software. The battery may need to be connected to power the sensors; USB connection alone is not adequate.

Resources

[manual] Flight Controller and ESC [Axis Argus F7 Pro Stack 65A].pdf

[manual] Quadcopter Frame [Lumenier QAV-S 2 JohnnyFPV Edition].pdf

[manual] Quadcopter Goggles [Avatar HD Goggles X].pdf

[manual] EdgeTx v7.10.pdf

[manual] Quadcopter Video Transmitter VTx [Avatar V2 Kit].pdf


Created 01/16/25 | Modified 03/06/25