Raindrop Physics

Lately I’ve been seeing a lot of this particular Cadillac commercial.  Maybe you’ve seen it as well?  According to Mr. Serious Announcer Guy, when designing the CTS-V, Cadillac’s engineers considered every detail, even the force of a raindrop on the windshield wipers at 190mph.  Good for them, right?  Just makes you want to rush out and buy a Caddy?  Well, I don’t think the marketing department gave the same consideration to the details of this commercial.  At least, I don’t think so.  But take a look; see if you can spot what I’m on about.

YouTube - "Raindrop" Cadillac CTS-V Commercial

The frame above has been copied from the sequence in question (skip to 0:22).  Here we have a slow-motion shot of the Caddy supposedly flying along at 190mph.  But is it really?  Take a look at the raindrops.  You’ll notice they’re falling at roughly the same speed at which the car is moving.  So, nearly two-hundred miles/hour.  That doesn’t sound too unreasonable, right?  I mean, skydivers reach terminal velocities in excess of 120mph.  So you might think that rain truly can fall this fast, or perhaps even faster, right?  Wrong.  If you’re as weird as I am, you’ve probably already discovered that only in a serious tornado could raindrops possibly reach such speeds.  In fact, the terminal velocity of a large raindrop is only about 20mph (see here and here).

Now most likely, the raindrops shown here aren’t real anyways (they’re not shaped properly either).  But just about everything you see on TV these days is computer-generated.  I just find this all rather amusing myself.  I mean, a commercial about engineering precision should be precise, right?

So what we have here then is an exciting video of a Cadillac traveling fully twenty miles per hour.  Yay.  But wait, are we sure about that?  Disregarding computer graphics, if you look closely at this sequence, you’ll see that the CTS travels about three car lengths in half a second.  So roughly (15′) x (3) / (0.5s) = 90fps = 61mph.  Yea, that’s not exactly 190mph, but it is just slightly more interesting than 20mph.  But you know what?  It’s probably for the best.  If any part of this commercial is real, I’d imagine the producers were reluctant to call for such high speeds due to the risk of hydroplaning and the resulting crash, damage, injury, death, etc… 🙂

Home Sweet Garage

Alright, I think it’s about time for this silly article on plasma arc waste disposal to get knocked off the top of my site, don’t you?  It’s just fluff, honestly.  Filler.  And I’m tired of looking at it.  So how about a post on a real project for a change?  Sound good?  Great.

First though, a quick gripe.  I hate waiting for parts to arrive.  Specifically “last” parts.  Like that final DigiKey order, or in my case, a shipment of PCBs from Advanced Circuits.  You see, I now have everything I need to complete this really exciting new device I’m designing at work, except for the PCBs.

Assorted parts, but no PCBs...

And not having boards is kindof a show-stopper.  So I’m crossing my fingers and hoping that Advanced Circuits gets them shipped out early, as they so often do (because they’re totally awesome).

But let’s get down to business.  If you happen to have been reading my blog about six months ago, you may remember that I recently moved to the middle of nowhere Waterloo, Iowa to start working for John Deere.  Now prior to moving here, finding a place to live has been, for me, frustrating.  “Oh, here’s a place that’s nice, but it’s too far away,” or, “That’s way too expensive,” or, “Uh, what’s that growing on the ceiling?”

Not so this time.  Deere actually provided a relocation assistant to show me several nice places around town.  All I had to do was tell her what I was looking for and BAM, there we were.  Plus, the cost of living in Iowa is virtually zero.  So here I am, renting a lovely townhouse, about ten minutes’ drive from work.

Now, nothing’s ever perfect, and this place is no exception.  For instance, it’s got a nice single-car garage with an opener, but there are two problems.  First, the remote control has terrible range.  My landlord warned me about this, but explained that I just needed to find that “sweet spot” for it in my car.  But this thing is kindof a brick and looks rather like some RadioShack project box.

This really is a garage door opener.

The second problem is lighting.  The garage door opener does have a single light bulb which comes on when the unit operates, but it’s pretty anemic.  This isn’t helped by the fact that the inside of the garage is almost all dark wood, either.  Plus it seems to take a few seconds for this light come on, and it only stays on for a few seconds afterwards.

So in Iowa, winters are long, dark, and cold.  Not unlike a mine shaft, I imagine.  But I like light.  So I took a trip to Home Depot one weekend, and for about $50 (those motion-detecting switches are kindof steep) solved problem number two quite simply.

Let there be light!

Yep, that’s a Lutron motion-sensing light switch, wired into an extension cord, and a simple reflective lamp fixture.  And it’s all just clamped to the top of a set of shelves I already own.  Easy peasy.  And it works like a charm.  The switch has two little pots to control sensitivity and on-time.  Which is great, because I love adjusting things.  So now I can pull into the garage, catch those last few minutes of Wait Wait, Don’t Tell Me, and then hop out and voilà, let there be light.  And I saw that it was good (enough).

Now for a while, I lived with problem number one without much complaint.  I had to be in my driveway before the remote would trigger the opener, but it wasn’t a huge deal.  Then for some reason, it routinely started failing me.  My car actually had to be within a few feet of the door for it to open.  And more than once I had to get out of my car (heaven forbid) and wave the remote around in front of it.  I replaced the battery, but this made no apparent difference.

So again, one weekend I decided I’d had enough and sat down at my workbench to sort out the problem.  I popped the project box remote open and started probing.

A very simple garage door opener

To make a long story short, I discovered that the transmitter was simply broadcasting a repeating pulse train via (I believe) amplitude modulation.  Somewhere in the 800kHz range, although I don’t have equipment capable of measuring such high frequencies with any sort of precision.  I can tell you that the DIP switches you see control the sequence of the transmitted pulses to match a particular receiver.

Get on board the pulse train!  Woo woo!

Since I know virtually nothing about RF amplification, and didn’t want to risk damaging the remote, I decided to piece together my own remote from components I had lying around.  Here’s what I used:

Transmitter:

  • SparkFun 315Mhz ASK transmitter module ($4)
  • AVR ATTiny13 8-bit, DIP8 microcontroller ($2)
  • 5V Regulator
  • 9V Battery
  • Protoboard
  • Button

Receiver:

  • SparkFun 315Mhz ASK receiver module ($5, discontinued)
  • Olimex AVR-MT-128 development board ($75)
  • 12V wall-wart power supply

Now the precise components specified here aren’t really too important.  I used what I had.  I would recommend the RF transmitter and receiver though (except that the receiver has been discontinued).  These are both pretty amazing for the price; I got them a number of years ago and haven’t yet put them to much use.  But they’re fantastically simple.  Just apply TTL-level serial data to the input of the transmitter, and watch it appear at the output of the receiver.  That’s it.  No configuration/setup required.  The only complication is that there is no error checking.  So you’ll need to be clever about dealing with the occasional garbage data.

So how does this all work together then?  Well, when you press the button on the prototype remote, the 9V battery is then connected to the transmitter module and the MCU (via the 5V regulator).  The MCU then sends out a slew of bit-banged (since the ATTiny13 has no hardware UART) serial data to the transmitter, which then sends it wirelessly to the receiver.

Now this is a garage door opener!  Well, sortof...

The receiver then sends this data to the ATMega128 (on the AVR-MT-128 dev board), which does have a hardware UART.  If the received data is correct, a relay on the dev board is quickly closed and then opened again.  The relay terminals are wired up in parallel with the door open/close button inside the garage.  Thus, the action of the relay simulates a real button press and causes the garage door to open/close.

The receiver

That’s it.  Again, pretty simple, right?  The receiver, since it’s got an LCD display, also indicates how many times the door has been actuated (either opened or closed).  This was a comforting feature during initial testing, because it allowed me to determine whether or not my garage had been opened at any unexpected time.

Sophisticated, yes?Well I’ve been driving around with this silly protoboard taped to my center console for about two months now.  It’s been working great; I can now operate my garage door reliably from the street (a distance of probably 50′), and this little gadget has made for such a nifty conversation piece that I might just leave it in protoboard form.  I mean, a small enclosure would be nice and stuff, but…

Seriously though, if you have any cheap and cheerful ideas for housing the transmitter in a more elegant and robust manner, do let me know in the comments.  By the way, at this point in a post I’d usually provide links to my code, but I’m not going to do that this time.  I’d rather not make it too easy for the tech-savvy thief to break into my garage, you know?  Yea, I’m probably just being paranoid, but still.  Lots of crime in Iowa you know. 🙂

Now ultimately I’d like to extend the functionality of my device so that it automatically opens and closes the door when I come and go.  If you’re curious about how that might be done, take a look at one of my older posts on the subject.  Thanks for reading though, and feel free to pose any questions below!