Vista de Lectura

Hay nuevos artículos disponibles. Pincha para refrescar la página.

Version Control to the Max

There was a time when version control was an exotic idea. Today, things like Git and a handful of other tools allow developers to easily rewind the clock or work on different versions of the same thing with very little effort. I’m here to encourage you not only to use version control but also to go even a step further, at least for important projects.

My First Job

The QDP-100 with — count ’em — two 8″ floppies (from an ad in Byte magazine)

I remember my first real job back in the early 1980s. We made a particular type of sensor that had a 6805 CPU onboard and, of course, had firmware. We did all the development on physically big CP/M machines with the improbable name of Quasar QDP-100s. No, not that Quasar. We’d generate a hex file, burn an EPROM, test, and eventually, the code would make it out in the field.

Of course, you always have to make changes. You might send a technician out with a tube full of EPROMs or, in an emergency, we’d buy the EPROMs space on a Greyhound bus. Nothing like today.

I was just getting started, and the guy who wrote the code for those sensors wasn’t much older than me. One day, we got a report that something was misbehaving out in the field. I asked him how we knew what version of the code was on the sensor. The blank look I got back worried me.

Seat of the Pants

Version control circa 1981 alongside a 3.5-inch floppy that held much more data

Turns out, he’d burn however many EPROMs were required and then plow forward developing code. We had no idea what code was really running in the field. After we fixed the issue, I asked for and received a new rule. Every time we shipped an EEPROM, it got a version number sticker, and the entire development directory went on an 8″ floppy. The floppy got a write-protect tab and went up on the shelf.

I was young. I realize now that I needed to back those up, too, but it was still better than what we had been doing.

Enter Meta Version Control

Today, it would have been easy to label a commit and, later, check it back out. But there is still a latent problem. Your source code is only part of the equation when you are writing code. There’s also your development environment, including the libraries, the compiler, and anything else that can add to or modify your code. How do you version control that? Then there’s the operating system, which could interact with your code or development tools too.

Maybe it is a call back to my 8″ floppy days, but I have taken to doing serious development in a virtual machine. It doesn’t matter if you use QEMU or VirtualBox or VMWare. Just use it. The reason is simple. When you do a release, you can backup the entire development environment.

When you need to change something five years from now, you might find the debugger no longer runs on your version of the OS. The compiler fixed some bugs that you rely on or added some that you now trip over. But if you are in your comfy five-year-old virtual environment, you won’t care. I’ve had a number of cases where I wish I had done that because my old DOS software won’t run anymore. Switched to Linux? Or NewOS 2100tm? No problem, as long as it can host a virtual machine.

Can’t decide on which one to use? [How to Simple] has some thoughts in the video below.

How About You?

How about it? Do you or will you virtualize and save? Do you use containers for this sort of thing? Or do you simply have faith that your version-controlled source code is sufficient? Let us know in the comments.

If you think Git is just for software, think again.

What’s an LCR Databridge?

[Thomas Scherrer] has an odd piece of vintage test equipment in his most recent video. An AIM LCR Databridge 401. What’s a databridge? We assume it was a play on words of an LCR bridge with a digital output. Maybe. You can see a teardown in the video below.

Inside the box is a vintage 1983 Z80 CPU with all the extra pieces. The device autoranges, at least it seems as much. However, the unit locks up when you use the Bias button, but it isn’t clear if that’s a fault or if it is just waiting for something to happen.

The teardown starts at about six minutes in. Inside is a very large PCB. The board is soldermasked and looks good, but the traces are clearly set by a not-so-steady hand. In addition to AIM, Racal Dana sold this device as a model 9341. The service manual for that unit is floating around, although we weren’t able to download it due to a server issue. A search could probably turn up copies.

From the service manual, it looks like the CPU doesn’t do much of the actual measurement work. There are plenty of other chips and a fast crystal that work together and feed an analog-to-digital converter.

LCR meters used to be somewhat exotic, but are now fairly common. It used to be common to measure reactance using a grid dip meter.

Thermal Monocular Brings the Heat at 10X

[Project 326] is following up on his thermal microscope with a thermal telescope or, more precisely, a thermal monocular. In fact, many of the components and lenses in this project are the same as those in the microscope, so you could cannibalize that project for this one, if you wanted.

During the microscope project, [Project 326] noted that first-surface mirrors reflect IR as well as visible light. The plan was to make a Newtonian telescope for IR instead of light. While the resulting telescope worked with visible light, the diffraction limit prevented it from working for its intended purpose.

Shifting to a Keplerian telescope design was more productive. One of the microscope lenses got a new purpose, and he sourced new objective lenses that were relatively inexpensive.

The lens sets allow for 5X and 10X magnification. The lenses do reduce the sensitivity, but the telescope did work quite well. If you consider that the lenses are made to focus cutting lasers and not meant for use in imaging devices, it seems like an excellent result.

Missed the thermal microscope? Better catch up! Do you need a thermal camera? Ask a duck.

The ZX Spectrum Logic Analyzer

We know [Happy Little Diodes] frequently works with logic analyzer projects. His recent wireless logic analyzer for the ZX Spectrum is one of the oddest ones we’ve seen in a while. The heart of the system is an RP2040, and there are two boards. One board interfaces with the computer, and another hosts the controller.

The logic analyzer core is powered by a common open-source analyzer from [Eldrgusman]. This is one of the nice things about open source tools. Most people probably don’t need a logic analyzer that plugs directly into a ZX Spectrum. But if you do, it is fairly simple to repurpose a more generic piece of code and rework the hardware, if necessary.

You used to pay top dollar to get logic analyzers that “knew” about common CPUs and could capture their bus cycles, show execution, and disassemble the running code. But using a technique like this, you could easily decode any processor, even one you’ve designed yourself. All you need to do is invest the time to build it, if no one else has done it yet.

[Happy Little Diodes] is a big fan of the [Eldrgusman] design. What we would have given for a logic analyzer like this forty years ago.

Unwinding an Unusual Slide Rule

If the Otis King slide rule in [Chris Staecker’s] latest video looks a bit familiar, you might be getting up there in age, or you might remember seeing us talk about one in our collection. Actually, we have two floating around one of the Hackaday bunkers, and they are quite the conversation piece. You can watch the video below.

The device is often mistaken for a spyglass, but it is really a huge slide rule with the scale wrapped around in a rod-shaped form factor. The video says the scale is the same as a 30-inch scale, but we think it is closer to 66 inches.

Slide rules work using the idea that adding up logarithms is the same as multiplying. For example, for a base 10 logarithm, log(10)=1, log(100)=2, and log(1000)=3. So you can see that 1+2=3. If the scales are printed so that you can easily add and then look up the antilog, you can easily figure out that 10×100=1000.

The black center part acts like a cursor on a conventional slide rule. How does it work? Watch [Chris’] video and you’ll see. We know from experience that one of these in good shape isn’t cheap. Lucky that [Chris] gives us a 3D printed version so you can make your own.

Another way to reduce the scale is to go circular, and you can make one of those, too.

What’s in a Washer?

Some things are so common you forget about them. How often do you think about an ordinary resistor, for example? Yet if you have a bad resistor, you’ll find it can be a big problem. Plus, how can you really understand electronics if you don’t know all the subtle details of a resistor? In the mechanical world, you could make the same arguments about the washer, and [New Mind] is ready to explain the history and the gory details of using washers in a recent video that you can see below.

The simple answer is that washers allow a bolt to fit in a hole otherwise too large, but that’s only a small part of the story. Technically, what you are really doing is distributing the load of a threaded fastener. However, washers can also act as spacers or springs. Some washers can lock, and some indicate various things like wear or preloading conditions.

Plain washers have a surprising number of secondary functions. Spring washers, including Belleville washers, help prevent fasteners from loosening over time. Wave washers look — well — wavy. They provide precise force against the bolt for preloading. Locking washers are also made to prevent fasteners from loosening, but use teeth or stops instead of springs.

There are plenty of standards, of course, that mostly match up. Mostly.

If you like knowing about odd washers, you might also want to know about the bolts that pass through them.

Simulating Cable TV

[Wrongdog Recons] suffers from a severe case of nostalgia. His earlier project simulated broadcast TV, and he was a little surprised at how popular the project was on GitHub. As people requested features, he realized that he could create a simulated cable box and emulate a 1990s-era cable TV system. Of course, you also needed a physical box, which turned into another project. You can see more about the project in the video below.

Inside is, unsurprisingly, a Raspberry Pi. Then you have to pretend to be a cable TV scheduler and organize your different video files for channels. You can interleave commercials and station breaks.

One addition was a scheduler so you could set up things like football games only play during football season. You can also control timing so you don’t get beer commercials during Saturday morning cartoons.

We were especially impressed with the program guide channel that lets you see what’s playing, just like an old-style cable system. The simulation even plays trash TV in the morning and bizarre commercials post-midnight.

If you are tired of having to decide what to watch, this might be for you. If you want to simulate the earliest pay TV, you’ll need a coin slot. We wonder if the simulator could do a local origination weather channel.

Open Source ELINT Accidentally from NASA

You normally think of ELINT — Electronic Intelligence — as something done in secret by shadowy three-letter agencies or the military. The term usually means gathering intelligence from signals that don’t contain speech (since that’s COMINT). But [Nukes] was looking at public data from NASA’s SMAP satellite and made an interesting discovery. Despite the satellite’s mission to measure soil moisture, it also provided data on strange happenings in the radio spectrum.

While 1.4 GHz is technically in the L-band, it is reserved (from 1.400–1.427 GHz)  for specialized purposes. The frequency is critical for radio astronomy, so it is typically clear other than low-power safety critical data systems that benefit from the low potential for interference. SMAP, coincidentally, listens on 1.41 GHz and maps where there is interference.

Since there aren’t supposed to be any high-power transmitters at that frequency, you can imagine that anything showing up there is probably something unusual and interesting. In particular, it is often a signature for military jamming since nearby frequencies are often used for passive radar and to control drones. So looking at the data can give you a window on geopolitics at any given moment.

The data is out there, and a simple Python script can pull it. We imagine this is the kind of data that only a spook in a SCIF would have had just a decade or two ago.

Jamming tech is secretive but powerful. SMAP isn’t the only satellite to have its mission unexpectedly repurposed.

Tearing Down a Forgotten Video Game

Remember Video Volley? No? We don’t either. It looks like it was a very early video game console that could play tennis, hockey, or handball. In this video, [James] tears one apart. If you are like us, we are guessing there will be little more than one of those General Instrument video game chips inside.

These don’t look like they were mass-produced. The case looks like something off the shelf from those days. The whole thing looks more like a nice homebrew project or a pretty good prototype. Not like something you’d buy in a store.

Even inside, the wiring looks decidedly hand-built. The cheap phenolic PCB contained a surprise. The box does have a dedicated “pong” chip. But it isn’t from General Instruments! It’s a National Semiconductor chip instead.

The controllers are little more than sliding potentiometers in a box with a switch. We wonder how many of these were made and what they sold for new. If you know anything, let us know in the comments.

We still see the occasional project around a General Instruments chip. If you really want a challenge for a homebrew pong, ditch the pong chip and all the other ICs, too. If you want to read more about the history of the pong chip, you’ll probably enjoy this blog post from [pong-story].

An LLM for the Raspberry Pi

Microsoft’s latest Phi4 LLM has 14 billion parameters that require about 11 GB of storage. Can you run it on a Raspberry Pi? Get serious. However, the Phi4-mini-reasoning model is a cut-down version with “only” 3.8 billion parameters that requires 3.2 GB. That’s more realistic and, in a recent video, [Gary Explains] tells you how to add this LLM to your Raspberry Pi arsenal.

The version [Gary] uses has four-bit quantization and, as you might expect, the performance isn’t going to be stellar. If you are versed in all the LLM lingo, the quantization is the way weights are stored, and, in general, the more parameters a model uses, the more things it can figure out.

As a benchmark, [Gary] likes to use what he calls “the Alice question.” In other words, he asks for an answer to this question: “Alice has five brothers and she also has three sisters. How many sisters does Alice’s brother have?” While it probably took you a second to think about it, you almost certainly came up with the correct answer. With this model, a Raspberry Pi can answer it, too.

The first run seems fairly speedy, but it is running on a PC with a GPU. He notes that the same question takes about 10 minutes to pop up on a Raspberry Pi 5 with 4 cores and 8GB of RAM.

We aren’t sure what you’d do with a very slow LLM, but it does work. Let us know what you’d use it for, if anything, in the comments.

There are some other small models if you don’t like Phi4.

The Nuclear War You Didn’t Notice

We always enjoy [The History Guy], and we wish he’d do more history of science and technology. But when he does, he always delivers! His latest video, which you can see below, focuses on the Cold War pursuit of creating transfermium elements. That is, the discovery of elements that appear above fermium using advanced techniques like cyclotrons.

There was a brief history of scientists producing unnatural elements. The two leaders in this work were a Soviet lab, the Joint Institute of Nuclear Research, and a US lab at Berkeley.

You’d think the discovery of new elements wouldn’t be very exciting. However, with the politics of the day, naming elements became a huge exercise in diplomacy.

Part of the problem was the difficulty in proving you created a huge atom for a few milliseconds. It was often the case that the initial inventor wasn’t entirely clear.

We were buoyed to learn that American scientists named an element(Mendelevium) after a Russian scientist as an act of friendship, although the good feelings didn’t last.

We wonder if a new element pops up, if we can get some votes for Hackadaium. Don’t laugh. You might not need a cyclotron anymore.

Inside a Selective Voltmeter

[Martin Lorton] has a vintage Harmon 4200B selective voltmeter that needed repair. He picked it up on eBay, and he knew it wasn’t working, but it was in good condition, especially for the price. He’s posted four videos about what’s inside and how he’s fixing it. You can see the first installment below.

The 4200B is an RMS voltmeter and is selective because it has a tuned circuit to adjust to a particular frequency. The unit uses discrete components and has an analog meter along with an LCD counter.

The initial tests didn’t work out well because the analog meter was stuck, so it wouldn’t go beyond about 33% of full scale.

Since there are four videos (so far), there is a good bit of information and detail about the meter. However, it is an interesting piece of gear and part 3 is interesting if you want to see inside an analog meter movement.

By the fourth video, things seem to be working well. You might want to browse the manual for the similar 4200A manual to get oriented.

Forgot why we measure RMS? You weren’t the only one. RMS conversion in meters is a big topic and there are many ways to do it.

Scan Your Caliper for Physical Part Copies

We’ve certainly seen people take a photo of a part, bring it into CAD, and then scale it until some dimension on the screen is the same as a known dimension of the part. We like what [Scale Addition] shows in the video below. In addition to a picture of the part, he also takes a picture of a vernier caliper gripping the part. Now your scale is built into the picture, and you can edit out the caliper later.

He uses SketchUp, but this would work on any software that can import an image. Given the image with the correct scale, it is usually trivial to sketch over the image or even use an automatic tracing function. You still need some measurements, of course. The part in question has a vertical portion that doesn’t show up in a flat photograph. We’ve had good luck using a flatbed scanner before, and there’s no reason you couldn’t scan a part with a caliper for scale.

This is one case where a digital caliper probably isn’t as handy as an old-school one. But it would be possible to do the same trick with any measurement device. You could even take your picture on a grid of known dimensions. This would also allow you to check that the distances at the top and bottom are the same as the distances on the right and left.

Of course, you can get 3D scanners, but they have their own challenges.

Understanding Linear Regression

Although [Vitor Fróis] is explaining linear regression because it relates to machine learning, the post and, indeed, the topic have wide applications in many things that we do with electronics and computers. It is one way to use independent variables to predict dependent variables, and, in its simplest form, it is based on nothing more than a straight line.

You might remember from school that a straight line can be described by: y=mx+b. Here, m is the slope of the line and b is the y-intercept. Another way to think about it is that m is how fast the line goes up (or down, if m is negative), and b is where the line “starts” at x=0.

[Vitor] starts out with a great example: home prices (the dependent variable) and area (the independent variable). As you would guess, bigger houses tend to sell for more than smaller houses. But it isn’t an exact formula, because there are a lot of reasons a house might sell for more or less. If you plot it, you don’t get a nice line; you get a cloud of points that sort of group around some imaginary line.

There are mathematical ways to figure out what line you should imagine, but you can often eyeball it, too. The real trick is evaluating the quality of that imaginary line.

To do that, you need an error measure. If you didn’t know better, you’d probably think expressing the error in terms of absolute value would be best. You know, “this is 10 off” or whatever. But, as [Vitor] explains, the standard way to do this is with a squared error term R2. Why? Read the post and find out.

For electronics, linear regression has many applications, including interpreting sensor data. You might also use it to generalize a batch of unknown components, for example. Think of a batch of transistors with different Beta values at different frequencies. A linear regression will help you predict the Beta and the error term will tell you if it is worth using the prediction or not. Or, maybe you just want to make the perfect cup of coffee.

Edison Phonograph Plays the Cylinders

You might be old enough to remember record platters, but you probably aren’t old enough to remember when records were cylinders. The Edison Blue Amberol records came out in 1912 and were far superior to the earlier wax cylinders. If you had one today, how could you play it? Easy. Just build [Palingenesis’] record player. You can even hear it do its thing in the video below.

The cylinders are made of plaster with a celluloid wrapper tinted with the namesake blue color. They were more durable than the old wax records and could hold well over four minutes of sound.

The player is mostly made from wood cut with a mill or a laser. There are some bearings, fasteners, and — of course — electronics. The stylus requires some care. Conventional records use a lateral-cut groove, but these old records use a vertical-cut. That means the pickup moves up and down and has a rounder tip than a conventional needle.

Rather than try to control the motor to an exact speed, you get to set the speed with a potentiometer and see the resulting RPM on a small display. Overall, an involved but worthwhile project.

We recently looked at some players that would have been new about the same time as the blue record in the video. We don’t think you could modify one of these to play stereo, but if you do, let us know immediately!

Wireless USB Autopsy

It might seem strange to people like us, but normal people hate wires. Really hate wires. A lot. So it makes sense that with so many wireless technologies, there should be a way to do USB over wireless. There is, but it really hasn’t caught on outside of a few small pockets. [Cameron Kaiser] wants to share why he thinks the technology never went anywhere.

Wireless USB makes sense. We have high-speed wireless networking. Bluetooth doesn’t handle that kind of speed, but forms a workable wireless network. In the background, of course, would be competing standards.

Texas Instruments and Intel wanted to use multiband orthogonal frequency-division multiplexing (MB-OFDM) to carry data using a large number of subcarriers. Motorola (later Freescale), HP, and others were backing the competing direct sequence ultra-wideband or DS-UWB. Attempts to come up with a common system degenerated.

This led to two systems W-USB (later CF-USB) and CW-USB. CF-USB looked just like regular USB to the computer and software. It was essentially a hub that had wireless connections. CW-USB, on the other hand, had cool special features, but required changes at the driver and operating system level.

Check out the post to see a bewildering array of orphaned and incompatible products that just never caught on. As [Cameron] points out, WiFi and Bluetooth have improved to the point that these devices are now largely obsolete.

Of course, you can transport USB over WiFi, and maybe that’s the best answer, today. That is, if you really hate wires.

Tracking the Sun? Nah!

If you want solar power, you usually have to make a choice. You can put a solar panel in a fixed location and accept that it will only put out the maximum when the sun is properly positioned. Or, you can make the panels move to track the sun.

While this isn’t difficult, it does add cost and complexity, plus mechanical systems usually need more maintenance. According to [Xavier Derdenback], now that solar panels are cheaper than ever, it is a waste of money to make a tracking array. Instead, you can build a system that looks to the east and the west. The math says it is more cost effective.

The idea is simple. If you have panels facing each direction, then one side will do better than the other side in the morning. The post points out that a tracking setup, of course, will produce more power. That’s not the argument. However, for a given power output, the east-west solution has lower installation costs and uses less land.

Letting the post speak for itself:

East-West arrays are simple. They consist of parallel strings of PV modules that are oriented in opposing directions, one facing East and the other West. The current of the whole array is the summation of these string currents, effectively letting East-West arrays capture sunlight from dawn till dusk, similar to a tracked array.

So what do you think? Are solar trackers old hat? If you want one, they don’t have to be very complex. But still easier to just double your panels.

DIY Penicillin

We don’t often consider using do-it-yourself projects as a hedge against the apocalypse. But [The Thought Emporium] thinks we should know how to make penicillin just in case. We aren’t so sure, but we do think it is a cool science experiment, and you can learn how to replicate it in the video below.

If you want to skip the history lesson, you need to fast-forward to about the six-minute mark. According to the video, we are surrounded by mold that can create anti-bacterial compounds. However, in this case, he starts with a special strain of mold made to produce lots of antibiotics.

You may not have all the gear he uses, including a bioreactor to generate liters of mold. Even with a lot of mold, the yield of penicillin is relatively low. Since Purina doesn’t make mold chow, you’ll have to create your own food for the mold colony.

All the work he did wound up producing 125 milligrams of drug. Obviously, if you are going to save the post-apocalyptic world, you are going to need to scale that process up.

If you are the sole survivor, maybe your AI companion can help out.

Five Oddest Op Amp Applications

You think of op amps as amplifiers because, no kidding, it is right in the name. But just like some people say, “you could do that with a 555,” [Doctor Volt] might say, “you can do that with an op amp.” In a recent video, you can see below, he looks at simulations and breadboards for five applications that aren’t traditional amplifiers.

Of course, you can split hairs. A comparator is sort of an amplifier with some very specific parameters, but it isn’t an amplifier in the classic sense.

In addition to comparators, there’s a flip flop, a few oscillators, and a PWM audio over optical transmitter and receiver. If you want to test your understanding of op amps, you can try to analyze the different circuits to see if you can explain how they work.

Op amps are amazing for analog design since you don’t have to build up high-quality amplifier blocks from discrete devices. Even the worst op amp you can buy is probably better than something you have the patience to design in a few minutes with a FET or a bipolar device. Fair to say that we do enjoy these oddball op amp circuits.

❌