Sunday, July 28, 2013

WxService Update Available

WxMonitor ow4j130728

  • Made WxMonitor animate the backlog of sensor events missed since the last update. In the case of WxMonitor initial start-up, if WxService has been running for 24 hours or more, the past 24 hours' events will be animated. If the computer running WxMonitor has been sleeping or hibernating, the animation will cover the duration that the computer was offline, or 24 hours, whichever is lesser. It takes about 30 seconds to animate 24 hours worth of data, and it's entertaining and informative to watch.
  • Widened the buttons on the Configure tab and the Add Property dialog to provide more room when running on Open JDK under Linux, which uses boldface for the dialog font button labels. They didn't fit in the allotted space. A future update will also address a similar problem with the text field labels.

WxService ow4j130728

  • Updated WxService to use OWAPI library version 1.11, which includes support for 64-bit 1-Wire drivers when installed on a 64-bit operating system. (Note: for some reason, the Dallas/Maxim OWAPI library is still tagged with version 1.11, so I'm not sure how one can tell which library is actually present by looking at the WxService logs.)

Thursday, July 18, 2013

WxService Update Available

WxMonitor ow4j130713

  • Added a status bar message string "Downloading 24 hour sensor backlog from %s.", where %s is the URL of the WxService. This provides an indication that the initial backlog of sensor data has not yet been received. On a fast network, you may not get a chance to view this message. On a slow network (e.g., being served from a host that is running behind a DSL connection), it could take up to a minute to catch up.

WxService ow4j130713

  • Changed getSensorData to return all data for the last 24 hours, if the time argument is 0. This is the case when WxMonitor has not received any prior data (as on startup). This change allows WxMonitor to accurately reflect the minimum and maximum readings, and fill all of the averaging buffers on startup. 
This may seem like a step backwards in performance, but it is a major improvement in accuracy. I think accuracy beats the illusion of performance without the accuracy, every time.

(Download...)

Friday, July 5, 2013

Electric Vehicles -- Growing Pains

I have been intrigued by electrically powered vehicles. I know they're more efficient than Carnot-cycle internal combustion engines, and I know that electric motors have a much more user-friendly power curve than IC engines do. Electromotive propulsion is so desirable that diesel-electric railroad locomotives carry their own power generation plants on their backs wherever they go.

I just don't want to ignore practical problems that may also exist. I believe humans (and their media) are overstating the problems of fossil energy. It's because we're familiar with them: They have been in use for a long time, and the nearly universal application by millions of consumers brings the drawbacks up above the noise level. They rise to the level of measurable significance. Meanwhile, the problems associated with electrically powered vehicles are still too small to be obvious because the adoption rate is still negligible, so the media, the environmentalists, the government regulators, the road tax structure, have not picked up on it.

Now, if the illiberal control freaks in government would leave the free market to work these things out (save for the road tax angle), we humans - voting with our hard-earned dollars - would naturally gravitate towards the most practical (or at least cost-effective) solutions without a bunch of top-down central planners making all the wrong decisions for us, based on politics, junk science and poor engineering. If individuals make the wrong decisions, it doesn't require an act of congress to correct them. We just sell or scrap our bad decisions, and buy better ones. It's an evolutionary process.

We still need to solve the problem of how to pay for roads, when electric vehicles are all mains-powered. I don't like the idea of government tracking our position by GPS. Commercial charging stations and battery-swap stations would be a reliable and convenient choke-point for road taxes. I assume that domestic charging will not be the dominant go-forward mechanism for reforming the batteries. I actually think battery-swap stations would be more practical, unless we can dramatically increase the charging rates, or switch to ultracapacitors or some other technology.

The nice thing about charging stations or swap stations, is that they are responsible for their own power supply - generation or connection to the power grid, where it can be taxed at the point of sale. Battery swap stations can have battery banks in stock, so the charging demand could be moved to off-peak times. They might be able to make some use of solar or wind power (although I'm skeptical of that - I think it would be partial at best). Maybe they could even use Crower-cycle diesel generators. The Crower-cycle design would be extremely beneficial in this application. Of course, an intrinsically safe, 20-year pebble bed nuclear reactor buried onsite would be awesome!

Finally, I am very concerned that batteries, especially Li-ion, are not environmentally friendly to make. Even with recycling, which isn't 100% efficient at reclaiming the components, the demand would increase dramatically, and Lithium mines and the manufacture of other components will bring down the wrath of NIMBYs and environmental extremists, dramatically driving up costs, and curtailing the availability (which also drives up prices).

So, lots of things to think about. Left to individual ingenuity, I think we humans would work them out naturally. What we end up with might not look anything like the electric car as we envision them today. But if we allow bureaucrats to regulate the snot out of it, we'll be driving gasoline powered cars up until the point where cost of obtaining gasoline becomes prohibitive.

In case you haven't guessed, the thing that bothers me the most are the agenda-driven regulators, bureaucrats, NIMBYs and environmental extremists. Illiberal control freaks, all of them.

Friday, June 28, 2013

PI is Wrong!

PI isn't wrong in the sense that it is inaccurate, but it was the wrong choice for the circle constant. So many equations have terms that include 2π, if we had chosen a different constant, equal to 2π...



It's a long video, but well worth the time to watch.

Tuesday, April 23, 2013

Lousy Sound -- Capacitors

I am an audiophile, but not an audiophool. I don't buy magic elixirs and oxygen-free copper, especially not in mains cords and speaker wire. The difference between capacitor sounds and amplifier sounds, tubes and transistors, digital vs. analog, have to have some basis in physics, and be demonstrable in a blind A/B comparison, or it doesn't exist. If a blind A/B difference can be detected, then we need a scientific hypothesis, and an explanation with reproducible results, or it's mere superstition.

There are some differences that are so gross, so obnoxious that you don't need a blind test to detect. We all know that. It sometimes happens when a component fails, and all of a sudden there's a hum that wasn't there before, or some kind of distortion that is just painfully obvious, and it goes away when you fix the problem.

Case in point: I have a pair of JBL 500 bookshelf speakers that I purchased for my office about 15 years ago. They're not what I would call hi-fi, but they are adequate for use with my computer sound system, playing the various bleeps and boops, and sometimes an AAC or MP3 here and there. They sounded OK for the past decade or so, but lately they have just started sounding obnoxious. I simply could not stand to listen to music through them. I would have to turn them off. "Obnoxious" was definitely the operative word here. And it wasn't just while I was thinking about it. Background music was distracting me from my other work. It wasn't subliminal.

I was able to rule out the source and most of the amplifier by switching to my AKG K-501 headphones. I still wondered if the amplifier was behaving badly, maybe oscillating, or under-biased with nasty crossover distortion (I usually listen at low volume). But no, the amplifier bench tested well within spec, and all the voltages and currents were normal. It was definitely the speakers -- or my hearing. But no, the headphones sounded OK. It was the speakers. But how? I've never experienced speakers going bad before.

I finally popped the back off the speakers, and at one glance, I had my suspicions. The crossover. It is the simplest kind of crossover that would possibly work, using the cheapest components possible: one (ferrite core) inductor and one (electrolytic) capacitor. The capacitors had gone bad in both channels. They were five microfarad bipolar electrolytics, and if their values changed, if they shorted in one direction, they could become quite non-linear. And of course, a change in value would make the crossover operate at the wrong frequency, and hence, change the frequency response and distortion characteristics of the speakers. I had to replace the caps.

So, what to replace them with? Electrolytics? Well no, but not with audiophool caps either. Electrolytics can deteriorate over time. Film caps generally do not. Five microfarad film caps are available for building crossovers. They're more expensive, and they're physically larger than electrolytics, which is why JBL didn't use them on entry-level bookshelf speakers, which outlived their warranty by some 14 years anyway.

So I paid my three dollars each, and put them in. The main problem was, they wouldn't fit on the crossover circuit board. I had to wire them on, and then use hot glue to secure them in place so they wouldn't vibrate and rattle around. But I got them installed.

The speakers sound much better now, thank you very much. Not obnoxious. I can work once again, undistracted, with music playing in the background. There is definitely a difference when a component is malfunctioning or operating out of spec. Capacitors can have a "sound", especially when they're used as a frequency-discriminating element in a filter, such as a speaker crossover, where voltages are gyrating all over the place. Bypass and coupling capacitors most likely do not have a "sound", unless they're inadequately specified, or if they're malfunctioning.


Thursday, February 14, 2013

Lousy Sound

I have noticed a trend -- lousy sound. I have been a music lover and audiophile (not audiophool, which is unscientific superstition, like anthropogenic climate change) since high school.

Listening to Pandora, I was struck by a new kind of distortion. It's an obnoxiousness in the upper midrange, almost like a harsh, noise modulation being kicked up by things like electric guitars and vocals. It isn't harmonic, and it isn't normal intermodulation. And no, it's not this.

What a long strange trip it's been, getting to the bottom of it. At first, I figured it was Pandora's standard AAC bitrate. So I paid for the subscription version so that I could get the high quality feeds. No joy. Besides, AAC actually sounds really good at reasonable bitrates.

So then I suspected my speakers. Maybe they were just obnoxious, so I started listening with headphones -- three different ones. No joy. Next was the sound card, so I tried a number of different ones on various machines I have at my disposal. They all exhibited the same obnoxiousness.

Heathkit AA-1214
Crossover distortion in my amplifier? I replaced the finals in it a while back, because they went into Vce breakdown and burned up. I used the original part, but with a higher breakdown voltage that wasn't available in 1972. Did I get the bias wrong? It turns out, one of the bias resistors had changed value. So I re-biased both channels. Distortion measurements are well within their original spec. Besides, this amp has never sounded bad to me in the 40 years since I first assembled it. The obnoxiousness persists.

My ears? Maybe... I do have tinnitus... but no, it doesn't happen on every song. I don't notice it with my old personal CD or vinyl collections (although the distortion does sound somewhat similar to vinyl damage from a worn out stylus). But I have been familiar with that phenomenon since the early '70s, when my ears were brilliant. Although I miss with great anguish the acuity of my youth, I do know how to listen. This ain't it.

To reiterate: it doesn't happen on every song. I have heard of the loudness wars that CD producers have been engaged in. It's the same idiotic loudness wars that broadcasters have been engaged in for many years, except it's even more idiotic when we're dealing with a medium that so doesn't need any additional processing to sound good. There's more than enough headroom on a CD for the dynamic range of any music known to humans. There's no reason to pack it all into the top 6 dB of the 96 dB available.

Not only do they compress the snot out of it, they clip it too. If this clipping occurs before the A/D converters, the higher harmonics that would cause aliasing get filtered out. But if they clip after the A/D converters, it will cause aliasing, and aliasing sounds nasty.

Aliasing has no correlation with the harmonic structure of the music (in fact, it's inverted). But it will kick up as noise whenever the digital clipping occurs. I can't imagine that recording engineers and record producers would be so stupid as to clip in the digital domain (without using the proper anti-aliasing filters), but maybe they do. If anybody knows, please drop me a line, or post a comment here.

I would not expect this obnoxiousness to occur with the classics, but with so many classics being remastered and reissued, I expect that the new releases of old material are also getting the same treatment. It certainly sounds like it is. Even our proud legacy is being mutilated.

Thursday, February 7, 2013

Realtek Sound Improving?

A favorite pastime among gamers and audiophiles is to bash Realtek audio codecs. This may have been justified at one time. A build I did several years ago using an Intel D945GCCR motherboard with the Realtek ALC883 audio codec certainly deserved the drubbing. Even an old Sound Blaster 16 PCI was a dramatic improvement.

But a recent build using an Intel DH67BL motherboard with the Realtek ALC892 audio codec was a very pleasant surprise. In A-B listening tests, I was unable to discern the difference between the Realtek and the Asus Xonar DG (a very well regarded audio board).

It's possible that the ALC892 sounds better than the ALC883 chipset. However, the published specs of the two chipsets are too close to quibble, and frankly the horribleness of the sound of the D945GCCR motherboard would have made any specification pointless. The thing that curled my eyelids was the harsh upper midrange distortion, which if anyone measured it, would have pegged the needle. It was that nasty.

You want to know what I think? I think both Realtek chipsets are just fine. I think Realtek is a victim of industry-wide poor motherboard design. I think the problem is with the analog portion of the D945GCCR motherboard, which was designed by Intel. Intel are digital logic designers, not analog audio designers. I think they botched it with the D945GCCR, but they finally got it right with the DH67BL. The former requires an add-in sound card. The latter really is a pleasure to listen to.

I think Realtek's problem is that it's their face on the audio subsystem -- their volume controls, equalizers, effects controllers, media players (if you use them). If Realtek were smart (or a bit smarter anyway), they would let the motherboard manufacturers put their logo on those apps. Then the blame (or praise) for the sound quality would go to the board manufacturer, which actually has more to do with the sound quality anyway.

The sound really depends on the board layout, the analog design and choice of components, whereas if you get the audio codecs right, they're right -- period, end of story. It really isn't any more expensive to make a good audio codec than a poor one, so might as well make a good one. If you get a justifiable reputation for making poor audio codecs, your bottom line will suffer terminally, regardless.

Now, having said all that, I should point out that the Realtek chipsets are not as quiet as the Xonar (with noise levels in the -90 dB range, the Realteks are comparable to 16-bit conversion), whereas the Xonar approaches -120 dB, which consistent with 20 ~ 24-bit conversion. They all claim 24-bit resolution, but only the Xonar approaches actual 24-bit performance.

Make no mistake though, unless you're using this for professional studio work, 16-bits is far more resolution than you'll be able to discern with your naked ear in anything but an anechoic recording studio. As a point of reference, the noise level of a good vinyl analog recording corresponds to about 8 ~ 10-bit resolution.