A 3D-printed case for the ZX Spectrum with a mechanical keyboard

The ZX Spectrum Finally Gets A Proper Keyboard

The Sinclair ZX Spectrum is fondly remembered by many for being their first introduction into the wonderful world of computing. Its advanced capabilities coupled with a spectacularly low price made it one of the great home computers of the 1980s, at least in the UK and nearby countries. What was less spectacular about the Spectrum was its awful keyboard: although a step up from the flat membrane keyboards of earlier Sinclair computers, the Spectrum’s tiny rubbery keys made typing anything more than a few characters a bit of a chore.

If you’re planning to do any serious programming on your Spectrum, you might therefore want to check out [Lee Smith]’s latest project in which he redesigns the Spectrum’s case to include a proper mechanical keyboard. [Lee] got this idea when he was looking for ways to fix a few Spectrums with broken or missing cases, and stumbled upon several projects that aim to recreate classic Sinclair machines using modern components. He took a keyboard PCB meant for the ZX Max 128 project, populated it with some high-quality switches, and added a modified set of keycaps from the ManuFerHi N-Go.

A new ZX Spectrum case, opened to show the keyboard connecting to the mainboard
The new keyboard plugs into the original connectors and doesn’t require any board-level modifications.

Together, those parts formed a modern, comfortable keyboard that still had the proper labelling on all keys. This is rather essential on the Spectrum, since each key is also used to generate symbols and BASIC keywords: for instance, the “K” key also functions as LIST, +, LEN and SCREEN$.

With the keyboard design settled, [Lee] set to work on the rest of the case: he designed and 3D-printed a sleek enclosure that takes the new keyboard as well as an original Spectrum mainboard. The resulting system is called the ZX Mechtrum, and looks fabulous with its matte black exterior and the obligatory four-coloured rainbow. A replaceable rear panel also allows several board-level modifications, like composite video or VGA output, to be neatly incorporated into the design.

We wrote an extensive retrospect on the Spectrum on its 40th anniversary earlier this year. If, somehow, you actually like the Spectrum’s original rubbery keyboard, then you can also modify the whole thing to work with modern computers.

Continue reading “The ZX Spectrum Finally Gets A Proper Keyboard”

All About USB-C: Illegal Adapters

Let’s be clear – it’s not enough to have USB-C to USB-C cables. There’s a lot of cables that we might want to acquire for our day-to-day use, perhaps, for a transition period while we still own some amount of devices not adorned with a USB-C connector. However, the USB-C specification only accounts for a limited amount of kinds of cables, explicitly or implicitly excluding a range of cables that you might want to buy or make.

It’s my firm belief that, as a hacker, you should be able to buy any USB-C contraption that you could ever need. Hackers don’t need restrictions driven by marketing – they need understanding of how a piece of tech can or cannot be used, based on how it operates internally. I would like you to provide with such understanding, so that you can make informed decisions.

On the other hand, USB-C is designed to be used by less-than-skilled people, even if it often fails at that. (Cable labelling, anyone?) Clear definitions of what complies to a standard can help enforce it. Here’s the notorious story of a USB-C cable that killed a Chromebook, and launched a career of explaining USB-C specifics online for [Benson Leung]. There’s many such failure stories, in fact. Today, we’ll go through USB-C contraptions which might or might not fail you, depending on how you use them. Continue reading “All About USB-C: Illegal Adapters”

A collage of three images. On top is the main PCB of the headphones, with a charger IC and the main MCU. On the bottom left, it shows ACOK and EN signals going to pullup resistors near the MCU. On bottom right, it shows the charger chip with its pinout overlaying it, highlighting the pads to be probed and later cut.

One Hacker’s Battle To Slightly Improve A Sadistic Sony Headset

One thing you won’t read in reviews of pricey Sony WH-1000XM3 headphones – if you choose them, you’re going to find yourself in a one-sided abusive relationship. A button press or low-battery notification makes the headphones scream at you, ignoring the actual sound volume of what you’re currently listening to. Once they’re discharged, they suddenly emit loud noises, lecture you about how the battery is low, then shut down. Oh, and you can’t use them as they’re charging – if your voicecall lasts longer than expected, you might find yourself being shouted at and forced to fumble around with wires, silently pleading for call participants to wait while you change over to a different headset.

On-PCB footprint for the IC, with two pads carefully cut in half as mentioned in the article[MisterHW] decided to dig in and figure out how to work around at least some of the shortcomings. Naturally, the “no charge while using” limit looked like low-hanging fruit, and a hefty usability improvement too – plus, he suspected the charge cutoff to be masking noise issues already abundant on these headphones. Some painful disassembly later, he was inspecting the charger IC , the MP2625, responsible for power management. Its signals were connected to the MCU using via-in-pad – and some pads had to be cut in half to disconnect the vias.

However, the laborious pad cutting and subsequent careful soldering didn’t turn out to be fruitful. Even with external control of the output inhibition pins, the shutoff still continued – something affected the circuit, whether it was VBUS detection, some other unnoticed via-connected pins on the charger, or sensing on D+/D-. About to run out of life force for this mod, [MisterHW] added a Qi charging circuit, powering a TP4056 wired in parallel with the MP2625. The mod, dubbed HW-1000XM3, made these headphones all that more reliable and less annoying – charger and MCU none the wiser.

Now, all that’s needed to charge these headphones is to slap a magnetic charger coil onto them, and it doesn’t interfere with voicecalls as much as the screaming and forced shutoffs do. Hopefully, Sony eventually learns to test their headphones by having humans use them – it’s far from the only gripes with this lineup, after all. We also hope that the voice notifications will be conquered eventually – this summer, we’ve seen a hacker firmware mod a Bluetooth speaker to make the sounds more pleasant. If your headphones are based on a relatively popular module, repurposing them might be even easier than that!

A DIY self-balancing robot

3D-Printed Self-Balancing Robot Brings Control Theory To Life

Stabilizing an inverted pendulum is a classic problem in control theory, and if you’ve ever taken a control systems class you might remember seeing pages full of differential equations and bode diagrams just to describe its basic operation. Although this might make such a system seem terribly complicated, actually implementing all of that theory doesn’t have to be difficult at all, as [Limenitis Reducta] demonstrates in his latest project. All you need is a 3D printer, some basic electronic skills and knowledge of Python.

The components needed are a body, two wheels, motors to drive those wheels and some electronics. [Limenitis] demonstrates the design process in the video below (in Turkish, with English subtitles available) in which he draws the entire system in Fusion 360 and then proceeds to manufacture it. The body and wheels are 3D-printed, with rubber bands providing some traction to the wheels which would otherwise have difficulty on slippery surfaces.

A PCB driving two stepper motors
The PCB has just a few components, with most of the complexity handled by plug-in modules.

Two stepper motors drive the wheels, controlled by a DRV8825 motor driver, while an MPU-9250 accelerometer and gyroscope unit measures the angle and acceleration of the system. The loop is closed by a Raspberry Pi Pico that implements a PID controller: another control theory classic, in which the proportional, integral and derivative parameters are tuned to adapt the control loop to the physical system in question. External inputs can be provided through a Bluetooth connection, which makes it possible to control the robot from a PC or smartphone and guide it around your living room.

All design files and software are available on [Limenitis]’s GitHub page, and make for an excellent starting point if you want to put some of that control theory into practice. Self-balancing robots are a favourite among robotics hackers, so there’s no shortage of examples if you need some more inspiration before making your own: you can build them from off-the-shelf parts, from bits of wood, or even from a solderless breadboard.

Continue reading “3D-Printed Self-Balancing Robot Brings Control Theory To Life”

Teensy Twofer Of Plug-In Emulated Retro CPUs

[Ted Fried] wrote in with not one but two (2!) new drop-in replacements for widespread old-school CPUs: the Zilog Z80 and the Intel 8088. Both of the “chips” run in cycle-accurate mode as well as in a super turbo mode, which can run so fast that you’ll need to use the Teensy’s internal RAM just to keep up.

Both of these designs have a hardware and software component. The PCBs basically adapt the pinout of the Teensy to the target CPU, with a bunch of 74VLC latches on board to do the voltage level conversion. The rest is a matter of emulating all of the instructions on the Teensy, which is more than fast enough to keep up. If this sounds familiar to you, it’s basically the same approach that [Ted] used last year to bring us his replacement for the 6502 found in the Apple ][ and Commodore 64.

Why would you want an emulated CPU when the originals are still available? [Ted] inherited a busted Osborne I, an ancient Z80 luggable. By replacing the original Z80 with his emulation, he could diagnose the entire system, which led him to discover some bad DRAM chips and get the old beast running again. Or maybe you just want to play IBM XT games at insane speeds?

And it looks like [Ted] has updated his 6502 emulation to include the undocumented C64 opcodes, so if you’re into that scene, you should be covered as well.

If any of this tickles your fancy, head over to [Ted]’s blog, microcore labs, and follow along. Although now that he’s covered most of the famous retrocomputers, we have to ask ourselves what processor is going to be next?

Tube Audio Amplifiers Needn’t Be Complex

There’s a mystique in audiophile circles about tube amplifiers. They can have a very nice sound which is attributed to their even-harmonic distortion, but they are often portrayed as requiring rare and expensive components. You don’t need matched gold-plated tubes and special transformers wound by Japanese monks with oxygen-free silver wire when the tube you’d have found in a TV back in the day paired with a repurposed mains transformer will do. [Mikremk] demonstrates this with a simple but effective amplifier using a PCL82 triode-pentode.

It’s a conventional tube amplifier circuit in which the triode is a preamplifier for the pentode power output stage. The pentode is running in class A mode, and the high impedance of its output is brought down to speaker impedance with that mains transformer. Best of all it doesn’t need a particularly high voltage, with the 40 V DC power coming from a DC-to-DC converter module.

These amplifiers could be found back in the day in some form in most consumer electronics, and remain a spectacularly cheap way to boast a tube amp in your hi-fi even if it might not always be the best possible amp.

Connecting Commercial 433 MHz Sensors To MQTT And Home Assistant With RTL-SDR

When [Elixir of Progress] was looking at setting up environmental sensors around their home to keep track of temperature, humidity and such, the obvious ideas of using WiFi-connected sensors didn’t work due to lack of WiFi range. Although Zigbee (Z-wave) sensors have longer range than WiFi, they are decidedly more expensive, proprietary and require a special transceiver hub. That’s where 433 MHz sensors for weather stations come into the picture.

The idea is simple: virtually all of those sensors – many of them rated for outdoor use – use the unlicensed 433 MHz spectrum that can easily be captured using cheap RTL-SDR (software defined radio) USB dongles. With the data stream from these sensors captured, the open source rtl_433 project enables automatic decoding of these data streams for a wide range of supported sensors.

While Realtek RTL2832-based and other RTL-SDRs can be found for quite cheap, it should be noted that these can run quite hot. Rather than heatsinking the IC, for this project it was elected to only listen sporadically and allow the RTL-SDR receiver to cool down in between listening sessions.

Getting the data from there into Home Assistant, InfluxDB or similar is easy, as rtl_433 can output the decoded data directly to an Influx database, MQTT broker as well as other formats. In this case, the data was sent via MQTT with the Home Assistant instance configured to treat these MQTT topics as sensors. With each sensor’s location carefully registered, this allows for setting up a dense, very low-power network of 433 MHz sensors for monitoring and home automation purposes.