Faster Computers Lead To Slower Experiences?

Ever get that funny feeling that things aren’t quite what they used to be? Not in the way that a new washing machine has more plastic parts than one 40 years its senior. More like “my laptop can churn through hundreds of gigaflops, but when I scroll it doesn’t feel great.” That perception of smoothness might be based on a couple factors, including system latency. A couple years ago [danluu] had that feeling too and measured the latency of “devices I’ve run into in the past few months” (based on this list, he lives a more interesting life than we do). It turns out his hunch was objectively correct. What he wrote was a wonderful deep dive into how and why a wide variety of devices work and the hardware and software contributors to latency.

Let’s be clear about what “latency” means in this context. [danluu] was checking the time between a user input and some response on screen. For desktop systems he measured a keystroke, for mobile devices scrolling a browser. If you’re here on Hackaday (or maybe at a Vintage Computer Festival) the cause of the apparent contradiction at the top of the charts might be obvious.

Q: Why are some older systems faster than devices built decades later? A: The older systems just didn’t do much! Instead of complex multi-tasking operating systems doing hundreds of things at once, the CPU’s entire attention was bent on whatever user process was running. There are obvious practical drawbacks here but it certainly reduces context switching!

In some sense this complexity that [danluu] describes is at the core of how we solve problems with programming. Writing code is all about abstraction. While it’s true that any program could be written directly in machine code and customized to an individual machine’s hardware configuration, it would be pretty inconvenient for both developer and user. So over time layers of sugar have been added on top to hide raw hardware behind nicer interfaces written in higher-level programming languages.

And instead of writing every program to target exact hardware configurations there is a kernel to handle the lowest layers, then layers adding hotplug systems, power management, pluggable module and driver infrastructure, and more. When considering solutions to a programming problem the approach is always recursive: you can solve the problem, or add a layer of abstraction and reframe it. Enough layers of the latter makes the former trivial. But it’s abstractions all the way down.

[danluu]’s observation is that we’re just now starting to curve back around and hit low latency again, but this time by brute force! Modern solutions to latency largely look like increasingly exotic display technologies and complex optimizations which reach from UI draw functions all the way down to the silicon, not removing software and system infrastructure. It turns out the benefits of software complexity in terms of user experience and ease of development are worth it most of the time.

For a very tangible illustration of latency as applied to touchscreen devices, check out the Microsoft Research video after the break (linked to in [danluu]’s piece).

Continue reading “Faster Computers Lead To Slower Experiences?”

The Joy Of Properly Designed Embedded Systems

The ages-old dream of home automation has never been nearer to reality. Creating an Internet of Things device or even a building-wide collection of networked embedded devices is “easy” thanks to cheap building blocks like the ESP8266 WiFi-enabled microcontroller. Yet for any sizable project, it really helps to have a plan before getting started. But even more importantly, if your plan is subject to change as you work along, it is important to plan for flexibility. Practically, this is going to mean expansion headers and over-the-air (OTA) firmware upgrades are a must.

I’d like to illustrate this using a project I got involved in a few years ago, called BMaC, which grew in complexity and scope practically every month. This had us scrambling to keep up with the changes, while teaching us valuable lessons about how to save time and money by having an adaptable system architecture.

Continue reading “The Joy Of Properly Designed Embedded Systems”

Octavo Systems Shows Off With Deadbug Linux Computer

Once upon a time, small Linux-capable single board computers were novelties, but not anymore. Today we have a wide selection of them, many built around modules we could buy for our own projects. Some of the chipset suppliers behind these boards compete on cost, others find a niche to differentiate their product. Octavo Systems is one of the latter offering system-in-package (SiP) modules that are specifically designed for easy integration. They described how simple it would be to build a minimal computer using their SC335x C-SiP, and to drive the point home they brought a deadbug implementation to Embedded World 2019. [Short video after the break.]

Most of us encounter Octavo modules as the heart of a BeagleBoard. Their increasing integration made tiny wonders like PocketBeagle possible. But bringing out all those pins for use still required a four-layer circuit board. Octavo’s pitch for hardware professionals center around how easy integration saves time for faster time to market, and fortunately for us easy integration also translates to a more accessible device for our projects. It’s one thing to publish a document describing a hypothetical single-layer PCB for an Octavo module, it’s quite something else to show that concept in action with no PCB at all.

Of course, this little machine only has access to a fraction of the module’s functionality, and it is certainly overkill if the objective is just to blink a few LEDs. If so, we’d just use 555 timers! But it does show how simple a bare bones “Hello World” machine can be built, removing intimidation factor and invite more people to come play.

One of the three top winners in our circuit sculpture contest was a wireframe Z80 computer. There’s quite a jump from a Z80 to an Octavo SC335x, but we’ve already seen one effort by [Zach] over Supercon 2018 weekend to build a deadbug computer with an Octavo module. It won’t be long before someone one-ups this minimalist LED blinker with something more sophisticated and we can’t wait to see it. Continue reading “Octavo Systems Shows Off With Deadbug Linux Computer”

Ask Hackaday: Can We Get Someone To Buy And Destroy RAM?

We like blinky things. We’re moths drawn to the flame of serially-addressable RGB LEDs. If the LEDs are smaller, we want to know. If you can drive more of them, we want to know. That said, the most interesting news out of CES last January was both right up our alley, and immensely disappointing. Corsair, makers of RGB computer fans, RGB CPU coolers, and RGB keyboards and mice, have a new product out: RGB RAM, because professional gamers and streamers have a higher win percentage when their RAM is illuminated.

The key innovation of the new Corsair Dominator Platinum RGB DDR4 DRAM is called, ‘Capellix LEDs’. The press surrounding these LEDs gives a clear advantage: right now, the RGB LEDs in your gaming system are mounted in a large SMD package, like a WS2812 or APA101. These large packages reduce LED density, and making LEDs smaller means moar RGB — more colors, or brighter colors, or better efficiency. The key advancement in Capellix LEDs is taking the guts of a serially addressable RGB LED and putting it in a smaller package. Instead of a package that’s 2.8mm³ in volume, the Capellix LED is ‘just 0.2mm³ in size’. The few pictures available of these LEDs give the impression they’re about the size of an 0805 package. It’s small, and we’d like to get our hands on some.

Where these LEDs come from is anyone’s guess, but Corsair did partner with Primax, a Taiwanese manufacturer of computer peripherals, to pull this off. There is no mention of Capellix LEDs in Primax’s press releases, and we don’t actually know if these are the smallest serially addressable RGB LEDs available; we don’t even know if they’re serially addressable. There could easily be a small microcontroller in the Corsair Dominator Platinum RGB DDR4 DRAM, as each stick is only driving twelve individually controllable RGB LEDs.

The bottom line is, someone needs to spend $160 for 16GB of RAM, then tear the whole thing apart, preferably with close-up pics of the fancy new RGB LEDs.

A cynical reader would say that Capellix LEDs are simply existing LEDs, the name ‘Capellix’ was trademarked by Corsair, and these LEDs were shoved into a stick of RAM with a significant markup. This, surprisingly, is demonstrably wrong because there is no entry for ‘Capellix’ in the United States Patent and Trademark Office Trademark Electronic Search System. That doesn’t mean the spirit of the cynic is wrong, though; ROHM semiconductors just released a new side-view RGB LED that might be smaller than Corsair’s Capellix LEDs. There are, of course, RGB LEDs available in similar sizes, but none of these are serially-addressable like a WS2812 or APA101. We don’t know what’s in these fancy sticks of RAM, but we’re waiting for someone to do a tear down so we can find out.

Thinkpad T25 Gets Less Retro With Hardware Swap

For many, the Thinkpad T25 was something of a dream come true. Celebrating the 25th anniversary of the venerable business-oriented laptop that hackers love so much, it featured a design inspired by “retro” Thinkpads of yore, but with modern hardware inside. Unfortunately, as it was more fan service than a serious revitalization of classic Thinkpad design, the T25 was only ever available in a single hardware configuration.

[kitsunyan] liked the look and feel of the T25, but in 2019 was already feeling a bit let down by the hardware. The screen wasn’t up to snuff, and while the CPU is an i7, it only has dual cores. To make sure the T25 is still viable down the road, it seemed the only option was to try to transplant the hardware from one of the current Thinkpad models into the anniversary chassis. It certainly wasn’t easy, but given the fact that the T25 was more of a redress than a completely new product to begin with, everything came together a lot better than you might expect.

A custom mount installed in the T25

To help put things into perspective, the T25 is basically a modified version of the T470. Last year, Lenovo replaced the T470 with the new T480 that has just the sort of hardware improvements that [kitsunyan] wanted. The T480 was more of a refresh than a complete revamp, so the actual chassis of the machine didn’t change much compared with its predecessor. That being the case, it seemed like it should be possible to transplant the newer T480 components into the T470 derived T25. Got all that straight?

[kitsunyan] was able to put this theory to the test when the opportunity to connect a T25 keyboard to the newer T480 presented itself. Since the 7-row keyboard on the anniversary edition was one of its biggest selling points, seeing if it would work on another machine was kind of a big deal. It didn’t fit physically, and some of the keys didn’t work as expected, but it at least had the same connector and didn’t let out the magic smoke. It represented the first tiny step of a much larger journey.

In the end, it took a lot of trimming, gluing, hacking, and fiddling to get all the new hardware from the T480 to fit into the T25. But if you’re brave enough, the process has been detailed exquisitely by [kitsunyan]. Not only are the part numbers listed for everything you need to order, but there’s plenty of pictures to help illustrate the modifications that need to be made to all the clips, brackets, and assorted widgets that go into a modern laptop.

While we’re very impressed by this project, we can’t say it comes as a complete surprise. We’re well aware of the incredible lengths Thinkpad aficionados will go to keep their machines running into the 21st century. But don’t just take our word for it, you too can join the ranks of the Thinkpad elite.

[Thanks to Pierre for the tip.]

Supercon: Ruth Grace Wong And Firmware From The Firehose

Firmware and software are both just code, right? How different could the code that runs Internet-scale distributed web stuff be from the code that runs a tiny microcontroller brain inside a personal hydroponics device? Night and day!

Ruth Grace Wong works in the former world, but moonlights as a manufacturing engineer with some friends. Their product had pre-existing firmware that contained (at least) one bug, and Ruth’s job was to find it. The code in question was written by the Chinese PCB engineer, who knew the electronics intimately but who had no software background, providing Ruth an opportunity to jump head-first into the rawest of raw embedded programming. Spoiler alert: she found the bug and learned a lot about firmware along the way. This talk follows her along the adventure.

“The code is very well documented, in Chinese” but the variable names are insanely non-descriptive. Similarly, while the PCB engineer knows full well what a 24C02 is, if you’re a software geek that might as well be Chinese. As you’d expect, web searches came to the rescue on both fronts.

The bug ended up hiding in a logical flaw in the PWM-setting code inside an interrupt service routine, and it kept the fan from ever coming full on. Once found, it was easily fixed. But getting to the point where you understand the codebase deeply enough to know where to look is four-fifths of the battle. Heck, setting up the toolchain alone can take a day or two.

If you’re a fellow software type, Ruth’s talk (embedded below) will give you a quick glimpse into the outer few layers of the onion that is embedded firmware development, from a familiar viewpoint. Give her quick and value-packed talk a watch! Grizzled hardware veterans will nod along, and maybe even gain a little insight into how our code looks to “them”.

Continue reading “Supercon: Ruth Grace Wong And Firmware From The Firehose”

Cheaply Charging Cylindrical Cells

For one reason or another, a lot of us have a bunch of 18650 cells sitting around. Whether they’re for flashlights, our fancy new vape pen, remote controlled toys, or something more obscure, there is a need to charge a bunch of lithium ion cells all at once. This project, by [Daren Schwenke], is the way to do it. It’ll charge ten 18650 cells quickly using a stock ATX power supply and less than twenty bucks in Amazon Prime parts.

The idea began when [Daren] realized his desktop lithium ion charger took between 4-6 hours to fully charge two 18650 cells. With a Mountainboard project, or a big ‘ol electric skateboard waiting in the wings, [Daren] realized there had to be a better solution to charging a bunch of 18650 cells. There is, and it’s those twenty bucks at Amazon and a few 3D printed parts.

The relevant parts are just a ten-pack of 18650 cell holders (with PC pins) and a ten-pack of 5V, 1A charging modules (non-referral Amazon link, support truly independent journalism) meant to be the brains of a small USB power bank. These parts were wired up to the 5V rail of a discarded ATX power supply (free, because you can scavenge these anywhere, and everything was wrapped up with a neat little 3D printed mount.

Is this the safest way to charge lithium ion cells? No, because you can build a similar project with bailing wire. There is no reverse polarity protection, and if there’s one thing you never want to do, it’s reverse the polarity. This is, however, a very effective and very cheap solution to charging a bunch of batteries. It does what it says it’ll do, nothing more.