Tag: crash

GPS fail, Geofence madness, crash!

Another quadcopter crash today. I was just hovering in my garden and it randomly flew into a fence. All four (carbon fiber reinforced) propellers broken, two motor mounts bent and a leg snapped.

Looking at the telemetry logs (which I happen to have as I had my laptop connected at the time) it seems the GPS suddenly reported the position wrong by a couple of hundred metres and the geofencing feature kicked in and it tried to return to launch. More investigation needed though.

I think I might change the fail safe to just auto-land, rather than RTL.

I may also do a complete rebuild and see if I can take the opportunity to make my quadcopter lighter and bit more agile.

Update

Actually, the GPS didn’t suddenly report a wrong position – and in fact, arducopter has protection against that exact kind of GPS glitch (it ignores sudden impossible increases in GPS position).

What actually happened is the GPS position slowly drifted away from where it really was, avoiding the arducopter glitch detection, until it went outside my configured geofence distance. At that point, it went into failsafe mode and tried to fly where it thought home was (RTL – return to land).

So, I’ve changed the failsafe mode from RTL to just “land” for now and am investigating the GPS problem (though I was at the bottom of my garden which has poor GPS reception).

Avoid quadcopter crashes with throttle failsafe

I crashed my quadcopter last week due to flying out of range of my transmitter, causing my quadcopter to drop out of the sky. This happened because I hadn’t calibrated my throttle failsafe properly.

This is for my Spektrum DX8 transmitter and AR8000 receiver, but it’ll be the same for most Spektrum devices (and the theory is most likely the same for any transmitter/receiver)

The theory

The theory is simple: Your receiver records your transmitter’s throttle position when you first bind them together. From then on, if the receiver loses contact with the transmitter, it defaults to outputting that throttle setting to your flight controller.

So usually, you’d make sure your throttle is down when you bind. So then, if you’re flying along at high throttle and go out of range, the receiver will just throttle down (and your quadcopter will drop out of the sky like a potato without a parachute).

Most flight controllers (mine is an APM 2.5 running ArduCopter 3.1.1) are able to land (or return to the launch point) automatically, but it needs to be able to differentiate between losing signal and you just throttling down (maybe you’re doing a stunt, or testing Newton’s law of universal gravitation).

The trick is, to have your transmitter output a lower throttle setting than the lowest stick position when you bind it to the receiver. That will allow your flight controller to tell the difference between you throttling down, and your receiver going into failsafe mode.

Throttle down low

There are a couple of ways to get your DX8 transmitter to go lower than the lowest throttle tick position but the simplest I found was setting the throttle travel setting temporarily:

  1. power on your DX8
  2. click the roller on the right to bring up the function list
  3. select “Servo Setup”
  4. select “Travel” and “Throttle” (actually the defaults)
  5. change the left hand “100%” up to the highest it’ll go (for my DX8 that was 150%)
  6. click the back button to get back out to the menu
  7. power off your DX8

spektrum-dx8-throttle-travel

Rebind

Now, your lowest throttle stick position is outputting a value of something like 920 to your flight controller. Now you go through the binding procedure. As a reminder:

  1. power transmitter and receiver off
  2. connect your bind adaptor to the bind plug on your receiver
  3. power on your receiver
  4. power on your transmitter whilst holding down the bind button (make sure your throttle is down!)
  5. wait for bind to complete
  6. power everything off and remove bind plug from receiver
  7. power everything back on, make sure binding worked.

Now you go back into the “Server Setup” menu on your transmitter and reset the travel back down to 100%, so your lowest throttle stick position is back to normal (around 1100).

So now, your lowest throttle stick position outputs something like 1100 to your flight controller, but if you power off your transmitter it will drop to something around 920.

Configure your flight controller

Now you can configure your flight controller to land, RTL or quantum leap or whatever when it can detect that it is out of range. On my ArduCopter, the defaults were all good (anything below 975 detected as failsafe) – I just had to enable failsafe.

Major quadcopter crash, dodgy propeller

2013-05-04 12.07.49

I had a major quadcopter crash a few weeks ago – and it wasn’t due to my dodgy flying skills. One of my propellers broke in mid-air; one blade snapped off from a prop at the hub. The prop was one of two new bright orange coloured ones I’d bought to help keep track of the direction of the aircraft, which worked very well for me until it crashed. Looking more closely at these new orange props I now notice that they are much thinner where they attach to the hub. My other props thicken out as they approach the hub making them much stronger. The orange ones are much weaker – bending them quickly results in white crease lines at the hub, which doesn’t happen with my black ones. Lesson learned, don’t buy cheap props (actually, they weren’t any cheaper, so the lesson is to understand how to recognise crap props).

At the time the prop snapped, I was about 20 metres up in the air, traveling horizontally at quite some speed. When it broke, which made a “ping” sound, I panicked and dropped the throttle and then realised that was wrong and throttled back up to try and cushion the landing. I’m not really sure to what extent that helped, but it hit the grassy ground hard. I was flying it in a field near my house and was prevented from immediately retrieving it by a group of curious horses that went to investigate this UFO crash landing site. Luckily they decided against trampling or eating it and eventually lost interest.

It was still powered up when I got to it, though unarmed. Annoyingly I’d decided against flying with the camera this time so didn’t have any dramatic footage of the accident.

2013-05-04 12.09.18

The battery looks too badly damaged to use. It’s not quite punctured, but it’s bashed up and misshapen. I may try recharging it out of curiosity, but I expect it to set on fire, explode or quantum leap or something – who knows with these lipo things. Quantum lipo. A friend has loaned me two new batteries, which are higher capacity (3900mAh) but weigh more – so we’ll see how that works out for performance and flight time.

A couple of the other props got damaged, but the motors, ESCs, and controller stuff seem all fine.

The two arms where it hit the ground were bent quite badly.

2013-05-04 12.06.50

Rebuild

It’s taken me about a month to get around to it, but I’ve finally rebuilt it. The new frame is pretty much the same design as before but with a couple of minor modifications. I mounted the arms less closely to the middle of the base, so there is more space for cables, and I mounted the motors about 1cm closer to the end of the arms. So the result is that the motors are about 2-3cm further away from the base, which I expect to change the behaviour slightly and gives me more headroom between the props and the base – they were quite close before and prevented me from mounting some bits close to the edge of the base.

2013-06-16 15.33.02Since my first build I’ve acquired a power drill mounting and I built a wooden jig to keep the two bases in place, which meant I was able to drill holes much more accurately. I also drilled lots of extra holes which I knew would be handy, so more places to run cables and pass through tie-clips. It’s much tidier now.

Lastly, in an effort to isolate vibration better, I put patches of neoprene where the arms are bolted to the base plates, and where the motors are bolted to the arms. The neoprene was an old laptop “skin” I cut up. I had to remove it from the motors as it meant they weren’t mounted perfectly square, so the craft was spinning a bit. I’m not really certain how effective this is as I don’t really have any data to back it up so it’s a bit cargo culting atm. I may experiment with this more scientifically at some point.

I bought some much sturdier carbon-fibre reinforced propellers too – I’ll write about my efforts to balance them properly later.

In summary, crashed it due to cheap propellers and I took the opportunity to rebuild the frame with some improvements. No horses were harmed.

Segfault in Ruby Ferret query parser

Whilst working with the Ruby text search engine library Ferret, I came across a segfault in the query parser. It had already been reported and fixed, but I realised it can lead to a denial of service.

If you use Ferret anywhere that allows users to execute queries, those users can crash the Ruby process with a specially crafted query.  This was quite serious for a number of my sites (not to mention slowing development of a current app) so I applied the fix to the released 0.11.4 source and repackaged it as 0.11.4.1.

Obviously this isn’t in any way official, but it works for me and I’m sharing here for anyone else affected. Gem, tgz and zip here and just the patch available here (derived from the author’s changeset to trunk).

The patch is against the release source, as the subversion repository seems to be down atm (I got the changeset from the web bases subversion viewer).

Get upgrading!

Leeds Bus Crash

Overhead view of bus crashed into Ainsleys bakery in Leeds

This bus narrowly missed a Subway franchise in Leeds and crashed into an Ainsleys instead. Ethical dilemma: if you were a dissenting bus driver would you choose to plough into Subway rather than Ainsleys knowing that whilst it’s a bigger and eviller chain, you might hurt more people?

I think the easy answer to this is to crash into both places, but make sure you do it after hours when the place is closed. More photos here. I didn’t take them though; I plucked them from the grape vine.

Ghost posting

I’m currently on holiday in Russia. I wrote this post last Saturday night and made my bloggy software not display it until today (Monday).

If my plane crashed and I died then this post will be a bit disconcerting. I probably went to hell, but don’t worry: all my friends will be here one day. Could someone please feed the cats.