Time Capsule on life support

29.11.2009 18:30

I managed to bring the broken Time Capsule from the office back to life today. It turned out that the problem really was only in the Flextronics power supply, so when I connected the +5 V and +12 V rails to a lab power supply it booted up.

Apple Time Capsule on external power

The yellow LED is blinking which, according to the manual, means it cannot get an IP from the DHCP server. After restoring the factory settings I saw the "Apple Network XXXXXX" on wireless and was able to connect to it with my laptop.

Unfortunately, even with the hardware working, it's still a brick as far as I'm concerned. It appears that these things can only be configured with a proprietary Mac or Windows application. There's no friendly HTTP server to greet you. Instead nmap shows port 5009 "airport-admin". I did find this Java configurator, but it doesn't say anywhere if it works with Time Capsules and I haven't tried it yet.

As far as the broken power supply is concerned, I haven't found the problem so far. Starting from the largest components and going downwards in size, I got to the high-voltage MOSFET and the rectifying diodes, all of which appear to be fine.

Even if I manage to fix it, I don't think I'll be putting it back into the white box just to get overheated again.

Posted by Tomaž | Categories: Digital | Comments »

The price of performance

27.11.2009 18:34

I've been running some experiments with Google's Unladen Swallow at work a while ago. If you haven't yet come across it, Unladen Swallow is Google's attempt to create a faster Python implementation.

It's shocking just how large this software project is: 2009Q3 release is 343 MB and 1.4 million lines of code (as counted by sloccount).

Compare this to a stock Python 2.6.4 distribution: 63 MB and 780 thousand lines of code. Or the latest GCC 4.4.2 release for instance, which weighs in at a hefty 3.8 million lines.

Is this really the future of software development? You often hear that the only completely bug free program in existence is the Hello, World!. Suddenly, even that seems doubtful. Sure, many of those hundreds of thousands of lines probably aren't touched by its compilation. But still a staggering amount of code needs to work correctly to reliably run even the simplest program nowadays.

For a more practical viewpoint, see my post on Zemanta Tech blog. The bottom line is that it worked surprisingly well for a project of this age and size and gave a promising, but modest 5% speed up compared to stock Python in a certain Zemanta text analysis task.

Posted by Tomaž | Categories: Code | Comments »

Reverse biased LED

25.11.2009 16:10

Here's an interesting question: If you force current through a LED in the reverse direction (i.e. by causing a breakdown in the junction), will it emit light, and if not, why?

Fear the glowing spheres

Let's start with an experiment. I took an old low-intensity 3 mm yellow LED (I'm guessing GaAsP chemistry) - I want to limit this discussion only to simple P-N junction devices and ignore for the moment complicated new LEDs with quantum wells and such.

I applied a high reverse bias through a large resistor (1 MΩ, to limit power dissipation) and visually checked for any light. The diode started conducting a significant current at 185 V (which, by the way, is surprisingly high as all datasheets I've seen rate such LEDs at maximum 5 V reverse bias). At that reverse voltage I let 0.1 mA of current through it (which gave total power of something around the rated 20 mW). I couldn't see any light coming from the LED.

As a control I then reversed the polarity and let 0.1 mA flow in the forward direction. In that case I could clearly see the LED lit up in a darkened room. So, the LED wasn't destroyed in the experiment and 0.1 mA was enough to produce a visible effect.

So, the experiment confirms that a LED will not light up when the current flows in the reverse direction. But what is the theory behind it?

Visible photons emitted by the LED are generated by electron-hole recombinations in the semiconductor. The material has just the right energy gap that an electron in the conducting band can give away it's excess energy to a visible photon when it fills a hole in the valence band. In forward operation most of these recombinations happen after charge carriers travel through the depletion region and are diffusing into N or P material as minority carriers.

When the junction is in breakdown, a similar thing happens (from the high reverse voltage I measured I'm guessing the avalanche mode of breakdown). However this time carriers don't diffuse through the junction but are generated there through impact ionization. But because the voltage is reversed, electrons enter the N material as majority carriers (same goes for holes in the P material). So gone are the recombinations near the depletion region and no significant number of photons is produced.

Interesting though, carriers from an avalanche breakdown have significantly more energy than thermal ones in forward operation. And they do in fact emit light after they pass through the junction (i.e. through bremsstrahlung and hot carrier recombinations). However the light's wavelength is no longer defined by the material's band gap and its spectrum is completely different to that of forward operation. So the LED might have as well lit up in my experiment, but with intensity and wavelengths that were invisible to an unaided eye.

Posted by Tomaž | Categories: Ideas | Comments »

This time multimeter survived

23.11.2009 18:07

This is how Apple Time Capsule's power supply looks from the inside:

Apple Time Capsule power supply, component side

It's quite small for a 30 W switcher. The label says Flextronics P/N 614-0414 and it's rated at 5 V 3.0 A, 12 V 1.2 A.

Apple Time Capsule power supply, solder side

What isn't obvious from the picture is that whoever designed this decided to leave out bleeder resistors. Combine with some quality high voltage capacitors that can hold their charge since my last visit and plastic wrapping around the circuit that can't be removed in any trivial way and you got a very nasty little trap.

The supply is now obviously completely dead (better it than me I guess) - it's not showing any signs of life on the secondary side. I'm not sure if it's because of the short circuit through my body or if it was broken to start with. Although I think the second possibility is more likely. If the switcher was working the capacitors probably wouldn't stay charged that long.

The next step I guess is to see if the computer and the hard drive work if I connect them to another power supply. But that will have to wait. I think I had enough Apple for one day.

Update: since still a lot of people are asking about resistor values, here is a close-up of the circuit around the switching transistor:

Apple Time Capsule power supply close-up
Posted by Tomaž | Categories: Analog | Comments »

Uphill, both ways

22.11.2009 18:47

Look what I found today:

D-link DE-620

It's an old DE-620 Ethernet adapter that was manufactured by D-Link. This used to be the only way I could get onto an Ethernet network with my Compaq Contura 4/25cx.

It has a parallel port connector on one end (largely obsolete today) for connection to a host PC and a 10BASE2 (thin coaxial, very obsolete) and 10BASE-T (UTP, common today) connectors on the other. This device had wonderful support on the old 2.0.x series of Linux kernels.

I can't recall what kind of bandwidth I could get with it, but I believe it was several orders magnitude better than a serial modem connection (especially since Contura's UARTs could only manage 9600 bit/s), but slower than the theoretical 10 Mbit/s for Ethernet.

Another curiosity was that it required external power through a power brick that's rated at 12 V and 500 mA (parallel port didn't provide power to devices). Today I guess I could almost run a complete EeePC with those six watts of power.

Posted by Tomaž | Categories: Digital | Comments »

Comes with a built-in censor

19.11.2009 13:15

I stumbled across this interesting note in the manual of a large programmable LED sign that is being sold by Conrad.

The device has a built-in profanity filter

I can't help but wonder where they got the idea to build in a list of bad words that will be automatically censored by the sign's firmware. It's like your computer monitor had a filter for images its makers didn't like (or perhaps that's yet to come when computer vision catches up).

I can even think of a use case when this feature would be potentially useful. Do people buy these things and set them up to display profanity to unsuspecting victims on public spaces? Are they afraid of a lawsuit? I hope not, because that would mean some country has such a broken legal system that a monitor manufacturer can be sued if their product transforms an electrical signal into an offending display.

Judging from the number of languages the manual is written in this exercise is futile anyway and probably just causes problems for the user. A swear word in one language may be a most common one in another.

Posted by Tomaž | Categories: Code | Comments »

Trip in case of trolls

18.11.2009 16:20
Internet on a circuit breaker

You know they are serious about Internet safety in Rome when even the Internet connection is on a circuit breaker.

I resisted the temptation to turn it off, just in case this circuit breaker in my hotel room turned off something important (like the hotel's LAN switches).

On a more serious note, I spent the last week in Rome, representing Zemanta at the second IKS workshop, but that is a subject for another post.

Posted by Tomaž | Categories: Life | Comments »

Almost but not quite unlike tea

09.11.2009 16:00

On Saturday I bought some fancy Thé des Sables green tea in a new tea shop in Ljubljana. As explained by the friendly miss in the shop the French instructions on the bag say that it must be infused for 3 minutes in water at 75°C.

Unfortunately, I don't have a thermometer at hand that I would wish to stick into something I'm later going to drink. And even if I had one, I don't think I would bother to use it for each cup of tea.

So the question is, if I have boiling water from a kettle (obviously at 100°C) and cold tap water (let's say at 10°C), what's the perfect volumetric mixture to make the tea (i.e. something you can gauge by visual inspection alone)?

If T1 is the temperature of boiling water, T2 temperature of cold water, Tf desired final temperature, c specific heat capacity of water and m1 and m2 masses of boiling and cold parts of water respectively, then:

\Delta Q = \frac{(T_1-T_f)m_1}{c} = -\frac{(T_2-T_f)m_2}{c}
\frac{T_1-T_f}{T_f-T_2} = \frac{m_2}{m_1}

For temperatures I mentioned above, this gives mass (and volume) ratio of 0.38 or, in other words, a mixture of about a quarter cup of cold water and three quarters of boiling water.

There you have it, physics joins law and open source in service of a good cup of tea.

Posted by Tomaž | Categories: Life | Comments »

Urban myths interactive

07.11.2009 0:07

At approximately the same time Ljubljana city buses got the new RFID card one other interesting thing appeared in that mode of transportation. A few buses now seem to be equipped by flat panel screens that show an animated display of various stuff. The logo says Gem interactive.

At the first glance the thing looks interesting. There's a news feed from Slovenian Press Agency and a kind of bulletin board where anyone can post a text message (through an SMS). Surprisingly, there aren't many ads (probably going to change soon) and the stupidity filters on the SMS board must be quite effective since I have so far seen only one inflammatory post (and it was in English).

What bothers me more is that the overall message these things are sending. The company has a crop circle as its logo. The largest, central area of the display is dedicated to either a daily horoscope or a list of "did you know" blurbs that I would mostly classify as die hard urban myths or straightforward New Age nonsense. And of course, these are accompanied by the obligatory fancy slideshow of Einstein portraits, illegible math equations and similar popular pictures from other branches of science.

I wish they brought back the strips from Hiša eksperimentov.

Posted by Tomaž | Categories: Life | Comments »

Flipping bits

05.11.2009 21:00

On my last post Dušan pointed to an article that raised suspicion that errors in non-ECC RAM are one of the main causes of computer crashes these days.

I tend to disagree - I have seen and administered enough computers that ran ordinary desktop PC grade hardware and I haven't seen the numbers of unexplained software crashes that I should have if non-ECC RAM would really be that unreliable.

However, that may just be another case of the old story where a software engineer will blame hardware when his software crashes and a hardware engineer will claim vice-versa.

So, I'm starting a very simple experiment: I'm dedicating 10% of my server's non-ECC RAM for cosmic particle detection. In other words, I've written a short program that allocates 128 MB of RAM, fills it with a test pattern and checks once every day if the same pattern is still there. I'll keep it running as long as possible.

With the best FIT figure from Google (25000 failures per 109h per Mbit) and assuming that bit flips have a Poisson probability distribution:

P(n>1) = \sum_{n=1}^{\infty} \frac{e^{-\lambda t} (\lambda t)^n}{n!}
P(n>1) > 0.98 \qquad (\lambda = 0.0256 \frac{1}{\mathrm{h}}, t = 168 \mathrm{h})

I should have over 98% probability to see at least one error in 7 days. I would bet the proverbial case of beer that won't happen.

Of course, the logical argument here would be that my machine simply isn't in those 8% that see errors. So it would be interesting to see if this program reports any errors on some machine that experiences lots of unexplained crashes.

Posted by Tomaž | Categories: Digital | Comments »