Feeling The Heat: Railway Defect Detection

On the technology spectrum, railroads would certainly seem to skew toward the brutally simplistic side of things. A couple of strips of steel, some wooden ties and gravel ballast to keep everything in place, some rolling stock with flanged wheels on fixed axles, and you’ve got the basics that have been moving freight and passengers since at least the 18th century.

But that basic simplicity belies the true complexity of a railway, where even just keep keeping the trains on the track can be a daunting task. The forces that a fully loaded train can exert on not only the tracks but on itself are hard to get your head around, and the potential for disaster is often only a failed component away. This became painfully evident with the recent Norfolk Southern derailment in East Palestine, Ohio, which resulted in a hazardous materials incident the likes of which no community is ready to deal with.

Given the forces involved, keeping trains on the straight and narrow is no mean feat, and railway designers have come up with a web of sensors and systems to help them with the task of keeping an eye on what’s going on with the rolling stock of a train. Let’s take a look at some of the interesting engineering behind these wayside defect detectors.

Continue reading “Feeling The Heat: Railway Defect Detection”

Europe’s Proposed Right-To-Repair Law: A Game Changer, Or Business As Usual?

Recently, the European Commission (EC) adopted a new proposal intended to enable and promote the repair of a range of consumer goods, including household devices like vacuum cleaners and washing machines, as well as electronic devices such as smartphones and televisions. Depending on how the European Parliament and Council vote in the next steps, this proposal may shape many details of how devices we regularly interact with work, and how they can be repaired when they no longer do.

As we have seen recently with the Digital Fair Repair Act in New York, which was signed into law last year, the devil is as always in the details. In the case of the New York bill, the original intent of enabling low-level repairs on defective devices got hamstrung by added exceptions and loopholes that essentially meant that entire industries and types of repairs were excluded. Another example of ‘right to repair’ being essentially gamed involves Apple’s much-maligned ‘self repair’ program, that is both limited and expensive.

So what are the chances that the EU will succeed where the US has not?

Continue reading “Europe’s Proposed Right-To-Repair Law: A Game Changer, Or Business As Usual?”

Vinyl Sales Ran Circles Around CDs In 2022

How do you take your music these days? For those in Camp Tangible, it seems our ranks are certainly growing, and in the analog direction. For the first time since 1987, vinyl record sales have outperformed CD sales in the US, according to a new report. The CD, which saved us all from the cassette, was a digital revolution in music. But for some, the love was lost somewhere among the ones and zeroes.

Those who prefer pure analog troughs of sound cut into wax have never given up on vinyl, and the real ones probably gobbled up a bunch of it in the 90s when everybody was CD-crazy. But mind you these aren’t used vinyl sales we’re talking about, which means that enough new vinyl has to have been readily available for purchase for quite some time now. Although it doesn’t really seem like that long, new vinyl’s been back for almost 20 years — and according to the report, 2022 was the 16th consecutive year of growth for record sales.

So Why Vinyl?

Nostalgia ain’t what it used to be, but there was a time in my 1980s childhood when vinyl was all this scribe had to listen to. I have historically been a bit slow to adopt new music formats — I didn’t have a CD player until 1998, and it was given to me for my birthday. I was excited to get the thing, mind you, especially since it had 10 seconds of anti-skip protection (which of course was a huge concern with portable CD players).

But CDs are way different from records. Sure, they’re both round, but the similarities sort of end there. For one thing, the artwork is disappointingly small compared to vinyl. And the whole gatefold album cover thing isn’t really possible with a CD, unless you forego the jewel case and release it in a chintzy little cardboard jacket. But then people will have this one disc that’s four times thinner than the rest and it throws everything off in the collection.

Continue reading “Vinyl Sales Ran Circles Around CDs In 2022”

The X Macro: A Historic Preprocessor Hack

If we told you that a C preprocessor hack dated back to 1968, you’d be within your rights to remind us that C didn’t exist in 1968. However, assemblers with preprocessors did, and where there is a preprocessor, there is an opportunity to do clever things. One of those things is the so-called X macro, which saw a lot of use in DEC System 10 code but probably dates back even earlier. You can still use it today if you like, even though there are, of course, other arguably better ways to get the same result. However, the X macro can be very efficient, and you may well run into it in some code, too.

Background

Preprocessing used to be a staple of programming. The idea is that code is manipulated purely at the text level before it is compiled. These days, languages with a preprocessor usually handle it as part of the compiler, but you can also use an external preprocessor like m4 for more sophisticated uses.

Modern languages tend to provide other ways to accomplish many of the tasks handled by the preprocessor. For example, if you have a constant you want to set at compile time, you could say:

int X = 32;
y = X;

But then you’ve created a real variable along with the overhead that might entail. A smart compiler might optimize it away for you, but you can be sure by writing:

#define X 32
y = X;

A modern compiler would prefer you to write:

const int X=32;
y = X;

But there are still some common uses for macros, like including header files. You can also make more sophisticated macros with arguments so you don’t incur a function call penalty, although modern usage would be to mark those functions as inline.

The Problem

Which brings us to the X macro. With all great hacks, there is first a problem to solve. Imagine you have a bunch of electronic parts you want to deal with in your code. You don’t want a database, and you don’t want to carry a bunch of strings around, so you define an enumerated type:

Continue reading “The X Macro: A Historic Preprocessor Hack”

Review: XHDATA D-219 Short Wave Radio Receiver

As any radio amateur will tell you, the world of radio abounds with exciting possibilities. Probably the simplest pursuit of them all is that of the SWL, or short wave listener, who scours the airwaves in search of interesting stations. SWLs will often have fully-featured setups with high-end general-coverage communications receivers and tuned antenna arrays, but it can start with the cheapest of radios at its bottom end. Such a radio is the subject of this review, the XHDATA D-219 is a miniature portable receiver that costs under ten dollars, yet is currently the talk of the town in SWL circles. This interest is in no small amount due to its being an especially low-price way to get your hands on a shortwave radio using one of the SIlicon Labs integrated software-defind radio receiver chips. We don’t often review a consumer radio here at Hackaday, but with an avid eye for unexpected gems at the cheaper end of the market this one’s worth a second look.

What Do You Get For Your Tenner?

A picture of the radio on my bench
This form factor is very typical for cheap “world band” radios.

I ordered my D-219 from the XHDATA website, spending about £10 including the postage from China. The usual wait ensued before the package landed on my doormat, and inside was the radio in its box with an instruction leaflet. It’s a small unit about 135 mm x 75 mm x 30 mm, and it follows closely the form factor of other similar radios.

On the top is the extensible antenna with an on-off switch and sockets for headphone and 5 V power, on the side are side-on knobs for tuning and volume, while on the front is the speaker and old-style multi-band tuning display.

On the back is a flip-up stand and a hatch for a pair of AA cells. There’s a band switch covering AM, nine different shortwave bands from 4.75 MHz to 22 MHz, the east Asian FM band from 64 MHz to 87 MHz, and the international FM band from 87 MHz to 108 MHz. The tuning indicator is very old-school, a vertical bar that moves across a frequency scale with the tuning knob. Continue reading “Review: XHDATA D-219 Short Wave Radio Receiver”

The Curious Etymology Of The Elements

It’s not often that the worlds of lexicography and technology collide, but in a video by the etymologist [RobWords] we may have found a rare example. In a fascinating 16-minute video he takes us through the origins of the names you’ll find in the periodic table. Here’s a word video you don’t have to be on the staff of a dictionary to appreciate!

Etymology is a fascinating study, in which the scholar must disentangle folk etymologies and mistaken homophones to find the true root of a word. Fortunately in the case of most elements they bear a name bestowed on them by the scientists who discovered them, so their etymologies are rarely in dispute.

The etymologies split neatly into categories, with among them such distinctions as Latin or Greek descriptions, places including the Swedish village of Ytterby which has more elements named after it than anywhere else, elements named for mythological figures, and those named for people.

He artfully skates over the distinction between aluminium and a curiously similar metal the Americans call aluminum, because etymologists are used to deflecting controversy when language differences colour, or even color, people’s emotions. Thank you, Noah Webster!

It’s an entertaining diversion for anyone with a love of both science and of language, and should remind us that the study of language has just as much scientific rigour in its research as any of those elements.

Continue reading “The Curious Etymology Of The Elements”

The First Gui? Volscan Controls The Air

In the 1950s,  computers were, for the most part, ponderous machines. But one machine offered a glimpse of the future. The Volscan was probably the first real air traffic computer designed to handle high volumes of military aircraft operations. It used a light gun that looked more like a soldering gun than a computer input device. There isn’t much data about Volscan, but it appears to have been before its time, and had arguably the first GUI on a computer system ever.

The Air Force had a problem. The new — in the 1950s — jets needed long landing approaches and timely landings since they burned more fuel at lower altitudes. According to the Air Force, they could land 40 planes in an hour, but they needed to be able to do 120 planes an hour. The Whirlwind computer had proven that computers could process radar data — although Whirlwind was getting the data over phone lines from a distance. So the Air Force’s Cambridge Research Center started working on a computerized system to land planes called Volscan, later known as AN/GSN-3.

Continue reading “The First Gui? Volscan Controls The Air”