Free RTOS

Getting Started With FreeRTOS And ChibiOS

If operating systems weren’t so useful, we would not be running them on every single of our desktop systems. In the same vein, embedded operating systems provide similar functionality as these desktop OSes, while targeting a more specialized market. Some of these are adapted versions of desktop OSes (e.g. Yocto Linux), whereas others are built up from the ground up for embedded applications, like VxWorks and QNX. Few of those OSes can run on a microcontroller (MCU), however. When you need to run an OS on something like an 8-bit AVR or 32-bit Cortex-M MCU, you need something smaller.

Something like ChibiOS (‘Chibi’ meaning ‘small’ in Japanese), or FreeRTOS (here no points for originality). Perhaps more accurately, FreeRTOS could be summarized as a multi-threading framework targeting low-powered systems, whereas ChibiOS is more of a full-featured OS, including a hardware abstraction layer (HAL) and other niceties.

In this article we’ll take a more in-depth look at these two OSes, to see what benefits they bring. Continue reading “Getting Started With FreeRTOS And ChibiOS”

Inputs Of Interest: Marsback M1 Is A Portable Party Peripheral

Again, let’s just get this out of the way up front: I got this lovely little 75% keyboard for free from a gaming accessories company called Marsback. It’s a functioning prototype of a keyboard that they have up on Kickstarter as of March 2nd. It comes in three color schemes: dark, white and sakura pink, which is white and pink with cherry blossoms.

This illustration of the lube points is from my email string with Marsback.

Marsback found me through my personal website and contacted me directly to gauge my interest in this keyboard. I’ll admit that I wasn’t too excited about it until I scrolled further in the email and saw that they are producing their own switches in-house.

I think that’s a really interesting choice given that Cherry MX and other switches exist, and there so many Cherry MX clones out there already. Naturally, I had to investigate, so following a short review, I’ll take it apart.

Continue reading “Inputs Of Interest: Marsback M1 Is A Portable Party Peripheral”

Retro Recreations Hack Chat With Tube Time

Join us on Wednesday, March 17 at noon Pacific for the Retro Recreations Hack Chat with Tube Time!

join-hack-chatNostalgia seems to be an inevitable consequence of progress. Advance any field far enough into the future, and eventually someone will look back with misty eyes and fond memories of the good old days and start the process of turning what would qualify as junk under normal conditions into highly desirable collectibles.

In some ways, those who have been bitten by the computer nostalgia bug are lucky, since the sheer number of artifacts produced during their period of interest is likely to be pretty high, making getting gear to lovingly restore relatively easy. But even products produced in their millions can eventually get difficult to find, especially once they get snapped up by eager collectors, leaving the rest to make do or do without.

Of course, if you’re as resourceful as Tube Time is, there’s another alternative: build your own retro recreations. He has embarked on some pretty intense builds to recapture a little of what early computer enthusiasts went through trying to build useful machines. He has built replicas of early PC sound cards, like an ISA-bus AdLib card, its MCA equivalent, and the “Snark Barker”— or is it the “Snood Bloober”? — which bears an uncanny resemblance to the classic Sound Blaster card from the 1980s.

Tube Time will join us for the Hack Chat this week to answer questions about all his retro recreations, including his newest work on a retro video card. Be sure to bring your questions on retro rebuilds, reverse engineering, and general computer nostalgia to the chat.

Our Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, March 17 at 12:00 PM Pacific time. If time zones have you tied up, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.
Continue reading “Retro Recreations Hack Chat With Tube Time”

Hackaday Links Column Banner

Hackaday Links: March 14, 2021

It’ll be Pi Day when this article goes live, at least for approximately half the globe west of the prime meridian. We always enjoy Pi Day, not least for the excuse to enjoy pie and other disc-shaped foods. It’s also cool to ponder the mysteries of a transcendental number, which usually get a good treatment by the math YouTube community. This year was no disappointment in this regard, as we found two good pi-related videos, both by Matt Parker over at Standup Maths. The first one deals with raising pi to the pi to the pi to the pi and how that may or may not result in an integer that’s tens of trillions of digits long. The second and more entertaining video is a collaboration with Steve Mould which aims to estimate the value of pi by measuring the volume of a molecular monolayer of oleic acid floating on water. The process was really interesting and the results were surprisingly accurate; this might make a good exercise to do with kids to show them what pi is all about.

Remember basic physics and first being exposed to the formula for universal gravitation? We sure do, and we remember thinking that it should be possible to calculate the force between us and our classmates. It is, of course, but actually measuring the attractive force would be another thing entirely. But researchers have done just that, using objects substantially smaller than the average high school student: two 2-mm gold balls. The apparatus the Austrian researchers built used 90-milligram gold balls, one stationary and one on a suspended arm. The acceleration between the two moves the suspended ball, which pivots a mirror attached to the arm to deflect a laser beam. That they were able to tease a signal from the background noise of electrostatic, seismic, and hydrodynamic forces is quite a technical feat.

We noticed a lot of interest in the Antikythera mechanism this week, which was apparently caused by the announcement of the first-ever complete computational model of the ancient device’s inner workings. The team from University College London used all the available data gleaned from the 82 known fragments of the mechanism to produce a working model of the mechanism in software. This in turn was used to create some wonderful CGI animations of the mechanism at work — this video is well worth the half-hour it takes to watch. The UCL team says they’re now at work building a replica of the mechanism using modern techniques. One of the team says he has some doubts that ancient construction methods could have resulted in some of the finer pieces of the mechanism, like the concentric axles needed for some parts. We think our friend Clickspring might have something to say about that, as he seems to be doing pretty well building his replica using nothing but tools and methods that were available to the original maker. And by doing so, he managed to discern a previously unknown feature of the mechanism.

We got a tip recently that JOGL, or Just One Giant Lab, is offering microgrants for open-source science projects aimed at tackling the problems of COVID-19. The grants are for 4,000€ and require a minimal application and reporting process. The window for application is closing, though — March 21 is the deadline. If you’ve got an open-source COVID-19 project that could benefit from a cash infusion to bring to fruition, this might be your chance.

And finally, we stumbled across a video highlighting some of the darker aspects of amateur radio, particularly those who go through tremendous expense and effort just to be a pain in the ass. The story centers around the Mt. Diablo repeater, an amateur radio repeater located in California. Apparently someone took offense at the topics of conversation on the machine, and deployed what they called the “Annoy-o-Tron” to express their displeasure. The device consisted of a Baofeng transceiver, a cheap MP3 player loaded with obnoxious content, and a battery. Encased in epoxy resin and concrete inside a plastic ammo can, the jammer lugged the beast up a hill 20 miles (32 km) from the repeater, trained a simple Yagi antenna toward the site, and walked away. It lasted for three days and while the amateurs complained about the misuse of their repeater, they apparently didn’t do a thing about it. The jammer was retrieved six weeks after the fact and hasn’t been heard from since.

Balanced Design And How To Know When To Quit Optimizing

I got a relatively inexpensive 6040 CNC machine, and have been spending most weekends making the thing work, and then cutting stuff, learning the toolchain, and making subsequent improvements. Probably 90% of my machine time has been on making improvements. It’s not that the machine was bad — I got the version with ballscrews and a decently solid frame — but it’s that it somehow didn’t work together as a whole. It’s just an incredibly unbalanced design.

Let’s start with the spindle motor. It’s a 2.2 kW water-cooled beast that is capable of putting tons of work into a piece and spinning at very high speed. Yet to keep up with the high speed spindle, the motors that move it around would have to be capable of high speeds as well — it’s a feeds and speeds thing if you’re not a CNC geek. And they can’t. Instead, the stepper motors that came with the kit are designed for maximum force at low speeds. Which can make sense for some machines, but for one with a slightly flexible X-axis like this one, that’s wasted as well. The frame just can’t handle the low-end grunt that the motors are capable of, so it can’t take advantage of the spindle’s power either. The design is all over the place.

Over the last two months’ of weekends, I’ve been going through this iterative procedure of asking “what is my limiting factor right now?”, working on fixing that thing up, running it some, and then asking the question again. And it’s a good general procedure, and I believe that it’s getting me to the machine I want at the minimum cost of time, money, and effort.

At first, it was the driver hardware/software with its emulated USB parallel port, so I swapped out the controller for an Arduino running GRBL, soldered directly to the DB-25 that comes out of the back. At least it can put out pulses fast enough to order the motors around, but they would still stall out at high speeds. Swapping the stepper motors out for a high-speed pair only cost me €40, which makes you wonder why they didn’t just put the right motors on in the first place. The machine now travels fast enough to make use of the high-speed spindle, and I’m flying through plywood and plastics without leaving burn marks. It’s a huge win for not much money.

The final frontier is taking big bites out of aluminum. The spindle can do it, but I fear I’m up against the frame’s rigidity on the X-axis. For whatever reason, they went with unsupported rods on the X, which are significantly more flexible than an axis that’s backed up by more metal. And this is where the limiting factor may actually be my time and patience, rather than money. I just can’t bear to disassemble and reassemble the thing again. So for now, it’s going to be small nibbles, taking advantage of the machine’s speed, if not yet the spindle’s full horsepower.

But it’s odd, because this machine is a bundle of good parts. It’s just that they haven’t been chosen to work together optimally; the frame doesn’t work with the stepper motors, which don’t work with the spindle. If they went through my procedure of saying “what’s the limiting factor?” they could have saved themselves €100 by just shipping it with a wimpier spindle, which would have been a balanced, if anemic, machine. Or they could have built it with the right motors for more speed. Or supported rails for more grunt. Or both!

I’ll never know why they quit optimizing their design when they did. Maybe they never got past the slow USB/parallel port speed? But I’m near the end of my path, and I can tell because the limiting ingredient isn’t a simple upgrade, or even mere money anymore, but my own willpower.

How can you tell when you’re at the top of a mountain in a dense fog? A step you take in any direction would lead you downhill. How can you tell when you’re satisfied with a project’s state? When you don’t have the need, or desire, to undertake the next most obvious improvement.

Hackaday Podcast 109: Cars That Suck, A Synth Packed With 555s, X-ray Letter Reading, And Pecking At A PS/2 Keyboard

Hackaday editors Mike Szczys and Elliot Williams riff on the week’s most interesting hacks. It’s hard to imagine a more perfect piece of art than an original Pong circuit board mounted in a shadow box and playable along with some tasty FPGA tricks to capture the original look of the screen. You could make a synth with a 555 timer, but what about using 20 of them for perfect polyphony? We ogle an old video showing off a clever toothed-disc CNC machine for cutting pastry with a water jet. And the episode wouldn’t be complete without looking at the strange tech that goes into making a fan car.

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)

Places to follow Hackaday podcasts:

Continue reading “Hackaday Podcast 109: Cars That Suck, A Synth Packed With 555s, X-ray Letter Reading, And Pecking At A PS/2 Keyboard”

This Week In Security: APT Targeting Researchers, And Someone Watching All The Cameras

Microsoft’s Patch Tuesday just passed, and it’s a humdinger. To add the cherry on top, two seperate BSOD inducing issues led to Microsoft temporarily pulling the update.

Among the security vulnerabilities fixed is CVE-2021-26897, another remote code exploit in the Windows DNS server. It’s considered a low-complexity attack, but does require local network access to pull off. CVE-2021-26867 is another of the patched vulnerabilities that sounds very serious, allowing an attacker on a Hyper-V virtual machine to pierce the barrier and run code on the hypervisor. The catch here is that the vulnerability is only present when using the Plan 9 filesystem, which surely limits the scope of the problem to a small handful of machines.

The most interesting fixed flaw was CVE-2021-26411 a vulnerability that allowed remote code execution when loading a malicious web page in either IE or pre-chromium Edge. That flaw was actively being exploited in a unique APT campaign, which we’ll cover right after the break.

Continue reading “This Week In Security: APT Targeting Researchers, And Someone Watching All The Cameras”