Category Archives: Uncategorized

Android garage door opener

When they handed me the key to my house, the seller’s agent mumbled something about bringing by a garage door opener. Now, he didn’t lie, he brought one by, it just had no real connection to the actuator installed on the ceiling. I tried to figure out how to make it work, but my heart just wasn’t in it. I mean, I don’t keep a car in the garage, and only a fool would waste all that prime space on a car anyway. So I don’t really go in and out of the garage that much. It is true that my wife has been riding the kids to school on bikes that live in the garage for a long time, and there was a certain amount of grumbling, but I just never got around to getting an opener. Actually, I looked at Home Depot and realized that I’d have to spend something like $40 for each opener I wanted, and that annoyed me, so I spent time surfing the interwebs looking for fancy arduino designs that would clean the garage while they weren’t opening the door. Then I started riding my bike every day and understood just what my wife had been bitching about. So I went back to the first thing I found on my internet search and just made it happen.

What I got was the GarageMate app from the Android store. Like I say, I’d found this early on, but then I went to find the appropriate parts, and figured I could find them cheaper and didn’t and then he stopped selling the kit on his website. But now I was on a mission, so I just went to Amazon and spent $30 on the Samsung HM1800 headset 

that will do the trick. An hour in the garage later, both my wife and I can open the door with a tap on our phone screen. Hot damn.

Ok, so why am I writing this at all? Frankly, Lou over at Garage Mate did all the hard work, and you should be sure to donate to him when you realize this awesomeness. But, there are a few things I learned through the process that I would have liked to know up front. Plus, I truly hate video instructions. A well written page is so much more useful.

One question I had: why do you need to use one of 2 different Samsung headset models that are no longer made? Here’s why: when the phone tries to connect with them, a dumb voice in the headset informs the listener that a phone is connecting. This would drive me bat shit crazy if I were wearing the think in my ear. But, on the plus side, it means that a connection event (to a previously paired phone) triggers noise on the speaker that GarageMate exploits to switch a transistor. This is the sauce that makes this work. Lou only recommends 2 headsets; undoubtedly others will work, but he’s got better stuff to do than test a million headsets to see if they bark in your ear when the phone tries to connect (but, critically, at no other time). Eventually, of course, Amazon will run out of these two models and then someone will have to figure it out.

Following the video from GarageMate

will get you up and running. A few things I did differently:
1) Getting the leg of the transistor to slide into the socket along with the USB plug was a pain. Instead, I just wrapped it against the base of the USB connector and soldered it in place. There was a little plug visible out of the socket anyway, so I still got a secure connection.
2) Don’t stress the precise value of the 30 ohm resistor. I happened to grab a 47 ohm, and it worked fine. I suspect that any value under a kohm would be OK.

Thanks GarageMate! Someday I’ll get fancy with something that tells me whether the door is up or down and does other fancy stuff, but it might be a while.

Love Letter to McMaster-Carr

I spent a lot of time in grad school getting my degree in marine biology. Most of that time was spent ordering shit from McMaster-Carr, tossing it in the ocean, wondering why it had broken or disappeared, and then buying another one. I kind of like the place. I liked it so much that I wrote a little poem about it.

Plumbing primer

Below is the Moose-primer to plumbing (note: this was written as a class handout… I’m posting it here in the hopes that commenters will extend it). The opinions expressed are very much my own. Please feel free to contribute your own thoughts on the forum.

Most marine biologists need to plumb something at some time or another. The most common thing to use is PVC pipe. Another really handy thing to use are instant tube fittings. We will use both extensively in our labs. Barbed tube fittings are also common around labs, and can be very useful, although I personally discourage their use.

PVC pipe comes in a variety of sizes from ¼” – 12”+. The most common sizes for the work we do are ½”, ¾” and 1”. It’s important to realize that these are nominal sizes; don’t bother measuring a pipe to determine what size it is (If your PVC pipe is 1.05” in diameter, then it is ¾” pipe. Easy enough?). Fortunately, most pipe and fittings are stamped with their nominal sizes.

There are two main ways to join pipe: screwing them together or gluing. Gluing produces strong joints that don’t leak, and the fittings are less expensive. On the down side, glued fittings require several hours to cure, and they leach toxins into the water for some time. Threaded fittings are great for anything that might need to come apart later, and they can be assembled and used in minutes. The biggest downside of threaded fittings is that it can be difficult to assemble complex structures because shapes need to spin for several revolutions to join securely.

Fittings come in a wide variety of shapes such as Elbows (also called 90°s) which turn corners,
Tees which allow water from different directions to join.

And adapters which bridge between glued and threaded fittings.

Incidentally, glued fittings are often called “Slip” and threaded fittings are often called “NPT” (after National Pipe Taper which describes the thread). You may also see MPT (which is “Male Pipe Thread,” the same as a male NPT) or FPT.
If you may need to disconnect a piece of your plumbing, don’t count on unscrewing threaded fittings. They’re hard to unscrew and replace without leaks. Instead, use union fittings; they’re designed for the task. The collar unscrews easily, allowing you to pull pipe pieces apart. There is an O-ring inside the fitting… don’t lose it.

Cam Lock
These fittings are awesome any time you need to connect and disconnect large (1/2” and larger) pipes on a frequent basis. they are incredibly easy to connect and disconnect. Not common at the local hardware store, but super useful.

Instant Tube

I seriously love these things… They make connecting and disconnecting small tubes (1/16” – ½”) so ridiculously easy that you’ll wonder why anyone would ever use anything else. They come in all sorts of shapes like elbows and tees (above). There are also adapters that let you connect small tubing to the pipes discussed above. To use, you need to use a tubing cutter to get a very straight cut on your tubing, then shove it into the fitting until it bottoms out, then rotate a bit. It sometimes helps to draw a mark on the tube to show how far it should go in; sometimes the tubing gets hung up half-way in. Properly seated these perform really well. They can hold high pressure and don’t leak. At the same time, they are extremely simple to disconnect. They work with hard tubing (such as polyethelene) as well as soft tubing like Tygon.

Barbed fittings
These fittings are common in biology and chemistry labs. They are cheap and simple to connect. Properly used, they make a secure fitting. Unfortunately, they are an absolute nightmare to disconnect. Generally it is necessary to slit the tubing with a knife and sometimes this involves cutting one’s finger as well. A heat gun is very useful for softening tubing to aid in removal. I go to some lengths to just avoid barbed fittings if at all possible.
Drip Irrigation
A common need when plumbing aquarium systems in the need to have pressures balanced between different parts of the system. If you have a bucket draining into 2 aquaria, the water will mostly flow out through the easiest pipe. One way to balance these flow is to put some sort of flow restriction on the pipe. A cheap way to do this is with drip irrigation drippers. I have tested several models and found that at least one brand does a good job of providing balanced flow, even under low pressures. The brand that I’ve been happy with is DIG ( ) which are generally available at Home Depot. You should test any batch of drippers to make sure they perform as expected. They come in 3 flow rates (nominally 2, 4, and 8 gph), but these are at a specified pressure (around 25 psi). Under normal lab conditions with gravity or small pumps, they will not necessarily deliver this flow.

There is absolutely no way to become facile with PVC pipe without experience, but here are some rules to remember:
– Teflon tape: To ensure secure threaded fittings, wrap them with Teflon tape. Wrap tape around the male fitting in a clockwise direction. Hold the tape so it’s unrolling as you wrap around.
– Glue: For gluing PVC fittings, follow the instructions on every can. I rarely use primer (it is important at higher pressures) but it can make for a better joint. Gluing PVC joints can be messy, so wear gloves and have a paper towel handy to wipe up drips.
– Cutting pipe: For PVC pipe, you can use a hacksaw, but you’ll be much happier if you buy a ratcheting cutter which produces a nice clean cut with little effort. For smaller pipe and tube, you can use a light duty cutter which will also provide a clean cut. For larger pipes, you can use a chopsaw, such as the one in the student shop.
– Drilling: Plastic, including pvc pipe, is very easy to drill. They sell special drill bits for plastic if you want a really clean hole, but these aren’t generally necessary. When drilling plastic, run the drill slowly and try to avoid letting it spin on the piece. You want to cut a hole rather than melt it – if the drill gets too hot, the edges of the hole will be gummy and actually fall back in to make a smaller hole. Hole saws are really useful for drilling larger holes in plastic, too.
– Tapping: Tapping is the process of cutting threads into the outside of a hole to accept screw-in fittings. It is extremely useful, since you may want to join pipes in ways that no one else has wanted to before. The tool for doing this, a tap, looks like a strange drill bit. tap picture They do not have a sharp enough point to actually drill a hole, though. Instead, you must drill out a hole slightly smaller than needed, and use the tap to cut it wider. Taps come in a variety of sizes and shapes depending on the size of hole, the material you are working in, and whether you want the threads to go close to the bottom of a hole or all the way through a sheet of material. To determine the hole size, look it up on a tap drill chart (such as here: ). This will have a list of standard thread sizes (the example below shows “NPT” or “National Pipe Taper” which is the standard in the USA for pipe fittings. The first number (e.g. 1/4 ) represents the nominal pipe size. The second number (e.g. -18) represents the number of threads per inch. There are usually only one or two thread pitch choices for a given size; in pipe, you will probably never see a ¼-14 tap, for instance. If the exact drill size is not available, then you may have to make a decision. In soft material such as PVC, you can generally tap a slightly smaller hole without difficulty. If the only drill available is slightly larger, it may be OK if there won’t be any pressure on your fitting (such as drain pipes). Try it in a piece of scrap material and see if it fits tightly. In tapered threads (the T in NPT), the hole gets narrower as you screw the fitting in, so it may sit tightly.
– If you want to add a instant tube fitting to the side of a pipe, you can drill a 7/16” hole in the pipe, tap it with a ¼-18 tap and screw in a fitting.
– To use a tap, you turn it with a special tap handle or wrench. For pipe taps, you often won’t have a handle that will fit, but you can use a 12-point box wrench. Wear safety glasses when tapping; small taps especially can break off and send metal flying. Even big taps can throw a chip out while your face is right next to them trying to decide if the hole is straight.

NPT Size Tap Drill Size (in.) (Decimal) (in.)
1/16 – 27 “C” (0.242)
1/8 – 27 “Q” (0.332)
1/4 – 18 7/16 (0.438)
3/8 – 18 9/16 (0.562)
1/2 – 14 45/64 (0.703)
3/4 – 14 29/32 (0.906)
1.0 – 11•1/2 1•9/64 (1.141)
1•1/4 – 11•1/2 1•31/64 (1.484)
1•1/2 – 11•1/2 1•23/32 (1.719)
2.0 – 11•1/2 2•3/16 (2.188)
2•1/2 – 8 2•39/64 (2.609)
3.0 – 8 3•15/64 (3.234)

– To tap a hole, it is important that the tap go straight down the center of the hole. Generally it is a good idea to clamp the piece you are working on so you only have to worry about keeping one part straight. The very best way is to clamp the piece in the drill press and use something sharp (a pencil can work in a pinch) in the chuck to guide the back end of the tap straight down the hole. Taps generally have a small dimple on the top for this purpose. Tapping generates a lot of heat, so you need to use lubricant. Any sort of oil will work, they also sell special cutting fluids and waxes. Apply to the tap before starting and possibly during tapping. Getting a tap started is the most difficult part; it will want to twist out of the hole at a weird angle. Hold the handle firmly and press down as you turn. After ½ of a turn, stop and look at your tap from different angles to determine whether it is going in straight. After ever ¼- ½ of a turn, rotate the tap counterclockwise a small amount (1/8 – ¼). This will allow it to clear away the material it has just cut. Continue through the hole in this manner. When you are done, it is often useful to back the tap all the way out, clear it off, then run it in again to clean up the edges of the threads.

– There are good instructional videos on the web if this doesn’t make sense.

Where to get stuff

Lots of plumbing fittings are available at your local hardware store. Often, the best way to figure out what you need is to take a field trip. Walk up and down the aisle (carrying your fish tank if need be) and see what they have that might work. Generally it is not possible for the sales staff to be helpful; they are unlikely to understand what you are doing (you’re the first one to want to do this, remember, that’s why you’re building it yourself) and will often offer you suggestions that do more harm than good. It’s OK to say, politely, that you don’t need any help and then ignore them until they go away.
The internet is, as always, a fantastic resource. My favorite site in the world (seriously: with some searching you might even find the poem I wrote on the subject) is This is really useful for learning about new products.

Leatherman Juice XE6 review

Running a little late for my plane in San Diego, I decided to leave my trusty Swiss Champ in the car rather than deal with checked luggage that probably wouldn’t make the flight. Now I love my sister Trish dearly, but I have no illusions that I’ll get the knife back in short order. When I got home, I switched to my backup tool… the hilariously huge monstrosity that Tim found for me in Switzerland.

The only problem was as soon as I unbuckled my belt, my pants dropped like a weightbelt, sometimes hurting my toes… time to shop around. I’d been sort of wanting a multitool, if only for the pliers, but worried about the hassle of opening the pliers to get at the bottle opener.

Some quick searching and I found a great multi-tool comparison site which let me choose important features like tools that open on the outside. I quickly narrowed it down to the Leatherman Juice line. After some dithering, I decided to go with the XE6

Just got it, and there is a lot to like.
The pliers are really great. The outside-opening tools mean that it works a lot like the Swiss. I can open a beer in just about the same time (sure to get faster with practice). The corkscrew has a nice feature where you can use the bottle opener to lever up the cork. It doesn’t work well, but it was a cool feature.

Some quick comparisons of what I feel like I’ve lost over the Swiss Champ (which I’ve had on my belt, with one hiccup, since 1993).

The screwdrivers are hard to get out. Two of the 3 flat-bladed ones I haven’t even managed to get to. On the other hand, this might mean they are less prone to folding back up as soon as you put a little torque on a screw.

The can opener looks challenging. I doubt it’ll zip open a can as fast as the Swiss.

The blades are wheezy. The serrated blade is probably great for cutting salami, but the main blade looks OK for sticking a steak off the BBQ and not a lot else. The main blade of the Swiss was a good shape to use for lots of wire-stripping/package opening/whittling tasks. Guess I don’t need to strip wires with the blade anymore, though.

No tweezers. That’s kind of a bummer, since I used them quite a bit. I guess if I end up making a new sheath for it, I can include a pocket for a pair of #5 forceps.

No magnifying glass. Not a huge bummer, the one on the swiss sucked, but I did actually use it from time to time.

Anyway, those are my first impressions. It seems much smaller on my belt, which is kind of nice.