Thursday, November 28, 2013

Thanksgiving

At some point, every Thanksgiving seems to end up like this.

Sunday, November 24, 2013

Family photo

When Sigrid and Anders returned from seeing the Barber of Seville, it seemed like a great opportunity for a family photo. Especially because Anders needed a current family photo for school.


That's actually not the photo Anders chose for school, because he liked a goofier one. But not quite so goofy as this:


Our last real family portrait was a couple of years ago.

Bunk bed fort

Sunday, November 17, 2013

What we saw in Golden Gate Park

A fat spider.




Two goofy boys.



A fountain.


Some shadows.

Saturday, November 16, 2013

pimp my bunk bed

That bottom bunk can get dark at night—until you install some LED lighting, that is. On high:

...and dimmed:

Friday, November 15, 2013

(bunk)bedtime stories

Fifth day we've had the bunk bed, and not so coincidentally the fifth day in a row the boys have both slept in the same room. Bedtime stories look like this now.

Monday, November 11, 2013

Bunk bed!

As they say, some assembly required...

...like 31 pages worth of assembly.


Fast forward a few hours, and...

Sunday, November 10, 2013

Massive Cookie

We borrowed a book called Wild Boars Cook from the library. At the end of the book, there's a recipe for "Massive Cookie." Well, we had to try it out.


Ready to cook!


Making the cookie.



Ready for the oven.


Cooking!


Massive enough for you?


One-eighth of a massive cookie.

Saturday, November 09, 2013

Chestnuts

Our (mostly) annual pilgrimage to Skyline Chestnuts.

The parking lot was much more full than in years past.


And, as it turned out, the harvest started a couple of weeks earlier than usual, and things were pretty well picked over when we got there. Rather than the seven pounds we usually end up with, we managed just a bit over two pounds.

But that doesn't mean we didn't have fun.



And it was beautiful, as usual.



And the rusted out old car is still there. (After all, where would it go?)



Wednesday, November 06, 2013

Tinkering

When we bought our house, the first run of stairs to get up to our front door had a motion sensor light at the top of the stairs. It was pretty much impossible to get this light to turn on until you were a fair way up the stairs. And because the sensitivity of a standard motion sensor drops when it is cold out, during the winter the light didn't turn on until you were nearly at the top of the stairs.

About three years ago, we had a second motion sensor light installed at the midway point on the stairs when we were having some other work done on the stairs. This improved things greatly, but the sensor sensitivity still varied with the seasons. And it was easily confused into turning on repeatedly if the plants on the other side of the stairs were swaying in the wind. (And then, after a couple of years, the sensor failed altogether, so we just kept the mid-stairs light off.)

Really, the problem is that with your typical security light, the sensor is right next to the light, but we wanted the light to be triggered by motion at the bottom of the stairs—several feet away. What we needed was to move the sensor away from the light. But I didn't think that simply moving the sensor, by splicing in a cable, was a good idea, because the wire would carry line-level current, and having a jury-rigged 120 volt power cable running down the wall next to the stairs didn't seem terribly safe.

So I instead decided to build a circuit with an Arduino microcontroller, a motion sensor, and a light sensor (so that I could program the light to go on only at night). If the circuit detected motion (at night), it could trigger a relay that would turn on the light. This would allow the cable between the circuit and the light to be limited to low voltage.

Originally, I assumed the circuit would use the same sort of motion sensor as the original one—one that detected infrared energy (heat). This would still have tuning issues, but I figured that if the sensor was close to the point at which I was trying to detect motion, I could adjust things so that there wouldn't be too many false-positives, and so that seasonal changes weren't a big problem either.

But then I found a cool sensor that detects whether something is close by, and if so how close. It does this by sending out very short bursts of ultrasonic (40 kHz) sound and then waiting to see if any of it is reflected back, and if so how long it took for the reflected sound to come back. This was perfect, because I could program things so that the light would only turn on if an object came within, say, 30 inches of the sensor, thus avoiding the wind problem (because the plants are around 50 inches away). And although the speed of sound varies with temperature, the variation is pretty minor. Given the outdoor temperature range in San Francisco, the maximum distance that the circuit would check might vary by an inch or two—no big deal.

After a bunch of fiddling, here is the circuit I built (it's about 2 inches by 3 inches):

It looks much more complicated than it is—most of the traces you see on the circuit board are unused (I built the circuit on a generic prototyping board). Those two speaker-like things are the ultrasonic transceiver and receiver. The light sensor and the power relay aren't on the board.

Because this circuit was going to be outdoors, I needed to fashion a weatherproof enclosure. This is an "old work" electrical box. I drilled some holes into it to accommodate the ultrasonic sensor, to mount the circuit board, and to mount affix the photocell (the light sensor). The cable (on the upper-left) brings power (about 9 volts) to the circuit, and also has a signal line (5 volts) that goes to the power relay (which is in a crawl space in the house).


The enclosure wasn't weatherproof on its own, so I epoxied the holes, painted the whole thing, and for good measure added some silicone sealant. The ultrasonic transceiver and receiver can't be sealed (that would block the ultrasonic bursts), so I'm hoping they are weatherproof enough to survive some rain. I'll grant that, even painted, this is not the most beautiful of things, but this is going under a mailbox.


I removed the old motion sensor from the light, and used the whole to thread the cable with the low-voltage power and the signal line through to the crawl space. I then sealed the hole with silicone sealant. (Word to the wise: See how the light is tilted a bit? Bad idea. The T3 halogen bulb inside is intended to be horizontal. If it's at a tilt, the higher end gets stressed by heat, and the bulb fails. The light, with a new bulb, is now turned so that the bulb is horizontal.)

Inside the crawl space, I have a power supply for the low-voltage line, and an enclosed relay that is triggered by the signal line.

The finished sensor is mounted under the mailbox, for a bit of protection from the rain. (It's actually a bit lower than in this picture, which I took before I finalized everything.) It's mounted with galvanized wood screws, and there is a silicone mat between the enclosure and the wood.


End result? The light reliably turns on when you get to the second step. Because of its height, it won't be triggered by small animals climbing up the stairs. Because of the type of sensor used, there shouldn't be any noticeable seasonal changes. Now we just have to see whether it survives the rainy season.

Sunday, November 03, 2013

Saturday, November 02, 2013

A gathering of family and remembrance of times past...

Hi, Augie! Hi, Josie!





Such a quiet, solemn group.