World’s Cheapest ARM Debugger Is Actually RISC-V

[bogdanthegeek] has a lot of experience with the ARM platform, and their latest escapade into working with cheap ARM chips recovered from disposable vapes involved a realization that it was just plain wrong to debug such recovered silicon with something as expensive as a Pi Pico. No, they needed to build a debugger using the super cheap CH32V003.

What follows is an interesting tour around ARM Debug Access Port (DAP) programmers and creating a practical USB-connected device that actually works with modern toolchains. The first problem to be solved was that of host connectivity. These days, it’s USB or go home, which immediately limits the microcontrollers you can choose. Luckily for [Bogdan], they were aware of the excellent work by [cnlohr] on wedging low-speed USB support onto the RISC-V CH32v003 with the software-only bit-banging rv003usb, which provided a starting point. The next issue was to check for interrupt-driven endpoint support (needed for low-speed USB) in the Mac OS X kernel, which they knew was being dropped at an alarming rate (well, at least for full-speed). Luckily, the CMSIS-DAP standard required support for interrupt-driven USB endpoints, so kernel support was likely intact.

Next, [Bogdan] noticed that the DAPLink project had been ported to the bigger, native-USB WCH chips like the CH32V203, so it was a matter of porting this code to the diminutive CH32V003 using the rv003usb stack for the USB support using [cnlohr]’s ch32fun toolchain. There were a few bumps along the way with a lack of clarity in the DAPLink code, and some inconsistencies (across platforms) with the USB library dependencies of the upstream tool pyOCD, but they did get some tools working on at least Mac OS and some others on Linux. Which was nice.

We’ve covered the CH32V003 a fair bit, with people trying to give it all kinds of big-CPU tricks, such as speech recognition (of sorts) or even building a supercluster.

Batteries Not Included: Meet The Swiss Réglette!

Over on YouTube, [The Modern Rogue] created an interesting video showing a slide-rule-like encryption device called the Réglette. This was a hardware implementation of a Vigenère-like Cipher, technically referred to as a manual polyalphabetic substitution cipher. The device requires no batteries, is fully waterproof, daylight readable and easy to pack, making it really useful if you find yourself in a muddy trench in the middle of winter during a world war. Obviously, because it’s a slide rule.

Anyway, so how does this cipher work? Well, the ‘polyalphabetic’ bit infers the need for a key phrase, which is indeed the first thing all parties need to agree upon. Secondly, a number is required as a reference point. As you can see from the video, the sliding part of the device has letters of the alphabet, as well as numbers and a special symbol. The body has two series of numbers, with the same spacing as the central, sliding part. A second copy of the sliding part is also needed to slide in behind the first unit. This second copy is neatly stowed below the body during storage.

With each message letter, you lookup the corresponding cipher text number, then shift the slider to the next key phrase letter.

The cipher works by first aligning the starting letter of the (variable-length) key phrase with the reference number. Next, encode the first symbol from the cleartext message (the thing you want to encrypt). You simply look up the letter on the slide and read off either of the numbers next to it. Randomly selecting the left or right set adds an extra bit of strength to the code due to increased entropy. The number is the first symbol for your ciphertext (the thing you want to transmit to the receiver). Next, you move on to the next symbol in the cleartext message. Align the following letter of the key phrase with the reference number, look up the corresponding letter in the message, and transmit the following number onwards. When you run out of key phrase letters, you loop back to the start, and the cycle repeats.

The special symbol we mentioned earlier is not really a ‘blank’; it is a control symbol used to retransmit a new reference number with the existing setup. To change the reference number, the blank character is encoded and sent, followed by the latest reference number. When the blank symbol is received at the other end, the following code is used as the reference number, and the key phrase position is reset to point back to the first letter, restarting the cycle anew. Simple, yes. Effective? Well, not really by modern standards, but at the time of limited computing power (i.e. pen and paper, perhaps a mechanical calculator at best), it would have been sufficient for some uses for a couple of decades.

Why is this Vigenère-like? Well, an actual Vigenère cipher maps letters to other letters, but the Réglette uses numbers, randomly selected, adding entropy, as well as the control code to allow changing the cypher parameter mid-message. This makes it harder to attack; the original Vigenère was considered first-rate cryptography for centuries.

If you’d like to play along at home and learn some other simple ciphers, check this out. Kings and Queens of old frequently used cryptography, including the famous Queen Mary of Scots. Of course, we simply can’t close out an article on cryptography without mentioning the Enigma machine. Here’s one built out of Meccano!

Continue reading “Batteries Not Included: Meet The Swiss Réglette!”

Putting A Teensy To Task As A Transputer Link

One downside of working with the old Inmos Transputer devices is the rarity and cost of the original silicon. Obviously, you can’t sidestep the acquisition of the processor—unless you emulate—but what about replacing the IMS C011/C012 link chip? You need this (expensive) part to interface the transputer to the programming host, but as [Erturk Kocalar] discovered, it’s perfectly possible to coax a Teensy to do that job for you just as well.

The unusual two-bit start sequence differentiates a data packet from an ACK. It’s simple to emulate if you use the LSB of a 9-bit word as a dummy start bit!

Transputers work by utilizing an array of bit serial interfaces to connect a network of devices, allowing for cooperative computation on tasks too large to fit on a single device. This protocol is, at its link level, a simple asynchronous bit serial affair, with 11-bit data messages, and a raw two-bit frame for the acknowledge. The C011 device at its heart is just a specialized UART—it takes 8-bit parallel data from the host, dealing with handshaking, and pushes it out to the first transputer in the chain at 5, 10 or 20 Mbps, but inverted and with two start bits and a single stop bit. In parallel, it performs the same task in the reverse direction.

[Erturk] realized that the Teensy UART has an inverted mode and, crucially, a 9-bit data mode. This allows the second start bit to be generated as bit 0 of the word, with the remaining eight bits forming the payload. Simple stuff. Additionally, the Teensy UART is capable of the maximum transputer bitrate of 20 Mbps, without breaking a sweat.

Continue reading “Putting A Teensy To Task As A Transputer Link”

CoreXY 3D Printer Has A Scissor-Lift Z-axis So It Folds Down!

We don’t know about you, but one of the biggest hassles of having a 3D printer at home or in the ‘shop is the space it takes up. Wouldn’t it be useful if you could fold it down? Well, you’re in luck because over on Hackaday.io, that’s precisely what [Malte Schrader] has achieved with their Portable CoreXY 3D printer.

The typical CoreXY design you find in the wild features a moving bed that starts at the top and moves downwards away from the XY gantry as the print progresses. The CoreXY kinematics take care of positioning the hotend in the XY plane with a pair of motors and some cunning pulley drives. Go check this out if you want to read more about that. Anyway, in this case, the bed is fixed to the base with a 3-point kinematic mount (to allow the hot end to be trammed) but is otherwise vertically immobile. That bed is AC-heated, allowing for a much smaller power supply to be fitted and reducing the annoying cooling fan noise that’s all too common with high-power bed heaters.

Both ends of the cable bundle are pivoted so it can fold flat inside the frame!

The XY gantry is mounted at each end on a pair of scissor lift mechanisms, which are belt-driven and geared together from a single stepper motor paired with a reduction gearbox. This hopefully will resolve any issues with X-axis tilting that [Malte] reports from a previous version.

The coarse tramming is handled by the bed mounts, with a hotend-mounted BLTouch further dialling it in and compensating for any bed distortion measured immediately before printing. Simple and effective.

As will be clear from the video below, the folding for storage is a natural consequence of the Z-axis mechanism, which we reckon is pretty elegant and well executed—check out those custom CNC machine Aluminium parts! When the Z-axis is folded flat for storage, the hotend part of the Bowden tube feed is mounted to a pivot, allowing it to fold down as well. They even added a pivot to the other end of the cable bundle / Bowden feed so the whole bundle folds down neatly inside the frame. Nice job!

If you want a little more detail about CoreXY kinematics, check out our handy guide. But what about the H-Bot we hear you ask? Fear not, we’re on it.


Was The Napier Nomad The Most Complex Aero Engine Ever Made?

From 1945 to 1955, a British aeronautical company called Napier & Son produced not just one but two versions of an intricate hybrid piston engine, which they named the Napier Nomad. The post-World War II era saw the development of several fascinating (and highly complex) piston-powered aeronautical engines alongside the emerging gas turbine engine designs. During this period, gas turbines were inefficient, unreliable, and primarily used for military applications. The (then) British Ministry of Supply commissioned the design and creation of a more fuel-efficient piston engine for aeronautical purposes, both military and civil, aiming to achieve gas turbine-like power while maintaining piston engine efficiency. Quite the challenge!

The specification aimed for 6000 hp and optimal fuel efficiency for long-range use. Napier knew gas turbines were limited by maximum operating temperature, constrained by available materials, which increased fuel consumption and reduced range. Piston engines operated at higher peak temperatures. They considered combining both principles to create a superior design, a concept suggested by aeronautical engineer Sir Harry Ricardo, who had consulted for Napier on other projects. Their complex solution was to build a gas turbine with a two-stroke diesel engine as the combustion chamber, merging the benefits of both.

Continue reading “Was The Napier Nomad The Most Complex Aero Engine Ever Made?”

Live Coding Techno With Strudel

The super talented [Switch Angel] is an electronic music artist, with a few cool YouTube videos to show off their absolute nailing of how to live code with Strudel. For us mere mortals, Strudel is a JavaScript port of TidalCycles, which is an algorithmic music generator which supports live coding, i.e. the music that is passed down to the synthesizer changes on-the-fly as you manipulate the code. It’s magical to watch (and listen!) to how you can adapt and distort the music to your whims just by tweaking a few lines of code: no compilation steps, hardly any debugging and instant results.

The traditional view of music generators like this is to create lists of note/instrument pairs with appropriate modifiers. Each sound is specified in sequence — adding a sound extends the sequence a little. Strudel / Tidalcycles works a little differently and is based on the idea of repeating patterns over a fixed time. Adding an extra sound or breaking down one sound slot into multiple sounds squeezes all the remaining slots down, causing the whole pattern to repeat in the same period, with the sounds individually taking up less space. This simple change makes it really easy to add layer upon layer of interest within a sequence with a few extra characters, without recalculating everything else to fit. On top of this base, multiple effects can be layered—more than we can mention here—and all can be adjusted with pop-in sliders directly in the code.

Continue reading “Live Coding Techno With Strudel”

BASICODE: A Bit Like Java, But From The 1980s

Those of us ancient enough to remember the time, or even having grown up during the heyday of the 8-bit home computer, may recall the pain of trying to make your latest creation work on another brand of computer. They all spoke some variant of BASIC, yet were wildly incompatible with each other regardless. BASICODE was a neat solution to this, acting as an early compatibility standard and abstraction layer. It was essentially a standardized BASIC subset with a few extra routines specialized per platform.

But that’s only part of the story. The BASICODE standard program was invented by Dutch radio engineer Hessel de Vries, who worked for the Dutch national radio broadcaster Nederlandse Omroep Stichting (NOS). It was designed to be broadcast over FM radio! The idea of standardization and free national deployment was brilliant and lasted until 1992, when corporate changes and technological advancements ultimately led to its decline.

Continue reading “BASICODE: A Bit Like Java, But From The 1980s”