Friday, November 20, 2015

Air Conditioner Measurement - Part 1 - First Cut

I was getting ready to update the hardware on my air-conditioner measurement system when I realized that I had never written about the initial set-up. So, several months after the fact, here's what I've been doing.

In my previous temperature measurement system, I was able to fairly easily measure the air-conditioner state by tapping into the relay that activated the central circulation fan. In this new house, that was not going to be so easy so I decided to try something more direct: measuring the condenser fan in the outdoor unit. I thought about tapping into the relay on that fan unit but that relay switches 240V and I didn't want to have to worry about making sure the wiring was properly protected for that higher voltage. Instead, I decided to measure the air pressure change caused by the fan turning on.

To do that I employed a BMP180 which measures both pressure and temperature.  I was able to get the sensor mounted on a little PCB and strap down an old milk jug to catch some of the air when the fan turns on, making a little pocket of slightly higher-pressure air. I wasn't sure if this was work but testing revealed the pressure increase was high enough for the sensor to clearly detect.

Air pressure capture for the fan. I've pulled the system for maintenance and it isn't shown.

I wanted to try to make correlations between outdoor temperature and air-conditioner run-time under the assumption that the air-conditioner would run longer when the outdoor temperature was higher. To do that, I employed one of the temperature sensors I previously used for indoor temperature measurement. Not being weather proof at all, I stuck it under the out-cropping on our house under, behind the air-conditioner. This is not ideal as it is very close to the ground (less than 6 inches of clearance) and natural air circulation is likely to not be very high. Its not great but it is out of the rain and is better than nothing. (I'm not able to use the BMP180's temperature sensor because the air blown by the air-conditioner fan will be hotter than ambient. The whole point of the outdoor half of an air-conditioner is to cool the hot coolant as a part of the thermal cycle.)

Since I don't have a real-time measurement system up and running to record the data collected, I decided to use an SD card logger commonly available for the Arduino platform. It is fairly easy to write specific values to the card and it includes a real-time clock to time-stamp each log entry. With this I measured the BMP180 pressure and temperature (the later just for fun), and the TMP36 outdoor temperature. I did this every 15 seconds and, through the use of an extension cord, was able to leave the unit plugged in, running indefinitely.

Here's the final schematic:

The two LEDs are diagnostic lights. The red one flashes every time the SD card is being written to and the green one is lit up when the system is powered.

Here's the hardware, pulled out for maintenance:
From left to right: Interface PCB for LEDs and TMP36 module, BMP180 module, SD card logger on top of an Arduino Uno, and TMP36 module.

And here's the code. Not all of it is working at present, such as the time measurement, but the core measurement functionality has been working great.

Thursday, November 12, 2015

MIDI Controller

A nerdy friend of mine plays electronic keyboard at his church for Sunday morning services. He's expressed a desire to have some kind of controller he could use for the bulk switching of settings between or during songs. He knows that its very possible to do this with MIDI, the protocol designed for communication between electronic instrumentation. Lacking a convenient controller, though, it wasn't possible to actually make this happen.

For his birthday, I decided to make him an Arduino-based MIDI controller. Not knowing the exact use-case he had in mind, I tried to make it as generic as possible without getting caught up in feature creep. I decided to go with two foot pedal inputs, four LED outputs, a MIDI in, and a MIDI out.

Here's the schematic:

I spent a little bit of time putting in hardware switch debounce that ended up working pretty well. The foot pedal jacks had the extra contacts to indicate when the pedals are plugged in, allowing for some fancy software mode-switching if so desired.  Not having any MIDI equipment, I have blindly implemented online schematics; let's hope it works. Oh, and due to the MIDI and the Arduino USB port using the serial port for communication, a hardware switch is needed to move the Arduino over into programming mode and switched back to run mode when its time to use the box.

So about the software. For better or worse, I'm leaving that largely up to my friend.  I've stubbed in a lot of code to demonstrate functionality and I don't expect that he'll have any trouble making this do exactly what he wants but I feel a little bad that this isn't a fully-realized product. Thankfully he's a nerd and I expect he'll enjoy completing this last little step on his own. Plus he'll get to make it do exactly what he wants it to do. Nothing beats fully customized electronics.

Here's the assembled kit, all done up in a cheap enclosure I got off of eBay.

Saturday, November 07, 2015

Antenna Pre-amp - Part 1 - First Attempt

On the to-do list since we moved: get my amateur radio station set back up. We have a larger yard and a two-story house and I've been scheming of how to make best use of the space without running afoul of the wife, dogs, and neighbors. In the vein of taking baby steps first, I'm going to try putting in a shortwave listening antenna but rather than going up high like you might think antennas should, I'm going to be placing this one six feet or so off the ground along one of our fences. From what I've been reading, this style of antenna (something like a Beverage but not exactly) is very good and not picking up noise. It is also not very good at picking up radio signals but better at not picking up noise.

OK, let me try that again. The antenna reduces the amount of noise it picks up more than the amount of radio signals I might want to hear. This reduction in the signal-to-noise ratio is great but it has the side-effect that you need some way of boosting the signal back up to a useable level. To provide this boost I'm building a small amplifier called a "pre-amp" that will go in between my radio and the antenna.

The design I'm using  is one I've found with extensive documentation. The designer, Larry (call sign W7IUV),  has put a lot of time into building, testing, and documenting his work; this is very helpful for people like me who have not spent any time in building radio-frequency circuits before. In fact, I'm going to be copying an entire portion of his radio set-up by also building a few switchable attenuators like he has; I have no idea how effective the antenna and pre-amp will be.

After ordering the required parts and finding some cheap scrap PCB on eBay to use as the circuit board, I went to work making the cuts in the double-sided PCB to form the nodes in the circuit. The designer used a Dremel to make the cuts in his PCB but lacking such a tool, I used a utility knife. As you can see, mine didn't turn out super neat but it was good enough. (I took the picture after starting to populate a few of the capacitors.)

As you can see in the photo, the parts span the gaps in the copper, connecting the various nodes. The back side of the board is ground and I drilled a few vias to connect a few top-side ground pads to that larger ground plane. The RF-gurus say having a big ground plane helps reduce noise in the circuit; sounds good to me.

Here's what things looked like after I fully assembled the board:

(The components sticking out the sides are just resistors used in testing and not part of the pre-amp proper.)

Construction and testing of the circuit revealed a few problems:
  • The largest by-pass capacitor, a 4.7uF tantalum, shorted-out on me twice. I don't know why this is happening. The input voltage is ~13V and the capacitor is rated at 50V. I don't know if I got a bad lot or if I'm doing something wrong. It may be related to the other problem I'm having...
  • The amp draws ~110mA, documentation says it should be somewhere more along the lines of 75mA. The testing process suggests making a comparison in the amount of current drawn when the input and output are terminated (as shown in my picture) and unterminated. If the current goes up when it is unterminated, the designer says this is an indication that the tran-sistor is oscillating at a very high frequency. I don't see a difference terminated vs. unterminated; its just high all the time.
Maybe the two are related, maybe they aren't. Maybe my pre-amp is oscillating, maybe it isn't. The good news is that I found somebody (WD8DSB) who, based on the pictures the designer provided of his pre-amp, made up a diagram of showing how the designer laid out his board. I've got the components and now that I've built it once, the second time shouldn't take too long. I plan on building this second version following his plans and comparing the current draw to the first. Stay tuned....

Monday, November 02, 2015


Our phone system at work is set up to send us a text transcription of each voicemail we receive, called a "Voice Mail Preview". I guess they don't want to claim it is actually a transcription because of situations like this:

Hi it's your wife they bury in asleep please call back thank you bye.

Maybe somebody came to our house and buried my wife alive while she was taking a nap and she's kindly asking me to call her back.

Or maybe its something else.

Either way, I should probably give her a call and see what's going on.

Thursday, October 15, 2015

An Example of What I Do During the Day

My day job is at Pacific Northwest National Lab working in the Electricity Infrastructure group. Most of the time, best case, the conclusions from my weeks or months o work ends up as part of a report. A technical report full of terms most people don't need to understand and even those of us who care about such things resent having to read. A lot of times the report is public because it was funded with government dollars but when was the last time you went looking for a report by a government contractor on ANYTHING you were even slightly interested in? Let's just say, as a rough approximation, that a lot of what I write is not read by many. (Probably including this blog. Hi, Mom.)

But this project I just finished is different. I was part of a small team that made a website that estimates the emissions impacts of various smart grid project.  People more gifted than I did the actual website coding but I had a significant hand in the design of the analysis engine and wrote most of the code that performs those calculations. The site is called the Emissions Quantification Tool and there are people out there who are very excited about it.  It was even mentioned by the Secretary of Energy, Ernest Moniz. (Around here, we call him S-1.)

So go and enjoy; play around. The easiest project to start messing around with is solar PV; that's the one I go to when I wanted to verify some general functionality. Play around with the graph at the bottom of the page. If you really want to be surprised, check out the impact that energy storage has on emissions.

Its nice to have work you can take pride in be so publicly placed.

Monday, October 12, 2015

Hot Air Balloons

A few weeks ago we took an early morning trip to see a hot air balloon launch in a nearby town. I hadn't been to one since I was a kid and my wife had never been before.

Just as the balloons were due to launch, the wind picked up and gradually, the pilots concluded, each on his or her own, that they weren't going to fly that day. We were one of the last to leave, hoping that somebody might take the chance. The upside: we got to see how the balloons are deflated and repacked.

Wednesday, August 05, 2015

Washington Westside

Photos from a weekend trip we took a few months out to the west side of the state.  We live in the dry, desert half (as you can see from my Pallouse Falls photos); this part of the state is what people think of when we say we live in Washington.

The famous Skaggit Valley Tulip Festival. Abnormal spring weather this year meant by mid-April, when we took the trip, most of the flowers were gone.

 We spent that evening on Fidalgo Island.