Wednesday, June 10, 2009

Project Laxity

I have been lax in posting about my projects - indulging in the engineering tendency to do rather than to document. So, for a while at least, things are going to be more historical than contemporary. In February, I picked up a replacement frame for my bike and stripped it with methylene chloride and acetone in preparation for repainting it.

Before I get into describing this project: methylene chloride, and any corresponding gel- or liquid- paint stripper is nasty stuff. MINIMAL PRECAUTIONS INCLUDE: Chemical gloves: (not latex gloves, not dish-washing gloves, not leather gloves, but cloth-lined chemically resistant chemical gloves (shown below). Proper ventilation: you really should work outside. If you must work inside, work in a large area with huge fans (even for small projects). Fumes are hazardous to pets, your eyes, your brain and your home decor. Proper respiratory protection: Comfort masks won't cut it here, and dust respirators won't filter out the organic solvent fumes. You'll need to use a bona-fide paint and insecticide respirator. Decent respirators are available from the Home Despot for less than $40 and the cartridges need to be kept in an air-tight bag when not in use (they have a limited lifetime of less than 10 hours after being exposed to air). Protective clothing: When working harsh and destructive organic solvents, you'll want to wear eye protection, full sleeves, overalls and boots that you don't mind trashing. Common sense: Your work surface should be protected from the stripper gel. You should have an exit strategy in case you get gel where you weren't expecting it (like on your skin or face). Have shop towels and acetone around to clean up spills. Have a plan for how you'll dispose of the used materials (like putting your scrapings and used towels in an empty paint can and traipsing it over to your local DPW on hazardous waste collection day).

The obligatory disclaimer is that there are more environmentally-friendly ways to strip paint and enamel off of metal. You can sand-blast, use a rotary wire brush, resort to "green strippers", etc. The truth of the matter is, however, that none of these alternative methods are as fast and effective as using organic chemical stripper and trying not to breath too deeply.

Step 1: Prep your materials. I worked on my deck. I started by zip-tying a platform together from four milk crates and then affixing some 3-mil thick contractor waste bags to act as my work surface. For my stripper, I used 5f5 that contains, among other solvents, methylene chloride aka dichloromethane. I used a wire brush for both stripper application and paint removal. I used a metal container to hold the 5f5 while I applied it in small batches and a small quart paint can to dispose of the paint scrapings.




Step 2. Clean the frame of any debris and remove the decals (scraping with a knife or exacto blade).



Step 3. Apply gel stripper to a portion of the frame in a thick and even coat. You can see my entire set-up in the photo.



Step 4. Wait. The directions on the stripper recommend waiting 10-15 minutes per application, but that varies with humidity, temperature, the type of paint and the base material. When the paint is ready to be scraped, it will have begun to bubble up if not slough off outright. This beautiful degeneracy is illustrated perfectly on the head-tube.



Step 5. Scrape. Use the wire brush to remove the paint. As it collects on the brush (or on the work surface) scrape it off into the waste container. As the solvent dries, the paint will re-adhere to whatever surface it happens to be on. This adhesion is fairly weak, but it makes clean-up bothersome.



Step 6. Repeat over the frame. Limit your working area to a size where you can apply the solvent, step back, breath some wholesome air, and then scrape the entire area clean before the paint re-dries.



Step 7. Clean the frame with acetone (on shop towels) to remove remnants of both the paint and the methylene chloride. I also cleaned my work area in-between applications of stripper to prevent removed paint from getting back onto the clean frame. You can see in the photo below that the frame is looking pretty good after one go-over. Methylene chloride is as effective as it is dangerous.



Step 8. Repeat as necessary. It took two applications of stripper to get my frame and fork pefectly clean. I then wiped down the frame with acetone, followed by water, and cleaned up my workspace.



Now I have a bike frame ready for primer, color and top-coat.

Tuesday, January 27, 2009

Zero-th Order Function Generator

I'm trying to debug a circuit that's having either a frequency- or pulse-width dependent glitch. We're using a hall-effect sensor to measure RPM on the Boldsprints equipment and under mysterious and hard-to-reproduce circumstances, the microcontroller that bridges the sensors to the software crashes. Maybe we're exceeding the frequency input of the micro. Perhaps the sensor isn't triggering for long enough. Maybe there's excessive noise on the line. Well, at least the first two conditions are easy enough to rule out or verify by swapping out the sensor input for a function generator. The only problem is - this isn't for work, and I don't own a function generator. So, I took the day to make one.

The ckt:



The scope shot:



It's a straight-forward circuit using two LM555s. I cascade an astable 555 into the trigger of a monostable 555, and sweep the Ra of each to vary frequency and pulse width, respectively. In retrospect, I should have used LMC555s - a CMOS version that has full-swing TTL output... but more on that below the notes. As it is, I can dial the pulse width from 110uS to 12.5mS and sweep the frequency from 12Hz to about 2.5kHz using the two 100k potentiometers. I can generate negative and positive pulses (by exploiting aliasing!). The signal swing is from 0V to 3.7V. The overshoot is minimal.

And because there's nothing sacred in engineering... the notes:




Congrats - you made it to the bonus geek-out portion. Why should I have used an LMC555 over the LM555? Well, it's the difference between CMOS architecture and old-school bipolar processes. Here's the schematic for the National LM555. For the purposes of this discussion, we only care about the output stage - specifically the pull-up transistors Q27 and Q28.



The LM555 is old. In addition to being incredibly cheap, it uses a very old-school bipolar process. Now, a modern bipolar process typically has comparably good P- and N-type transistors, so you'll often see a push-pull output stage that has pretty good output swing. However, Back In The Day, the P-type transistors (PNPs) were really crappy compared to the N-types (NPNs). Specifically, the P-type had really low beta (low gain), and couldn't slew a lot of current. So, a push-pull output wasn't an option for the LM555 designers. Instead, the LM555 has two NPNs (Q27 and Q28) configured as a totem pole to slew a lot of current at the output (which is necessary if you want your square wave to look square). When the LM555 is driving high, Q27 is always on, and the maximum output voltage is one Vbe down from the rail (Vbe is typically 0.6 Volts, give or take) plus the voltage drop across R12. When the load current is high enough so that the voltage drop across R12 (3.9k * Iload) exceeds the Vbe of Q28, then Q28 will turns on, which increases the current drive capability of the output but has the trade-off of limiting the output swing to within 2x Vbe of the top rail. My function generator circuit is driving a 50 Ohm resistive load (which requires a fair amount of current - 3.7 Volts / 50 Ohms = 74 mA), so it's no surprise that the output of my circuit settles at 3.72V instead of 5V.

In the CMOS-based LMC555, the output is driven by a beefy inverter - an inverter being a P-type MOSFET stacked on top of an N-type MOSFET. Once nice thing about FETs is that you can design them to have very low on-resistance (Ron), and the output of such an inverter will be able to swing to within Ron * Iload of either rail. So, in order to improve on the LM555, all the C555 designers had to do was specify the "max" output current load and the output swing to exceed the specs of a bipolar 555, having already sized the output FETs accordingly.

The Birth of Praxicality

Praxis \Prax'is\, n.

1. Use; practice; especially, exercise or discipline for a specific purpose or object. "The praxis and theory of music." -- Wood. 2. An example or form of exercise, or a collection of such examples, for practice.

Practical \Prac'ti-cal\, a.

1. Of or pertaining to practice or action. 2. Capable of being turned to use or account; useful, in distinction from ideal or theoretical; as, practical chemistry. "Man's practical understanding." -- South. "For all practical purposes" -- Macaulay. 3. Evincing practice or skill; capable of applying knowledge to some useful end; as, a practical man; a practical mind. 4. Derived from practice; as, practical skill.

Combine the two at 3,146 RPM and -40C for 4 minutes and 32 seconds, and you get praxical. As conceived of on 1/26/2009 with previously generated content ported over and back-dated appropriately.

Sunday, January 11, 2009

Makeation

I recently found myself killing time in NYC, which means a visit to the good folks over at Adafruit Industries. Cue dramatic voice over, "This time, it's not social." Limor had wrapped up the prototype for her Vacuum Florescent Display (VFD) clock, but was still in need of an enclosure. I was in need of something to do. Thus - over the weekend - I had a Makeation.

It began, as all things must, with an engineers' pad, some graphite, an eraser and some high-precision calipers.



After I was thoroughly sure of the dimensions (on paper), I started sketching up the pieces to cut on the laser cutter in Illustrator. No, it's not the right tool for CAD, but you can monkey around and get center-to-center drills if you sufficiently abuse some of the alignment and grouping features. And it worked well enough to yield a first-time-right design (although one that required exactly 0.125" acrylic).

Here's the front:



The back:



And the bottom:



The final kit won't be called 'iceb0x,' but I couldn't resist. It's only a prototype run so far, but the layout of Limor's board is clean and very compact. The VFD itself is also nice. You can see from the photos that the color is a cool aqua, that's a nice contrast to the warmer tones of the highly-fetishized Nixie tubes. The other upside(s) to using a VFD over a Nixie is that it's multi-digit, not nearly so rare, and it runs at a significantly lower voltage. A VFD takes less than 40V as compared to Nixie tubes, which need 80V to 100V. I know that voltage is cool (it's current that kills) but why use a BEEFY transformer when a cute SMT core will do?

Another nice detail of the clock is that Limor has the VFD mounted on a daughter board via a right-angle header so that the tube "floats" above the PCB. That made for the trickiest part of the enclosure design -- placing the "nipple" drill in the North face that keeps the tube in place. It worked on the first pass, but I admit to tweaking it so that the tube was perfectly parallel to the PCB. There's less than 1/16" of wiggle room in the long dimension in this version of the case. I'm especially proud of the fact that it's fully-interlocking on 5 of 6 faces (the top being held on by compression from two nuts) and assembled using 6 x 4-40 screws.

If you're psyched about the VFD clock design, and can't wait for the Adafruit Industries kit to come out - it's the sort of project that's been multi-sourced by
rsw and Make Blog, among others.