Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   capacitance fuel probe works
Monday, February 18 2013
Due to the relatively cold winter, an occasionally stuck-open zone valve, and having had our house house-sat by a stranger, we depleted our fuel oil at a faster rate this year than in other recent years. Normally we can get through a heating season on a single 275 gallon tank of fuel oil, but this year our tank has already dropped below the quarter-full mark (according to the float-based fuel level gauge). Since our house would be house-sat again fairly soon (and this house sitter likes a warm house), I thought it prudent to have our tank refilled. The fuel delivery would be happening some time today, and I wanted to use the refueling as a chance to road-test my homemade capacitive fuel level sensor, which is already installed in the tank. So before the fuel was delivered, I took a number of measurements of the raw capacitance readings (which were in some arbitrary non-farad-related unit) with the tank just less than a quarter full of fuel. Since the capacitance measuring system relies on Arduino's Capacitive Sensing Library, one of the variables is a resistor placed between two of the Arduino's digital pins. I'd been using a 10 megaohm resistor, but I also took readings with 1.5 megaohm, 100 kilohm, and 10 kilohm resistors. (I eventually decided to use the 1.5 megaohm resistor.) With all those numbers recorded, I trained an IP webcam (which connects via WiFi) on the floater-based fuel level gauge so I could watch it from my computer while also watching the raw data from the capacitance probe. This meant that when the fuel delivery happened, I could take notes on what numbers corresponded to what levels on the floater-based gauge as it gradually rose. I should note, by the way, that it only took about a minute for the oil delivery guy to pump the 178.5 gallons of fuel necessary to fill the tank. (And, since the 275 gallon tank evidently still had 96.5 gallons in it, one can surmise that the floater-based fuel gauge isn't all that accurate.)
Happily, the capacitance values rose in a nicely linear way in tandem with the floater-based gauge, sweeping through 3000 of whatever units I was measuring (from 9395 to 13469). This was the first real evidence I'd had that I'll be able to measure fuel levels simply by using it as a dielectric in a long, narrow open-air capacitor made of concentric copper pipes. I was delighted.
Things did not go smoothly after my initial jubilation. I wanted to see if more shielding would make the readings vary less than they were ranging, so I took the Serial Slave apart and refined its makeshift sheet metal case by folding up some of the edges. Then I went to test it again to see if these changes had thrown off its capacitance readings. But in the fuss and bother of reattaching the Serial Slave to the four-pin cable that brings both data and power, I attached the cable backwards, reversing ground and positive five volts. Evidently Atmega328s are tough little fuckers, because, though this misconnection caused the microcontroller to become very hot, when I finally connected it correctly, it still seemed to work. More troubling was that now my readings were all very different from what they had been. Instead of being around 13500, they were now 2 or 5 or sometimes 50. If a small change of shielding position was going to change the readings by four orders of magnitude, this was never going to work.
But then I did some more experiments and found that the correct readings would come if I just disconnected and then reconnected the coax cable to the capacitance probe. Evidently the Capacitive Sensing Library was doing some sort of calibration based on the initial capacitance it read when starting up and subtracting that value from all subsequent readings. That's great when the library is being used to read a touch sensor, but it's useless in this application. I researched the Capacitive Sensing Library and soon found the problem: I was using the capacitiveSensor method, which performs the calibration I was seeing. What I needed to use instead was capacitiveSensorRaw. Once I used that, everything worked perfectly.


Schematic of the capacitance fuel gauge described above.

This evening I drove down to Ray & Nancy's house to watch tonight's episode of the Bachelor. When I arrived, Ray (who had the night off from his normal job as a bartender) was on the couch watching teevee. He can be a little hard to read, though sometimes (at least according to Gretchen) he can be in a foul mood. There was some indication of a recent such mood on the dining room table, where Ray had begun writing out some "house rules." I wondered if he'd left this list out for me to see as some sort of passive-aggressive statement. Though I didn't get a chance to read them, it's possible Ramona's bottomless puppy energy ran contrary to those rules. There was also something about picking up trash, which might have been in reference to the beer cans I'd left behind when I'd come to see the last episode of the Bachelor.
Eventually Sarah the Vegan showed up with the makings for a multi-course Thai meal. She was testing some recipes for use in a cooking class she is taking down in the City. The food ended up being really good, partly because it was so damn fresh. It was perhaps a little sweeter than I would have preferred, but that's because both Gretchen and I have unusually savory palettes. But Gretchen wouldn't have liked the food anyway; it included two of her least favorite vegetables: cucumber and avocado.
I'd brought over some extra beers for Ray if he wanted them, but it seems he's pretty much stopped drinking. So I had them all to myself. The ladies both drank wine.
Tonight's episode of the Bachelor was the one featuring "hometown dates," which is usually a bit of a snooze. But the producers had tried to ratchet up the excitement by including an actor paid to play the role of a broken hearted stalkerly former boyfriend. And then there was the brother who seemed to be coached to call out the bachelor himself as a fraud. Both of these incidents happened with the same young woman, and she was the one sent packing at the end of the episode. So I wouldn't recommend it as a strategy on the show (assuming one actually wants to "win").


For linking purposes this article's URL is:
http://asecular.com/blog.php?130218

feedback
previous | next