Thursday, December 30, 2010

Designing for the degenerate case

In mathematics, a degenerate form is one that cannot be perturbed in some way without being rendered a member of a larger, more complex class.  For example, a circle is a degenerate ellipse- change the constant multiplier of one of the terms and you push the form out of the class of circles into the larger class of ellipses.

Next time you're solving a problem, ask yourself: am I solving for a degenerate form?  And, if the answer is yes, is that important?  Let me give an example where the answer to both questions was "yes".  I was tasked once with supporting some motion code which was intended to align a circuit board on a conveyor belt under a camera.

The code as written worked fine in the lab, but in the field, customers began to complain of erratic and unpredictable behavior- boards which would be incorrectly positioned at the start of inspection, pushed off the end of the conveyor, etc.  It turns out that the code had originally been written to the degenerate case of a PCB that had no slots or notches and was less than 300mm long- even though the system was specified to handle ANY board of a length up to 450mm in length.  The result was that it was relatively easy for a slot (or even a hole for a component lead in boards coming through before soldering) to allow enough light through to fail to activate the accurate positioning sensor, resulting in a misaligned board.  Longer boards caused a problem too- they would be (only occasionally) detected as fault conditions because they would trip more than one sensor at once.  Once I rewrote the code with the mental model of trying to align a picture frame with non-parallel leading and trailing edges (basically, the broadest possible class of objects that could come through the machine), a huge number of field issues resolved immediately.

Perhaps the most serious of these degenerate cases is the "normal" human.  I have a number of "abnormalities" (if you will; I hope I don't offend anyone with my terminology but it's important, I feel, to consider denotation rather than connotation and to realize that "abnormal" is, in fact, a term with no qualitative meaning) of capability which have rendered my life, if not worse, at least harder than necessary.  The most significant one is my colorblindness.  I'm a deuteranope* - I have a great deal of trouble with red-yellow-green colors.  I have a great deal of trouble with bicolor LED indicators- the colors of yellow, orange, red, green, and amber used in cheap indicator LEDs are all basically identical to me, differing only in intensity.  The result is that I can  get relative information from them (changes in state) but I can't get absolute information from them (is the light red or green?).  If the encoded information is VERY important (for instance, stop/go signals at an intersection), and color is the ONLY way it is presented, or the only absolute way in which it is presented (for instance, some areas have stoplights that are horizontal, and green can be on the left or the right depending on the orientation of the intersection), the result can be disastrous.  At best, it's an annoyance to roughly 10% of the population who lack "normal" color vision.**

The best way to avoid designing degenerate case flaws into a system is to explicitly write down what your expected use cases are.  Get other people to look at them, and to look for holes in them.  It's okay to discard their feedback, and it's not always important to expand your design to break free of a degenerate case (sometimes it's just too expensive to support every use case, and sometimes other restrictions rule out the need for supporting some use cases)(no need to encode the speedometer in a car such that a blind user can interpret it, for example), but you should consider them just the same.  Fixing a design after the fact is far more expensive than doing it right the first time.

* I think I'm a deuteranope, anyway, based on discussions with a very smart coworker (who happens to be deuteranomolous).  Most online colorblindness tests will only provide a better diagnosis than "yes, you're colorblind" if you enter SOMETHING in the field next to the Ishihara plate image, as the shape you see is what determines what type of colorblindness you have.  I can't see ANYTHING in most of them, but "nothing" isn't an option.  Ironically, these pages were probably designed by someone with normal color vision who completely failed to consider my case.

** So how to solve this problem?  Use two LEDs instead of one with two colors, so the information is position encoded as well as color encoded.  Use a blink code.  Use colors which will be discernible to the largest number of potential users (relatively few people have a kind of colorblindness that causes them to confuse blue with any other color).  Use significant differences in intensity to encode information.

Tuesday, December 28, 2010

5 comments on DIY projects that deserve a big, fat STFU

Whenever you put a project out there in the community, be it on your blog, a community board, or as an article in another venue (or if it gets picked up by say, Hackaday or Make), you're bound to get some comments that are, shall we say, worth less than the calories they took to type.  Worse still are the times you get these comments from someone to whom you are explaining (in meatspace) your current pet project- those times can be a SERIOUS buzz kill and I've lost the will to finish a couple of projects after comments like this.
  1. "You know, Target sells something that [does that]/[does almost exactly that]."  This is more common in meatspace than on the web, I think, because the web audience self-selects for people who understand that the joy is in the making, not the having.  And, frequently, the "almost" is where the bugaboo lies- I want EXACTLY that, not ALMOST exactly that.
  2. "Arduino is for losers."  Or some variation thereon.  Arduino, as a platform, is a lot like Python: best used when development time is the most precious commodity of all, more precious than CPU cycles, money, or cachet.  People who get that, use it.  People who don't get that spend a lot of time trolling comment threads but never actually make anything.
  3. "Using a microcontroller/PC parallel port/Arduino for that was total overkill."  Yes, I know, you could have built that project with four 7400 series logic chips, three capacitors, a resistor, a piece of perfboard, and an inflatable duck, but A. I didn't have those on hand, B. designing that circuit, wiring all that crap together and troubleshooting it would have taken more time than I wanted to spend on the project, and C. I made it and you didn't, so shut up.
  4. "I/my cousin/Nikola Tesla/Jeri Ellsworth already did that better."  That's great, really.  If my "project" page is just a detailed description of my assembly of someone else's kit, I probably deserve to be chided (or at least ignored).  But if not, then the odds are that I either did it ignorant of the prior art (which means my work should be judged on its own merit, not against someone else's) or I think I have something to add on the topic (in which case, you probably didn't read the post to see what I added before commenting, and shame on you for that) or you/your cousin/Nikola Tesla/Jeri Ellsworth didn't post it on the web or adequately document it (meaning, my documentation of the project adds to the richness of the human experience, or something).
  5. "You have too much time on your hands."  Another troll comment from someone who thinks they're hot stuff but never actually does anything.  What, pray tell, SHOULD I be doing with the tiny little amount of spare time I carve out of parenting, working, housekeeping, commuting, and sleeping?  I MIGHT tolerate this from someone who doesn't even OWN a television (because if you own one, I guarantee you spend more time watching it than you think), but since that's only something like 1.5% of the population and that 1.5% is too busy being productive to level such a shallow criticism, anything I'd suggest to this commenter would be inappropriate for a public venue.
I'll tell you who I feel bad for- the kids of these wastoids.  "Pshaw.  You call that a fingerpainting?  Have you ever heard of perspective?  Composition?  Wiping your fingers between colors?"

So, as your mother should've taught you, if you don't have anything nice or constructive to say, STFU.

Last thought- this is a major reason hackerspaces are awesome.  Most of these comments are easy in the faceless netvoid but you'd NEVER trot them out face-to-face.  Plus, by their very nature, hackerspaces attract the people for whom the doing is the most important part; for them, results speak louder than words.

Monday, December 27, 2010

Draft proposal for SI units for bitching...

... as proposed by Jeri Ellsworth:  the "Jones", after EEVblog's Dave Jones.

As with all SI units, we must define it in terms of base units, so I propose this:

1 Jones = (# of complaints about a topic) * (sum of levels of annoyance caused by said complaints weighted by exposure frequency to causative events, in seconds between exposures) * (# of people likely to be exposed to your ranting)

Obviously, the level of annoyance varies from person to person; I imagine a level 1 annoyance ("mild eye rolling followed by repetition of action until desired result is achieved") for a more patient colleague might be a level 5 annoyance to me ("loud sigh with posture change and muttered profanity") and could rank to a level 100 for someone else ("widely distributed internet video rant with attendant behavioral change and increased probability of property damage to exact retribution on an inanimate object").

As a practical example I'll float my issues with OrCAD- there are five things which cause me pain every day with OrCAD, three level two issues ("eye rolling with quiet sigh") and one level 6 issue ("profanity audible but not comprehensible to workers in adjacent cubes") and one level 50 issue ("loud cursing and banging of mouse on desk").  Weighted, I'd say I get one level two event every 60 seconds of OrCAD usage (.033), one level 6 issue every 300 seconds (.02), and one level 50 issue every 3600 seconds (.014), for a total weighted annoyance of .067.  At best, normally, about four people are exposed to my ranting; thus my irritation with OrCAD is about 5*.067*4 = 1.34 Jones.

The nature of this is such that it is similar to the Schmidt Sting Pain Index- individual preferences and tolerances will affect the outcome heavily, as does personal audience size (clearly, Dave has a much bigger audience than I do).

Tuesday, December 21, 2010

Regulators, mount up!

On the heels of a few tweets regarding linear voltage regulators that I passed with a friend yesterday, I think I'll do a couple of posts on voltage regulation.

First, the general concept: voltage regulation is the creation of a stable, low-impedance DC voltage source from an unregulated DC voltage source.  Examples of unregulated DC voltage sources are batteries, "wall wart" type AC/DC converters (even though many of these create very good voltages (these days, anyway), you should always assume that you (or someone else) will plug a different supply in), car cigarette lighter sockets, rectified and filtered transformer outputs, solar panels, fuel cells, dynamos, and fruit with pieces of zinc and copper in.  In fact, pretty much anything other than a locally generated voltage from a well-designed regulator circuit should be treated as an unregulated source (for design purposes, at least).

This first post will concentrate on linear voltage regulators.  Sometimes you'll hear these carelessly referred to as "LDOs", although the LDO (low dropout) regulator is really a subclass of linear voltage regulators, and not all linear regulators count as "low" dropout.

Pictured above is a typical linear regulation circuit.  V1 is the unregulated source; D1 prevents a reverse-connected power supply from destroying the circuit, and should be a large enough power rating that it won't be in danger of damage when the circuit is energized (the 1N4001 is not a bad choice for this, although at higher currents it has a fairly high forward voltage drop).  If the voltage drop from a diode is unacceptable, there are linear regulators available that have built-in reverse voltage protection (the LM2931 is a good example of this), and there is a trick that can be played with a PMOSFET which provides good coverage at the expense of increased cost (I'll not cover that here- maybe in a future post).

The capacitors are where the real work comes in, so to speak.  Every different type of linear regulator will want to have different capacitors on the input and output- some will be happy with no, or minimal capacitance, while others will want a large "bucket" capacitor to provide current during surge periods.  Some need a minimum amount of ESR (equivalent series resistance) to avoid oscillatory behavior while others are fine with a low ESR tantalum electrolytic or ceramic on the output.  There are three things that need to be said here:  first, ALWAYS check the datasheet for the part you're planning to use.  The manufacturer will typically specify on the front page, in bold lettering, quotated, underlined, with a little drawing, what they expect in the way of capacitors and whether low ESR caps are expected/accepted.  Second, the bucket capacitor on the input (C1 above) is much less important in most cases than a decoupling cap and output capacitors, UNLESS there's a significant distance between the unregulated supply and the regulator (i.e., a long wire running from a wall wart calls for an input cap, but a battery a couple of inches away likely doesn't).  Third, you should derate the capacitor voltages by a factor of  (at least) two- if you expect to see 12V on the input, use 25V or better capacitors.  Ceramic capacitors are quite tolerant of at or near spec voltages, while aluminum electrolytics will suffer from prolonged near-spec voltages and tantalum electrolytics will freak out and die horribly with even small spikes above their rated voltage (seriously)(we're talking fire and brimstone freak outs, here).

So, now that you understand the circuitry, there are a couple of other key concepts to understand: quiescent current, dropout voltage, and power dissipation.  Quiescent current is the current the regulator "wastes" in the business of doing its job.  This is another look-it-up-on-the-datasheet value; the quiescent current will vary based on the cost of the regulator and the momentary load current (usually the Iq vs Iload spec is shown by a graph on the datasheet).  Some regulators will have very low quiescent currents (<10uA); it rarely ranges above a few mA.  The variation across load currents is usually not huge in absolute terms; for instance, the LM2931 mentioned above is from 1-10mA across its specified current range.

Dropout voltage is the minimum voltage difference between the input and the output.  The dropout voltage will increase as the load current goes up, and as the temperature of the device increases (we'll talk more about this in the power dissipation section).  If the input voltage is not greater than the output by at least the dropout voltage spec, the regulator will not perform as specified.  Typically, the output voltage will begin to sag, and will remain at a level of approximately Vin - Vdo; as Vin sags further, so will Vout.  Other characteristics will suffer too, such as noise rejection and surge current response.  Cheap regulators like the ubiquitous 7805 may have a dropout voltage exceeding 1V for even fairly light loads; fancier regulators may have dropout voltages well below .1V for light loads.

Power dissipation is the big bugaboo with linear regulators, and the limiting factor in their use.  The standard EE equation of P = I*V is applicable here; as the output current increases, the power dissipation of the linear regulator increases, as well.  The actual equation should look more like this:
P = Iq*Vin + Iload*(Vin-Vout)

This leads us to a couple of observations:  first, the greater the Vin/Vout delta, the more energy is wasted.  This is an important data point, because, while running a 5V system off a 9V battery with a cheap 7805 regulator may seem like a no-brainer, you're going to waste a tremendous amount of the battery's capacity.  An Arduino doing not too much pulls about 70mA; at that rate, you're going to deplete a 9V battery to 6V (which is probably about as low as you want to go before you start to eat into the margin of dropout voltage plus protection diode voltage) in something like 8 hours.  Add an Xbee module and you're going to end up below half of that time.

Second, the greater the Vin/Vout delta, the hotter your regulator is going to get.  With a fresh battery, the regulator on your Arduino is going to be dissipating close to 300mW, BEFORE you add additional load.  Again, the datasheet will give you some idea of what you can get away with here: typically, there will be parameters for Vin max, Vin - Vout max (more important with adjustable regulators), Iout max and Pmax, and typically there will be multiple values for each depending on the selected package and whether or not the device is provided with a heatsink (either in the form of an actual chunk of metal or a solid connection to a large pour of copper).  You'll need to comply with the most restrictive combination- if your 5V regulator specifies 20V maximum input, 100mA maximum output current, and 500mW maximum power dissipation, you obviously can't expect it to source 100mA with a 20V input level without melting.  In fact, if that 500mW dissipation is depending on a big fat heatsink and forced air cooling, you might not even be able to reach that without destroying your part.

So, now, the question that started this all:  If I'm running a 3.3V regulator and a 5V regulator off a 9V battery, am I better off dropping the 5V to 3.3V or conneting the 3.3V regulator directly to the 9V supply?  The answer is, it depends.

Going from 5V to 3.3V is going to result in the 3.3V regulator dissipating less power (because the voltage delta is smaller); that may mean you can use a smaller regulator, or a regulator that can't tolerate the full 9V input supply.  However, that power dissipation gets moved from the 3.3V part to the 5V part, so there's no free lunch in terms of reducing total power consumption.  Maybe that's okay, because the 5V load is light, or because the 5V regulator can handle the greater power dissipation better than the 3.3V part could have.  It may also enable you to use the output capacitors from the 5V regulator as input capacitors on the 3.3V supply, or obviate the need for input capacitors on the 3.3V supply at all.

Connecting them in parallel has the benefit of spreading the power dissipation between the two devices; it also means that a brownout on the 5V supply won't bring down the 3.3V supply (which could be good or bad).

The driving forces behind the decision, then, become your selection of the regulators to be used and the load on each regulator.

Lastly, I'll say that, despite the seemingly great amount of detail here, there's a lot I've left out.  I didn't cover adjustable regulators at all (typically, they use a voltage divider to set the voltage at a pin, from which the output voltage is derived), or regulators with enable pins (generally used for power supply sequencing or disabling parts of the circuit when necessary), or multiple output regulators (pretty much the same as single output, but you'll need to sum the power dissipation of each output rail to calculate the total power dissipation of the package).  Most of that stuff is refinements of the information here, and this is a good practical primer on the topic (or so I hope).

I've got a few more posts on the topic- switched capacitor supplies, inductive switching supplies, batteries, and maybe more on other types of unregulated supplies.

Wednesday, December 15, 2010

Voltage dividers

A common problem in electrical engineering is the use of a resistor divider to create a circuit which derives a second (lower) voltage from a known voltage.  This can be for a reference voltage to an ADC (as on the Arduino), to set the voltage on an adjustable regulator (where the regulator seeks to maintain an output voltage adequate to produce a set voltage at a feedback node), or to calculate the gain on an amplifier circuit, among other possibilities.

The canonical voltage divider circuit
Usually, we know Vin and Vout, but R1 and R2 are unknowns.  We usually pick one of them (based on what's on hand, in the parts library, time of day, dog's birthday, roll of a 20-sided die, etc), then calculate the other.  Almost always, that results in a value which is not readily available, so we pick the closest value, calculate the error, decide it's too much, and pick another resistor value and start over.

Error in the output voltage has a number of possible sources:  input error (typically, we're pulling Vin off a supply rail, which means it's only as accurate as our supply; for a cheap 7805 shunt regulator that may be as much as 5%), bias current error of the sampling circuit (typically fairly minimal in most circuits, but if you want to use high-value resistors to minimize waste current for battery life issues, you may find that the minimal current drawn at the Vout node introduces significant error), variation of the selected resistor values from the ideal values, and error in the actual resistor values from their nominal value.  Depending on what you want to use the output voltage for, even a fairly small error can be quite significant: many devices want power supplies to be within 5% or less, and every little bit of error reduces your design margin.

There are calculators all over the web that will do some of this work for you but they are usually only algebra cranks- they ask for three values and calculate the fourth; they rarely look for a "real" value that will work, and they don't usually tell you what kind of error you're introducing.

Since the values available are discrete and with a fixed tolerance, it's fairly easy to write a program that accepts Vin and Vout as parameters and returns an arbitrary number of solutions based on real values.  Sure, it requires many thousands of calculations (for standard 1% resistors, there are 9,216 possible combinations if you consider only those within one multiplier (i.e., 1.00k<= R < 10.0k); if you expand the range (i.e., 100<=R < 100k), that number quintuples, but what are computers for if not for automating repetitive tasks?

Here's a program that uses Python (2.7) to solve for an arbitrary (default 5) number of solutions to the resistor divider problem.  As arguments it accepts:
  • Vin
  • Vout
  • Series (standard 5% (E24) values, 1% (E96) values, or an arbitrary list from a file)
  • number of results desired
  • whether to include values one step above or below the nominal range
It returns a list to the command line which specifies:
  • multiplier for R1
  • multiplier for R2
  • absolute nominal error
  • worst case errors, +/- (given the tolerance of the parts specified)
  • parallel resistance of R1 and R2 (valuable if output impedance of circuit is important)
The worst case errors are only calculated for standard values- if you input a text file, both worst-case values will be the signed value calculated for the nominal value.

As an example, the TI TPS73201 regulator sets its output voltage based on a voltage divider- Vin is the desired output voltage, Vout is 1.204V, and by selecting appropriate resistor values, Vout can be set.  Furthermore, the datasheet indicates that to minimize error, R1||R2 should be 19k.

A chart is provided in the datasheet for various common voltages; for 1.5V, the suggested resistors are 23.2k and 95.3k (both standard 1% E96 values).  Running the script shows us 24 value combinations that have a better nominal error than that combination, BUT none of those combinations comes as close to the 19k parallel impedance requirement.

Maybe at some point I'll get this script executing in some fashion on a website; if I do, I'll link it.  For now, download it and play with it yourself.  Execute it from a command line; the -h switch will print a fairly comprehensive help list.

Monday, December 13, 2010

Fun with super-cheap LED flashlights

Somehow I've become a prolific blogger lately.  I wonder if this will last...

Today at work I had a serendipitous moment of seeing two desktop objects in an abnormal light: a small, scavenged lens cell and a super cheap (2 for $5) LED flashlight.

As part of my on-going inculcation into the mystical arts of optical engineering, one of my fellow engineers demonstrated to me the ease with which an illuminated object can be projected onto a surface, if the various distances are correct.  His demonstration was with the image of the lit window that faces our cubes, but it occurred to me today that, by tweaking distances, I could probably get a similar image from my LED flashlight, writ large on a blank whiteboard.

Tah-dah!  What's more, I found that, by moving the lens slightly along the optical path, I could bring different elements of the LEDs into focus.  But lets start by analyzing this image.

First, you can see (though not very well) that the LED lenses are fouled quite badly.  Most of the speckling on the middle three LEDs is NOT the whiteboard.  More significant, however, is the fact that, of 12 LEDs, one is off entirely, one is barely on, and one is quite dim.  This is owing to the sub-par circuit design of this flashlight (for $2.50, I don't expect much, but, hey, let's learn from it!): the LEDs are basically all in parallel with each other and with three AAA cells in series.  The result of this is that the LED with the lowest forward voltage gets most of the current, until IT burns out, then the next lowest voltage, and so on down the line.  The LED that is off either has a REALLY high forward voltage or is the first casualty of this chain of failure.

Interestingly, although it's not visible here, some of the LEDs seem to be flickering a bit- this may be a precursor to failure or simply a result of bad solder joints (which is another possible failure for the "off" unit).  Rather than pads, the PCB (if you can call it that) which these LEDs are mounted to is essentially a couple of concentric rings of copper- resulting is an immense thermal mass which needs to be heated up to get a good solder joint.  Most likely, this is being done by hand in a Chinese factory (believe it or not, hand assembly is economical in many Chinese assembly plants), which opens up many possibilities for cold joints and overheated diodes.

By sliding the lens a little further along the optical axis, I was able to bring some other features into focus.  The middle three LEDs (particularly the lower left one) have clearly visible wire bonds to the center of the die.  This isn't really bad or abnormal- I've seen similar things on very expensive LEDs as well.  However, it's a pretty nifty little visible artifact of a part of the assembly process we normally don't think a lot about.

I'll also briefly mention the blue-ish color seems to be a hallmark of VERY cheap LEDs from China- I've ordered some "white" LEDs from the super-cheap vendors on Ebay before and they look almost more blue than white.

Sunday, December 12, 2010

If you can't find it, you don't own it (part 4)

Once you've got it all together, where do you use it?

My workspace is divided in half- an electronics bench with tools and a PC station.  The PC desk is boring- two 19" monitors, speakers, printer, etc- I won't bore you with pics of that.

There are only a couple of things I really want to mention here as being special about my desk.  First, the knife holders.  These are the standard type of wall-mount magnetic knife mounts.  Mounted vertically (because they were too long for horizontal) they hold my small tools- little screwdrivers, a wire stripper, a side cutter.  I have duplicates of all of these tools in the mobile kit but it's nice to have them handy.

Secondly, the whiteboard.  It's magnetic so I can stick stuff onto it, but it's really more useful as a whiteboard- I'm a big believer that whiteboards are the stuff engineering magic is made of.  I have four of them in my cube at work, and one of the smartest facility design elements I've ever seen was in the "new" (this was probably over 10 years ago) EE building at the University of Richmond.  Every hallway in the building had a little alcove directly across from each doorway where people who were walking along could stop, step out the line of traffic, and use a whiteboard in the alcove to explain a concept.

Third- drawers.  And more drawers.  And yet more drawers.  To have any prayer of being productive, you need to categorize and segregate your goodies.  The little wooden cabinets are narrow but long; the plastic drawers on top have several subdividers in each one, and the red cabinet in the lower left is big enough to accommodate quite large items (say, a 7" SMT component reel).

Finally, the monitor is (if I do say so myself) cleverly mounted:

I used a couple of long travel drawer slides from Ax-man to place it such that it can slide to the right, out of the way, exposing a shelf behind.  I keep that shelf mostly empty so I can stash a project that I'm not done with but putting on temporary hiatus.  This keeps the work surface from being cluttered with bits and pieces of stuff I'm not using at the moment, but which I'm not ready to put away.  Also note the little baggie to the left of the monitor- it's a "tiny trash" bag, where I can deposit trimmed leads, stripped wire insulation, ruined screws and the like, thereby keeping that stuff from building up on the work surface.  Clutter begets clutter.

The rest of my stuff is here- the shelves on the left are mostly domestic items- tool kits, screws, etc.  Stuff any reasonable homeowner should have.  Worth mentioning is that my junkbox cyclorama is just out of view in the lower left.  The boxes on the shelf at the back are individually labeled subdivided containers; when I want to put a project in "cold storage" so to speak, either because I want to work on it much later or because I don't want to tear it apart but I'm done playing with it, I throw it in a box, label it, and shelve it.  There is only one "random crap" box- EVERYTHING else is properly labeled, because boxes of random stuff might as well not exist when they get too big or too prolific in number.

Lastly, I'll say this:  there is a reasonable amount of unused space on the shelves on the left, at the bottom.  Unused in the sense that all the boxes that are stacked there are empty.  This, I think, is the last critical element of keeping your space under control: provide for growth.  If you can't immediately categorize an item (meaning, put it in a LABELED drawer or box), or create a NEW category for it (meaning, put a label on an empty box or drawer and throw it in there), the clutter will come back with a vengeance, and you'll never be able to find the parts you need.

Saturday, December 11, 2010

If you can't find it, you don't own it (part 3)

In part three, I'll show off my mechatronics tools and parts kit.  Part four will be my workbench and parts storage; that'll probably follow pretty closely on the heels of this since I'm so totally snowbound I really can't do anything else.

It's bigger than it looks.  I had a hard time with this box- it was one of those tool boxes that new homeowners who fancy themselves "handy" buy, which are inexpensive, totally lacking in adequate internal division, and end up full of things like rusty hacksaws, dull chisels, ruined putty knives and inexplicable sheet metal items with flanges and numbered mounting holes.

As always, mouse over for labels.

Mostly self explanatory; I'm going to mention a couple of things by name.  First, the Pocket Ref on the left side.  My copy predates Make but you can get it from the Maker Shed.  If you don't own this, you should  It has ALMOST everything you'll ever need to know- from the density and chemical composition of a huge range of substances to the masses, orbital periods, and average solar distance to each planet.  In practical terms, it has density, hardness, and coefficient of thermal expansion on dozens of woods, metals, plastics, and glasses.  It would, in fact, be pointless for me to continue to expound, so I'll say this: I have yet to be disappointed by this book when I tried to look something up.

JB Weld, if you don't know it, is a binary compound that works kind of like an epoxy- mix two pastes and they harden over time.  Once it cures, it's really strong, drillable, machinable, etc.- and quite heat resistant, to boot.  It's great stuff.

In the "main chamber" of the box is actual raw material.  Salvaged gearboxes, motors, pulleys, and parts from optical drives take up most of the space, along with a hot glue gun and a bunch of sticks (I go through hot glue like potato chips).  The small divided cases that attach to the lid are full of gears, sprockets, and fasteners, mostly compatible or nearly so with the Tamiya gearboxes that I've got in there.

Finally, on the left side, you can see an assortment of Sculpey III polymer clay.  This stuff is BRILLIANT.  When baked at 275°F (135°C) for about 20 minutes (depending on thickness) it sets up into, essentially, PVC.  Furthermore, the curing temp is lower than the deformation temperature of most OTHER plastics, so you can use it to build out other parts (I've had great success using it to neck down the hub hole in a wheel or gear; pack it in, harden it, then re-drill a smaller hole).  It's also low enough temperature that you can embed electronics inside your creations.  It's not too expensive ($2 or so for a 2 oz. block, which is about the 2/3 the size of a deck of cards), and comes in a whole rainbow of colors.

So, that's effectively the end of my mobile workshop, except for one summary picture:

The little cart is from IKEA- I got it a couple of weeks ago for $9.50 in the As-is section because it didn't have the bag.  The strap is an REI luggage strap meant to hold a smaller piece of luggage to a larger one, but it's tops for this.  The wheels are a completely lost cause in a Minnesota winter, but it beats making three or four trips to get all my crap into the workshop.

I have a wheeled laptop bag, as well, which I keep my netbook and some assorted other stuff in, but it's too dull to warrant a post.  Later tonight or tomorrow I will put up some pictures of my at-home workspace and storage system.

Coroplast snowshoes- it SOUNDED like a good idea...

If necessity is the mother of invention, snow day boredom is the drunken dorm-mate who will ultimately get you picked up by the campus police.

If you're outside of the Minneapolis/St Paul metro area, you may only be cursorily aware of the current snow-tastrophe.  We've gotten about 12 inches so far (300mm for you post-Imperialists) and are expecting another 4-6 (100-150mm).  I managed to get my car safely embedded into a snowbank off of the snow emergency route I live on (read the rules regarding that here- it's harsh but necessary), and, after digging and pushing out a few more people on the walk home, I got bored.

My work has been throwing out shoebox sized coroplast boxes for a while now; and being, as I am, on the verge of collapsing into full-on hoarding behavior, I've been picking them up and carting them home.  I've probably rescued about 800- there's a stack taller than I am at the Hack Factory.  Anyway, I use these things for everything- as boxes for storing stuff, dividers in my toolkit, a platform to spread out my compost on, whatever.  So, of course, faced with the reality of 18" (with drifts) of snow in my front yard, I decided to make snowshoes!

So, the basic construction is pretty simple- the beaver tail at the bottom of the picture folds up behind my boot, and the two pieces of knotted fabric strips tie around my ankle and over my toes.  All the folds are held together by a few layers of packing tape- I'm not bringing diptheria serum to Nome, here, so I don't really care for long-term viability.  I just wanted to walk around on top of the snow a bit.  I've always wanted to try it.

So, without further ado, here's a video of me trying them out...It didn't work quite as well as I'd hoped.

So, my post-mortem:
First, they aren't rigid enough.  They really just fold up around my foot and then I sink down to bedrock anyway.
Second, they are too big towards the instep.  That's what all the goose-stepping was about- once I sank into the snow, the plastic very helpfully fanned back out, necessitating a wide stance and a longer-than-optimal pace length.
Third, the lack of a frame and a really strong shoe connection means that it's really more like trying to walk with a someone throwing a small sled under your foot with each step than on a snowshoe- I slipped and slid both foot on the plastic and plastic on the snow- that's why I fell at the end.

Did I do ANYTHING right?  I think so...the packing tape seems to have held up well, and the pieces of fabric I used as ties were really nicely sturdy and big enough to easily be done and undone with gloves on.  I think a piece of lathing or similar light but sturdy material across the toe and heel edges would've probably made them work reasonably well, but I don't have anything like that in the house and I really didn't feel like trying to slog out to the garage.

It was fun, anyway, and a good way to kill an hour on a snowy day.

Thursday, December 9, 2010

Some thoughts on hackerspaces

Of course, the world is replete with articles like this but I recently had cause to write down my thoughts on the issue and I feel like a little more on it couldn't hurt.

Why did I get involved in Twin Cities Maker back in 2009, before there was a space?  Simple- I wanted to be part of a MEATSPACE community of people that likes to make stuff.  It didn't exist, so when I found the group, there was no way I could NOT get involved.  I think people who worry too much about virtual space replacing "real" interactions should look at hackerspaces as a dynamite counterexample.  By definition, the people who are involved in these groups are the most likely to be tech savvy, the most likely to participate in online communities of informational interchange about their hobbies, the most likely to be creative basement hermits, AND YET, increasingly, they are seeking out face-to-face interaction as an adjunct to their online work.

The tools, the workshop space, the raw material bins: these things, alone, aren't enough.  Oftentimes, I've given people a tour of the Hack Factory and, at the end, they'll say "that's great, but I have most of these tools in my garage.  Why should I pay $50 a month to use them here?" (usually, the touree has an "I-can't-believe-you-haven't-thought-of-this" smirk when they say that).  And I usually say to them, "if that's how you're going to look at it, the Hack Factory probably isn't the right place for you."  They see an underfunded, understaffed, under-equipped TechShop, but a hackerspace collective requires a different mental model than a TechShop, in much the same way as a farmer's market is from a grocery store.  Sure, the superficial trappings are similar (tools for use/food to purchase) but if you've shopped at a farmer's market, the difference is immediately apparent- people sitting, having coffee, chatting with the vendors and one another.  In a word, community, which is the key to a hackerspace being successful- and it's what those people with the spiffy garage workshops don't understand.  

TechShop is, in a way, a cargo cult realization of the concept- a belief that if you put a bunch of tools in a building and charge admission, people (and money) will show up.  The Hack Factory is, in fact, a building wrapped around a community, and tools and materials have shown up- the community created the value of the space.  I'm not knocking TechShop; in a place that's flush with technical types and cash (Silicon Valley), it's a great idea, and I have no doubt that a lot people who go to TechShop feel a sense of community there, as well.  But in most places, the dedication of the individual to the community is more important than the willingness to pony up $100 a month, because you'll find more dedicated amateurs willing to pay $50 (and a parcel of their time) to support a community they believe in than you will to pay $100 for a little extra workshop space and some fancy tools.

Chris Anderson talks a lot (in his book, Free) about these dedicated amateurs, and the value of recognition to these people (us, I should say) as a compensation for their work, and why a lot of online communities attract people to do really high quality work for recognition rather than cash (Wikipedia).  Hackerspaces attract the same sort of person that will spend hours writing and researching a Wikipedia article- they get a charge from the pride of producing a fine piece of work and knowing people appreciate it.  The hackerspace, of course, puts it into meatspace, which (for some folks) increases the relative value to a point where people are not only willing to do the work for free, they are willing to PAY to support the community that enables that appreciation.

In the end, I suspect it's all about finding "your" people- people who understand the motivation behind making something that you could buy, buying something perfectly usable just for the parts inside, people who not only don't mock your three-story mobile toolkit, they think it's pretty cool.  $50 a month seems like a bargain.

Tuesday, December 7, 2010

NDAs, Patents and Projects

Some thoughts below on NDAs, patents, and people seeking project help from me when I'm wearing my freelance engineer hat.  A lot of this comes from having followed the Piclist mailing list for about 10 years, as well as reading quite a bit of Don Lancaster's writings on the matter- as well as a healthy dose of professional dignity imparted to me by the conflation of engineering with other highly skilled professions such as law or medicine during college.

Sometimes I'll get a feeler e-mail about someone who wants to work with me, and they start off right away by saying "if you're interested, let me know and I'll get an NDA out to you right away."

I don't mind working under an NDA (under certain conditions), but some things about being hit up by it right away like that scare me:
  • Once I sign this NDA, if I subsequently complete or publish a project which is remotely similar to this person's idea, there is a legal document which could cause grief for me.  This is why music labels and publishing houses have rules about unsolicited material.
  • If the person e-mailing me is doing so as the classic "garage inventor", the assumption of an NDA feels to me like an assumption of asymmetry of relationship- they value their idea more heavily than my ability to make that idea a reality, and that spells trouble.  The fact is, ideas AND engineering chops are both a dime a dozen.  What's TRULY rare is the wherewithal to bring an idea to fruition in the right place at the right time.
  • I believe in open source hardware and software.  An NDA is pretty much an acknowledgment from the get-go that this project will never see the light of day, EVEN IF there is no "secret sauce" in the project.  If it's good enough to steal, it'll get stolen whether I post details on the net or not.
So, in the end, if the first e-mail is all about the NDA with zero or nearly zero technical detail, I usually assume I'm dealing with a prima donna type that I'm unlikely to be able to satisfy.  It may be unfair, but my time is scarce and it seems like a good pre-filter.

Don Lancaster has a lot to say about patents (and being an engineer in general- if you're not familiar with his work it certainly a little browsing of his copious online archives certainly won't harm you any) so I'll not do more than touch on it.  In short, all a patent does is give you license to sue someone if they rip off your project.  If your project is good enough for a Chinese manufacturer to decide to rip it off, they'll make enough money to brush off your lawsuit.  If not, you have nothing to fear because nobody will waste their time with your fiddling small change.  The key is not to get overly self important about the matter- it's easy to waste a lot of time and money on patenting something.

Finally, how I actually view projects that make it through the filter to be considered:

Broadly, I divide commission projects into two groups- one-offs and product development.  A one-off is something like that bathroom hassler that I posted a couple of weeks ago- probably something REALLY fun, where the client is not concerned with bringing something to production, the overall effort is like to be pretty small, etc.  Those I usually negotiate terms on a by-project basis- I ask that they buy extra parts so I can keep some goodies at the end (I make them fully aware of the fact that some of the hardware is part of my payment), or get a little in-kind service (I've done projects for food, laser cutting, and soon, golf driving range access).

Product development is a bit different.  For that I'm more likely to look for hourly rate plus development costs.  Part of the reason for that is because the process is more in depth and difficult- a one-off is basically a jumped-up hobbyist project, whereas product development requires some real knowledge beyond just slapping something together.  Another part is that, if things go well, they stand to benefit a lot from my work and so a steeper up-front cost is reasonable- it's an expense of doing business.

You'll find that a lot of people that come looking for help developing a product have no interest or ability to pay for it- but that's okay, because it's my day job to do that sort of stuff and the one-offs are more entertaining and enjoyable anyway.

Monday, December 6, 2010

The junkbox cyclorama

Adafruit had a post a few weeks ago about building a cyclorama to take nice pictures of your work.  I built one up for the office (we always have horrible pictures of things in our documentation), but for home I can't justify even the $50-75 one would cost me.  So, I did what any good maker will do- hit the junk piles!

First, a word on sourcing:  the local IKEA has a section right before the checkout called "As-is".  (My wife and I frequent IKEA for some reason- we eat breakfast there about once every couple of weeks, and dinner there almost as often.)  As-is is where IKEA goods too good for the trash but too bad to sell as new go- returns, scratch and dent, display models, etc.  Every so often, they'll bundle up a bunch of crap and put it on a "mystery cart" or a "handyman's cart".  The shelves just visible to the right above were a handyman's cart item; the lights all came from a mystery cart.  I've actually bought far too many of both of those; my garage is stuffed with disused cabinet doors and partly assembled furniture along with piles of mystery cart lights.  To be fair, I've also done a lot with the stuff I got out of them, but the piles of junk are probably not worth it.

At any rate, the backdrop lighting is provided by three "Kvart" lamps and the ambient lighting by a six-up "Glimt" light (link is to PDF of the assembly directions; apparently it has been discontinued).

There's a sample image; it's a little blurry around the edges (I don't have a tripod; I'll probably try to hack something together out of another Kvart desktop base) but I am quite happy with the quality of uniformity of the light.

Here we see some limitations; if the board angle is too steep, the picture shows hot spots from the individual bulbs.  I may try to add some diffuser paper (well, office paper) over the lamps- that's going to be tricky because the bulbs are stupid hot halogens.

I'll probably also make a roof and side walls out of  white foamcore (I have a bunch of THAT lying around, too, of course) in an effort to reign in some of the stray light I'm losing to the surroundings.

The backdrop is a blackout rollershade we had custom cut for a window without adequate measurement beforehand.  I couldn't bring myself to throw it out and now I'm glad I didn't!