In 2000 I attended a football game @ Penn State. ~100K people attended. And, cellular coverage (it was EDGE) was non-existent. That many people crammed together, and it was nothing but interference, nothing got through (not that it would have mattered on the phone I had at the time). So we all focused on the tailgate, the game, cornhole, the usual.

This past weekend I attended another football game (Tuscaloosa Alabama). ~100K people attended. And cellular coverage (LTE) worked!. First, lets try some (slightly blurrcam) video of the game, that I took and it uploaded automatically. It gives u an idea of the atmosphere!

Now, cellular coverage at high density is very difficult. The bandwidth is not the only issue. There is interference galore. No matter how much you aim no matter how many small cells, the phones chirp back towards them (and create a near/far problem). Even the shape of the stadium makes it tough (no towers overhead or in the middle).

But it works. And, of course, ‘bama won. And, amazingly, Tennessee brought their entire band (~400 people). So the ‘Million Dollar Band‘ played off against the ‘Pride of the Southland Band‘, the better part of 1000 instruments wandering a field. You don’t see that everyday.

So I don’t know what i was amazed at. 17 years of progress and 100K people can tweet HD photos live, ~1K people in band formation. Or the fact the score was as low as it was. Hmm.

And now (I didn’t take this photo), the photo of the game. Its like a modern day normal rockwell painting! It gets better the longer you look at it! (yes he got a misconduct penalty).

So I have this gas fireplace. And its heading into fireplace season. And, shockingly, its controlled by a fairly old-school honeywell thermostat. I mean, it works. But… its got a lot of cons. It uses 2 x AAA batteries. In my house, these always die sometime before it gets used for the season. Also, it won’t accept NiMH rechargeables (it turns off @ 2.4V, and 2xNiMH == 2.4V). It doesn’t understand if I leave the room to turn off. It can’t do timers. And it has no IP address, no automation. Hmm.

OK, this should be an easy problem to solve right? So, first, lets understand how it works. First, whats behind it? Well, the backplate has 2 wires connected. So its not suitable for a Nest or an Ecobee (no 24V, no common).


OK, what do those give? The meter shows 4.2V @ 1mA. If I short the two terminals, the fireplace turns on. 4.2V sounds good, but 1mA is not good enough (I guess I could do some sort of harvestor and Li-ion battery, but we’d have to charge it at less than the 1mA to prevent it from turning the fireplace on, and, well, that might be tricky to achieve and slow).

Lets look underneath. We have a gas inlet, a gas pressure regulator/switch, a thermocouple (thermopile?), a tiny power bar, and a 3V AC transformer. And, more interestingly, we can see the (brown) thermostat cable, with two unused wires (black/green). So, I think we can send power to the thermostat pretty simply, a 5V USB wallwart should do nicely, tie to the black/green wire.

 

The fireplace is a heat&glo SL-750TR-IPI-E

OK, next, lets look at how to make this look nice and work well.

To work, well, lets imagine a bill of materials. We need to switch 4.2V @ 1mA. For that we can use a NPN transistor, e.g. 2N3904. We want to be able to locally control on/off/temperature, so for that we can re-use the front-panel up/down temperature switches. To add a display, we can use a 0.96″ OLED like this one, which fits more or less exactly in the aperture (well, the ribbon cable is visible, but that makes it more ‘techy’ so I think it will look ok.

We’ll need a temperature sensor. For this I can use either a Dallas Semiconductor (Maxim) DS18B20, using 1 GPIO pin, or a module like the DHT22/AM2320/AM2302 temperature/humidity sensor (also using 1 wire).

I might also want to use a Li-Ion battery and charge circuit, so that the fireplace can operate when the power is out (its one of the aux heat sources in the house, along with a pair of D-cells that run the fireplace bits and go super crusty/leaky if you are not looking!)

 

And then for the brain, we can use a ESP8266. I have a choice, I can either use a -01 module, which means we would need a 5V to 3.3V buck converter, or, we could use a development module (like the wemos d1 mini) which has integral 5V to 3.3V supply as well as a USB port for debugging/uploading.

OK, now the theory would be: we let the ESP 8266 run the local logic. Measure temp, if temp < set point then turn on. If temp > set point + hysteresis, turn off. We then allow the set-point to be manipulated via MQTT (as well as reading the room temperature because ¯\_(ツ)_/¯).

We’ll do a bit of a de-bounce in software for the two front-panel switches, having them control the set-point (and broadcast this over MQTT of course). Then it will be a simple matter to hook it into Home Assistant.

OK so this is super-simple. USB 5V DC wall-wart, Li-Ion charger/3.3V supply module. ESP8266. 4k7 resistor, NPN transistor, Li-Ion battery, OLED display. Total BOM cost about $6. Probably take about 100 lines of C and a few hours to debug. Time to go scrounge the parts box to find the components. I’ll race you!

So I obtained a replacement capacitor. The old one (Yuhchang, top) and the new one (Cornell, bottom) are pictured. A quick snip with the soldering iron, and it has proven to fix the motor: no more buzzing after a few minutes of operation. Good!

Now, back to the automation part. I’m still mulling over whether to make a new circuit board (6 triacs for the motor speed, a relay, a triac for the dimmer, an esp8266 w/ some gpio), or just leave it as-is cuz its working. So to experiment, I have acquired 4 zigbee light-bulbs . I went with the Home Depot EcosSmart connected lights (each is zigbee controlled on/off/dimmer). This would give me automation on the light part of it.

Now, i have to convince my Xiaomi Mi Home Gateway to pair. It was trivial to pair to all its own widgets (there is an app, which can be set to ‘mostly english’ mode).

But what is this? Sacre bleu? There is no ‘light’. (Although I am glad there is a zero-fire option, that’s what i’m looking for in electronics!). Hmm. I’ve tried a few different ones. The light bulbs are a bit of a PITA to get into pairing mode (you turn them off for 5 seconds, on for 5 seconds, repeat 5 times, then wait, then it blinks). Hmm. More research will be required.

Now, i do have this gadget, which i’ve not tried yet. Its a USB zigbee sniffer. it shows up on USB as Product: CC2531 USB Dongle, Manufacturer: Texas Instruments, 0451:16ae, and its one of these. And I think this is the user guide. Hmm. I’d rather not have two ‘hubs’, I would prefer the Xiaomi gateway handle all the devices. Hmm. It seems the Xiaomi supports ZHA profile, which means it can support the lights, just have to figure out how to force it to pair. Suggestions?

So here @ casa don there are two big ceiling fans. Casablanca Panama II 6645T models, each with a light kit. You can see what it looks like in the wild on the right.

Now, sadly, both have become ill. The one directly over my desk works ok, but after a few minutes the fan starts making a buzzing electrical noise.

The one in the photo, well, not so much action.

 

 

But even without these problems, there is a more basic one… The ‘smarts’ are some 80’s era X10 style, with a wall-switch like this one. It operates wirelessly (I think using X10-style zero-crossing rather than radio). And this is nearly 2020, we should be able to run duke nukem 3d on a fan by now. Or at least crysis.

OK, so step one, ladder, screw driver, hex driver, dust removal (eww), and we are in. There is a control board sort of around the fan. There are 6 triacs (and 6 speeds…. hmmm… coincidence?), and a ‘resistor pack’ strapped down the side.

 

 

 

If we look in a bit more detail, there is a relay (DPDT) which I’m pretty sure is for the reverse. There is a 10uF capacitor which runs to one winding of the motor, and then the AC runs to the other winding through that resistor pack/triac setup.

Now, the most likely culprit for the noise is the capacitor. Capacitors fail over time, particularly when they are from ‘2nd tier’ brands, as this one is. So i remove it and check with the meter. Interesting, the Yuchang 10mfd/250wvac shows 10.11 uF. But my meter doesn’t measure ESR. Hmm. OK, i’m going to order two replacements from digikey. I picked the MMP2W10K-F, I hope its a decent match, i couldn’t find a a datasheet on the Yuhchang site, this was the closest.

OK, so step one will be to see if the capacitor swap fixes the noise. But step two clearly has to be to get an IP address on this thing.

So here’s where it breaks down as method. Method A, i do some retrofit. I add an ESP8266 to this circuit board. I have the ESP drive the same TRIAC (and sort out what the other switching transistors do, maybe related to the light-kit dimmer?). Method B, i ditch this circuit board, and get some logic-level triac to do the dimmer for the lights, switching to the existing resistor array for the fan (and keep the concept of the phase-shift capacitor/direction-relay as-is).

So… pro & con. If i go with the retrofit model, I get to keep the wall controls and have them coexist with the home automation/voice. If I go all new, well, i’ll understand it all. What should I do gentle reader?

Oh yeah, and given the phase-shift capacitor checked out on the meter, what would you suggest if the buzzing/shorting noise persists after I swap it?

Retrofit and keep the wall-switch, or replace and screw the next home owner?

View Results

Loading ... Loading ...

OK, so here’s the deal. The below pictured free-loader has been coming by my house for 4 years now. This is about the max distance you can get to him (presumed him because no kittens have been observed). If my door is left open, he’ll come in and snoop around a bit, maybe play w/ some catnip toys.

That little house you see in the background (yes its heated in the winter!) is where he can hang out in the rain or snow.

The cat (called ‘Outdoor Kitty’ or ‘OK’) gets fed (and as a consequence so do the raccoons and squirrels). After 4 and change years, we are now at a ~3m relationship, as long as I pretend not to see him. So, question (and poll below), do I now have 2 cats? At what stage is a stray cat your 2nd (or 3rd? 4th?) cat?

When is a stray cat your cat?

View Results

Loading ... Loading ...