Wednesday, March 27, 2013

Spontaneous Funnel Cloud

I saw a spontaneous funnel cloud yesterday. I suppose it is technically just a whirlwind, not a tornado, as apparently a tornado has to be connected to the cloud and the ground. To me, this was really cool. It would be cool to see a tornado for sure, but to see something that I had never even heard of was pretty cool as well.

We were driving along and I thought I saw smoke over the tree line, but it looked funny. It was as white as the clouds, which you normally only see if they are putting out a fire and you have steam instead of smoke, but there was no darker smoke above it from the pre-watered fire. Also, the smoke column appeared to be getting taller faster than it was rising. As we watched, it thickened and then suddenly tightened into a very distinct column just like a tornado, only it was white (which I suppose a normal tornado probably would be if it was out in the daylight instead of under a thundercloud). As far as I could tell, it wasn't connected to any cloud. And with the trees in the way, I couldn't say for sure whether it touched the ground or not. As to height, the visible column was at least 5 or 6 times the height of the trees in front of it.

The day wasn't clear. The sky was spotted with clouds, so an invisible vortex could have been associated with a cloud above. I think the original "smoke" was probably condensation from the pressure change as the vortex began forming. If that is the case, I would have expected it to be visible up to the cloud if it was connected, since a cloud would be direct evidence of enough moisture to become visible in the first place, but maybe not.

After doing research, the closest thing I could come up with is a "cold-air funnel cloud", which is pictured at right from wikipedia. The one I saw, as I said, wasn't attached to a cloud, and it was much more well defined, with a smoother margin, at least to me. I haven't found any images without the column being attached to a cloud, but I'm still looking. Surely someone else has seen one.

I wish I had gotten a picture, but the thing only lasted a few seconds. It had almost totally dissipated (there was still some high-level fluff left) 10 or 15 seconds after the column formed, so I wouldn't have gotten a picture even if I had had my camera with me. But trust me, it was still cool.

My wife's vent-a-hood

Our stove-top is on an island in the middle of the kitchen.  It has a vent-a-hood, but instead of being over the stove, it pops up out of the island behind the stove.  The circuit board in it went out 6 years or more ago, and I wired a radio shack push-button to the up-down motor and a light switch to the fan motor and just put them in the cabinet space under the counter top.  It works, but it is kinda annoying.

Well, I'm finally getting around to rebuilding the circuit board.  I had a guy at work that knew electronics try to decipher the existing circuit for me.  It seems that I thought he knew more than he did, as all he really did was trace the wires and tell me what some of the components were, not actually how the circuit was working.  Basically, I could run the up-down motor without a problem; simple on-off and there are limit switches at the top and the bottom.  But the fan has multiple speeds but only two wires.  I didn't know how they set the speed on a fan without having a different wire for each speed, and that's what I needed to find out.

Luckily, just knowing the parts put me on the right track.  Apparently, the on-off for both motors is controlled by a triac, one of the components that make up a solid-state relay, instead of using a mechanical relay.  But since the triac isn't mechanical, it can be very quickly turned on and off repeatedly; in fact, turned on and off fast enough to chop a peak of the AC sine wave in half.  This is called "phase control", in that you are controlling the speed of the fan by only allowing a certain percentage of the AC phase to get to the motor.  (Solid-state relays are just as reliable for fast and frequent on-off cycles, but they are more expensive and often have circuitry built in to make sure they only turn on and off when the AC sine wave is crossing the zero line, preventing phase control.)

So that got me started in figuring out how to run the fan, and there are numerous examples out there of phase control.  The other part of the circuit that I couldn't figure out, and that the guy at work had no idea about, was the power supply.  There's no transformer on the old board, but it's powering microcontrollers and such, so I know it has a low-voltage DC side somewhere.  But when you get on the forums and start asking about transformerless power supplies, the typical answer is something along the lines of "those things are inherently unsafe and will kill you, so we don't talk about them here".  Again, I got lucky and ran across an application note put out by MicroChip that is exactly what I needed.  I got that working, powered my circuit and programmed it and everything was going great, but my triacs weren't working on my AC lines.  I could use them to modulate a DC line to flash an LED, but I couldn't get the AC line to go off at all.  At first, I thought it was because I bought the wrong triac (I bought a standard one instead of a "logic sensitive" one) but when the new ones came in, they still didn't work.

And then, luck again.  With all of the examples I had found, I had never come across a true full schematic for doing exactly what I wanted to do.  But I had found a lot of information.  One of the bits was that inductive loads, like fans and such, may require a special circuit to keep the back-flow from turning the triac back on when you try to turn it off.  And another was that with resistive loads like light bulbs (or maybe both types), the phase control produces radio-frequency interference that needs to be filtered out.  So I was doing a search for triacs and resistive loads and found another application note from Microchip, this one about using a triac; AN958: Low-Cost Electric Range Control Using a Triac.  The circuits there use a transformerless power supply and use a triac to phase control a heating element.

Well, by golly, when I used their transistor driving circuit to drive the triac instead of trying to drive it straight off of the microchip, it worked like a charm.  The little ac night-light I am using to test just politely flashes right along with my status LED with no problems.  So now I have to build the zero-cross detection circuit and test it.  That is giving me problems, but they should be coding related, not circuitry related.  Of course, I decided to try and test it with a push button instead of actual AC input first just so I could make sure I had my interrupts right before I started worrying about timing, and that didn't work.  I was thinking about it last night and I think I may have fried the pin on my microchip.  I have the pin wired to ground through a pull-down resistor and then wired to +5 through the button.  So it is truly grounded until you press it, and then pulled to positive when you push the button because the button circuit has less resistance than the ground circuit.  In fact, no resistance.  See, I didn't put a resistor in the positive-flow path at all, so I am wiring my pin straight to positive and giving it, in essence, infinite current.  It is supposed to max at 25 milliamps, so unless it has internal protection, I may have burnt that pin out.

I'm going to move to a different pin and test with a proper current-limiting resistor this time and see if my code works.  If it does, and still fails when I go back to my preferred pin, then it's fried.  Luckilly, the PIC18F4520 that I am using has plenty of input pins I can use as interrupts, so I should still be good if I only fried one pin.  And since it still flashes my LED and accepts programming, I know I didn't fry the entire thing.

High tensile fence installation

I've been working on the fence out at the property again.  We spent spring break out there and I went out again last weekend by myself.  We're using a method I found in a Bekaert installation guide to set the posts.  I'd never heard of this before, but it seems like it is working very well.  You pack 8 inches of dry concrete at the bottom, then alternate 6 inch layers of concrete and soil the rest of the way up the hole.  After doing this, I realized that I don't think we ever packed posts correctly when I was a kid.  We always filled the hole up, then packed down the dirt.  Then filled it up again and packed the dirt.  And we just kept doing that until we couldn't pack any more in.  Our posts always had a good bit of wobble in them, and it's probably because the bottom of the hole, especially with a really deep hole, never really got packed.  But this Bekart method forces you to pack it in layers all the way up, so it is evenly packed all the way to the bottom of the hole.  These posts we've put in seem to be completely solid as soon as we are done packing them, and we don't have to haul water and a wheel barrow around to mix concrete or anything.  I want to say they are just as solid as they would be if we poured concrete, but I don't really want to lean into one enough right now to determine if the tiny bit of movement I see is the ground around the hole or the dirt in the hole.  At worst, they are "almost" as secure, and I'm confident that will change to "absolutely as secure" once the concrete layers finally cure.

I'm also experimenting with a different H-Brace method.  According to everything I have read, the h-brace cross member has to be two and a half times as long as the fence is tall.  For our 4 foot fence, that's a ten foot cross member.  The documents all suggest a 4 inch pole as a cross member, but I don't see how any wood is going to work long-term at 10 feet supported by its ends.  Sure, if it's pressure treated it may not rot, but it's still going to get soaked when it rains and risk sagging.  So I'm using 1 inch galvanized pipe as my cross members.  They're not as strong if you sit on the cross member as a pole would be, but they are only meant to absorb force long-ways, not up-down (compression, not bending) so it should be fine.

I also tried to cheap out on brace pins.  These are supposed to go through the upright post and into the ends of the cross member to support it.  Even though I'm using pipes, I still needed these to hold the pipe up, and I found that zinc-plated hex bolts were cheaper than actual brace pins of the same length.  Unfortunately, I also found out that the new(ish) compounds they use in pressure treating eat through the coatings very quickly, even on heavy galvanization.  So my bolts may not last long.  The hot-dipped galvanized is what is recommended, but even that will corrode.  So, instead of pricing out hot-dipped galvanized bolts vs the "class III" galvanized brace pins, I just decided to use a 1 3/8" forstner bit to drill a pocket about an inch deep into each post.  I then left the plastic thread protector on the end and set the pipe in the hole.  I don't know what "class" the galvanization on pipe is, but hopefully the plastic cap will help protect it from reacting regardless.  So far, the assemblies look very nice, even with the crappy home depot posts.  I'll put a picture up as soon as my phone starts working again (I took it on my camera phone, and can't currently get it off).