Blog posts

My midlife crisis

My new Evolve skateboard and I

They say every man goes through a midlife crisis. They used to be associated with flashy purchases like fast cars or motorbikes. But recently a new trend started to emerge. Generation X men coming into a mid-age increasingly choose carbon fibre bicycles over Porsches. This is in part because of the financial pressure - there has been no real wage growth over the last few decades, and at the same time, a larger proportion of the income needs to be allocated towards mortgage payments and other living expenses. Besides, men are chasing their youth, which is the essence of a midlife crisis, while Porsches are frowned upon as a sign of old age since only older men can afford them.

But every man is different. I honestly thought that my midlife crisis was behind me without any flashy manifestations. Well, I bought a red car ten years ago but it doesn’t count (sort of, right?). As for a bicycle, I have never been a bike person. I had a decent bicycle, but I barely rode it, and most of the time it was just idly sitting in my garage. Moreover, a geek should have a special kind of geeky midlife crisis, or otherwise, what’s the fun in it?

Read more →

Ghostbusters: Legacy

Sometimes I see dreams which are like movies: they are vivid, bright and clear. It doesn’t happen often, but whenever it does, I rush to write them down first thing in the morning before I forget them. Here is another one. I am not a writer. If anyone wants to take this and turn it into a work of art, be my guest. Just let me know. Here we go…

It’s been 27 years since the original Ghostbusters saved New York City from Vigo.

An organisation called The Legacy fights a new threat - humans possessed by ghosts. That combination makes those creatures extremely violent and dangerous. The technology developed by the Ghostbusters seems to have been lost: long gone are the proton blasters and high-tech traps. Members of The Legacy go into their battles armed with swords, crossbows and guns (Walking Dead - style).

A young member of The Legacy (male, 17-18 yo) is doing it very tough. He is not as strong as his older peers, and every encounter with the enemy leaves marks on him, both physically and emotionally. After yet another close call his fellow mate (a female, 25yo) advises him to check out the underground vaults of The Legacy’s headquarters. She hopes he can find something that can help him in a battle.

Our protagonist descends into the vault and among the piles of defunct old equipment buried there for decades he finds a Ghostbusters’ ghost trap. He retrieves the trap and decides to take it with him to the next mission.

During his next encounter, he places the trap but he is reluctant to activate it. After all, the trap was designed to work on ectoplasmic ghosts rather human-ghost hybrids. He finds himself pinned against the wall, and his comrade (male, 25-30yo) activates the trap to save him. Unfortunately, when the trap is used on a human tissue, it explodes, and the whole scene is turned into a bloody mess.

Disappointed and discouraged, our protagonist doesn’t know what he should do. He decides to locate Dr Egon Spengler and seek his advice. At the time, Spengler lives alone on the outskirts of the city. When our hero finds him, Egon is reluctant to admit him, but finally, succumbs when he finds out that he is from The Legacy.

Our hero asks Spengler what happened to the old Ghostbusters. It turns out that the Ghostbusters are still technically intact. Sometime after the New York battle with Vigo, the original members of Ghostbusters found themselves facing an ever-escalating threat from ghosts and other paranormal activity. The city they saved turned its back on them, and the Ghostbusters felt hopelessly outnumbered. In a hope to even a playing field, they agreed to a large corporation’s offer to acquire Ghostbusters. They hoped that the corporation will provide the support and resources they needed for their fight.

Unfortunately, the company soon discovered there was not much money in fighting ghosts. Instead, selling Ghostbusters merchandise made more sense to them. The funding was cut and the Ghostbusters team was disbanded. The former Ghostbusters HQ at an old fire department was turned into a tourist attraction, with ghosts slowly leaking from the high-tech vault. The iconic Ghostbusters wagon was sold to the city museum. The high-tech gadgets such as the proton blasters were seized by the corporation’s top secret military R&D department to develop new kinds of weapons based on them.

The disgruntled members of the original Ghostbusters withdrew themselves from the public scene. They stopped their fight but used their remaining money and influence to found a new organisation which would pick up where they left - The Legacy.

Our protagonist asks Egon for advice. He has an idea: to join the corporations R&D department to attempt to learn the ghost-fighting technology they develop, and they use that knowledge to help the Legacy. Egon replies that that may not be the worst idea.

Alien 560 Quadcopter Build - Part 3 - Transmitter setup

I wish I could tell you that setting up the transmitter was straightforward, but unfortunately, it wasn’t. I’ll do my best to describe what I did, although I’m not sure my process is 100% repeatable.

I have a Turnigy 9XR Pro transmitter with a FrSky JR module. It is a digital radio with lots of features: updateable firmware, model memory, custom sound files and so on.

The first thing I did was upgrading the firmware. That process is a bit different depending on whether you have a PC or Mac. Effectively it involves connecting the transmitter to the PC with a USB cable, firing up eepskye application, setting a few parameters and flashing a new firmware via the app. I found a useful cheatsheet for updating Turnigy 9XR firmware at Quadcopter Basics website. It is also worth to consult the official Turnigy 9XR Pro: Using the Eepskye Program manual.

All subsequent setup is performed on the transmitter itself via the series of the menus. Unfortunately, the structure of those menus changes depending on the firmware version. My version after the upgrade was V.3527-Mike. There’s a 9xr tutorials RCGroups forum thread to help you with the initial setup, besides John G provided a useful Turnigy 9XR APM Arducopter/Arduplane radio settings cheatsheet. Also don’t neglect to check the official 9XR Pro: First Steps with Ersky9x manual, but keep in mind that those may be outdated.

A long press on the left side 4-position switch gets you to the main menu.

9xr Pro Main menu

  • Go into Controls to change the channel order. Pixhawk requires the channels to be in AETR order: Aileron, Elevator, Throttle, Rudder. However, although that is a correct order for Mode 2 radio I have, the order may be different for Mode 1.

  • In Calibration section calibrate the radio’s controls.

  • Set current date and time in Date-Time section.

  • Exit returns you to the main screen.

A long press on the right side 4-position switch gets you to the main menu. Here you need to create a new entry for your model.

9xr Pro model select menu

Once you create a new model name, there are a few settings which need to be set up for it.

First of all, Enter Protocol section to set up your module and receiver options:

  • In my case, the protocol needs to be set to PXX which FrSky uses.
  • RxNum is 1 which is the number of the paired receiver in that model.
  • Type is D16 - the receiver is configured for 16 channels (check your receiver manual, for FrSky X8R I use it is a default configuration with no jumpers shortened.
  • Finally, pressing Bind puts the transmitter module into bind mode. Follow your receiver manual to bind the transmitter to the receiver. For X8R it involves just pressing a Bind button on the receiver once the transmitter is in bind mode.

Setting up flight modes

Pixhawk has quite a few flight modes. If you want to switch flight modes in-flight, a radio transmitter usually has a 3-way switch you can use (some radios have a 6-way switch). Turnigy 9XR has a 3-way switch, but I wanted to do something more advanced than just being able to choose between 3 modes. I got an idea from Mike Perillo’s blog post. My setup allows me to switch between 5 modes in the following way:

  • ELE D/R switch on the left is mapped to RTL (Return-to-Launch) mode. If it is turned on, it overrides all the other mode settings. It is an emergency feature aimed to return the aircraft to the launch site with a single switch flip.
  • AIL D/R switch on the right is mapped to Auto mode and overrides other mode settings except for RTL switch.
  • The 3-way switch is mapped to Stabilize, Alt Hold, and Loiter, but only if RTL or Auto are not enabled.

9xr Pro switches

The way I did that was with the combination of logical switches and mixer configuration. An important thing to understand is that the flight channels are mapped to the values on Channel 5 according to the configuration you define in Mission Planner or QGroundCtrl (more on that later). So all you need to do is to map different flight modes to values evenly spread across -100 … +100 range on channel 5. That involves a few steps:

Enter Model SetupL.Switches menu. Logical switches can have On and Off values just like real switches, but they are defined by logical formulas rather than positions of the handles on the transmitter. Set up logical switches like this:

9xr Pro logical switches menu

This effectively corresponds to the following formulas:

  • L1 = ELE OR AIL. Logical switch L1 is enabled if either ELE D/R or AIL D/R switch is on. In other words, if L1 is off when neither RTL nor Auto mode is engaged.

  • L2 = (NOT L1) AND ID-UP, L3 = (NOT L1) AND ID-CENTRE, L3 = (NOT L1) AND ID-DOWN. That means that L2 - L4 switches will only take effect if L1 is off, i.e. when neither RTL nor Auto mode is engaged. Logical switches L2 - L4 will be responsible for Stabilize, Alt Hold, and Loiter modes respectively depending on the position of the 3-wat switch (up, centre, or down).

  • L5 = (NOT ELE) AND AIL. Logical switch L5 is responsible for Auto mode and will only be enabled when ELE D/R switch is off and AIL D/R switch is on.

Next set up flight modes in Modes menu.

9xr Pro flight modes menu

You can see that Flight Mode 1 - Return is triggered by ELE D/R switch, while 4 other modes: Stabil, Alt Ho(ld), Loiter, and Auto are triggered by logical switches L2 to L5 respectively.

And finally, enter Mixer menu. These are probably the most complex settings in the entire transmitter, and I’m going to cover just enough of it to set up the flight modes the way we want.

9xr Pro mixer menu

You can see that channels 1 to 4 are mapped 100% to Aileron, Elevator, Throttle, Rudder (remember I told you about AERT channel order?), while channel 5 is different. It is configured to trigger the discrete values depending on the values of the switches we have previously set up. All the CH5 submixes are identical except for Offset and Switch values.

9xr Pro edit mix menu

  • 1st: has Weight: 33, Offset: -100, and Switch: ELE
  • 2nd: Weight: 33, Offset: -77, and Switch: L2
  • 3rd: Weight: 33, Offset: -50, and Switch: L3
  • 4th: Weight: 33, Offset: -20, and Switch: L4
  • 5rd: Weight: 33, Offset: 27, and Switch: L5

Submixes 2-5 have Replace multiplier. The above setup means that switches ELE, L2, L3, L4 and L5 are mapped to values -100, -77, -50, -20, 27 on channel 5 axis, which works nicely to switch between the first 5 channels configured in the ground station software (I’ll cover that later). I chose those values empirically by tweaking them until that worked.

That concludes the transmitter setup. Next, to the Pixhawk software setup and configuration.

To be continued…

Alien 560 Quadcopter Build - Part 2 - Assembly

Unlike a conventional helicopter, a multirotor aircraft contains very few moving parts: no gears, no swash plates, no contrarotating propellers. It only has motors directly driving propellers, and that’s it. So there was no complex mechanics to assemble. The frame was probably the most complicated bit. The Alien 560 frame consists of a couple of dozen carbon fibre plates which need to be screwed together by a hundred or so tiny screws.

The assembly instruction was not included in the kit, but it can be downloaded from here. In the end, it is not much complex than a large Meccano set. I found that placing a magnetic mat or tray under the frame during the assembly reduces the chances of losing those little screws. I also put a medium-strength thread lock on the screws which are prone to loosening from vibration, such as motor mounts. I held off attaching the upper deck (the frame’s lid) for now; that would wait till all the cables are in place.

The next step was to assemble the power system. The Pixhawk comes with a power module which sits between the battery and the rest of the electrical parts and provides power to the flight controller. A power distribution harness plugs into the other side of the power module and distributes the power to the 4 ESCs (electronic speed controllers). The Alien frame has compartments in the landing gear’s “legs” for mounting ESCs - that position provides optimal cooling during flight. Because the power harness’s wires were too short to reach the ESC bays, I had to make the extender leads out of 16AWG wires and bullet connectors. The ESCs then feed power to the motors positioned at the ends of the foldable “arms” (more extension power leads were necessary here). I insulated all the electrical connection points with shrink-wraps to avoid short circuits. The power fed to each motor can reach 10A, so you definitely don’t want that to happen.

quadcopter frame with assembled electrics

quadcopter frame with assembled electrics

That was it for the power circuits. The next step was to assemble the signal chains.

First, the receiver. I used an FRSky X8R receiver. It is a good idea to pair your receiver to the transmitter before installing it. The included FRSky manual describes the steps to do that, and there are plenty of videos on Youtube showing the process.

FRSky X8R receiver has two diversity antennas, and it chooses the one with the strongest signal during the operation. FRSky recommends putting the antennas apart at 90 degrees angle to each other. I made an antenna mount out of a piece of plastic, drilled the hole in the frame and mounted the antennas so that they pointed downwards. Then mounted the receiver on the lower deck attached by a piece of a double-sided sticky tape.

receiver mount on the bottom plate

I can’t stress enough that an utmost care must be taken while working with carbon fibre. Carbon fibre dust is extremely harmful. Therefore any drilling or sanding carbon fibre must be carried out in a well-ventilated area, and a respirator with N95 safety rating must be worn.{.text-danger}

There are multiple ways to plug a receiver into Pixhawk. The serial SBus interface both Pixhawk and FRSky support is the easiest option. It allows connecting the receiver to the flight controller via a single cable rather than one for each channel. This page describes how to make the connection.

The GPS receiver has to be mounted on the top of the aircraft away from any sources of interference such as battery and motors. And because Neo-M8N GPS module I used also had a compass in it, it had to be oriented the right way forward. The best way to mount a GPS module on a quadcopter is to lift it above the deck on a mast. But the Alien frame had an elevated GPS mount plate which I decided to use. By design, it would be sitting at the far back of the aircraft, like a scorpion’s tail, but because my GPS cable was short, I moved it closer to the centre and rotated 180 degrees.

The next step was to connect the GPS and the telemetry. And that was where Pixhawk Lite played a joke on me. The wiring of all the Pixhawk modules is spelt out in the Adrupilot Wiki. If you buy all the electronic components such as GSP, telemetry, and OSD in a package then connecting them together should be as easy as plugging the appropriate wires. But Pixhawk Lite’s designers committed a few mistakes when laying out the controller’s connectors. Therefore some of the signal leads had to be rewired. These are the bits which had to be changed (extracted from the rcgroups forum’s thread mentioned above and Banggood comments:

  • GPS Cable Changes Required: The 5V and GND wires are reversed. The RX and TX lines of the GPS are connected to the telemetry lines etc. So they need to be directly moved by two pins towards the new 5V line.

  • Telemetry Cable Changes Required: The 5V and GND wires are also reversed. The RX and TX also need to be swapped, but the lines stay in their current pins.

  • Although the wiring of the power connector is compatible with the included power module, the standard Pixhawk’s power module cannot be used because of the wiring changes.

After carefully rewiring the connectors I was finally able to plug the modules together.

I wanted to mount the telemetry transmitter with its antenna facing down for a better signal. But the problem was that telemetry antenna was huge compared to the rest of the components. Its size was dictated by the frequency is used, which was 915 Mhz - the frequency allowed in Australia. That made the antenna as large as a one of a Wi-Fi router. I decided to place the telemetry receiver at the back on the upper deck with its antenna strapped to one of the rear landing gear. That would keep it secure and out of reach of the spinning propellers. The antenna’s weight at the back will also counteract the weight of a camera in front should I decide to install one later.

telemetry antenna mounted at the back of the quadcopter

Pixhawk has an external reset button which I glued to the upper deck with a drop of hot glue.

The last thing to install was the flight controller itself. As prescribed by the Pixhawk’s designers, it should be mounted at the centre of an aircraft on an anti-vibration pad. High-frequency vibrations produced by spinning motors interfere with the Pixhawk’s built-in gyroscopes jeopardising the flight stability. There are many different ways to dampen the vibration. A genuine 3DR Pixhawk, for example, comes with a few pieces of a 3M double-sided foam. Also, copter builders through experimentation discovered a few more efficient ways. I decided to go with an anti-vibration mount consisting of two plates with rubber bushings in between which was similar to the highly recommended 3D printed mount. I fastened the dampening mount to the upper deck with a couple of screws and attached the Pixhawk Lite to it with a servo tape.

Now was the time to secure the top upper deck to the rest of the frame with the remaining screws from the frame kit and to plug all the signal cables into the flight controller: GPS, compass, telemetry, receiver and ESCs. The four ESCs are plugged into Pixhawk’s servo channels 1 - 4 strictly according to the aircraft’s configuration. An important note is that although Pixhawk servo connectors have +5V pin, Pixhawk doesn’t provide +5V power to the servo rail. Considering that in our build the Pixhawk is powered from its power module rather than a servo rail (that configuration is also possible), it makes sense to disconnect +5V (red) wire from the ESC connectors before plugging them in. That is because +5V from the power module may not have the exact same potential as +5V from the ESCs, and that can create a harmful voltage differential.

pixhawk mounted on the top plate

Finally, I had everything installed and plugged in. The next step would be to set up the software.

Alien 560 from the front

To be continued…

Alien 560 Quadcopter Build - Part 1 - Parts

When I was at school, I was an electronics geek. I was spending days in a library looking for schematics of AM radios and circuits of blinking lights and beeping sounds, and then long evenings in an electronics club trying to solder them together. Unfortunately, none of the stuff I built ever worked properly: radios received only static, lights blinked out of order, and beepers screaked. But most of all I was obsessed with remote control models.

I had a book about remote control models my dad gave to me. It was a 300-pages manual describing in details how to build a remote-controlled ship, a glider, and a car, complete with blueprints and full schematics and circuit designs of the transmitter and the receiver. It was all analogue like almost everything in the 80s, and the transmitter required some precisely machined metal parts for control handles. I drooled over that book for years but sadly I clearly understood that I had zero chances of assembling a radio and a working model.

Many years passed, but my yearning for remote control models remained. And finally, when I moved to Australia I decided that I had waited long enough. I bought my first hobby-grade remote controlled car, then another one, and before I knew I had a few.

Rack full of R/C cars

Those cars are a lot of fun to play with, and they are quite reliable. The oldest one I own is eight years old and still going strong. It had to repair it after some accidents, but it was nothing major.

About a year ago one of my friends talked me into attempting to assemble a quadcopter. He has built a few quad- and hexacopters himself and, as you can imagine, he knew quite a lot about them. The way he talked about copters sounded intriguing, and I’ ve got hooked up.

Rather than buying a ready to fly quadcopter off the shelf, I decided to build one myself from scratch to make it more interesting. With the help of my friend I have put together a list of the necessary components which looked like this:

CategoryItem
FrameHobbyKing® Alien 560 Folding Quad-Copter Carbon Fiber Version (Kit)
Flight Controller + GPS / Compass + OSD + TelemetryPixhawk PX4 2.4.6 32bit Flight Controller Led NEO-M8N GPS PPM OSD 3DR 915Mhz 433Mhz
Flight Controller Anti-vibration mountAnti-vibration-Plate-Pixhawk-APM-2-5-2-6-2-8-Shock-Absorber-RC-Flight-Control-WS
Motors (x4)Turnigy Multistar 4220-880Kv 16Pole Multi-Rotor Outrunner
ESC (x4)Afro ESC 30Amp Multi-rotor Motor Speed Controller (SimonK Firmware)
Propellers (x2)Quanum Carbon Fiber T-Style Propeller 11x5.5 (CW/CCW) (2pcs)
Propeller BalancerCarbon Fiber Propeller Balancer Maglev 4-axis Rack
Transmitter (w/o module)Turnigy 9XR PRO Radio Transmitter Mode 2 (without module)
Transmitter module & Receiver comboFrSky XJT 2.4Ghz Combo Pack for JR w/ Telemetry Module & X8R 8/16Ch S.BUS ACCST Telemetry Receiver
Transmitter BatteryTurnigy 9XR Safety Protected 11.1v (3s) 2200mAh 1.5C Transmitter Pack
BatteriesZIPPY Compact 5800mAh 3S 25C Lipo Pack
Battery StrapTurnigy Battery Strap 330mm
Power distribution harnessMultistar XT60 to 4 x 3.5mm with JST Plug Quadcopter Distribution Harness
Power wires (2m each color)Turnigy High Quality 16AWG Silicone Wire: red, blue, black
Power Connectors (x2)PolyMax 3.5mm Gold Connectors 10 PAIRS (20PC)
Servo Extension Leads15cm Servo Lead Extention (JR) 26AWG (10pcs/bag)
Servo Leads10CM Male to Male Servo Lead (JR) 26AWG (10pcs/set)
Heat ShrinksA bunch of various heat shrinks
Cable Ties75PCS Assorted heavy duty black nylon cable tie
Mounting TapeServo Tape (Clear) 25mm x 1m

I chose Alien 560 frame because my friend has already built a quadcopter based on it, so I hoped to leverage his experience. It is a carbon fiber frame allowing installation of up to 12’’ propellers. It also has foldable “arms” which are very convenient: it doesn’t take much storage space folded while unfolding it before a flight takes just a few seconds.

The choice of a flight controller was a key one. A flight controller is a brain which controls all the functions of an aircraft. There are quite a few to choose from on the market. Some, like CC3D and Naze32 are designed for drone racing while others, like Naza-M are tailored for aerial photography. I chose to base my quadcopter on a Pixhawk. Pixhawk itself is an open source hardware project. Because its schematics is available to anyone who cares, quite a few companies make them. 3DR is the “official” manufacturer; they use their controllers in their highly acclaimed 3DR Solo drones. But there is also no shortage of various Chinese manufacturers producing Pixhawk clones in all shapes and sizes, most of them costing half or less of the 3DR’s. Most of them use reference design and look identical to each other, but some are quite different. Regardless, they all should all be compatible and work just as well.

I ordered a package containing not just the flight controller itself, but also all the necessary accessories: a power module, GPS, Compass, a telemetry module and an OSD (on-screen display). Unfortunately, Banggood mixed something up and sent me a different package. While technically also a Pixhawk, that wasn’t the one I ordered. A quick search on the internet revealed that Pixhawk Lite I received had weird wiring issues. I complained to Banggood, explained their mistake, and they agreed to exchange the wrong controller for the right one. I sent the package back and received a new one in a couple of weeks. When I opened it I discovered that it contained the same Pixhawk Lite as the previous one they sent me. Obviously, there was something wrong with their inventory management system. At that point, I decided to give up since I saw no rational way of getting the right controller out of them. After all, there were people who had successfully built copters on it, and I figured I could do that too. Luckily for me, Banggood agreed to refund the price difference.

To be continued…

Subscribe for updates

Get the latest articles directly into your inbox.

No spam. Unsubscribe at any time.