John Harding - Insert Catchy Title Here

Insert witty phrase/saying here.

Sunday, June 07, 2015

250 Mini Quad Build Log

I like my 3D Robotics Y6 - very stable, good flight time, easily carries the gimbal, and by now I've got it tweaked the way I like it (gimbal and LEDs hard-wired, velcro for easy mounting of components, etc).  I took it on vacation last Summer and got some fun videos but it was a lot to pack - it plus other gear took up half a large suitcase.  So I thought I'd try building a smaller 250 Mini.


I was eyeing the QAV250 but couldn't justify spending that kind of money before knowing if I'd actually like/use the smaller size.  So I opted for the HobbyKing FPV250LH ($20).  At first, I thought it would be nice to have the extra cage space for mounting components, but at this point, it doesn't seem worth it.  The electronics can all mount on the top/bottom of the main plates.  I've had trouble with camera mounting - the fatshark camera doesn't work well, there aren't great holes for mounting a camera stand, I tried a board camera but it needs 12V, etc.  I plan to try removing the lower cage.

Motors & Props
For motors, I went for the Sunnysky X2204S 2300kV motors ($22).  A bit pricey at $22/each (looks like $24 now), but I'd been burned by crappy motors on my first build and everyone seems happy with these.  I've been happy, too.  I believe you can now get them in CW/CCW sets.

I got both 5" and 6" gemfans (and even some 5" 3-blades I haven't tried yet).  The 6" props fit, but they're so long they don't leave much clearance for cabling around the APM, GPS, etc.  The first time I tried spinning up the props, I chopped through a bunch of cables.

At this point, I've gotten used to APM and ArduCopter, so wanted to stick with that platform.  Poking around on rcgroups, people seemed reasonably happy with the ReadyToFlyQuads MiniReadyToFlyer , so I went for it:

If I had to do it again, I'd get the power module from somewhere else, due to the backwards pin layout used on the RTFQ module.  I'm also not sure about the ESC - it's convenient to use with the Mini APM which as a single connector/cable for the motor outputs.  But it was a bit tricky to solder with quite small pads and I'm not great at soldering.

Battery: 3S 1300mAH ($9)
FatShark 250mW Video Transmitter (re-using from my Y6, which got upgraded to 600mW)
HobbyKing MinimOSD ($21)
Camera: undecided
FrSky D4R-II ($21)

The Build

It's been a while and I didn't take great notes, sadly.

Frame Assembly
The frame assembled pretty easily - no problems with alignment, missing pieces, etc.  I didn't both assembling the lower cage until after I had everything working.  I did have to drill holes for mounting the electronics, using stacked nylon spacers.

When I did eventually put the lower cage on, it holds OK in normal use but comes off pretty easily in a crash.  As I said before, not really sure it's worth it.

With the ESC, APM and GPS all stacked up, the small cage that's meant to mount on top obviously doesn't fit.  I've seen some folks mount it on spacers, but I've just got it open to the air.

I had a lot of issues with the electronics.  I was ambitious and decided to solder motors directly to the 4-in-1 ESC.  If you look carefully at the ESC, you can see motor numbers screened onto it.  I goofed up at first and assumed the motor connections were sequential; they're not.  Fortunately, I was able to just move the motors around (rotation direction was correct).  The quad would still flip if I throttled it up, so I did a motor test in mission planner and found they were still wrong.  It turns out the APM->ESC cable that came with everything is wired strangely.  I emailed Paul to ask about it and he said it's intentional.  For this to work, you'd have to ignore the motor numbers screened on the ESC.  My solution was to swap the wires in the connector to make it pass-through (1->1, 2->2, 3->3, 4->4).

The GPS/Compass was a little tricky as well.  There were mixed reports of how to hook it up.  RCGroups suggests using A-port but I'm using B-port with no problem.  With the antenna facing up, you'll want the connectors facing the left side of your quad.  I've also had problems with interference on the cable (I initially tucked the slack under the ESC) so you'll have to keep that tidy.

I also wasn't getting a current reading from the power module - for a while, the RTFQ XT60 power modules had the connectors backwards, which prevents the current sensor from working.  I wrote up a whole post on power modules, but the fix here was to swap out for a standard power module and then re-order the cable to match.

End Result

So far, I'm pretty happy with it.  Just getting started trying to fly FPV, which takes some getting used to.  I also need to find a better camera setup.  I had been velcro-ing in the FatShark camera; the small size naturally angled it up to fit in the camera opening, but it wasn't that stable.  I tried a few more cameras:
SurveilZone CC1333 ($26) - Should fit the camera mount if you trim the border, but requires 12V power supply.  I should probably wire up a tap for this, but haven't gotten around to it.
SurveilZone HS1177 ($35) - I thought the stand would work well but there are no holes to screw it into; would likely need to use mounting tape on the stand.  Unfortunately, I just get a black screen from this camera and need to return it.
Currently trying a Hero3 Black velcro'd onto the front.  We'll see how that works out.

Monday, June 01, 2015

APM Power Modules

I was having a problem with my 250 Mini Quad (need to write up the build log at some point) where I wasn't getting current measurements from the power module.  Most of the parts for my 250 came from, including the mini APM and power module.  I had checked and double-checked everything, but no luck.  Some extensive digging on rcgroups turned up this post confirming that the ReadyToFlyQuads have the XT60 connectors on backwards, with the result that it can't measure current properly.  

No problem, I thought - I'll just swap one in from one of my other drones.  I grabbed the HobbyKing power module I use on my 450 and hooked it up.  But when I plugged in the battery, the ESCs didn't give their final chime indicating a signal from the flight controller.  After banging my head for a while, I noticed that the APM wasn't powering up.  This was strange - the mini APM uses a different layout for the PM connector on the board itself, but I assumed the power module layout would be standard (because they're also used with full-size APMs). But no.

Standard power module layout (looking at the receptacle as you'd plug it in with the retaining tabs facing up), a standard power module puts out:
V   V   Is   Vs   G   G 
The ReadyToFlyQuads power module puts out:
G   G   Vs   Is   V   V

[Vs and Is are measured Voltage and Current, respectively]

I re-configured the cable from the mini APM for a standard power module layout and everything now works like a charm.  Hopefully google search will pick this up in case others run into the same problem I did.

Since I needed another power module (figured it was cheaper to buy another one than the hassle of re-connecting the XT60 connectors in order to get current sensor working), I tried going super-cheap and ordered a power module from eBay for $8 shipped.  Standard layout, though the voltage out is slightly lower (5.37v vs 5.40v on the other two).  Will see how it holds up.  On the plus side, it comes with a 6-pin DF13->JST-SH cable for use w/ the mini APMs, including the correct wire order.  I need to put a load on it in order to confirm the current sensor works.

Update 6/6/2015:
I ordered another power module from ReadyToFlyQuads because, why not?  This one came with the XT60 connectors on the right way but still the backwards layout for the power module connector.

Saturday, August 09, 2014

Unplanned upgrade of my Y6 frame

I'm going a bit out of order here, as I still haven't written up the build for either my MultiWii Quad or original build of the 3DR Y6.  But this one is more interesting.

I'd flown my Y6 a good number of times, even several in quite windy conditions at Emerald Isle, NC.  Had never had any problems with lack of control or anything.  Last weekend, I finally got around to adding LED strips to the legs to help with orientation, including a 12V regulator (I usually fly with a 4S pack and the LEDs aren't intended for that high voltage).  While I was at it, I hooked up an additional JST connector to my power distribution board to power my gimbal.

After all that, I did a quick test flight in my backyard and everything appeared to be working properly.  So after work, I stopped by the park to try a real flight with some space to maneuver.  I was in a bit of a rush, so didn't connect my tablet or wait for GPS lock, just intending to fly around a bit in Stabilize mode.  

I took off and everything was working fine for about 20 seconds or so.  Then it started flying away.  I tried turning it around to head back towards me, but it kept flying in the same direction.  I pretty quickly ran out of space and crashed into a fence.  The carnage was pretty impressive:

  • Broke all 6 props
  • Bent both mounting plates for the gimbal as well as the RC connector (though it still works)
  • APM and GPS sheared off the mounting plates
  • Broke a bunch of the nylon screws for the landing gear and lost a spacer
  • Broke all the standoffs for the GPS/accessory plate
  • Cracked the carbon fiber base plate and it broke in half
They don't appear to sell replacement parts for the 2013 Y6 frame anymore, so I ordered a 2014 frame kit.  Just swapped out the base and top plates, though - pretty sure the legs are the same and there didn't seem to be much interesting with the new APM or accessory mounting plates.

As to what went wrong, I'm still not clear.  I don't have any experience troubleshooting APM logs so will need to figure that out.  My guess is something to do with the compass - in retrospect, it was behaving as if it was in Simple or Super Simple mode, but I don't even have that configured as an option right now.

Update: Replaced the top and bottom plates with new ones from the 2014 frame kit and it's back in the air.

Sunday, August 19, 2012

Digital Music Workflow

I wanted to work through some problems in my music workflow so I figured I'd write up an extended version of a short previous post that had a few notes.  Hopefully this is useful to someone.


My primary goal is to be able to easily access all my music on a variety of different devices - iPhones, Sonos, cloud-based music services, etc.  Second to this is preserving quality as much as possible.  


My digital music comes from a few different sources:


The bulk of my music comes from CD rips - it's the most practical & consistent way to get high-quality source material.  I rip CDs using Exact Audio Copy (EAC) and encode to FLAC - this way, I can get this music into any format I want (mp3, aac, wma) without worrying about loss of quality.  All the CDs end up in a FLAC folder organized as
CD Rips\AlbumArtist\AlbumName\## TrackName.flac
The folder organization is just for convenience - the embedded metadata is what everything keys off of.  There are a few tricky cases with this method of organization:

Various Artists

Compilations get handled one of two ways.  If there is no obvious artist for the album as a whole (e.g. movie soundtracks, Christmas music collections), it goes under "Various Artists" with the FLAC "album artist" field also set to "Various Artists."  When there is an artist for the album (e.g. DJ Mix CDs), it goes under that artist.  In either case, the "artist" field for individual tracks gets set to the artist for that track.

Multi-Disc Albums

Multi-Disc albums get treated as a single album - so all discs go into the same folder and have the same album name (rather than use album names like "The Wall (Disc One)" and "The Wall (Disc Two)."  When doing this, you need to make sure the "discnumber" and "totaldiscs" metadata fields get set accurately.

iTunes Store

Some of our music is purchased from iTunes.  I used to avoid purchasing anything from iTunes when music was encrypted, as it meant it could only be played on Apple devices.  Now that everything is unencrypted, we buy music from iTunes a bit more often - mostly singles.  On disk, I leave this the way iTunes organizes it:
iTunes Media\Music\TrackArtist\AlbumName\## TrackName.m4a
It's a bit annoying that iTunes uses the track artist instead of album artist on the filesystem, but since everything uses the metadata, it doesn't cause problems in practice.

Amazon Music Store

We also have some music from the Amazon music store - mostly singles from before iTunes got rid of DRM.  I manually put this stuff into the same structure as I use for CD rips, since I seem to get a wide range of file naming conventions from Amazon downloads:
Amazon Music\AlbumArtist\AlbumName\## TrackName.mp3
Since I buy so little from Amazon, I haven't bothered to automate any of this.


I've got a few odds and ends from other sources, which go in the same structure as CD rips and Amazon, but with a different root:
Other\AlbumArtist\AlbumName\## TrackName.mp3


I stated the primary goal was to get all this music playable on all my devices. Those basically fall into a few categories:


Since the only way to get music onto iThings is via iTunes, I need to get all this stuff loaded into iTunes.  Music from the iTunes Store, Amazon Music Store, and Other are all pretty easy - just point iTunes at the right folder and you're done.  Since iThings don't support FLAC, though, I had to get the CD rips into a different form for iTunes.  This is the job of the ConvertLibrary tool mentioned in my previous post.  I'll write up a separate post on that, but basically what it does is synchronize a music collection in different formats, resulting in
Converted CDs\AlbumArtist\AlbumName\## TrackName.mp3
I currently sync into mp3 but have been meaning to re-generate my library to AAC, since it's more space-efficient and I've been running out of space on my iThings.


I set up a Sonos system in our house a while back, since we have in-wall speakers in a number of different rooms.  The Sonos needs to play music off the network, so I point it at a NAS (Network Attached Storage) on our home network.  A batch job runs every day that ensures the NAS has a current copy of all the music Source folders from above.  I could point the NAS at the individual folders on my home PC, but it's good to have a copy on the NAS anyway.

Google Play Music and Amazon Cloud Player

I don't really use either of these that much but have been tinkering with them a bit.  I set these up basically the same as iTunes - point them at the folders for each Source.  I have Google Play Music set to use the Converted CDs folder instead of the original FLAC rips, though since Google Play Music limits storage by songs instead of size, I suppose I should use the FLAC folder instead (though they'll convert to 320Kbps mp3). 

To Do

A bunch of stuff still doesn't work quite the way I want.  Most notably, there's no synchronization of playlists across devices.  It looks like Sonos has some support for reading iTunes' playlists out of your iTunes library, but since my Sonos uses a different set of files, I think I'll need to do something else.

Many steps are still manual that should be automated:
  • When I rip a new CD, I have to manually run the ConvertLibrary tool to generate an iTunes-friendly copy; I need to update ConvertLibrary to monitor the folder and run automatically.
  • When any new music is added, I have to manually update the NAS copy for the Sonos (or wait for the batch job to run); similar to the first point, this should monitor the folders for changes.
  • I don't have a good system for getting appropriate album art.  Any recommendations?
  • My NAS uses FAT, which means it can't handle Unicode characters in filenames - either need to restrict character set for filenames or figure something else out.

Saturday, October 29, 2011

Synchronizing music library in multiple formats

Getting a new Sonos player motivated me to clean up some problems in my CD ripping workflow.  First, some background:

I decided a while back to rip all my CDs to FLAC.  The need for specific formats and bitrates are dictated by the device(s) you're trying to use, and with everything in FLAC, I can just re-encode my entire collection to a new format and/or bitrate whenever I want.

I use EAC for ripping.  Works fine.

I wrote my own tool, which I should publish sometime, to handle mirroring a music collection.  Conversion is handled by standard command line tools (e.g. lame) with config scripts that control the rules.  What's been a nagging problem for quite some time is The Compilation Problem.

It's remarkably hard to find good write-ups on the "right" way to handle compilations, so for the sake of future searchers, here you go:

  • Set the artist on individual tracks to be the actual track artist.  So this will be a different artist for every track on a Soundtrack or DJ compilation
  • Set the album artist ("ALBUM ARTIST" tag in FLAC/Vorbis or "TPE2" in id3v2) to something fixed for the album - "Various Artists" in the case of a soundtrack or the name of the DJ for compilation CDs.
  • Ensure you set the "TCMP" tag to 1 in the id3v2 tag - this is what flags the tracks as part of a compilation.  iTunes will then pick these up and merge into one album, using the Album Artist field.

Sunday, June 07, 2009

First android app

I frequently worry that I forgot to close my garage door. When this happens, I can either drive back home just to check, or assume that I closed it and try to move on with my life. While there are much better solutions to this problem, I decided to solve it by writing an Android app.

The app periodically takes a picture using the camera in the phone, and uploads it to a site where the picture can be viewed. At first, this was just a single location on my personal server, but for release, I created a simple Google AppEngine application to receive, list, and display the images.

Please post any thoughts/feedback in the comments. Some things I'll probably add:
  • Configurable # of recent images to be stored
  • Automatic generation of time-lapse video
  • Permissions/protection on the posted images
Other weird stuff:
  • It asks for permission to read the phone state - this is used to get the device's IMEI as a unique identifier. I'm sure there are better solutions, and you can just manually set an identifier in the settings. Problem will go away when I add permissions.
  • Dealing with the camera is a pain in the butt. The emulator camera doesn't behave at all like the real hardware. Currently, I re-initialize the camera after every picture, which is probably bad. Focus is flaky. And sometimes it ends up with a blank image, due to race conditions which I need to fix. Blah blah blah.
  • It's ugly. I know.

Saturday, April 04, 2009

Adult-proofing big wheels

One of my favorite annual San Francisco events is Bring Your Own Big Wheel, a big wheel "race" down a steep, winding road (Vermont St in SF's Potrero Hill neighborhood). Last year, my friend Dave and I rode in the race, and learned some lessons about how badly a stock Big Wheel handles aggressive riding by an adult. Fortunately, some simple modifications and reinforcement can make a dramatic difference.

Mod #1: Remove the pedals
Pedaling a big wheel as an adult is just not effective - you're better off pushing with your feet. In fact, the pedals are most likely just going to smack you in the shins. For the SF course, they're even more of a liability, as the pedals will hit the ground on sharp turns and lift the front wheel up in the air, eliminating what little steering you had.
Instead, I recommend just putting a bolt through the front wheel, with a cap nut on the other end. Unfortunately, I didn't write down the proper length and size, but it shouldn't be hard to find them. I put washers on either side of each prong of the fork, and used loc-tite on the cap nut to make sure it holds together.

Mod #2: Tighter steering
The handlebar setup for big wheels is just not meant for aggressive steering - the plastic buckles easily, and the screw attaching the handlebars to the fork starts tearing up the plastic. The end result looks like this:

In an emergency, you can just wedge something in the gap between fork and handlebar (we used torn strips of cardboard during the race last year), but that's not going to last.

What I ended up doing was picking up a pair of L brackets like these, to effectively stiffen up the fork. Go for thin ones, since there's not a lot of wiggle room between the fork and handlebars. First, attach the L brackets to the fork as shown here.

A few notes on this:
  • It's unlikely you'll be able to remove the fork from the main body of the big wheel with the L brackets on.
  • Depending on where you originally screwed in the handlebars, you can try to re-use the original holes in the fork. Make sure you use shorter screws, though - not the long ones that come with the big wheel.
  • I recommend putting a screw in all four sides.
Then, slide the handlebars on top of the L brackets. Depending on shape and fit, you may have to squeeze the brackets together to fit the handlebars over them. Push the handlebars down as far as you can - down to the heads of the screws holding the brackets to the fork. Use the original, long screws to attach the handlebars to the L brackets, ideally using the original holes in the handlebars. The screws will extend into the opening in the handlebars - my next step is to cut a block of wood to fit this gap, which will hold the screws in place.

The L brackets should pick up most of the pressure for turning the handlebars, such that the handlebar screws are just there to keep the handlebars from sliding up off the bracket. However, I found that putting a second pair of screws in helps it hold a bit tighter. I recommend drilling small pilot holes for the extra screws - 3/32" for use with #10 screws.

Unfortunately, my street isn't really steep enough to stress-test this new setup, so I'll have to wait until next week to see how it holds up.