Unix and, by extension, Linux, has a mantra to make everything possible look like a file. Files, of course, look like files. But also devices, network sockets, and even system information show up as things that appear to be files. There are plenty of advantages to doing that since you can use all the nice tools like grep and find to work with files. However, making your own programs expose a filesystem can be hard. Filesystem code traditionally works at the kernel module level, where mistakes can wipe out lots of things and debugging is difficult. However, there is FUSE — the file system in user space library — that allows you to write more or less ordinary code and expose anything you want as a file system. You’ve probably seen FUSE used to mount, say, remote drives via ssh or Dropbox. We’ve even looked at FUSE before, even for Windows.
What’s missing, naturally, is the Hackaday RSS feed, mountable as a normal file. And that’s what we’re building today.
Writing a FUSE filesystem isn’t that hard, but there are a lot of tedious jobs. You essentially have to provide callbacks that FUSE uses to do things when the operating system asks for them. Open a file, read a file, list a directory, etc. The problem is that for some simple projects, you don’t care about half of these things, but you still have to provide them.
Luckily, there are libraries that can make it a lot easier. I’m going to show you a simple C++ program that can mount your favorite RSS feed (assuming your favorite one is Hackaday, of course) as a file system. Granted, that’s not amazing, but it is kind of neat to be able to grep through the front page stories from the command line or view the last few articles using Dolphin. Continue reading “Linux Fu: Fusing Hackaday”→
One of the nice things about the Unix philosophy that Linux inherited is that the filesystem is very modular. That’s good, too, because a typical system might want a choice of filesystems like ext4, reiserfs, btrfs, and even network systems like nfs. Besides that, there are fake file systems like /sys and /dev that help Linux make everything look like a file. The downside is that building a filesystem required changing the kernel or, at least, writing a loadable module. That’s not as hard as it sounds, but it is a little more difficult than writing a normal program. Then came FUSE — file system in user space. This is a single file system module that allows you to create new file systems by writing ordinary code.
Fuses are generally there to stop excessive electrical currents from damaging equipment or people’s soft, fleshy bodies when faults occur. However, some people like to blow them just for fun, and [Photonicinduction] is just one of those people. He recently decided to push the boat out, setting his mind to the task of popping a 5000 A fuse in his own back yard. (Video, embedded below.)
It’s not a job for the faint-hearted. The fuse is rated at 5,000 A — that’s the nominal rating for the currents at which it is intended to operate. Based on the datasheet, the part in question is capable of withstanding 30,000 A for up to five full seconds. To pop the fuse instantly takes something in the realm of 200,000 A.
To achieve this mighty current, a capacitor bank was built to dump a huge amount of energy through the fuse. Built out of ten individual capacitor units wired up in parallel, the total bank comes in at 10,000 μF, and is capable of delivering 200,000 A at 3000 V. (Just not for very long.) The bank was switched into circuit with the fuse via a pneumatic switch rated at just 12,000 A.
Storing data “in the cloud” — even if it is your own server — is all the rage. But many cloud solutions require you to access your files in a clumsy way using a web browser. One day, operating systems will incorporate generic cloud storage just like any other file system. But by using two tools, rclone and sshfs, you can nearly accomplish this today with a little one-time setup. There are a few limitations, but, generally, it works quite well.
It is a story as old as computing. There’s something new. Using it is exotic and requires special techniques. Then it becomes just another part of the operating system. If you go back far enough, programmers had to pull specific records from mass storage like tapes, drums, or disks and deblock data. Now you just open a file or a database. Cameras, printers, audio, and even networking once were special devices that are now commonplace. If you use Windows, for example, OneDrive is well-supported. But if you use another service, you may or may not have an easy option to just access your files as a first-class file system.
The rclone program is the Swiss Army knife of cloud storage services. Despite its name, it doesn’t have to synchronize a local file store to a remote service, although it can do that. The program works with a dizzying array of cloud storage providers and it can do simple operations like listing and copying files. It can also synchronize, as you’d expect. However, it also has an experimental FUSE filesystem that lets you mount a remote service — with varying degrees of success.
If you don’t like using someone like Google or Amazon, you can host your own cloud. In that case, you can probably use sshfs to mount a file using ssh, although rclone can also do that. There are also cloud services you can self-host like OwnCloud and NextCloud. A Raspberry Pi running Docker can easily stand up one of these in a few minutes and rclone can handle these, too.
There’s a problem with fuses. On the face of it, testing would seem to be a one-shot deal — exceed the rated current and see if it blows. But once you know the answer, the device is useless. If only there were a way to test fuses without damaging them.
As it turns out there is, and [Kerry Wong] weaves quite a tale about his attempts to non-destructively test fuses. The fuses in question are nothing fancy — just the standard glass tube type, from a cheap assortment kit off Amazon. Therein lies the problem: can such cheap devices be trusted? Finding out requires diving much deeper into the technology of fuses than many people will have done, including understanding how the thermal and electrical characteristics of the fuse element behave.
[Kerry]’s test setup is simple, consisting of a constant current power supply and a voltmeter across the fuse to measure the voltage drop caused by the resistance of the fuse element. As he ramps up the current, the voltage drop increases linearly due to the increase in resistance of the alloy with increasing temperature. That only lasts up to a point, where the fuse resistance starts increasing exponentially. Pushing much past the point where the resistance has doubled would blow the fuse, so that’s the endpoint of his tests. Perhaps unsurprisingly, his no-name fuses all went significantly beyond their rated current, proving that you get what you pay for. See the video below for the tests and an analysis of the results.
It’s handy to know there’s a way to check fuses without popping them, and we’ll file this one away for future reference. Don’t forget that you should always check the fuse when troubleshooting, because you never know what the last person did to it.
The world of DIY circuits for STEM and wearables has a few options for conductors. Wire with Dupont connectors is a standard, as is adhesive copper tape. There’s also conductive nylon/steel thread or ribbon. Which you choose depends on your application, of course, but as a general rule wire is cheap and ubiquitous while making connections is more challenging; copper tape is cheap and simple to use, but delicate and rips easily, so is best used for flat surfaces that won’t see a lot of stress or temporary applications; and conductive nylon thread or tape is better for weaving into fabrics.
[Practical Engineering] is ready to explain how power substations get electricity to you in his latest video, which you can see below. One of the things we always notice when talking to people either in our community or outside it is that most people have no idea how most of the modern world works.
Ask your non-technical friend to explain how a cell phone works or how a hard drive stores data and you aren’t likely to get a very good answer. However, even most of us are only focused on some particular aspect of electronics. There are a lot of people who hack on robots or radios. The AC power grid,though isn’t something a lot of people work with as a hobby. Do you know exactly what goes on in that substation you pass every day on your commute? If you don’t, you’ll learn something in the video.