Linux Fu: File Aliases, Links, and Mappings

Have you heard it said that everything in Linux is a file? That is largely true, and that’s why the ability to manipulate files is crucial to mastering Linux Fu.

One thing that makes a Linux filesystem so versatile is the ability for a file to be many places at once. It boils down to keeping the file in one place but using it in another. This is handy to keep disk access snappy, to modify a running system, or merely to keep things organized in a way that suits your needs.

There are several key features that lend to this versatility: links, bind mounts, and user space file systems immediately come to mind. Let’s take a look at how these work and how you’ll often see them used.

Continue reading “Linux Fu: File Aliases, Links, and Mappings”

The Engineering Case for Fusing Your LED Strips

Modern LED strips are magical things. The WS2812 has allowed the quick and easy creation of addressable RGB installations, revolutionizing the science of cool glowy things. However, this accessibility means that it’s easy to get in over your head and make some simple mistakes that could end catastrophically. [Thomas] is here to help, outlining a common mistake made when building with LED strips that is really rather dangerous.

The problem is the combination of hardware typically used to run these LED strings. They’re quite bright and draw significant amounts of power, each pixel drawing up to 60 mA at full-white. In a string of just 10 pixels, the strip is already drawing 600 mA. For this reason, it’s common for people to choose quite hefty power supplies that can readily deliver several amps to run these installations.

It’s here that the problem starts. Typically, wires used to hook up the LED strips are quite thin and the flex strips themselves have a significant resistance, too. This means it’s possible to short circuit an LED strip without actually tripping the overcurrent protection on something like an ATX power supply, which may be fused at well over 10 amps. With the resistance of the wires and strip acting as a current limiter, the strip can overheat to the point of catching fire while the power supply happily continues to pump in the juice. In a home workshop under careful supervision, this may be a manageable risk. In an unattended installation, things could be far worse.

Thankfully, the solution is simple. By installing an appropriately rated fuse for the number of LEDs in the circuit, the installation becomes safer, as the fuse will burn out under a short circuit condition even if the power supply is happy to supply the current. With the example of 10 LEDs drawing 600 mA, a 1 amp fuse would do just fine to protect the circuit in the event of an accidental short.

It’s a great explanation of a common yet dangerous problem, and [Thomas] backs it up by using a thermal camera to illustrate just how hot things can get in mere seconds. Armed with this knowledge, you can now safely play with LEDs instead of fire. But now that you’re feeling confident, why not check out these eyeball-searing 3 watt addressable LEDs?

Continue reading “The Engineering Case for Fusing Your LED Strips”

[Ken Shirriff] Becomes a Core Memory Repairman (Again)

Lately, [Ken Shirriff] has been on some of the most incredible hardware adventures. In his most recent undertaking we find [Ken] elbow-deep in the core memory of a 50-year-old machine, the IBM 1401. The computer wasn’t shut down before mains power was cut, and it has refused to boot ever since. The culprit is in the core memory support circuitry, and thanks to [Ken’s] wonderful storytelling we can travel along with him to repair an IBM 1401.

From a hardware standpoint core memory makes us giddy. It’s a grid of wires with ferrite toroids at every intersection. Bits can be set or cleared based on how electricity is applied to the intersecting wires. [Al Williams] walked through some of the core memory history last year and we enjoyed hearing [Pamela Liou] recount the story of how textile workers consulted on the fabrication of core memory for the Apollo missions during her OHWS Talk in October. But giddiness aside, core memory has pretty much gone the way of the dodo having been displaced by technologies that take up exponentially less space.

Bad inductor (green housing has been dissolved away)

We chuckle at [Ken’s] mention of the core memory capacity for the IBM 1401. It has 4000 characters of memory built-in (with another 12,000 in an expansion box) and he goes on to detail that these are 6-bit characters on a machine that operates in decimal and not binary (hence 4k instead of the base-2 friendly 4096).

You may remember his work a few years back to repair core memory on the same model. The Museum has two 1401’s, which turned out to be a huge help in trouble-shooting this. After tracing out the control lines, the repair team began swapping cards between the working and non-working machines. They were able to bring it back online — establishing one of the green inductors was bad — only to be struck with a second fault in the power supply.

Get this, [Ken] comments that “the whole computer is pre-silicon”. When working through the PSU, some suspect transistors were replaced with germanium power transistors. Those may have been a red-herring, as a penciled-in fuse on the original schematics turned out to be the linchpin of the PSU repair. Buried deep in the assembly, replacing the designed-to-fail part let the ancient beast awake once more.

Machines of this quality were heavily documented, and the schematics make this type of trouble-shooting a lot more manageable. But it’s still as much an art as it is skill. Make sure to give [Ken’s] article a read, and look around at the other repair jobs he’s documented — keeping these machines in service is becoming wizard-level work and we love being able to follow along.

Fail Of The Week: Always Check The Fuse

[Tomas] at Umeå Hackerspace in Sweden had some broken audio equipment, including a Sharp CD player/amplifier. What went wrong when he tried to fix it is a fail story from which we can all learn.

The device worked – for about a second after being turned on, before turning itself off. That’s a hopeful sign, time to start debugging. He took the small-signal and logic boards out of the circuit, leaving only power supply and amplifier, and applied the juice.

Magic blue smoke ensued, coming from the amplifier. Lacking a suitable replacement part, that was it for the Sharp.

On closer inspection it emerged that the previous owner had bypassed the power supply fuse with a piece of copper wire, Evidently they had found the fuse to be blowing too often and instead of trying to fix the problem simply shot the messenger.

We have all probably done it at some time or other. In the absence of a replacement fuse we may have guestimated the number of single strands required to take the current, or used a thin strip of foil wrapped around the fuse body. And we’ll all have laughed at that meme about using a spanner or a live round as a fuse.

So if there’s a moral to this story, it’s to always assume that everyone else is as capable as you are of doing such a dodgy fix, and to always check the fuse.

2013-09-05-Hackaday-Fail-tips-tileFail of the Week is a Hackaday column which celebrates failure as a learning tool. Help keep the fun rolling by writing about your own failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.

A Field Guide to the North American Utility Pole

We live under the umbrella of an intricate and fascinating web of infrastructure that enables every aspect of modern technology. But how often do we really look at it? I’ve been intrigued by utility poles for years, and I’ve picked up a thing or two that I’d like to share. Bear in mind these are just my observations from the ground in my area; I’m sure utility professionals will have better information, and regional practices will no doubt lead to very different equipment arrangements. But here’s a little of what I’ve picked up over my years as a pole geek.

Continue reading “A Field Guide to the North American Utility Pole”

Writing a FUSE Filesystem in Python


Have you ever thought a particular project could be better if you could just control the file access directly? [Stavros Korokithakis] did, specifically for a backup program he was working on. What followed was the realization that writing a FUSE filesystem, particularly in Python, isn’t as complicated as it may seem. Really, through the power of open source, the heavy lifting has already been done for us. If you’d like to try it yourself, you’ll need to install fusepy. From that point, you simply need to define the filesystem methods you will be using.

Python isn’t going to win any speed contests in the filesystem space, but that isn’t really the point. Using this technology opens up a huge opportunity for new ways of accessing data. If you let your mind wander, you can conceive of encrypted filesystems, seamless remote data access, new key-value storage designs, etc. Perhaps even more interesting is the idea of using Python to communicate with a physical device… maybe a proc filesystem to keep track of your robot telemetry? We’d love to hear your ideas in the comments.

We had success using [Stavros’] example script on Linux and OSX. (Fair warning if you’re on a Mac, the pip version of fusepy seems to be linked against fuse4x rather than OSXFUSE, but once you’ve got the prerequisites installed, you’re golden.) We didn’t have a Windows machine to test. Can anyone confirm if the same is possible there?

Non-resettable thermal fuse teardown


This component is a one-shot thermal fuse. When the body rises above the specified temperature the two leads stop conducting. They’re useful in applications like motors, where you want to make sure power is cut to an overheating piece of hardware before permanent damage happens. They’re pretty simple, but we still enjoyed taking a look inside thanks to [Fatkuh’s] video.

The metal housing is lined with a ceramic insulator, which you can see sticking out one end in the shape of a cone. It surrounds a spring which connects to both leads and is under a bit of tension. The alloy making the connections has a low melting point — in this case it’s about 70 C — which will melt, allowing the spring to pull away and break the connection. In the clip after the break [Fatkuh] uses his soldering iron to heat the housing past the melting point, tripping the fuse. He then cracks the ceramic cone to show what’s inside.

The only problem with using a fuse like this one is you’ll need to solder in a new component if it’s ever tripped. For applications where you need a fuse that protects against over current (rather than heat) a resettable polyfuse is the way to go.

Continue reading “Non-resettable thermal fuse teardown”