• INAV 1.8: Automated landing for fixed wings

    It's official: next release of INAV (1.8 or maybe 1.7.2) will incorporate an automated landing procedure for fixed wings. I was already writing about it 2 weeks ago, but now new code has been merged back and will be released.

    Bear in mind, that this is not "state of the art" landing yet. It's rather a simple solution that can be used in emergency situations that will not crash an airplane, but rather put it on the ground without crashing. Procedure is quite simple:

    1. When Return-To-Home or Failsafe with RTH is engaged, go to Home position
    2. When Home is reached, start to loiter with defined radius and descend. Descent speed is limited to nav_landing_speed when altitude is above nav_land_slowdown_maxalt. When altitude is below nav_land_slowdown_maxalt, vertical speed is scaled down to one fourth of nav_landing_speed at nav_land_slowdown_minalt. So, on using default values, vertical speed is between 2m/s and 0.5m/s
    3. During descend, airplane is not allowed to raise throttle above nav_fw_cruise_thr when nose is up. This is to prevent airplane from gaining horizontal speed
    4. When nav_land_slowdown_minalt is reached, ROLL axis is locked to 0 degrees, PITCH axis is locked to nav_fw_land_dive_angle (default is 2 degrees) and motor is stopped when MOTOR_STOP is used or put to IDLE when MOTOR_STOP is not used. This puts airplane into a shallow dive to the ground

    fixed wing landing in inav

    That is all. Airplane should glide last few meters to the ground. Most designs should be able to do it without a problem. My testing platform did it like that:

    Since there is no auto-disarm procedure yet, MOTOR_STOP is recommended to prevent propeller from breaking and motors/ESC from burning.

    Read more...
  • FS1000A and XY-MK-5V, Arduino and VirtualWire

    While FS1000A and XY-MK-5V 433MHz radio modules might not be the best choice in terms of quality, or reliability or distance (although few hundred meters in open space are doable), they have one very important trait: they are extremely easy to use. No complicated wiring, no advanced programming. If you want to send some data, just connect data lines, supply voltage and write few lines of code. Super simple!

    In the example below, we will be sending a single 8bit number over FS1000A->XY-MK-5V line with a help of VirtualWire library.

    Please remember, without antennas and in the radio-noise rich environment, the range might be limited. Very, very limited. Even to just a few centimeters. So keep that in mind!

    Transmitter

    FS1000A transmitter Arduino

    Receiver

    XY-MK-5V receiver Arduino

    Read more...
  • FS1000A and XY-MK-5V range test

    Very often, where you go cheap, there is a price to pay. Exactly like with cheap 433MHz transmitter-receiver pair of FS1000A and XY-MK-5V. You rather do not expect much for $1, right?

    When playing with them in a middle of a big city (Berlin), few meters of the range was all those modules were able to archive. Too many interferences from other devices. But what about open space in a middle of nowhere? I've decided to test that, and this is what I came up with:

    If the video was too long: 315m apart, no direct line of sight between transmitter and receiver and still stable data flow! It would be more, but nature was against me and I just was not able to go further. I did not expect that much range from those two...On the one side, 315m for super cheap FS1000A and XY-MK-5V is a reasonable range. On the other, it's pretty close, right?

    Read more...
  • INAV can do automated landing on fixed wing?

    Those of you how subscribed to my YouTube channel should have noticed, that I got an interest in automated landing of fixed wings after RTH in INAV. And the sad truth was that, well, INAV up to 1.7 was unable to do it right. When landing after RTH was enabled (nav_rth_allow_landing = ON) and it was enabled by default, airplane usually started a 20 degrees dive to the ground. One does not has to be a prophet to figure out how it ended.

    For example like this:

    If not manual override, that would end up in a beautiful crash and probable full rebuild of an airplane.

    Luckily, that motivated DigitalEntity enough to something about that, and yesterday I was able to perform (probably the first one ever) a controlled descend after RTH that ended up with an airplane on the ground without any damage. With enough optimism one can call it even a landing. This is how it looked like:

    Current implementation is still far from perfect. Although it does not crash, it has a few small problems:

    • No disarm. Throttle is open all the time
    • It happily ignores speed. Both ground and airspeed
    • It also ignores wind, heading and so on

    But, to be honest, this is a nice progress. Stay tuned for more changes here, since I'm planning to work on it in the near future.

    Read more...
  • FS1000A and XY-MK-5V 433MHz RF modules: overview

    One of the cheapest (but not the best) solutions for DIY wireless data transmission between different devices (Arduino and other microcontrollers) is a pair of 433MHz modules: FS1000A and XY-MK-5V. A set of them (you will need one transmitter and one receiver) costs about $1. Pretty cheap, right?

    FS1000A and XY-MK-5V 433MHz RF modules

    Of course, there is a price to pay. Those modules are as simple as possible. They do not offer anything like error correction, RSSI, frequency hopping, or even two-directional transmission. They offer only basic functionality: receiver reports digital ONE when the transmitter detects ONE on the input (if in range, of course). Everything above that has to be done in the software. Read more...

  • AnyFC F7 output mapping for INAV

    AnyFC F7 when running INAV, is not using standard output mapping. That means, that M1 output is not where you should connect Motor 1 and M2 is not where Motor 2 should be connected. It's a little complicated, but with following table it should be pretty easy to connect any possible configuration to AnyFC F7 and INAV.

    Multirotors

    Output number No LED Strip With LED Strip
    1 Motor 4 Motor 4
    2 Motor 5 LED Strip
    3 Motor 6 Motor 5
    4 Motor 7 Motor 6
    5 Motor 3 Motor 3
    6 Motor 2 Motor 2
    7 Motor 8 -
    8 - Motor 7
    9 - Motor 8
    10 Motor 1 Motor 1
    Input Function
    1 PPM
    2 -
    3 Servo 1
    4 Servo 2
    5 Servo 3
    6 Servo 4

    Airplanes

    Output number Function
    1 Motor 1
    2 Motor 2
    3 Servo 4
    4 Servo 5
    5 Servo 3
    6 Servo 2
    7 Servo 6
    8 Servo 7
    9 Servo 8
    10 Servo 1
    Read more...
  • Using FET transistors as switches

    When over a year ago I published this post about using transistors as switches, I described only how to do it with bipolar transistors. And bipolar (NPN and PNP) transistors have a small problem: they are current driven, so they consume current when they are switched on. They consume much less than they drive, but still...

    Field Effect Transistors (FET), and especially the ones from MOSFET family, work in a slightly different way. Instead being current driven, they are voltage driven. Than means, to conduct between Source and Drain terminals, specific voltage has to be applied to Gate terminal. More than that, FET transistor consumes current only during switching. It works kind of like a capacitor. When Gate is charged, it stops conducting electricity.

    And that, in case of low voltages and low currents (3.3V - 5V logic level and few hundred miliamps), removes the requirement of Gate resistor. Small MOSFETs like 2N7000, BS250 and other, can be directly connected to microcontroller outputs. Cool!

    Switch with N-channel MOSFET

    N-channel MOSFET is ON when positive voltage (comparing to Source) is applied to Gate. So, Load will be powered when HIGH state is applied.

    N-channel MOSFET as switch

    Switch with P-channel MOSFET

    P-channel MOSFET is ON when negative voltage (comparing to Source) is applied to Gate. So, Load will be powered when LOW state is applied. It acts like an inverter.

    N-channel MOSFET as switch

    Gate resistor

    In case of bigger currents and voltages, gate resistor might be required since FET gate acts like a capacitor and passes electricity until charged. Consult transistor data sheet.

    Read more...
  • Scarab Knife 200 finally in the air

    It took me much more time to put my Scarab Knife 200 4" from CarbonBird.com into the air and actually fly it. First try that happened 2 weeks ago failed due to beginner mistake: too long motor screw caused one of the motors to overheat. I had to order shorter M2 screws and redo some other things: add 1000uF 36V low-ESR capacitor to power rail, relocate VTX and X4RSB RX. Nothing super fancy. Final effect looks like this:

    Scarab Knife 200 racing quad

    Scarab Knife 200 racing quad

    Scarab Knife 200 racing quad

    There are a few problems that I hope proper tuning will solve. One of them, is strange wobble, or low frequency oscillation, on full throttle. I'm not sure what is the source of it. It might be from quite soft props. I will try replacing stock HQProp 4x4.5" with DAL T4045. But second problem is that probably 4" props do not match my flying style. Those small props just do not gip so much air as 5-inchers and do not keep flying path as good as I'm used to. I had similar feelings when testing JJPro P175, so that might be the case.

    Next tries in 2 weeks...

    Read more...
  • AnyFC F7 Pinout

    There is still very little about AnyFC F7 on the internet. Especially pinout is kept secret. Without sambas official GitHub repository for hardware projects, there would be nothing at all. I've decided to close that gap a little and prepared full pinout for AnyFCF7.

    AnyFC F7 Pinout - Top Side

    AnyFC F7 Pinout - Bottom Side

    Yes, I know they are hand drawn and scanned, but I have a strong aversion for computer graphics software. I can move a slider left and right, but every time I have to do some creative photoshopping, my head starts to hurt. This is extremely ironic, since my major at university was computer graphics. Heh...

    Read more...
  • FrSky SmartPort Telemetry on AnyFC F7

    STM32F7 CPU family present in newest, experimental, flight controllers like AnyFC F7 (as well as upcoming AnyFC M7 with smaller STM32F722) simplifies many things. For example, comparing to F4 boards, SmartPort or S.Bus connection is extremely simple and can be done on any free UART. No more hardware hacks, external inverters and other "special" ways of doing things.

    It's super simple again, and here is how to do it in Betaflight (Cleanflight 2.x) and INAV

    Hardware

    The only required hardware is a cable to connect SmartPort enabled receiver with free UART port on F7 board. This will work on X8R, X6R, X4R, X4RSB, XSR and any other. The trick is to connect S.Port pin with UART TX pin only.

    How to connect F7 flight controller to SmartPort

    Read more...

Paweł Spychalski

I'm Paweł Spychalski and I do things. Mainly software development, FPV drones and amateur cinematography. Here are my YouTube channels: