Making Triumph Spitfire Parts

Spitfire Unloading Grandpa Stan bought this 1962 Triumph Spitfire and has been restoring it.  It had two brackets that hold the stabilizer bars, but his were horribly bent and broken.  I guess those brackets are hard to get because he asked me if I could make some replacements.

Problem PartHe gave me the the less destroyed of the two plates.  I was able to get some rough measurements.  I had sheet of metal with the same thickness, so the first thing I tried was cutting a piece out with the bandsaw and bending it into shape cold.

I used the vice and a big hammer to incrementally bend the center channel.  I clamped the metal in, hit it a few times, moved it up in the vice a little, and hit it some more to continue the bend.  Then I bent back either side of the channel to form the  transition from center curve to flat. Finally I bent up the two edge wings.  I had left plenty of extra metal for the wings to give me leverage.

This cold bending system was simple, but the results were poor.  The positioning was not super accurate.   The curved channel’s shape got distorted when I bent back on either side to make the transitions, which were not all that crisp.   I had to admit I wasn’t going to be able to bend it cold.

The reason I’d been trying to avoid working it hot was that the plates were just a little too wide to fit into my super tiny forge.  That meant that I’d need to haul out my foundry furnace and burn 45 minutes worth of propane just to get the furnace up to temp.  I guess I could have used to OA torch with a rosebud tip to do the heating, but then there would be one more thing to juggle around, and I don’t have five hands.

Some metal-working friends suggested forming the pesky center channel curve by placing a vice set to the correct width underneath the hot metal, having a heavy bar (with the correct radius) on top, and hammering down the bar to force the metal into shape.  I put my drill press vice on the anvil and set its jaws to the spacing I needed.  Some hunting though the scrap pile under the house turned up a solid bar that was close to the right radius.  I had a pipe that was the exact radius, but I thought that might not be able to take the hammering without going out-of-round.  It seemed better to use the solid bar.

Piece On the Vice Backed Up by an AnvilHere’s the plate on the vice, and you can see the metal bar in the background.  I put the vice on the anvil so it would be able to take some pounding.  The plan was to heat the plate in the furnace, fish it out with tongs, and position it on the vice.  My wife would then place the rod into position, and I’d hammer it down.  We practiced it cold, and then gave it a try.  We were a bit slow, so I ended up  having to do 2 heats to form the channel, and then another heat to fine tune the transition back to flat.

piece In The FurnaceWe banged channels into two of the plates, and it was time to put all this stuff away.  At least we put on an interesting show for the kiddos.  It was kind of  a big production for two little curves.

That was it for the hot work.   The next day I scribed, center punched, and drilled the holes on the drill press. Simon came out to help, so I let him stand on a stool and turn the drill press on for each hole.

Simon HelpingWe talked about drill press safety, like how it’s good to clamp the work down. We also discussed how to position the piece so if the bit catches, the part spins into something solid that is not the operator.  He did a good job helping.  I like his safety gear.

We have strict rules about “no bare feet in the shop,” but I guess Tigger feet are all right.  I love that those Harbor Freight face shields adjust down small enough for his head.

Drilling The HolesOnce we had all eight holes drilled, it was time to bend up the wings at the edges.   I just did that cold in the vice.  One tricky part was that in order to not squash the center channel area, I had to extend the jaws of the vice a bit with some square stock.

This part is where Simon helped a lot.  I was able to align the square stock and the part in the vice, and then tell Simon to crank the whole thing tight.  There was certain amount of “No the other way!” but it really was something that would have been a pain to do on my own.

partInViceLastBendlastBend

simonWithThePart

Then all I had to do was mark and hacksaw off the long extra parts of the wings.  The channel in the middle made it impossible to cut the excess off with the bandsaw. A nice sharp hacksaw can work wonders even if you do end up sweating a bit for the results.

finalParts

Here they are after being cut and cleaned up with a file. I think they came out fine. They’re hand made, so they’re not crazy precise.  Hopefully they’ll be good enough. It’s time to sand blast them, clean them up,  and mail them off to Grandpa.

Dyeing Flowers

During Teacher Appreciation week, we wanted to have some fun flowers for Pioneer to give out at school. He had a book that mentioned that you could make multicolored flowers by splitting their stems and putting the ends in dye. The dye gets sucked up to the head of the flower and, voilà, multicolored flowers.

Stem CuttingWe decided to give it a try. I got two dozen white carnations and put them to the sword.  Actually I used an Exacto knife to split the bottom two inches of stem. Pioneer worked away putting a loop of scotch tape around the stem above the split to keep the split from propagating. Then we cut down 4 plastic cups so the split stems could reach all the way down to the bottom of the cups.

Dyed Flowers HangingWe put different colored food dye and water into each of the 4 cups and used a loop of yarn to lash the flowers to a kitchen cabinet. Then I performed the somewhat ticklish task of getting all the flower stems to span the 4 cup boundaries. Once that was done, we just let them sit in the water over night.

In the morning, the flowers had taken on some of the colors. The colors weren’t super dramatic. I guess if you started with shorter stems or let them sit longer, you might get more color. I thought they came out looking good. Since I had left the stems quite long, we were able to just hack off the stems above the tape and presto! Colored flowers.

Blue And White FlowerI was really worried about the dye getting all over the counter. I put a plastic bag under the cups, and I’m really glad I did. In the morning, quite a bit of dye had found its way out of the cups and onto the plastic. I had to very carefully lift the bag up by the corners and carry it to the sink. Thankfully the plastic bag didn’t have any holes in it. If I do this again, I will put all the cups in the bottom of a glass casserole dish so I won’t have to play Food Dye Bomb Technician during clean up.

PioneerWithFlowers

Using the Sun to Make Glass

pioneerMixing

Pioneer squirms on the hot driveway.

Have you ever wondered if you could use a magnifying glass to melt sand into glass?  I have a very large Fresnel lens that a coworker gave to me when I worked at SGI. Using it is kind of scary.  I keep it covered while I’m carrying it around so as not to accidentally set something on fire.  I’ve used it to burn wood, but I wasn’t quite sure if it could melt sand.  My son Pioneer had been begging me to try it out.  This morning we went to the beach, and he insisted on bringing home a bucket of sand.  It was time to give it a try.

The first step was to unearth the lens.  Pioneer was a bit confused when he first saw it because he thought it would be round with a long handle ready to be gripped by an eight-story-tall Sherlock Holmes. I had to explain how a Fresnel lens works, including how it lets you have a big lens that’s not eight inches thick at the middle.  Then we spent a while washing it off because it was quite dusty from years spent under the house lonely and unused.

burnedPieceOfWoodI put a small chunk of wood out so we could have an easy and spectacular target to use for lens-aiming practice.  I put a steel plate under it to protect the driveway.  Once we’d  mastered our  half-blind welding helmet and giant lens ballet, we were ready for the big show. Ok, I admit it was more like the Hokey Pokey than ballet.  “Put your right arm down. Put your left arm up. Put your right arm in and stop shaking all about. You do the Hokey Smokey and you burn wood on the ground.  That’s what it’s all about.”

theTwoOfUsHoldingTheLensI was a bit worried that we wouldn’t have any sort of fluxing agent to lower the melting point of the sand, but my wife had just been experimenting with different low-allergy washing combinations and she had both borax and washing soda on hand.  What luck!  Time to give it a try.  We put a few spoonfuls of sand/washing soda/borax on the end of a soda can, donned our welding helmets, and fired it up.

lightOnTheCokeCanPointing that much sun at things can be pretty spectacular.  You can burn, melt, and pop things.  It’s easy to get all Gallagher.  In contrast sand is quite good at taking the heat.  Instead of a big plume of smoke or a loud popping sound  you get a very slow and silent melting action. In the end, we managed to make some smallish green globs of glass.  I think Pioneer was disappointed, but we were really limited by how long we could stand there with our arms in the air.  If we wanted to make more, I’d have to make some sort of frame to hold the lens flat and pointed at the sun.

globOfGlassStill I think it was a success. We did manage to make some glass, even if it’s not ready to go in a chandelier.

Making Cute Puppies with the Laser

puppySketchMy 5-year-old son came to me asking me to make him a wooden doggy.  I started drawing doggies on the back of an envelope.   He kept rejecting them.  Finally he told me that he really wanted one with a “mouth like an upside down Y”.  At least he was specific.  Finally we got a sketch that met with his approval. I assumed I’d make the doggy on the bandsaw and put details on using my trusty wood-burning pencil, since I’ve done a number of projects like that.  It’s always fun to semi-free-form cut on the bandsaw and improvise the shapes.  The width of the blade forces you to use broad curves, and the actual cuts in the wood are often nicer then the pencil lines you drew.

puppyPartsOnLaserFor the past few weeks, my Tech Shop night has been spent on a super-complex laser cutter project. The kind of project that won’t be finished for months with rounds of test assemblies. I realized that a purely aesthetic micro-project in the form of a cute puppy dog might be the perfect counterpoint to such a technical project. So I abandoned my original bandsaw plan.   I could get some finished objects with only about an hour of Illustrator time and some scrap 1/4″ plywood.  I could even glue them up while my next round of complex parts were being cut out, so I wouldn’t be  stealing too much time from my other project.

puppysNotFullyCutThroughThere was a bit of a glitch in that laser power output was a bit lower than usual. Wood is not an entirely uniform medium, so if you don’t have enough extra power going in, you end up with some uncut fibers.   Some of the pieces dropped right out, but a few needed to be cut free with my trusty Swiss army knife.  The tough fibers also tend to make the edges not a perfectly uniform burnt-wood color. If you care, you can touch those up after the fact with a wood-burning pencil. You can also sometimes get the pieces to come out cleanly if you sand the back of the sheet.  That way you don’t have to touch up the sides, but it’s a lot of sanding. And isn’t the best solution for plywood since you run the risk of sanding through the top ply.

puppyTwistThe nice thing about purely aesthetic pieces is you can glue them together any way you want.  That gives each puppy their own personality and lets you discover fun combinations.  I used some plywood that had one face a bit darker than the other.  I figured that would make puppies have a nice light underbelly.  The only down side is that they look a bit strange from the back.  I guess if you really wanted to make a bunch of these things, you could  cut the back legs/belly piece from plywood that was lighter on one side, then cut the head/forepaws parts from more uniform wood.

puppyBackAndSideBlueI knew that the pups would be a bit head heavy, but I thought when I glued them up, I could adjust the exact position of the hind legs so they would slightly lean back.  The only problem with that plan was that the two main contact points are only 1/4″ apart so they are  a bit tippy.   I considered scuffing them on sandpaper to give them a firmer foot hold, but then their paws would have bright flat spots on the bottom.  So I decided not to bother.   Puppies are tippy. That’s just the way they are.

threePuppiesWithBlueWallI glued one of the pups with his head down low, so he’d be the runt of the litter.  For some reason that also makes him seem a bit fatter.  I rather like this idea of cute parts that can be glued together in different configurations.  These have happy tails, but they could just as easily have sad ones.  This micro-project had a great effort-to-fun ratio.  Simon really loved his little wooden doggy: he loves the burn wood smell and thinks it’s cool that it was cut with light. He took it to school to show his friends. I haven’t really told him his pup has some brothers and sisters.  Here’s a family photo.  I could have sanded them to give them a crisper look, but I like the smudges and burn marks.  It gives them a bit more personality and it’s less work too.

puppiesOutsideByTree

Magic Wands and Secret Compartments

If you make a magic wand for one of your children, it is inevitable that your other children will want one too.   Just as day follows night.   No child wants to be out-waggled in a pointy stick magical arms race.  So I set about making a wand for Simon.   I wanted to make the wands a little bit more than just a pointed stick, so I decided to give them a secret compartment.

wandEndCapInPlageWhen I turned the wands, I gave each a finial at the end of the grip.   After turning and sanding the wands, I cut the finials off with the bandsaw.  The idea was that I could then drill holes in both the body of the wand and the end cap and glue a dowel peg to the end cap.  The deep hole in the body would form the secret compartment and the finial and dowel would form a removable cap.

protectingLatheFromWoodI hate turning wood on my metal lathe.   Sawdust and sanding grit can get into everything. The sawdust wicks away oil and the grit can embed into precision mating surfaces causing them to wear quickly.  To avoid this problem, I cover most of the dust-sensitive bits with aluminum foil.  This makes clean up a lot easier.

Holding the wand was a bit tricky because  its uneven shape.

drillingWandEndCapI ended up wrapping it with electrical tape to help protect the wood, and sticking it all the way though the headstock.  The wood is pretty soft, but I didn’t have to tighten the chuck down super tight since I’d be drilling it at high speed with a pretty slow feed.  I used some bits of blue foam to shim the wand so it wouldn’t wiggle.  When I drilled the finial, I used a collar to keep from drilling all the way though.wandThoughHeadstock

secretCompartmentDowl

With the secret compartments completed, it was time to think about finishing.   The kids were running around with the wands already, and I wanted a tough finish that could hold up to a lot of abuse but would look ok.   I decided to go with a polyurethane finish.   I use polyurethane a lot because it’s tough and dries quickly.  I usually use clear semigloss because that’s the most forgiving.   I’d never used colored polyurethanes, but I decided to give one a try for this project since I wanted a very distinct color and wanted to do it quickly.  I got a a very small can of deep red and started brushing.

The next morning I went out to the garage to see how it looked, and I was shocked to see that the finish had formed a really dark band on the side of the wand that was down while it was drying.   I can’t say I like the colored finishes because they really highlight unevenness like that.  Luckily I was going to build up quite a bit of the stuff, so I just kept changing which bit was the underside each time I let a coat dry. It mostly evened out.  No fun though.

simonWandFauxFinishI used red finish on the handle and clear on the body of the wand.    I wanted to make the wand look old.  I thought I could do that by just dabbing some black acrylic paint on, but since I’d never done that before, it was a little bit intimidating.   What if it looked awful?  I took a deep breath grabbed a paper towel and started dabbing.   I had to work fast because that stuff dries quick.   I dabbed and dabbed and eventually got it to something I was happy with.

It really highlights some of my not-so-perfectly-sanded areas on the finial, but I guess making it look old and dinged was the goal.   I’m pretty happy with the results.  Simon wanted the wand to be all black, which I could have done but seemed kind of boring.  He’s going to be upset if I make his brother’s all black.  I’ll have to come up with some other finish for that one, or Simon will be snagging it faster than you can say “Expelliarmus!”

secretCompartment2

Cat Door Project Comes -a- Knocking

bobertLookingExpectantOur cat likes to go out at night and his comings and goings cause us to lose a little sleep opening the door for him.   He has never put up with a collar, so I got an automated cat door that can read his imbedded ID chip so only he can get in.  I read in the Amazon reviews that the chip reader worked well, but that raccoons could learn to open it from the outside.  We live in the boonies with lots of raccoons and other critters, so I knew that was going to be an issue.

catFlapWithMotorizedCatchThe problem seemed to be that the chip reader could dynamically keep the door from being pushed “in”, but cats were free to push the door “out” from the inside.  Only a magnet keeps the door from going out.  The door is shaped to make it hard to pull it out from the outside, but apparently raccoons can manage it.  So I thought “I’ll add a beam break sensor and some extra locking so the door can’t push out unless my cat’s head is breaking the beam.”

A system like that would require an Infrared emitter detector pair and some electronics. I started designing it, and the design consisted of two timer chips, a bunch of resistors/capacitors some transistors, diodes, etc. I wanted it to fit into a pretty small space since I would have to integrate it into the existing cat door enclosure.   For a long time  I’ve wanted an excuse to try out some of those super tiny programmable CPU’s.   They come with internal clocks so you can get away with very few external components, and you can tune the behavior in software.   This cat door seemed like the perfect opportunity to give them a try.  Time to lose some sleep in the short term to try to gain some sleep in the long run.

railOfChips I decided on the ATTiny85 because it has 8k of program space, features a wide selection of internal timers/interrupts/analog to digital converters, and cost only about $.85 each.  They’re the kid brothers of the chips used for Arduinos. They use the C programming language and have GCC as the compiler. This sounded like very familiar turf.  I ordered 25 of the little guys to get the lower price point, make sure I had plenty of extras, and avoid the embarrassing situation of paying more for shipping than for the parts themselves.

USBTinyISPInPiecesSmallerUSBTinyISPAssembledI also ordered a USBTinyISP In Circuit Programmer that you get in kit form.   This past weekend the parts came, and I soldered up the programmer.   It’s all through-hole components and was pretty easy to put together.  They have a detailed step by step build of it documented on-line, although I personally prefer just a parts list and a population diagram.   There’s less scrolling around, and if you don’t happen to have a computer near your soldering area, having a giant scrolling assembly document is unwieldy.

ZIFprotoboardI also soldered up a board that has a Zero Insertion Force(ZIF) socket that wires the programmer to the program pins on the ATTiny85s.

I then downloaded the USB device driver for the USBTinyISP and the WinAvr tools, which include the compiler and a tool called avrdude that can use the ISP to program the chips.   By the end of that day, I managed to get avrdude to talk one of my tiny chips.  So far so good.

schematicForProgrammingHere’s a schematic of what I wired up to be able to program the chip.  The 6 pins of the programmer header are shown from above.

It wasn’t until the next weekend that I got a chance to try to run some code on the chip.   For the cat door project I need a 38khz signal to drive the Infrared LED.   That is because the IR receiver filters out all non 38khz signals so it can reject ambient light level changes and all kinds of other noise in the signal.   This is how pretty much all IR remote controls work and that’s why you can get a fancy receiver that does all the filtering for  cheap. Be careful when choosing a receiver module. Since they are used for IR data transfer, many of them can’t handle continuous 38khz signals.   If you just go get the receiver at Radio Shack, you’ll have to use bursts of 38khz to keep the receiver paying attention. That’s code complexity I’d like to avoid.

The ATTiny85 has timers/counters that can be set up to drive an output pin directly so I can setup the LED and forget about it.   That’s much nicer than trying to toggle the pin myself with a bunch of interrupts or code loops.   I found a nice overview of ATTiny timer programming and read though that.  I then read the ATTiny85’s datasheet to figure out exactly how to set it up on my chip.  With a full understanding of the chip, I should be able to avoid an unintended Rise of the Machines.  I did, however, only skim some parts of the datasheet ,so if you get word that I’ve been mauled by raccoons, head for the hills.

timerRegisters

Sorry this is so small

To set up the timer, there’s really only 3 bytes you have to fiddle with: two Timer/Counter Control Registers and the Output Compare Register ,which is the 8-bit number the counter compares against.  To have the counter run in a retriggering loop and have it toggle the output pin A each time it matches, I only really need to set these bits, and only two of those are non zero.

COM0A1 COM0A0   
  0      1        Toggle output pin A on Compare Match
WGM02 WGM01 WGM00
  0     1     0   Clear Timer on Compare Match

My first attempt at programming the timers worked, but there were a number of problems:

  1. outputting on the wrong pin
  2. totally at the wrong frequency

The funny part was that my programmer was upstairs in the house, and the protoboard/power supply/test equipment was in the garage.  I had to program the chip, pull it out and hoof it out to the garage.  I went back and forth about 10 times.  Who says hacking doesn’t provide exercise?

attiny85With38kI managed to get the output going to the correct pin. Then I got the clock prescaler turned off so the counter was getting the proper 1 Mhz clock.  Finally I tuned the output frequency in to as close to 38khz as I could get.  The counter counts up to a given number and then resets and toggles the output pin.   I’d originally calculated the count should be 26 since 1Mhz/38Khz is about 26.  Then I realized that the output pin toggles each time the counter is reset, which means the output frequency is actually half of what I was expecting.   So 13 was what I was looking for.   In the end I used 12, since the 1Mhz clock is only approximate (the chips running without a crystal) and it ended up being a better frequency match.  Or it could be that you want n-1 since we’re counting from 0.

What do I think of the 8pin CPU’s VS a pile of timers and discrete parts?

I won’t really know until I finish this project.  At the very beginning, this way has me spending more time installing device drivers, downloading and installing software, and fiddling with makefiles,  etc.     The other way lets you get right to the protoboard but is less flexible in terms of fine tuning the results.   Now that I have the tool chain up and running, the rate of progress has really increased, and the the rest of this project should be less annoying.   Tuning the output frequency might not have been as fast as adjusting a trim pot, but so far the only component I have is the chip!  I really should move the programmer closer to my test bench.

I’m starting to get the sneaking suspicion that I should have just sprung for the AVR programmer that Atmel makes.  It works natively with AVRStudio, which is the free IDE that they produce for their chips.  You can get the USBTinyISP to work with it too, but it sounds like you have to go though some wacky contortions to do it. I think the only real advantage the USBTinyISP has over the native one is that it can also power the external board via USB.  It also has a 10-pin programming header, but since I’m not trying to work with some board that has a 10-pin header, it isn’t much of an advantage.

I think if I were doing complex development with actual debugging, I’d go with the Atmel programmer just because it works natively with AVR Studio.   As it is I’m just doing code dumps without any interactive debugging, so it’s basically:  use your favorite code editor, write the code, and type “make”.   There’s even a make target that downloads the code to the chip, so you end up typing “make program ” a bunch.  Firing up AVRStudio for that would be way overkill.  So for this kind of dev a USBTinyISP is nice since I don’t need an external power supply for my programming board. This WinAVR way is simple, pretty much worked right out of the box, and it’s much smaller and less bloated than an AVRStudio install.

Here’s the code so far.  It just defines what pins I think I’m going to use, sets direction of the various pins, and configures the timer to toggle out of pin 5 of the chip.   In my next installment, I’ll try hooking up the IR receiver    I’ll also start dissecting the cat door, come up with a plan for how I’m going to lock it, and figure out what sorts of feedback and control I’m going to need.  Hopefully I’ll get to play with using the external interrupts and maybe I can even try out some power-saving modes.   I’d really like to put these chips though their paces and get a feel for many of the chips features.   Clearly with 25 of these little guys, they’re going to be showing up in lots of projects.

#include <avr/io.h>
#include <avr/interrupt.h>

#define IR_LED_OUT_PIN    (1 << PB0)
#define MOTOR_OUT_PIN     (1 << PB1)
#define SWITCH_IN_PIN     (1 << PB2)
#define IR_RECIVER_IN_PIN (1 << PB3)
#define OUTER_DOOR_IN_PIN (1 << PB4)

int main (void) {
    // Make it so the input from the switch will use the internal
    // pull up resistor.  Other inputs will have no pullup, and the
    // outputs will all be low.
    PORTB = SWITCH_IN_PIN;

    // Configure the motor and IR leds as outputs, and all the
    // other pins as inputs.
    DDRB = RELAY_OUT_PIN | IR_LED_OUT_PIN;

    // Configure the timer 0 to output on 0C0A with no pre-scaler
    // and so it'll  CTC (count down and auto reset) toggle every time
    // it gets to the compare.
    TCCR0A = (1 << COM0A0) | (1 << WGM01);
    TCCR0B = (1 << CS00);

    OCR0A = 12;  // 1Mhz/38khx = 26.3  Then you have to divide by 2
                 // you have to toggle twice to make the full wave.
                 // so that's about 13.  With my clock 12 ended up
                 // being closer.  No prescaler needed for these high freq.

   for (;;) {
   }
}