Thursday, September 25, 2014

ARM Programming tools

Not going to talk about the build environment, that's an entirely different story.  But I do want to mention what tools you'd use to program my tracker.  There are a couple of options.

My latest board uses a footprint that supports a *press on/press off* programming cable called a Tag-Connect.



Tag-connect Cortex-M (no-legs) programming cable

You can get the cable, the adapter for 20 pin to 10 pin, and the clip that it uses, if you don't want to hold it to the board, as a package direct from Tag Connect


The above covers the cable kit that would be needed to program my boards.

For a programmer there are a couple of options.  Neither are all that expensive in the grand scheme of things and the more expensive of the 2 is *much* faster that the other, it also has Linux, Mac and Windows software whereas the cheaper one only has software for windows.  Either of these will double as a Jtag/SWD interface for development if so inclined or just as a flash programmer.

My favorite for both development and programming is the Segger Jlink EDU



These are available from a handful of places I usually get mine from Digikey


The other options is the ST-Link V2 from ST also available from Digikey.  It's this one that only includes Windows programming software




Either will work just fine, and with both you simply load the file to be programmed and press the go button to program the board.  Very little else is required.


The above - my programming/development tools



Monday, September 22, 2014

My experience in Pico Basics

I'm certainly far from an expert about this, and most of what I've learned is simply trial and error, watching what others have done, asking questions and self taught learnings and experiences.  However, I get asked a number of times for information on how-to - so figured I'd just put some of it on my blog.

This isn't really a step by step How-To... There are hundreds of ways of doing the same thing, and there are just as many outcomes.  This is my way and right or wrong, it works for me.

NOTE, I'll probably update this post from time to time, so check back as it evolves and changes.  I'll also be adding some pictures from my next build where appropriate to better help with the word descriptions.

The Basics for a Pico Balloon launch
  • You are wanting to get a simple 36" party balloon to float for a number of hours, days, weeks, etc
  • You are *WILLING* to lose all the equipment that makes up the balloon and payload, because the odds are next to 0 at getting it back.
  • You want to sit on pins and needles for the next umpteen hours, after you set it free, wondering where it will go at the will of the winds... All the while only having an electronic console in front of you providing the minimal amount of semi-real-time information :)
If you are still interested in continuing, here's what you'll need for some of the parts and what you'll need to do with them.
  • You'll need a 36" foil balloon - Qualatex is the preferred brand, and they are available at reasonable pricing from here - 36" Qualatex balloons
  • You'll need some form of tracker.  It will need a radio, gps, and some form of processor.  The lighter the better - 15grams total weight should be considered a good starting point.  I've launched at 23grams and I've launched at 13.  The difference in float level was 6500 meters for the heavy and 8000+ meters for the lighter one.  All using a similar amount of free lift. 
  • You'll need some form of power supply.  It can be done on AA/AAA batteries, but if you do, use the Energizer Ultimate Lithiums, for their weight there are none better.  AA/AAA's should provide you with anywhere from 1-10 days of use depending on how the tracker is setup.  If you are going for longer duration, you'll need some form of battery and some form of recharging mechanism.  Because you can't recharge a primary cell, most of us are using a rechargeable Lithium battery and primarily a LiPo type.  Due to weight a 200-300mah range, single cell, 3.7v is what you are after - REMEMBER we are trying to keep the weight down.  I'll revisit this topic later.   If you are designing your own tracker you'll need to make sure of the current requirements given the flight profile.  Using a small MaH battery, you'll need to manage current such that you could survive on battery until the end of your mission or until sun lights your solar cells if that is your flight profile.
  • Solar is primarily used as the recharge mechanism so you'll need solar cells.  I run 2 in parallel as do most of the small pico's.  A few will run 2 in series, in parallel with 2 in series for a total of 4 cells.  Search ebay for 1x3" cells or I've switched recently to 38mm x 52mm with good success.  There are lots of providers and they aren't that expensive.  Watch for the type that have a centered +/- strip to make mounting and balance easier.
  • You'll need some form of antenna material.  Again staying on the light side, you could use small gauge magnet wire, or solid conductor twisted pair, etc.  Or I like the 13 gauge Ernie Ball Nickle plated guitar strings - Ernie Ball 13 gauge guitar strings - EBAY.  I also use this between the 2 solar cells and I solder it to ground on the board for the ground connection of the cells.
  • Tether - I use 30lb braided fishing line, just the cheap stuff, it's light, strong and usually coated so that its UV protected.  In my case I use 110 total inches (a 55 inch loop) of this line and I thread that through the mounting on the payload and then tie a knot in the 2 ends.  I'll center it so that the knot pulls right at the balloon attachment swivel and then I'll tie another overhand knot about 6" above the payload to stop the 2 threads from tangling with the antenna(s).
  • Odds and Ends - little things like heatshrink for wrapping the tracker/battery, attachment mechanism, etc.  This all needs to figure into your payload target weight as well.  For example, I found some 1.5mil black heatshrink that is 38-52mm wide in it's *flat* dimension that works for my uses, it shrinks 2x and then I seal the ends with Kapton tape or you can use it unshrunk and just tape the ends for a little larger thermal area.
  • You are trying to get all of the above to fit within your payload weight requirements.  In my case around ~13 grams

Putting it all together
The fun part is putting this all together, releasing it and then experiencing the rush trying to *will* it in directions you have no control over and away from obstacles that are trying to push it out of the sky!

Predicting
You can use a couple of tools to help with predictions.  I'll usually start at the CUSF - prediction site and here is how I enter a float prediction because at the moment it doesn't support one directly.
  1. enter your launch lat/lon
  2. enter your launch altitude
  3. enter your launch date/time
  4. for ascent rate, I usually use .6 - .75 m/s and you can tweak that after you launch one and see what it really does.
  5. Set the burst altitude to your predicted float altitude
  6. Now this is where you simulate a float... enter a descent rate that is pico tiny... I usually use .01e-10 as the value of m/s descent
The above isn't perfect because in effect you are descending a small amount each interval, but it will get you a general idea of the winds, etc.

Here's a little example of one that I just did so you can get a feel for what it will look like -Float prediction with CUSF predictor

You can also try Jerry Gables excellent predictor tool, it's a bit slower because it's client based, but it can handle a float altitude for a pretty good duration of time. It's here - S3 Research flight predictor.  With this one just follow the bouncing ball.  I'll usually use a 2880 mins (2 day) duration to test a path, and then extend it to 5760 mins (4 days).  Enter all the accurate information.  For the last question, I almost always manually enter a 200 ft landing altitude as sometimes it can't figure one from the maps and that will cause the predictor not to function.

One thing Jerry's tool will let you do is predict an inflight float.  If you enter the launch altitude and the float altitude as the same value, you can use it from a current position/altitude to predict an inflight float.  I've even found you can *back* predict if you need too by adjusting the GFS date to be appropriate for the launch/update time.

Lastly and the best feature of all - if you use APRS, it will generate an overlay and link that you can use to provide the predicted path on APRS.FI while the actually watching the position updates against that path.  I have found that if you re-generate this link, it may take a few minutes to become effective.  This is because of the cache in your browser and the internet, but it will update at some point.

Assembly
Once you've got the tracker assembled, functional and tested, sealed up and ready for flight, you are ready to go... Here's how I do my final assembly/fill.
  • I use a short length of the braided fishing line to form a multi coil loop. This loop has a very small fishing swivel threaded through it and I tie the two ends in a fishermans knot so they won't pull through or break.  I usually use a 4 or 5 strand loop.  This is then slid up the fill stem on the balloon about midway between the fill opening and the end.  The end is folded up over this multi loop and I use a short piece of Kapton tape to tape that end to the rest of the stem below the fill opening.  This is so I can attach the payload as I check free lift.
  • Next I'll use a small piece of the white or blue tacky putty and I'll weigh that out to about 2.1grams.  I do this to account for the other tape that I'm going to use on the fill stem, and to provide my 1.75-1.9gr of free lift.  I'll then stick this putty to the payload so that it doesn't pull off while I do my fill process.
  • From here it's just a process of filling *slowly* to the point where the balloon just lifts off the table and a tiny bit more.  This won't lift the payload yet, but it's now time to attach the payload.  Open the swivel and attach the tether and then close the swivel... I use the locking type so make sure it catches as it should.
  • Now just keep filling *slowly* and checking.  You want to remove the fill tube each time.  You are trying to fill to the point where the payload will just *float* and won't climb or descend with the sticky putty still attached to it.  Obviously doing this in a garage or basement is preferred.
  • Once you are there, you'll want to take a piece of kapton and tape over the fill opening fully, and you'll want to roll up the fill stem, keeping the attach loop down at the bottom of the roll as you fold/roll it up.  Finally wrap the entire fill assembly with a longish piece of kapton tape so it won't unravel. - this is why the small additional weight was included in the sticky putty weight - to account for this step.  (one modification here, if you have an RC sealing iron, you can heat seal the fill stem as a further guarantee that it won't open.
  • LAST STEP - REMOVE THE STICKY PUTTY :) - you'll laugh, but you aren't going anywhere if you don't remove this putty and in the heat of the release moment, it's easy to forget... ask me how I know :)
Ok, now you are ready for launch.  Lift isn't going to be much so make sure you have good clearance all around and if it's windy triple that clearance.  On all the launches that I've done, for some reason, at release, the balloon will climb a few hundred feet and then it will start a very shallow descent only to start climbing again... One of these days, I'll understand why that is.  Not sure if it's because the air conditioning was on the vehicle that I used to transport the balloon to it's launch location, and it cooled the He in the balloon or if its something with getting the balloon and it's He to ambient that takes a few minutes, but be prepared and make sure you have clearance.  I'm sure that such a low free lift make this dip much more exaggerated.

Most pico flights using a *sealed* balloon are what's called Super Pressure flights.  When you launch the balloon it will only be about 40-50% full, as it climbs with both heating (if during the day), and gas expansion, the He (or H2) will expand to fill the empty space.

Once that *inflates* the balloon fully, it will actually stabilize, as the gas is being constrained by the material and it's seams... When it gets to this point it will then try to  *stretch* the material.  This stretching will yield a little and it's this point where any imperfections in the balloon or seams will be realized.  Getting here is your first goal and staying here is your path to the start of a successful float and flight.  You can sometimes see this in the altitude profile, the balloon will get to what you think is the float altitude and then it will stay there for a few minutes and then rise a few 100 ft/mtrs more till it gets to it's fully stretched, fully contained - super pressure float altitude.  This will be dependent upon payload weight, free lift, size of balloon, etc.  If anything fails at this point... well, you know the rest of that story.

NOTE: Thermal heating will have an influence on this *stretch* activity.  If you launch at night, you'll most likely see a much lower float altitude that first evening, as the sun comes up and heats both the He and the balloon, it will rise, stretch, and come up to daytime float altitude.  The next evening/night will probably see that float altitude decrease, but usually not to the same altitude as the first evening.  For example, on my first night release, my night float was right at about 7000 meters... As the sun came up that next day and thermal activity started to occur the He warmed and the balloon warmed and stretched and my daytime float was at 8000+ meters.  The following evening/night, the altitude decreased to about 7500 meters.

NOTES: (from my short experience)
  • Because free lift is so light - 1.75grams, anything can make the balloon descend.  A bird could poop on it and it will come down.  This also means a high humidity content at your float altitude isn't going to be nice to you. Worse yet a rainstorm or for that matter a cloud.  Rime Ice can form in humid air that is super cooled so even temperature doesn't help you here....  Its one of the challenges with low free lift and semi-low altitude floating flights.
  • LIPO batteries - the typical consumer battery uses a type of electrolyte that will function and provide current in discharge to -20C by specification.  The specification for charging are equally restrictive and shouldn't start until 0C in temperature.  In my testing, these standard batteries may function below -20C but at some point, it will stop providing current.  In reading through some information from Nokia that discusses this, they mention that at below -20C that the electrolyte will go through a change that will prevent the battery from providing current.  This change is further discussed as making the battery useless and unrecoverable even as it rewarms.  I'm not sure exactly what happens, it either changes chemically or freezes and it's unclear if the battery becomes a dead short or a full open.  In a recent flight to -60C temperatures with a standard LiPo, the battery failed at -35C and never recovered the next morning even with thermal heating and solar charging - as luck would have it this occurred about an hour before sunrise :).  As an alternative, you can have custom batteries made that use a different chemical make up that will allow discharging at -40C and some temperatures below.  It's unclear if these will fail from the same causes as the standard battery versions, but at some point it will most likely fail due to extreme low temperatures.  They call these types of LiPo's - Cold Chemistry LiPos.
  • Thermal heating can be your friend.  In my testing it appears to be good for approximately a 20-25C temperature increase over ambient.  The size of the tracker, the type of material used in protecting it etc, will have an impact on this.