Paying It Forward

It’s all those little things. A month ago, I was working on the axes for a foam-cutting machine. (Project stalled, will pick back up soon!) A week ago, somewhere else on the Internet, people were working on sliders that would ride directly on aluminum rails, a problem I was personally experiencing, and recommended using drawer-glide tape — a strip of PTFE or UHMW PE with adhesive backing on one side. Slippery plastic tape solves the metal-on-metal problem. It’s brilliant, it’s cheap, and it’s just a quick trip to the hardware store.

Just a few days ago, we covered another awesome linear-motion mechanical build in the form of a DIY camera rig that uses a very similar linear motion system to the one I had built as well: a printed trolley that slides on skate bearings over two rails of square-profile extruded aluminum. He had a very nice system of anchoring the spacers that hold the two rails apart, one of the sticking points in my build. I thought I’d glue things together, but his internal triangle nut holders are a much better solution because epoxy doesn’t like to stick to anodized aluminum. (And Alexandre, if you’re reading, that UHMW PE tape is just what you need to prevent bearing wear on your aluminum axes.)

Between these events, I got a message thanking me for an article that I wrote four years ago on debugging SPI busses. Apparently, it helped a small company to debug a problem and get their product out the door. Hooray!

So in one week, I got help from two different random strangers on a project that neither of them knew I was working on, and I somehow saved a startup. What kind of crazy marvelous world is this? It’s become so normal to share our ideas and experience, at least in our little corner of the Internet, that I sometimes fail to be amazed. But it’s entirely amazing. I know we’ve said it before, but we are living in the golden era of sharing ideas.

Thanks to all of you out there, and Read More Hackaday!

Retrotechtacular: The $5,000 40 Pound HP Classroom Computer

See if you can talk your local school district into buying a computer that costs about $5,000 and weighs 40 pounds. That was HP’s proposition to schools back in 1968 so really it is more like $35,000 today. The calculator had a CRT display for the RPN stack that you could mirror on a big screen. You could also get a printer or plotter add-on. Pretty hot stuff for the ’60s.

The 1970 videos promoting the HP 9100, posted by the [Computer History Archive Project], shows something we’d think of as a clunky calculator, although by the standards of the day it was a pretty good one with trig functions and a crude programming capability.

Continue reading “Retrotechtacular: The $5,000 40 Pound HP Classroom Computer”

How To Get Into Cars: Hypermiling Mods

While we’re currently in an era of comparatively low gas prices, the last few decades have seen much volatility in the oil market. This can hit the hip pocket hard, particularly for those driving thirstier vehicles. Thankfully, modifications can help squeeze a few extra miles out of each gallon of dinosaur juice if you know what you’re doing.

The art of striving for the best fuel economy is known as hypermiling, and involves a broad spectrum of tricks and techniques to get the most out of a drop of fuel. Let’s dive in to how you can build a more efficient cruiser for getting around town.

Step 1: Know Thine Enemy

The MPGuino is a great solution for monitoring fuel consumption in older cars without a trip computer.

If you want to improve your fuel economy, the first step is to measure it. Without accurate measurement, it’s impossible to quantify any gains made or optimise for the best performance. For those with modern cars, it’s likely that there’s already a trip computer built into the dash. Using this to track your fuel economy is the easiest solution. Instantaneous modes are useful to help improve driving habits, while average modes are great for determining the car’s economy over time.

However, many older vehicles don’t have such features installed as stock. Thankfully, there’s a few ways to work around this. For those driving post-1996 vehicles outfitted with an OBD-II port, tools like Kiwi or Scangauge can often track fuel economy. Failing this, most fuel injected cars can be fitted with a device like the MPGuino that monitors fuel injection to calculate consumption. Fundamentally, all of these tools involve tracking the amount of fuel used per distance travelled. Factory tools and OBD-II gauges do it by using the car’s standard hardware, while the MPGuino splices in to speedometer signals and injector triggers to do the same thing with an Arduino. If you do decide to install a custom device, make sure you calibrate it properly, else your figures won’t bear much resemblance to what’s going on in reality.

Of course, as long as your car has a working odometer and a fuel tank that doesn’t leak, there’s always the pen-and-paper method. Simply reset the trip odometer to zero after filling the tank to the brim. Then, when refilling the tank, fill all the way to the top, and divide the miles driven by the gallons of fuel added back to the tank. This isn’t the most accurate method, as the nature of gas station pumps and automotive fuel tanks mean that tanks aren’t always accurately filled to the brim, due to air pockets and devices used to prevent overfilling. Despite this, it’s a handy way of getting some ballpark figures of your car’s performance over time.

Continue reading “How To Get Into Cars: Hypermiling Mods”

Hackaday Podcast 087: Sound-Shattering Gliders, Pressing Dashcam Buttons, And Ratcheting Up Time

Hackaday editors Mike Szczys and Elliot Williams dish up a hot slice of the week’s hardware hacks. We feature a lot of clocks on Hackaday, but few can compare to the mechanical engineering elegance of the band-saw-blade-based ratcheting clock we swoon over on this week’s show. We’ve found a superb use of a six-pin microcontroller, peek in on tire (or is that tyre) wear particles, and hear the sounds of 500 mph RC gliders. It turns out that 3D printers are the primordial ooze for both pumping water and positioning cameras. This episode comes to a close by getting stressed out over concrete.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 087: Sound-Shattering Gliders, Pressing Dashcam Buttons, And Ratcheting Up Time”

This Week In Security: PunkBuster, NAT, NAS And MP3s

Ah, the ever-present PDF, and our love-hate relationship with the format. We’ve lost count of how many vulnerabilities have been fixed in PDF software, but it’s been a bunch over the years. This week, we’re reminded that Adobe isn’t the only player in PDF-land, as Foxit released a round of updates, and there were a couple serious problems fixed. Among the vulnerabilities, a handful could lead to RCE, so if you use or support Foxit users, be sure to go get them updated.

PunkBuster

Remember PunkBuster? It’s one of the original anti-cheat solutions, from way back in 2000. The now-classic Return to Castle Wolfenstein was the first game to support PunkBuster to prevent cheating. It’s not the latest or greatest, but PunkBuster is still running on a bunch of game servers even today. [Daniel Prizmant] and [Mauricio Sandt] decided to do a deep dive project on PunkBuster, and happened to find an arbitrary file-write vulnerability, that could easily compromise a PB enabled server.

One of the functions of PunkBuster is a remote screenshot capture. If a server admin thinks a player is behaving strangely, a screenshot request is sent. I assume this targets so-called wallhack cheats — making textures transparent, so the player can see through walls. The problem is that the server logic that handles the incoming image has a loophole. If the filename ends in .png as expected, some traversal attack checks are done, and the png file is saved to the server. However, if the incoming file isn’t a png, no transversal detection is done, and the file is naively written to disk. This weakness, combined with the stateless nature of screenshot requests, means that any connected client can write any file to any location on the server at any time. To their credit, even Balance, the creators of PunkBuster, quickly acknowledged the issue, and have released an update to fix it.

Continue reading “This Week In Security: PunkBuster, NAT, NAS And MP3s”

Even More Firmware In Your Firmware

There are many ways to update an embedded system in the field. Images can fly through the air one a time, travel by sneaker or hitch a ride on other passing data. OK, maybe that’s a stretch, but there are certainly a plethora of ways to get those sweet update bytes into a target system. How are those bytes assembled, and what are the tools that do the assembly? This is the problem I needed to solve.

Recall, my system wasn’t a particularly novel one (see the block diagram below). Just a few computers asking each other for an update over some serial busses. I had chosen to bundle the payload firmware images into the binary for the intermediate microcontroller which was to carry out the update process. The additional constraint was that the blending of the three firmware images (one carrier and two payload) needed to happen long after compile time, on a different system with a separate toolchain. There were ultimately two options that fit the bill.

The system thirsty for an update

Continue reading “Even More Firmware In Your Firmware”

Linux-Fu: Making AWK A Bit Easier

awk is a kind of Swiss Army knife for text files. However, some of its limitations are often a bit annoying. I’ve used a simple set of functions to make awk a bit better, although I will warn you: it does require GNU extensions to awk. That is, you must use gawk and not other versions. Your system probably maps /usr/bin/awk to something and that something might be gawk. But it could also be mawk or some other flavor. If you use a Debian-based distro, update-alternatives is your friend here. But for the purposes of this post, I’m going to assume you are using gawk.

By the end of the post, you’ll see how to use my awk add-on functions to split up a line into fields even when there is no single character to separate all fields. In addition, you’ll be able to refer to the fields using names you decide. You won’t have to remember that $2 is the time field. You’ll say Fields_fields["time"] instead.

The Problem

awk does a lot of common work for you when you use it to process text files. It reads files a record at a time. Normally, a record is a single line. Then it splits the line on fields using whitespace, or some other choice of field separators. You can write code that manipulates the line or individual fields. This default behavior is great, especially since you can change the end of record character and the field separator. A surprising number of files fit this sort of format.

Until, of course, they don’t. If you have data coming from a data logging instrument or some database, it could be formatted in a variety of ways. Some fields might have structured data with a variety of separators. This isn’t a deal-breaker. Since you can get at the whole line, you can do almost anything you want, but the logic is harder and the whole point to using awk is to make things easier.

For example, suppose you had a file from a data recorder that had an eight-digit serial number, followed by a six-character tag, and then two floating point numbers separated by colons. The pattern might look like

^([0-9]{8})([a-zA-Z0-9]{6})([-+.0-9]+),([-+.0-9]+)$

This would be hard to handle with the conventional field splitting and you’d normally just write code to split everything apart.

Continue reading “Linux-Fu: Making AWK A Bit Easier”