Friday, March 31, 2017

Good news! (And also, electronics are finicky!)

Just a quick pseudo-celebratory post - all of the work I've been doing on this engine has been under the shadow of uncertainty. The engine was involved in an off-airport landing, and I've been wondering if my crankshaft had sustained any damage. If it had, this engine would probably be scrap, based on how it had been modified - the major modified parts just don't seem to be readily available, and other manufacturer's modified parts wouldn't fit, and that would mean I'd need a new crankshaft, prop hub, and engine case, and they'd all have to be machined... Got it back from the machine shop today with a clean bill of health. Now I just have to finish cleaning and painting a few things, and the reassembly can begin.

In other news, apparently circuit design is a little tougher than I thought... received the PCB I had printed for my landing lights, (they look FANTASTIC, by the way - really like the purple solder mask with the gold solder pads) soldered everything in place, and... nothing. Back to the drawing board...


Tuesday, March 28, 2017

Rust removal sucks, Cleaning sucks, Painting sucks...

....but they're all pretty necessary if this engine is going to last. So I've been doing due diligence to remove corrosion, clean up, prep, paint, and heat treat all my engine components according to best practices as instructed by Bob Hoover and Tom Wilson. There's a fantastic resource online at http://www.eaa691.net/images/pdf/VW%20aircraft%20engine%20building.pdf , which is a hundred some pages on what to do, why to do it, and what happens when you don't. I've been just collecting parts and trying to get everything ready for the first trial assembly. Tomorrow I'm taking my crankshaft in to have it magnafluxed, and if it comes back ok I'll start putting stuff back on it. First the woodruff key and the gears, then the prop hub. The next step will be installing the bearings in the crank case, and dropping crank and camshaft, along with some associated hardware, inside and making sure it all turns the way I want it to. 

I got new cylinders and pistons, measured them, weighed them, cleaned them *very* well, and painted them black to prevent corrosion and encourage heat transfer. 

The cylinder on the left has wet paint on it, the cylinder on the right has been cleaned but not painted yet. I made sure to keep track of the cylinders, and marked them after they were painted so I could keep track of them.


As it turns out, the cylinders I designated as "A" and "D" were both 4.490" between the two sealing surfaces, whereas cylinders "B" and "C" were slightly shorter at 4.487". That's right on the edge of too much difference, but because I've got less than a half a thousandth of difference between matching cylinders, I'm not going to send them out to have them machined. Instead, I'll put both of the "long" cylinders on one side, so the heads will be able to seal correctly, and either make up the difference between the two sides with a .003 shim, or just not worry about it.... for all I know, once it's assembled, other tolerances may stack up and either make it a larger difference or even it out. That's why I'm calling this a "trial" assembly, because there may be adjustments to make after it's all together. 

I'm working on removing some surface rust on my prop hub with vinegar. Most of it came off after soaking for about two hours, but I'll give it another shot tomorrow after work. I still have a fair amount of cleaning to do on the engine case, which is about the last thing I want to do... but it's going to be the thing that's holding me up in just a few days, I think. By next week, I hope to be posting pictures of a freshly painted, partially assembled engine.

Wednesday, March 15, 2017

Lights! Cameras! Snow drifts! (aka, Lighting Part 1)

LED lighting. Pretty expensive for normal people, not so shocking to airplane people. But you can pay upwards of a grand for the basic strobes and a landing light. Once again, something in me says, "I can do it cheaper!" And in this case, that something in me is right.

In the magazine "Kitplanes," a guy named Jim Weir writes a column on all sorts of electrical topics, from basic concepts to DIY projects. One of the tasks he tackles is building your own LED lighting kit for significantly less than you can buy one. Naturally, I was impressed, and after purchasing the components listed, I built the circuits in their entirety on a breadboard and plugged them in. Unfortunately, nothing happened. I started taking the circuit apart and focusing on individual components, making sure they worked as I thought they should. The only part that wasn't working was the part of the circuit that caused the strobes to.... well.... strobe. I sent email after email to several of Jim's email addresses, and email after email to the contact address for the magazine. After a couple of months of no response from anyone, I decided to give up on the strobe circuit as published.

My solution was to digitize. I've been playing around with Arduino at work, and decided to see what I could accomplish here. 

The LEDs I'm using are made by LEDEngin. The strobe part numbers are LZ1-00R102 (red), LZ1-00G102 (green), and LZ1-00CW102 (white). I'm running these at 800mA, which isn't quite as bright as they can be, but should keep them from burning out for at least a decade. The landing light part number is LZ9-00CW00. 

So, the difficulty is in powering these guys. That part of the circuit I went ahead and borrowed from Jim. Basically, you use a transistor and a resistor wired up as a current limiting circuit. To tune the current, you adjust the resistor. 

Now, for the landing light, that's it. Case closed. Toss a switch in there and all the heat shrink and wire loom you can find, and then cover the whole thing over with electrical tape and dunk it in that Plasti-Dip stuff for good measure.  (Pretty sure that's not how the Designated Airworthiness Representative wants to see your electrical work done.) The strobes still need some work, though, and for that we turn to a tiny electronic arachnid called an ATTINY85.

The AT-Tiny-85 is programmed with the Arduino IDE. Arduino borrows heavily from C++, but it's so well documented that even a complete ape like me can copypasta (that's internet lingo for copy and paste) and make things work. The ATTINY85 has 8 pins, but we only need 3 - one for each strobe. The ATTINY85 puts out 5v, which is plenty for our LEDs, but it only sends a measly 40mA per pin. That's not enough to light our LED, but it *is* enough to trigger a Darlington transistor... which is exactly what we'll do.

A transistor can act like an electronic switch - voltage won't flow across two pins, unless voltage is applied to the third pin. A Darlington transistor is akin to two transistors paired in order to handle large amounts of power, while being switched by just a little bit. In our case, we're controlling 800mA at 12v by applying >40mA at 5v. This means that not only can we turn our LEDs on and off electronically, but we can write code for any strobe pattern or brightness (by using Pulse Width Modulation) and upload it to the chip, rather than swapping analog electronic components for different timing or brightness. What's more, we can control each LED on its own pin, so they can be independently programmed, but they're all running from the same chip, so they can be synced perfectly if we so desire. And we do so desire.

So, in the end, I spent >$150 for everything, including lenses and having the PCB printed and shipped to me. That's pretty stinking good, considering these lights are significantly brighter than what's on the old Cessna 172 I learned to fly in. Total power consumption is >5 amps, which is significantly less than what the old Cessna draws for its dim lights. This may not be the best solution, but it is *a* solution, and I'm pretty happy with it. 

In the spirit of sharing, I've added the board and parts list below, and the board can be ordered at https://oshpark.com/shared_projects/6PehzB0Z . 

*edited March 29,2017: Turns out the board isn't quite right... Upon population, the landing lights worked just fine, but the strobes weren't working at all. I'll link to the new board once I figure out what's wrong and fix it...

Parts list:
1x LEDEngin LZ1-00R102
1x LEDEngin LZ1-00G102
1x LEDEngin LZ1-00CW102
1x LEDEngin LZ9-00CW00
1x ATTINY85
3x 2 watt 1.5 ohm Resistors
3x 2 watt 1.8 ohm Resistors
3x 1/4 watt 1k ohm Resistors
6x LM317 Transistors
3x BDX33C Transistors (TIP-120s will work just as well)
You'll also need a way to program the ATTINY85.  I use the AVR USB programmer from SparkFun. The code in its entirety can be copypasta'd from below:
_________________________________________________________________________________
/*
LED_Flashers_Rev_3

  Designed for a homebuilt airplane's LED strobe lights using an
  ATTINY85 chip. This code will flash the LEDs 10 times in 800ms,
  then leave them off for 800ms.

  modified March 15, 2017
  by Matt Quimby
 */


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  for(int i = 0; i < 10; i++) // using a "For Loop," int = integer, used as a counter to count "i." Starts by assigning a value of 0 to "i," and states that the bracketed code should loop if it reads "i" to be less than 10. "i++" tells the counter to add 1 to "i" each time the sequence is run.
  {
  digitalWrite(0, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(1, HIGH);
  digitalWrite(2, HIGH);
  delay(40);              // wait for 40 milliseconds
  digitalWrite(0, LOW);   // turn the LED off
  digitalWrite(1, LOW);
  digitalWrite(2, LOW);
  delay(40);               // wait for 40 milliseconds
  }                        // completes the inner loop
  delay(800);              // wait for 800 milliseconds
}                          // completes the outer loop and starts from the "void loop" again
_________________________________________________________________________________

And the board: (2.51" x 2.61")



And finally, the followiing is how I spent my afternoon and evening.



Friday, March 3, 2017

More surprises!

Curiouser and curiouser! I spent a fair amount of time during disassembly taking measurements and writing things down, and then promptly forgot to worry about any of those numbers. When I was sold this engine, it was sold to me as a 2180. There was some mystery behind its history, but I didn't think too much of it. However, as I was ordering parts today, I realized that the numbers didn't match up.... specifically, the cylinder and crank numbers. 

A Volkswagen 2180 engine begins life with around 2/3 that displacement, and then a bit of machine work is down. The crankshaft, which comes stock with a stroke of 69mm, is replaced with a crank with a stroke of 82mm. In addition, the cylinders and pistons, originally in the 85-90mm bore range, are replaced with 92mm sets, which gives the final displacement of 2180cc.

My Volkswagen "2180" engine no doubt had similar beginnings, but the end result is a bit different - the pistons are not 92mm, but 94mm. The crank stroke, likewise, instead of 82mm, is 78mm. The engine I'm working on has, in fact, a displacement of approximately 2165.

What does that mean? I'm not sure. Obviously the parts for it are different. As far as power and reliability, those depend a lot more on quality of workmanship than they do on any other factor. Bottom line, I *may* have a little more torque, or I *may* not, and at the end of the day it's still up to me to build a solid engine. 

This does cause some complications, though. The main one I've run into so far is that nobody sells cylinders for a 78mm stroke... only 69mm and 82mm. That being said, some folks sell the 82's as "78-84mm," and don't give any other dimensions. There are three possibilities, as I see them (in order of most preferable to least preferable from my point of view):

1. The cylinders are short enough for 78mm stroke, and you add shims to use them for longer strokes
2. The cylinders are long enough for 84mm stroke, and you cut them down on a metal lathe if you need shorter cylinders
3. The cylinders are somewhere in the middle, and we don't really expect you to worry about compression ratio that much.

I'll know better once they show up and I can measure them. One way or another I'll get this engine built.... but if I have to custom cut each cylinder, it'll probably cause me to wait a little longer before the next rebuild.

On a more normal note, I finally got my crankshaft ready to send out for NDT (Non-Destructive Testing). Here's the key in the slot:



Partway removed:



All the way out:



I hope to spend some time this weekend cleaning the parts I intend to reuse... we'll see if I can pull myself away from this guy long enough to get any work done.