Monday, December 21, 2009

Did you see a sign on my door that says "Dead capacitor storage"?

With apologies to Quentin Tarantino...

For a 10-year-old problem, the capacitor plague has been bizarrely present in my life recently.

It started a couple of weeks ago when a coworker offered me an LCD TV that was "flaky" as scrap (my scraphound predilections are by now legend among those who know me). Being the upstanding gent I am, I pointed out that it was probably bad caps, and I found and replaced the buggers for him.

A friend in Iowa sent me an e-mail, asking for help debugging a dead plasma he'd been gifted. He hasn't found bad caps yet but I'm fairly confident he will.

My PC was dead the other morning, when I got to work. Guess why?

A couple of months ago, I found a dead 17" LCD in the trash bin at the office. By now you should know how I fixed it.

A tweep I follow posted this article this morning.

This is fascinating for me in that it hits a number of points that people fail to understand about electronics:
  1. They wear out, but certain components are more likely than others to wear out, and fortunately, those components are easy to fix.
  2. There are two completely different realms for parts procurement. If you're dealing with quantities below, say, 1e6, you deal with the companies represented by distributors found in an Octopart or Findchips search. Above that, there is an entirely different group of manufacturers, and their components aren't cheaper because they grow on trees- they cut corners.
  3. OEMs don't care about long life, just long-enough life. If they save $1 per motherboard by using caps with a MTTF of 2000 hours rather than 10000 hours, and that gets them past their warranty period, that's fine with them.
  4. "High quality" electronics are not immune to this. ALL consumer goods (seriously, all of them) are dipping from the pool of cheap-o component makers. This is true from the $15 coffeemaker from Target up to a $2000 plasma TV, from brands like Coby all the way up to Dell servers.
  5. If you're making a product pulling from the Digi-key sourced manufacturers, the quality of component you're getting will be much higher. Replacing a burst cap with one from DK with similar specs is going to get you a long way.
I'm wondering how many otherwise perfectly good consumer electronics items are in landfills because of this issue.

So, take heed- most likely, a failed cap lurks in that dead PC, somewhere. It's an easy fix that can bring lots of valuable electronics into your life.

Monday, November 16, 2009

Pulses on pushbutton

A friend was asking after a circuit for making pulses from a pushbutton on push and release. Two ways immediately suggest themselves- using a PIC and using a differentiator.

The PIC is easy for me, at least- I have a small stock of 12F683s which are 8-pin devices. Add a bypass cap and you're in business- you could even reprogram it to change the delay, debounce the input, etc. Of course, not everyone has a PIC programmer, and I feel like it's a pretty trivial app for a PIC, so I'll not talk much more about it.

The differentiator circuit is a little more involved.
Apologies for the crappiness of the image- LTSpice doesn't generate great output images, for one, and this was part of a larger image (it started NPN based, and generated negative going pulses; that's where Q3, Q4, etc etc went).

V3 is the switch- in the application, it should be a 100-ohm pull-up to 5V and a switch that yanks C2 to ground when it's closed.

R4 pulls up the base of Q3 and Q4, keeping them turned off and providing a 0V output normally. In steady-state non-pushed, C2 will have about 0V across it. When the switch closes, the base of Q3 and the emitter of Q4 get yanked down (since the voltage across the cap can't change instantly). Q3 turns on, and the load sees a pulse that goes up to 5V. C2 charges to 5V (since one end is at 0V and the other is tied to 5V through R4), and as it charges, Q3 slowly turns off. Q4 has, as yet, never turned on, since the base has never been at a lower potential than the emitter. When you release the button, the (not shown in the drawing) 100-ohm resistor which is a pullup to 5V yanks the bottom of the capacitor up by 5V. Since the cap is already charged to 5V, the voltage across the capacitor is now 10V, which shoves the base of Q3 above the 5V rail by about 5V (turning it off even harder, for what it's worth)(which is not much) and, here's the magic part, shoves the emitter of Q4 5V above the 5V rail. Now, there's a 5V difference between the base and emitter, the transistor is biased, and it turns on, which again yanks the load up towards 5V. Again, C2 will discharge, and Q4 turns off as it does. The diode provides a clamp to the 5V rail, limiting the voltage on the output. It tends to pop up to 8V or so, although only briefly, so it may not be an issue.

This circuit is a real hack job- I know I could kill that >5V excursion if I spend a little more time on it. It's simple, though, and I like it.

The LTSpice file is available here.

EDIT: Adding a 270-ohm resistor between the base of Q3 and the emitter of Q4 keeps the excursion to a very reasonable .2V above 5V.

Tuesday, November 10, 2009

LTSpice

For those in the electronics world, SPICE simulation can be a great way to answer the "will my circuit work as advertised" question without breadboarding. It's a great sanity check- if it don't work in SPICE, it won't* work on a breadboard.

LTSpice is Linear Technologies' own incarnation of SPICE. It's a nice little product, and comes with models for many of Linear's products (power supplies, op-amps, etc) along with many supporting components from other manufacturers (diodes, transistors, capacitors, inductors, etc) and generic parts (555s, LEDs, etc). Obviously, they provide it expecting people to download it, sim up a solution involving Linear parts and then sell eleventy-billion a year, thus providing a nice income stream for Linear (and it works- LTSpice makes it much more likely that I'll reach for a Linear part for power supply design than another manufacturer's parts).

But for the tinkerer, it means that there's a free, very powerful SPICE tool out there, which is well supported. Give it a look!

*for some values of "won't". For instance, there are times you might want to put a transistor in "backwards", or use just the collector-base junction as a noise source. In that case, the model probably won't hold up- but if you're doing things like that, chances are you don't mind not having a model for it anyway.

Saturday, November 7, 2009

Breadboarding the Arduino- part 1

A few weeks ago, I purchased 10 Atmega328P's from Mouser, naively thinking it would be easy enough to get them working on a breadboard as an Arduino sans the fancy (expensive) board. I was planning to use an FTDI USB to TTL serial data cable to bootload (I bought a 5V one, then realized that the two 3.3V ones I already had would work fine- lesson one of this saga). I also bought a some 16MHz crystals and the appropriate capacitors.

At this point, I want to extend my thanks to whomever it was that decided a 6-pin AVRISP compatible ICSP header would be a value-add to the Arduino. I know that 95% of the Arduino users out there will NEVER use it, but I am very grateful.

So, first hurdle- I figure I'll take one of the 328s and upgrade my Arduino (it was one of the, what, six? Duemilanove's that shipped with a 168 from the factory). Supposedly, the Arduino IDE has the capability of loading the bootloader onto a blank chip through an AVRISP, but I'll be buggered if I could get it to work. After a little bit of monkeying around with it, I gave up, admitted defeat and downloaded AVRStudio. I highly recommend this route if the IDE bootloader program (using AVRDUDE) doesn't work right away- the pain level of a ~100MB download is much lower than trying to debug AVRDUDE- at least, on my internet connection.

At any rate, I had no Atmega328 Arduino to snoop, and nobody, nowhere, had clearly and definitively stated what the configuration bits are supposed to be. So, for posterity, I do that here, now (note that they've changed since I first posted this):
Extended- 0xFD
High- 0xDA
Low- 0xC6

EDIT: Note that these settings ARE NOT the settings suggested in the "boards.txt" file in the hardware\arduino directory. My suggested low bits- 0xC6 instead of 0xFF- will allow more types of crystals or resonators to work, at the expense of a slightly increased power draw. If you're THAT WORRIED about power draw, you're probably already digging deep enough that you've figured all this out, already.

I made a few educated guesses and got values which more or less seemed to work, and then I grabbed the bootloader binary from its home deep in the catacombs of the Arduino application folder. Success! I could upload and run sketches with my new 328 enhanced Duemilanove. Flushed with my success, I immediately launched into the next portion of the project: getting a breadboarded 328 loading sketches through the FTDI cable and the IDE.

At this point, and exactly how I managed to do this remains unclear to me, I proceeded to brick all three of my remaining 328s (I know, I bought 10, but I sold 6 to friends). I know I somehow wrote inappropriate fuse bits to the config registers, but I don't quite know how I did that, let alone how I managed to do it to all three. I can only assume that, briefly, I was MONUMENTALLY stupid.

So, of course, I began a bit of yak shaving. First, I tried my JTAG-ICE mkII, but that only works on JTAG capable parts (which the 328 is not). I THOUGHT it might have HV capability (Microchip's equivalent, the ICD2, does), but alas, no. Finally, thanks to Jeff Keyzer's excellent tutorial on making an Arduino into a high-voltage programmer (only high-voltage programming can resurrect an Arduino under some circumstances; for instance, if the reset pin is disabled), I was able to bring the chips back from the purgatory I thought I'd condemned them to forever.

So, here I sit, at 2:30 in the morning, weeks after starting all of this, about to embark on the next step: getting the parts to work on a breadboard, through the IDE, with minimal "tricks" involved. I will mention that I've been at this point before- before I bricked the chips, I had put them in a bread board and started tinkering, but I just couldn't get the thing to work. We'll see if this turns out any better- with luck, the next post will be a post-mortem on why it failed before and what I did right this time.

Thursday, October 15, 2009

Balloon boy- plausible?

Quick and dirty math post-

The media reports the balloon was about 20' x 5'. Modeled in SketchUp as a 20' diameter sphere, shmooshed to a disc with a 5' vertical, that yields ~1000 cu. ft. of helium, or ~28,300L. As we all know, helium can lift 1.113g/L, for a total of about 31.5 kg of lift for that volume of gas. A quick Google search tells me the average 6-year-old boy weighs 46.2 pounds, or 21kg. That leaves 10.5 kg for the mass of the craft itself- about 23 pounds, or slightly less than the weight of three gallons of milk.

I guess it's plausible, but I'm skeptical. I think it will come out that he was never on board in the first place.

Wednesday, July 15, 2009

Essential Skills Redux

Some general notes on the whole "Essential Skills" post.

A couple of commenters mentioned that it is a bit heavy on electronics. True; partly that's because I'm an electrical engineer, but it's also because, in my experience, it's also where many makers (aside: I will continue to use that term; I came to my personal peace with it during the discussion about what to name the Twin Cities Maker group) "fall down" and lose confidence or run aground. Electronics is a massive sphere, and my hope, by including those things on the list, was to encourage people to develop familiarity with the most basic, most useful aspects of it (at least, as far as general making is concerned), rather than feeling overwhelmed by the whole thing and steering clear of electronics projects altogether. Some of the coolest projects I've seen were banged together by people with little or no electronics experience, just the confidence to go forward and the willingness to make a few mistakes.

In the intro to the list for the BoingBoing crosslink, Cory Doctorow invoked Heinlein's "Specialization is for insects" mantra. I'll admit that I'd forgotten about that, but it was the spirit in which I was writing the list. Some people made suggestions later: rebuild an engine, wind a motor, weld, etc. I avoided things like that, because they tend to be too specialist. My goal for this list was to include nothing that required more specialized equipment than one was likely to find at, say, Wal-Mart. I think part of the maker "movement" is a sense that vast outlays of material and equipment cost are not and should not be required to do remarkable things. Welding, rebuilding an engine, using an engine lathe or a vertical milling machine, these are all admirable (and valuable) skills, but they are also out of reach for a vast swath of the making public. Most everyone, on the other hand, can find room (and money) for a tote box that contains a Dremel tool, an assortment of glues, a soldering kit and a multimeter.

Over the coming days (and weeks, no doubt), I'll make one post about each of the items on the list, and probably an updated list, too- I have no doubt some of the commenter's suggestions will make it on (and credit where credit is due, of course).

I hope some folks will check up occasionally and see what I have to say.

Monday, July 13, 2009

18 Essential Skills for a Maker

@AntonOlsen recently posted an article on GeekDad enumerating 100 Essential Skills for Geeks. As he was inspired to do so by a list of "Essential Skills for Men", so I am inspired to make this list of essential skills for Makers.

His list was a little long (100 items), terse (essentially one line per item, but with links), and slightly biased (heavier on computers than I might have liked, but to be fair, that is the most common geek fetish). I'm going to go for a shorter list, with slightly more verbose entries, and try to cast a wider net. If I get interest from this list, I'll follow up with an article on each point going into more detail.

1. Calculate power consumption and estimate battery life- Most electrical projects will involve batteries of some sort. Having an idea of how long your project will run on a battery can save you a lot of trouble later- that wireless garden soil moisture monitor is probably not going to run very long on a 9V battery. Maybe solar is a better idea?
2. Spot valuable salvage- Not only knowing where to get it, but knowing it when you see it. Finding it isn't too hard- curbs, alleys, and the classic dumpster dive. Deciding whether to keep it is the real trick: can it be broken down? Are there useful things inside (gears, motors, electronics, hardware, salvageable wood, springs, etc.)? Is trying to salvage parts of it a wise thing to do (upholstered items left outside are a great way to get bedbugs into your home)?
3. Spot eminently hackable, cheap Chinese crap- The glut of crap from China occasionally brings some real gems with it. Woot.com recently sold some rotating LED-based "police lights" for $3, which connect to USB and can be turned on and off by pressing a key on the keyboard.
4. Find "prior art"- In the patent world, "prior art" is anything which suggests that the idea you are trying to patent (or have patented) was developed or described by someone else first. The existence of prior art can break a patent. In the Maker world, prior art is a springboard. Someone, somewhere on the internet did (or tried to do) what you are trying to do. They may even be selling bits of the project which may make showstopping technical challenges mere speedbumps.
5. Stitch a simple and serviceable seam- We're not talking about making your daughter's prom dress, here- just being able to neatly and durably reclose the seam on the Furby you just hacked into reciting the Vincent Price speech from "Thriller".
6. Understand the voltage/current ratings on a power supply- If a battery won't cut it, you should understand at least the rudiments of power supplies: how to get a cheap wall-wart AC adapter, what voltage you can use, and why it's okay to use a 500mA supply to replace a 250mA supply.
7. Know which glue to use, when- Elmer's white, spray mount, Uhu glue sticks, JB Weld, cyanoacrylate, and two-part epoxy all have their uses.
8. Know which tape to use, when- Duct, masking, Scotch, foam-two-sided, and (occasionally) electrical tape all have their uses.
9. Deal with recalcitrant fasteners- Sooner or later, you'll want to remove a screw or bolt that is stripped, broken, or uses a security bit. Owning a wide variety of driver bits is a start, but knowing how to drill out a fastener or cut a notch for a flat-edge screwdriver should be somewhere in your bag of tricks.
10. Use a Dremel- 'nuff said.
11. Find the parts you can't salvage- Locally or over the internet. You should know where local shops are that sell things like nuts and bolts by the pound, simple electronics (resistors, soldering tools, protoboard, etc.)(RadioShack is a poor choice for this, if it can be helped), fabric, paper, artist's supplies, wood, hobbyist tools and toys. You should also be familiar with Digikey.com, Mcmaster.com, Octopart.com, Smallparts.com, Adafruit.com, Sparkfun.com, and Jameco.com, just to name a few.
12. Identify electronics in the zone between too-hot and smoking by smell- When you smell the smoke, it's too late.
13. Strip, splice, and terminate wire- Trickier than it sounds. You should be able to splice wire using a crimp splice, a wire nut, and heat shrink + solder (note: electrical tape is NOT on that list). You should know how to use a wire stripper to strip stranded wire without cutting more than one or two strands. You should be able to attach a wire to your project in such a way that it will still be attached in two weeks, two months, or two years.
14. Create fairly neat holes of arbitrary size and shape in sheet metal, plastic, and wood- Nibblers, step-bits, tin-snips, chisels, awls, drill bits, and the appropriate Dremel bit all play crucuial roles here.
15. Use Ohm's law- V = I*R. Know it, use it, love it.
16. Tie useful knots- Bowline, taut-line hitch, slip, figure-eight, overhand, square, clove hitch, sheet bend. One or another of these knots will get you through most situations.
17. Solder.
18. Program a microcontroller- nothing fancy, just something along the lines of the Arduino. Just enough to make it spin a motor on a trigger or light an LED or sound an alarm.

Did I forget anything?

Friday, June 19, 2009

A Maker does gardens

So, in keeping with our ethic of keeping our food as close to home as possible, Beth and I elected to put together a bit of a garden this year.

Rather than do it on the ground, as is more usual, I built some boxes up on stilts. Being the ever-resourceful scrap hound that I am, I found some really good sources for the material to make these boxes:
  • My work was clearing out a part of the factory and disposed of a demo dumpster FULL of various types of wood scrap. The bottoms of all the boxes came from some old shipping crates we no longer had a need for- they are rough-grade 1/2" plywood with a 2"x4" frame around the edge and one 2"x4" across the middle for extra support. 3'x4', pre-cut. Saved me a lot of effort and basically made the whole thing feasible.
  • The legs are largely made from scrap I found on the side of the road. Someone had done some concrete work and left the wood on the roadside for anyone to pick up. Warning: wood used for a concrete form takes on the fashion of concrete. It is insanely hard, will ruin your drill bits and saw blades, and is generally not worth the trouble.
  • Home Depot sells what they refer to as "cull lumber". It's typically on a cart at the back of the store, behind all the good wood. This is stuff that was damaged, warped, or otherwise undesirable. They pull it out, cut it into 4'-6' lengths, and sell it for half price or less. The price is nice if you don't need perfectly straight or pretty wood, and if you have a small car like ours, having it pre-cut (for free, instead of $0.25 per cut like they would normally charge) takes a lot of stress out of the transaction.
  • And, of course, Ikea. The picture to the left shows our bean box (hanging on the fence). The ladder above it is one side of a crib. Ikea sells "handyman's carts" periodically, which are basically all the bits and pieces of furniture that they don't think they can sell piecewise. For $15, you get one of their ginormous flatbed carts heaped above the level of the handles with things like this. The ladder structures in the picture below (against the garage) are bed base slats screwed together. The curvature of the slats holds the structure away from the wall so the cukes and zucchini can be more easily trained onto the ladder. I'm not sure what the structures on the middle two free-standing beds are, but they were $5 each and are almost exactly the width of the box, and have sturdy wire mesh with 4" spacing.

We may have gone a little crops-crazy. The left box above has six square feet of carrots, planted 16 to a square foot. The other half of the box is potatoes- Beth is trying a trick where you plant the potatoes and then keep covering the sprouts with an inch of soil everytime they pop up. The end result is supposedly a much thicker layer of potatoes beneath the surface. I'm afraid we're just going to end up with potatoes under six inches of soil, but it's worth the try. The right box is salad greens, chard, and turnips. I also tried replanting the roots from a bunch of lettuce from the Wedge and it took!
The right image shows the size of the raspberry patch- it was here when we moved in. The box has 10 winter squash plants- I'm hoping that we can train them to grow out in different directions from the box and just completely let them take over that side of the house. We got two types- queensland blue and Burgess' buttercup. They're both blue, pumpkiny squash that should store well. I'm hoping to get a dozen or so squash, and a cool room in the garage for them may be a future project.

The image to the right shows the main growing area. The fence in the background is overgrown with grapevines. No word yet on palatability but I'm hopeful. The box on the left has 12 tomato plants- 11 of them are small, yellow cherry tomatoes. The last one is the same as the three across the back of the next- Brandywine. We also have four San Marzanos, which make (supposedly) outstanding sauce. Against the wall, we've got cucumbers (of a large variety well suited for pickling) and zucchini. Most of the rest of those two boxes is full of onions (14 square feet, with four or five per), with three square feet of dill (OVERKILL) and one of leeks. At least four square feet are basil (I thought we planted six but it's only coming up in four), three of other assorted herbs (not coming along too well), and three are eggplant.
The tub on the ground has some bean plants and zucchini from the thinning out process- we'll have to figure out where to put those permanently, which means more construction. We also have a ground-level trough of strawberries and a small patch of rhubarb snuggled up on the other side of the steps.

All in all, we should have a lot of food, even if we only get half production out of this. Total cost was probably around $300. The largest single expenditures were screws and soil- we bought 2.5 yards of compost/soil mix for about $125, and that was a smidge too much.

Monday, May 18, 2009

Laser diodes and you

I know some of the people who read this blog (or who will see links to this post on Twitter) are into laser diode projects, so I thought I'd throw out some of the lore I've acquired on the topic.

Laser diodes...

1. ...are current driven devices: Always drive them as such, being careful to limit the current through them to some relatively safe value. 30mA is not an unreasonable guess; as they age the current required for the same output power will increase.
2. ...aren't very laser-like: Don't expect a laser diode to put out a tidy little dot of light. That requires some optics. As the current pushed through a laser diode goes up, the efficiency of the device increases, and the divergence angle of the beam decreases. The beam tends to project an ellipsoidal shape on a perpendicular surface; the larger of the two dimensions will change more as the current goes up, while the smaller dimension won't change much at all. This is why laser pointers do not project a perfectly round dot of light.
3. ...are easily damaged by excessive current: Unlike LEDs and most other components, where excessive current draw kills by heat, laser diodes can be killed by exceeding, even momentarily, their maximum safe optical power output. Too many photons will damage the facets of the die, causing them to rapidly degenerate.
4. ...are easily damaged by static electricity: These are probably the most sensitive devices the average user will ever encounter. Static discharges of below 25V can kill or damage a laser diode.
5. ...can be readily damaged by heat during soldering: A laser diode overheated by 10-15°C and heated for too long by 2-3 seconds can be destroyed or have its lifespan significantly degraded. Always solder at the lowest possible temp, as quickly as possible, using lead-bearing solder if you can.
6. ...have a sharp "knee" in their output power curve: At some point, the laser diode passes the "lasing" threshold, above which the output increases linearly and very steeply with regard to increased input current. The device's efficiency in the datasheet will usually be given for this area, in terms of mW/mA.
7. ...usually have built-in feedback: Many laser diodes will have a built-in photodiode which will allow you to make an educated guess at how many mW of optical power are coming out of the diode. If you have access to the datasheet, there will be an efficiency value stated in there which describes the output current of the photodiode for a given bias voltage in mA/mW of optical power. This can be a very good thing to watch to make sure you don't blow the diode by overdriving it.
8. ...have a fast response time: Laser diodes are LED-like enough to be modulated at pretty high frequencies, providing a usable communications link for longer distances fairly easily.

So, that's all I can think of right now. In short, in most cases, you're better off buying a laser pointer or laser diode module and using that, since the optics and protection circuitry are taken care of and built right in. That's not always an option on a hobbyist budget, especially if your source for laser diodes is old optical drives.

Questions?

Thursday, April 30, 2009

April maker challenge 21- RFID mouse

I got started late on the AMC, so I'm a few behind. I have, however, managed to average one a day since the 10th. I'm offline at home until May 6 (moved- why do I NEVER remember to arrange things like that ahead of time?), so I'll post my last one now. I have a ton of others, so I'll trickle them out, because I enjoy this, but this'll be it for the daily do.

I'd like to include an RFID reader in a mouse. I think it's doable- some computer mice are pretty large, and by hacking ruthlessly at a hub and RFID reader, you should be able to do it easily enough.

Why, you might ask? Quite simply, it would be a good way to keep your PC secure. Workplace hijinks can occasionally cause heartburn, so I know several coworkers who lock their PC when away from their desks. I'd prefer to have it lock itself after 2 minutes of no action, then have it automagically unlock when I get back to my desk. Thus, an RFID reader that detects a tag I have in a ring I wear and unlocks the computer for me.

Next project- an RFID tag in a ring. :-)

Tuesday, April 28, 2009

April maker challenge 20- POV display

The MiniPOV is an Adafruit toy that provides a discreet package for POV (persistence of vision) display. Normally, POV displays involve lights that are mounted to a moving arm or wheel. As the lights are swept across a person's field of vision, the slow response time of our vision receptors causes us to detect the changing light patterns as an image.

The MiniPOV depends on a person to provide the motion. Instead of being mounted to a moving object, the user holds it in his or her hand and sweeps it through an arc, providing the motion.

That's pretty cool, but it's also kinda small- it fits into an Altoid tin. I'd like to make a larger one- say, 12" long, with one LED every half- or quarter-inch. My deeply subversive application is to press this up against the window of my bus as it drives past all the suckers stuck in traffic on the highway, flashing a message to hopefully get them to consider some alternative to single-commuter driving.

April maker challenge 19- Inductive lamps

I used to have one of those super fancy Phillips electric toothbrushes. One of the cool features of it was that it charged by sitting in a cradle that inductively coupled to the toothbrush handle, so the handle could be sealed water tight and yet still accept a charge.

I'm fascinated by this and by the potential associated therewith. I'd love to try using this for other applications. The easiest is a setup where a coil placed under a table passes power to a device sitting on the table, and the most obvious candidate would be a reading lamp or a centerpiece that has lights involved. The result is a cool centerpiece that lights up without the inconvenience of running a cord across the table.

April maker challenge 18- LED based "candles"

This is a pretty common consumer product: a device approximately the size of a votive or maybe a tealight that behaves basically like a candle, in that it has a small LED that flickers and fades. The reason I want to make one rather than just buying it is that I have a special need- to be able to turn it on and off without contacting it. A few years ago I made some balsa and paper lanterns that can be hung from the ceiling on a string. A tealight in the bottom provides nice light, and the dozen or so that I made create a very warm atmosphere in a room where they are the sole illumination.

Of course, lighting all those candles is no fun. It requires hauling a chair around the room, getting up and down, and trying not to catch the paper on fire. Putting them out is similarly taxing, unless you let them burn down over four to five hours. Obviously an application ripe for electronify-ing, but an electronic light has the same problem: to turn it on, you need to get up on a chair, pull the light out of the lantern, turn it on, and drop it back in. I know, not SUCH a huge deal, but still more than one wants to do regularly.

So, my solution is a pretty simple one: make the lights magnetically switched. It's pretty simple to do- just put a reed relay in the system and drive the thing with a PIC. The PIC stays in sleep mode until you activate the relay, then it flickers the LED until you activate the reed relay again. Activation of the reed relay just requires waving a magnet on a stick near the lantern. A PIC in sleep mode can sit in a circuit with a couple of AA batteries for months without draining them.

April maker challenge 17- Tachometer glove

Four, this time, because I know I'm going to go today and tomorrow without having another chance, since I'm moving tomorrow and I'm not going to have Internet access at home or work (eep).

Tachometer glove for race driving- I USED to have a zippy car (VW Jetta GLI), and I always had a hard time knowing where the tach was. I thought it might be nice to have feedback that didn't rely on vision (because taking your eyes off the road at certain times can be...dumb is the best word I can find) or sound (because open windows, music, road noise, and other things can distract you from the actual sound of your engine.

My idea was a pretty simple one- you put a pager motor on the back of a glove that fits snugly, so that the motor is held tightly against the bones to get maximum sensation. I'd guess a wireless link (Zigbee or Bluetooth or IR or whatever) would be most appropriate, and the motor would vibrate at a frequency either equal to or proportional to your engine RPM, providing simple physical feedback that is hard to obscure.

Saturday, April 25, 2009

April maker challenge 16- portable collapsible squat bar for birth

My wife is pregnant. She is very interested in pursuing natural childbirth practices, and one of those is the idea that squatting during childbirth is preferable to being flat on the back.

We have some concern that our chosen birthing "venue" (Fairview Riverside) may not have the necessary item for facilitating this position, and I desperately want to support my wife's birth plan, so I'm thinking about figuring out what exactly is required for this and trying to make it real and portable in the next six months. I'm guessing there are other women out there who might want this sort of thing as well.

Friday, April 24, 2009

April maker challenge 14 and 15- camping stove and micro-preamp

I'm just going to give up trying to do one a day and go for two every two days. It seems more believable for me.

I have a small interest in camping, which I'd like to make into a larger interest in camping. One of my very favorite camp toys is the penny stove-an ultralight alcohol fueled stove made from two Heineken cans and a penny. Yes, they do have to be Heineken cans- the shape is important.

I have two of these little fellas and they work GREAT. A few mL of denatured alcohol into the stove is enough to boil a quart of water long enough to cook noodles, or make rice, or whatever. There are three other things I'd like to make in relation to these, though- a heat concentrator, a nice stand, and a larger burner version. In reverse order:

Heineken comes in 12 ounce cans or 24(?) ounce cans. I'd like to buy a couple of the big ones and make an uberstove. Just for kicks.

My current stands are two bent-up coat hangers. They require fairly level ground and are kind of wobbly. I'd like to make something more sturdy, possibly collapsible and possibly with a bit of leeway for unstable or unlevel surfaces.

The last I'm stealing from another AMC post: a heat concentrator. I'd like a highly portable and very easily used device that wraps around my stove, stand, and pot, which keeps the hot air coming up off the stove flowing along the sides of the pot instead of letting it disperse. I'm expecting this would make the penny stove much more efficient.

Next idea- micro-preamp. I have an interest in foley artistry (not that I've ever done anything about that interest) and I always have my MP3 player with me. My MP3 player has an input jack which apparently has a fairly high high input impedance. I also have a tiny little microphone which has a fairly high output impedance. I'd like to make a super-simple lo-fi amplifier that I could plug in to the MP3 player for when I find a really fun sound in the environment. I could then later collect these sounds, play with them, and possibly offer them to the world. Ideally, it would be powered by a button-cell battery and have an off switch to avoid draining it too badly (although that might be unnecessary if I design the circuit right). In fact, a REALLY fun trick would be an amplifier that could work on a charged capacitor rather than a button cell- must consider that.

Wednesday, April 22, 2009

April maker challenge 12 and 13- Jacob's Ladder and raised garden beds

Two-fer today, to make up for yesterday. I wish I could get it together and post daily.

The first is a simple Jacob's ladder. I've always wanted one of these and it's an affront to my tinkering nature that more than 10 years after I started into electronics, I still haven't made one up.

The second is a raised garden bed for my vegetable garden. We'll be moving next week (eep!) and I have no interest in tilling up a large patch of yard in a rental property, and I'll need to buy some kind of soil to make it support plants anyway (there's little chance of success in the area I'll be living in without doing so, due to the advanced age of the neighborhood), so I'm thinking I'll build beds on legs, about two feet high and four feet by eight feet. I figure that'll make it easy to work them, and you should be able to reach the middle pretty easily. Good drainage, etc.

My company has a demo dumpster FULL of old shipping crates made of 1/2" plywood with a 2x4 frame. These should make wonderful box bottoms. There's other wood in there, too, that'll be perfect for the legs and sides. Free is good!

Monday, April 20, 2009

April maker challenge 11- IRduino

I like the Arduino as a simple computing platform, but I've mentioned here before that I'd like to offload some of the more basic functions to a co-processor to let the Arduino have more CPU cycles for other stuff.

That's true for many, MANY tasks, and one of the ones I've been fascinated with since college is the capturing and parsing of data from an infrared remote control. Adding IR to your project is a SUPERB way to add very complex I/O.

I'm not sure if the Arduino has a library to read IR from remote controls, nor do I care, because it's likely to suck up an unacceptable number of CPU cycles. Thus, the IRduino: a shield with a small microprocessor (I'll probably use a PIC, since I know how to work those much better than AVRs) which decodes the signals from infrared remotes, packs it into three or four bytes (there are actually a LOT of possible codes out there, due to the number of encoding schemes). There would then be several options for sending this to the Arduino- a semaphore based scheme, a "dump-on-receipt" option, a "hold-until-request" option. Others, perhaps.

April maker challenge 10- Self-destructing USB drive

So, since DHS can swipe your stuff at a security checkpoint for no good reason, I've been thinking I might like to make a self-destructing USB drive.

There are two possible tacks for this: one, a "snappable" drive where there's a small ampule that one would crush (a la cold war suicide pills) that connects an on-board 3V lithium battery backwards across a couple of pins, roasting some silicon and making the drive pretty much irrecoverable. I guess in the end, it would be difficult to completely wipe out the entire flash matrix, but it's a start. This has a disadvantage in that you need to KNOW someone is ABOUT to take your flash drive away in order to activate it.

The other method is a simple wire and switch method, where the drive is modified to reverse the 5V and ground unless the user does something to reverse that. The easy way is to put a switch on the drive which has to be flipped; that of course draws attention to the mechanism. A subtler method involves an internal reed relay that requires a magnet to be close to it in order to operate safely. That's less discoverable, but you're more apt to accidentally forget to do it and kill the drive yourself.

Of course, if one were to productize this, it would fail instantly, because DHS would become aware of it and all would be lost. You also need to make the hack relatively invisible; if it's not, you'll draw additional attention and make it MORE likely that the drive is confiscated.

This is, of course, the Sunday project. Another will follow later today.

Saturday, April 18, 2009

April Maker challenge 9- mixer to food mill adapter

In canning, when making sauce or jelly, the easiest way to go is to use a strainer to separate seeds and peels from the desired fruit meat. The drawback is you get crank arm eventually, because you have to turn the crank for sometimes up to a couple of hours at a stretch and, while it's not terribly physically demanding, the long throw of the crank means that your whole arm is involved which can really wear on the joints.

To that end, I've decided to make myself an adapter that will let me join my strainer to the PTO (or whatever it's actually called) on the front of my KitchenAid mixer. I bought a couple of universal joints at Ax-man that should do the trick nicely (necessary because the height of the mixer PTO and the height of the mill axis are not the same; I considered making a platform that the mixer can sit on and the mill could clamp to which would position the two machines to be coaxial but frankly, I'm not crazy about having to line them up THAT carefully every time, so two U-joints it is). This is going to take me a couple of hours in the machine shop probably, but since I had the mill already, buying the attachment for the mixer would have felt like a waste. Plus, I like the idea of being able to drive it by hand if necessary.

Friday, April 17, 2009

April maker challenge 8- Outdoor canning kitchen

Canning in the house sucks. It involves putting a pot of water on to boil for hours at a time (some canned goods must be boiled for 30 minutes or more, and if you're doing it, you probably want to do enough to make it worth your time, so that means several rounds), tying up the whole kitchen, and release about a bazillion joules of heat-energy into your home. By the way, did I mention that this can only be done during the hottest months of the year? Yeah.

Beth and I are moving into a rental house in a couple of weeks, and I'd like to make an outdoor canning kitchen (I bet you though ALL my projects were electronics...). What I have in mind is a couple of those turkey deep fryer things, connected together through some kind of Y-valve, with a nice frame of some sort to add stability. A bench, too, probably. I can't build this stuff in because this is a rental, so it'll be an interesting challenge to see how I can do it.

Thursday, April 16, 2009

Superhack power supply



(click to enlarge)

I'm not going to count this in the April Maker challenge. I don't know why.

I hacked together a really hokey power supply for my tabletop foam cutter and as-yet-unbuilt acrylic bender (although strictly speaking, the portion of the foam cutter heating element that runs underneath the acrylic "table" has done a nice job of melting it). JTBarclay is using it for driving a 24V nigh-5W fan under a stir-plate, and Pat is building one for HIS foam cutter.

It does a fairly good job, although it has no check on the amount of current it draws from the unregulated DC supply, which is a MAJOR short coming. The IC is an 8-pin PIC that I've programmed with a PWM controller that reads a pot to determine the duty cycle (at least, in this configuration it does). Because of the way the design works, you can put a limit on the duty cycle by inserting a resistor between the potentiometer and the ground rail. Using a smaller potentiometer is wise if you were going to do that- you want to keep the overall resistance down. The larger the resistor, the lower the maximum duty cycle will be. If the resistor is equal to the value of the potentiometer, you'll be limited to a 50% duty cycle; if it is twice the pot's value, you'll be limited to 33%. The equation is Rpot / (Rpot + Rbias), where Rbias is the value of the added resistor.

April Maker challenge 6 and 7- Mini-lathe and RepscRap

I keep falling behind, but I'll not be more than one day back, dammit!

Number 6- A mini-lathe. One of the most common things I use a lathe for is the drilling of a concentric hole (or reaming one out) in a circular object (gears and wheels, for instance). I don't need a super-accurate means to reduce a diameter or things like that, just a way to put a hole in the exact center of a gear when I'm trying to mate it to a particular shaft (of a potentiometer, or encoder, or what have you). I guess "lathe" is the wrong term, but it's the best I have.

Number 7- RepscRap. The RepRap, of course, is the open-source self-replicating 3d part printer. The RepscRap is an extension to that, a device which allows the reclamation of plastic material of appropriate composition by shredding it, melting it, and extruding it as a stick or rod the can be re-used in a RepRap. The material would be recaptured from junked electronics, pop bottles, or whatever uniform source of approrpriate material. Of course, I need to make a RepRap before this matters.

Tuesday, April 14, 2009

April maker challenge 4 and 5- Acrylic bender and tabletop foam cutter

I'm a day behind so it's a two-for-one, but a quickie, because I'm behind in every possible metric my life could be measured in.

Number 4 is a tabletop hot-wire foam cutter. Imagine a scrollsaw or bandsaw, but instead of a saw blade, using a piece of hot wire. It excels in cutting intricate shapes out of pieces of expanded polystyrene foam, and can be used on other thin and low-density plastics as well.

Number 5 is an extension of this. By putting the hot wire at the edge of a table, along the corner, a piece of acrylic can be heated evenly along a line, which will allow it to be bent.

Both of these use the same power supply. That will be described as a future project.

Sunday, April 12, 2009

April Maker challenge 3- Tamiya servo conversion

Tamiya is a Japanese company that makes many hobby-type products- model kits, "experiment" sets, RC toys, and others. Deeply buried in their product line is a set of generic motor/gearbox combinations.

These range from very simple to very complex; I have a couple of their high-power ones, and one of the 6-speed ones as well. They are well constructed, fairly tightly toleranced, and loaded with features. The have a twin-axis gearbox, a worm drive gearbox, and a planetary gearbox, in addition to more "standard" types. Typical cost is between $10 and $20, depending on the model.

One of the most enjoyable items in the hobbyist robotics arsenal is the RC servo. However, most servo motors tend to be either pricey or weak, and they tend to be non-reconfigurable, meaning that you can't readily trade off speed for torque or vice-versa.

To that end, I'd like to make a small PCB that would let me take an input from a shaftless potentiometer attached to the output shaft of a Tamiya gearbox and turn the gearbox into a servo. Target cost would be $10 or less in parts, because that puts a Tamiya gearbox + this circuit in a price range to be MUCH better placed than a comparable servo.

Saturday, April 11, 2009

April Maker challenge 2- servo driver IC

Lately I've become obsessed with multiprocessing solutions for hobby level embedded systems. A PIC12F683 is a reasonably powerful 8-bit microcontroller in an 8-pin package, and it sells for right around $1 in qty 25. This can provide a powerful means for offloading certain functions of a circuit to another IC at minimal cost, allowing you to do heavier lifting in your main circuit than you otherwise might have. An example is servo-motor control with the Arduino. It's quite do-able, but you may find yourself in a project where you want to control a servo's rotational position based on user input from a potentiometer. In that case, using precious CPU cycles from the Arduino in the system just to read the pot and update the servo periodically is a drag. So why not take an 8-pin PIC and make a simple IC that reads digital inputs and converts the value to a servo angle?

It'd be easy enough- the servo output is a PWM signal but the duty cycle is low. The motor holds position expecting a pulse every 20ms, and the pulse is usually in the range of 1-2ms for 0° to 180°. That leaves you a minimum of 18ms to read the analog voltage(s) and calculate the next pulse length. At 8MHz (the maximum internal clock speed of the '683), each instruction is 500ns in length. If we do 8-bit math, we can have 256 variations representing 0° to 180°. Making the assumption that the pulse needs to be 1.5ms +/- .5ms, we have a 1ms dynamic range to express with 256 slices- about 4us per slice or 8 instruction cycles. I think that's probably enough time to do a pretty accurate timing routine for three channels, using three analog inputs, which is handy, because the '683 has 6 I/O pins, so that's three analog ins and three pulse outs.

Friday, April 10, 2009

April Maker challenge- project 1

Over on the TCMaker web forum, a challenge was levied to all of us to come up with one project every day during the month of April. I'm behind, because I've been VERY busy preparing for and teaching my intro to electronics class through Studio Bricolage, but I'm going to try VERY hard to keep up with it for the rest of the month. Hence, the new blog.

Project 1: Airsoft pellet gun organ
Ax-man sells Airsoft pellet guns super cheap (~$10 for a pistol). I'm thinking it might be fun to try to make a pipe organ that articulates based on having the pellets fired down the pipes, which would then dump the pellets into a bin for immediate re-use.

It might get pricey, since I'm thinking I'd want the seven major notes, but I'm not sure how I'd go about tuning them or even what effect firing a pellet down a tube would have. Still, it might be cool to try out.