x2.1 with right angle connectors
I chose the mRobotics x2.1 (Rev 2) autopilot for my FOHDY FPV wing primarily because when I reviewed the schematic diagram I was most impressed with the good electronics design and the attention that had been paid to fault tolerance. There are separate 3.3V regulators for the two CPUs and the external Spektrum satellite receiver, as well as an ideal diode and an overload protected power distribution switch for the 5V line so that a single short circuit won’t cut power to the entire board. Since it’s based on the PixHawk architecture there’s even a separate IO processor that will allow pass-through control if the main CPU fails. So I ordered an x2.1 along with an ACSP7 power module with Hall effect current sensor, an M8N GPS with dual compass, and a GPS case to complete the installation.
Now that I’ve had a chance to install, configure and fly quite a bit with the x2.1 (including some medium range flights), here is my review.
Customer Service
I found mRobotics a great company to deal with. I received almost immediate and very knowledgeable responses to my queries, my order was shipped promptly by FEDEX and arrived in South Africa exactly a week later, which is exceptionally fast. There was one minor problem with the order – the wrong version of the GPS case was shipped, which didn’t have an opening cut for the USB connector. This took me all of 30 seconds to resolve with a file, but when I informed mRobotics they immediately sent me the correct case, even though I had said not to worry as I was quite happy with the case I had modified. No “please send photographs and video” or “cut hole with craft knife” or “will you accept a $1 store credit” – just “really sorry, our mistake, the replacement is on its way”. This level of customer service is certainly a big step up from the industry norm.
Build Quality
The first thing I did was to have a good look at the PCB and soldering of the x2.1 using a magnifier, and I’m pleased to report that it all looked properly laid out and well built. The only caution I have regarding the PCB layout is that there are a few 0402 SMD capacitors on the top surface of the PCB where the 0.1″ grid header connectors go. If you are using the supplied header pins (straight or right angle) this is not a problem, as the capacitors will be protected by the pins. If you solder wires directly to the board then you need to ensure that these capacitors aren’t subjected to mechanical stress, either when connecting the wires or during normal use.
The GPS is equally well constructed, with top notch components including the U-Blox M8N GNSS module and an excellent Taoglas dual-band 5.4 dBi patch antenna. This should (and does) provide excellent performance for the size.
Documentation
The x2.1 documentation is excellent. There’s a graphical data sheet with the pin-outs of all connectors clearly labelled, and a wiki with configuration and operating instructions. There’s also a full circuit diagram which provides additional insight into the design and functionality, a mechanical drawing, and even a STEP file in case you want to generate a CAD model of your aircraft.
Installation
x2.1 and ACSP7 installed in the FOHDY electronics bay
The FOHDY is not a large aircraft and my installation had to be compact, as I installed the autopilot, power adaptor, ESC and video transmitter at the back of the electronics compartment, with a 5200 mAh 3S battery occupying the front of the compartment. In the picture above the x2.1 is at the bottom right of the electronics, with the USB extension cable connected to it.
The USB cable is terminated with a micro USB socket which can be mounted at an easily accessible location on the airframe for “plug and play” USB configuration or software updates. The other side of the USB cable is terminated with a JST-GH latching connector. I like these as they will prevent cables from vibrating loose, but can be disconnected with little force by depressing the latch release. However the USB connector is on the underside of the PCB, so it is upside down and the latch release is on the bottom! This wouldn’t matter in a larger build, where the USB extension cable would be permanently installed, but in the FOHDY there’s no room for this so I plug it in when I need to connect to the autopilot, and unplug it afterwards, and have to release the latch underneath the connector with a small screwdriver. All the other latching connectors are mounted on the top of the PCB so the latch releases are easily accessible.
I installed the x2.1 in a custom 3D printed case, which protects the PCB from dirt and damage. It also simplified installation, as I simply attached the case to the bottom of the electronics compartment with double-sided tape, which was much simpler than having to install standoffs for a miniquad-style stack. The GPS, USB and Telemetry connectors and the SD Card are all on one side of the PCB (facing forwards in the picture above) so they are all easily accessed when the flight battery is removed. There’s a CAN bus connector on the other side but I’m not using it. The ACSP7 is at the top right – I soldered the XT60 connector to it and covered the PCB and connector with protective heat-shrink.
There aren’t many fully functional autopilots that are small enough to fit into this space – a PixHawk would be gigantic in comparison – and yet the x2.1 has essentially the same functionality. An especially clever feature of the x2.1 design is the PCB shape, which has half-circle cutouts on the edges that allow it to be mounted in a standard flight controller stack with mounting holes in a 30.5mm square pattern, even though the x2.1 itself is only 31.5mm wide.
To further complicate matters, in my build the electronics bay opens on the bottom of the aircraft, so the autopilot is upside-down as well as sideways! Fortunately the ArduPlane software allows the orientation of the autopilot to be specified by AHRS_ORIENTATION. This makes it more flexible that the proprietary autopilots like the Pitlab autopilot or Eagle Tree Micro Vector, which require that the autopilot be installed in the standard orientation, which would not have fitted in my build.
My electronics compartment is quite low – only 25mm (1″) from the floor to the cover. I found that this isn’t sufficient height to install the x2.1 with vertical connectors, because it uses standard servo connectors for most of the connections and the back-shell of the these is quite long. There also wasn’t sufficient room to install the right-angle connectors (both straight and right-angle connectors were supplied) in the already cramped electronics compartment. So I left the header pins off and directly soldered the wires instead. This required some careful work, as the holes are quite small diameter, but I accomplished it without much difficulty (and inspected it carefully with a magnifier to ensure that none of the wire strands had escaped from the holes to pose a short-circuit risk). However I do recommend that you use the supplied header pins if possible, both because they will protect the SMD capacitors and because they will be easier to solder, as well as making it easier to maintain in future if required.
The “basic bundle” accessory set that can be ordered with the x2.1 includes all the cables needed for a typical installation, as well as a hardware safety switch that I mounted so the button protrudes above the upper surface of the wing, and a buzzer that I mounted on the back of the wing, just below the motor mount (not ideal – did I mention that space was tight?). The safety switch gives one the assurance that the prop can’t spin until it has been physically pressed, and also gives a visual indication of the powered and safety status of the aircraft.
GPS Installation (viewed from the bottom of the wing)
I installed the GPS in a pcoket that I cut into the wing. I left the top surface of the airfoil in place (it’s EPP which is quite transparent to RF) and covered the bottom with Coroplast before laminating the wing. Although I didn’t use them, it was great to see that the GPS cover has threaded metal inserts so it can be bolted to the platform if desired.
Configuration
The x2.1 is compatible with both the ArduPilot suite (including ArduPlane and ArduCopter) and PX4 software. I decided to use ArduPlane because it does everything I require and seems to be a more stable and perhaps more thoroughly tested code-base than PX4. Also, it has a setup wizard, which was attractive as I come from a Cleanflight and Betaflight background but know nothing about ArduPlane.
After spending several hours trying to set up ArduPlane using the wizard, I finally gave up. It makes too many undocumented assumptions about your build (including autopilot orientation), and only supports the older “offboard calibration” compass calibration method, which I couldn’t get to work. So I gave up on the wizard, and rather set the autopilot up manually, following the Setup for Plane guide in the ArduPilot docs. This is well written, concise, more flexible than the wizard and uses the more recent “onboard calibration” which I found much easier and faster (plus it actually worked). Admittedly some of the calculated calibration constants are high according to the documentation – I’m not sure why this is – but the compass gives accurate readings, and Return to Launch works well, so I’m not overly concerned.
As the final stage of the autopilot configuration, I set initial values of the PIDs according to the Configuration Values for Common Airframes section of the setup guide. Since the FOHDY is not listed, I used the values for the most similar aircraft, the Telink Torro 900mm flying wing. This turned out to be a mistake, as I experienced substantial oscillation in pitch (porpoising) in fly by wire mode on my maiden. I eventually tracked this down to the suggested PTCH2SRV_P value of 2.0; a value of 1.0 works much better for the FOHDY. I then ran Autotune which set PTCH2SRV_D to 0.084, but found this caused pitch ringing on a hand-launched takeoff (when there is a significant initial disturbance to the pitch), so I reduced this to 0.04 which solved the problem without appearing to adversely affect the flight characteristics.
Performance
Gratuitous pic of my FOHDY (the safety switch is barely visible behind the LRS receiver)
My main reason for installing an autopilot was to have Return to Launch capability in the event of an RC fail-safe. This requires good GPS tracking, and I’ve found the mRobotics GPS to be excellent. It rapidly acquires sufficient satellites for an initial position fix (typically in under a minute), which is by default required to arm ArduPlane, and then keeps on acquiring satellites through the flight, usually ending up with 15 or more. The HDOP (Horizontal Dilution of Precision) is typically under 1m. I’ve tested RTL on numerous occasions (I do it as a standard procedure at the end of most flights) and it’s always worked flawlessly, which gives me great confidence that it won’t let me down should I need it for real.
Other than RTL, I’ve found three benefits to having an autopilot.
- I launch in Fly by Wire A (FBW-A) mode, with the trim set (by a switch on my transmitter) for 10º pitch. This completely eliminates torque roll, and allows the aircraft to climb out hands-off, so I can get my goggles on once I’ve confirmed that the aircraft is established in the climb.
- CRUISE mode is great for longer flights. It maintains ground track (compensating for crosswinds when necessary), attitude and altitude. The altitude hold seems to work really well – within ±5m (16′) over a 10 minute period with a crosswind and some turbulence.
- The ArduPlane log is useful for evaluating aircraft performance – for example, seeing how much current is being drawn at different air speeds. These should be accurate thanks to the Hall Effect current sensor in ACSP7 – I checked the readings against my calibrated bench supply at various loads, and found that they agree within a couple of percent.
I’ll be honest, though, that except for takeoff and medium range flights I still use manual (pass-through) mode most of the time, since the FOHDY is a lovely aircraft to fly without requiring any autopilot intervention. But it’s reassuring to know that RTL is only a switch away should I need it.
I don’t currently have an OSD connected to the x2.1. I’m using the very basic OSD of the Foxeer Arrow Mini Pro FPV camera, which displays only my call-sign, the flight battery voltage and the elapsed flight time. Having flown a few medium range flights after being used to flying full scale aircraft, I sorely miss the altitude and compass heading displays but, as you can see in the picture above, there’s not really space for an additional OSD unit in the electronics compartment. Which brings me to my one suggestion for improvement: it would be really nice to have an OSD PCB that can be stacked on top of the x2.1 (or x2.2), preferably using mating inter-board connectors for the necessary power supply and control lines. I hope you’re listening, Jordi 😉
Conclusion
The x2.1 is a small, yet fully functional PixHawk compatible autopilot that can run ArduPilot or PX4 software. It’s properly engineered, solidly constructed and well documented. In conjunction with the mRobotics M8N GPS it provides a reliable Return to Home capability and everything from basic stabilization and logging to fully autonomous mission execution in a tiny footprint. And it comes from a company that’s a genuine pleasure to do business with. Highly recommended!