Hackaday Links Column Banner

Hackaday Links: June 12, 2022

“Don’t worry, that’ll buff right out.” Alarming news this week as the James Webb Space Telescope team announced that a meteoroid had hit the space observatory’s massive primary mirror. While far from unexpected, the strike on mirror segment C3 (the sixth mirror from the top going clockwise, roughly in the “south southeast” position) that occurred back in late May was larger than any of the simulations or test strikes performed on Earth prior to launch. It was also not part of any known meteoroid storm in the telescope’s orbit; if it had been, controllers would have been able to maneuver the spacecraft to protect the gold-plated beryllium segments. The rogue space rock apparently did enough damage to be noticeable in the data coming back from the telescope and to require adjustment to the position of the mirror segment. While it certainly won’t be the last time this happens, it would have been nice to see one picture from Webb before it started accumulating hits.

Continue reading “Hackaday Links: June 12, 2022”

A Sipeed Tang Nano 9k board on a Thinkpad keyboard, with an LCD panel attached to it

An Open Toolchain For Sipeed Tang Nano FPGAs

[Sevan Janiyan] shares their research on putting an open FPGA toolchain together. Specifically, this is an open toolchain for the Sipeed Nano Tang FPGAs, which are relatively cheap offerings by Sipeed from China. The official toolchain is proprietary and requires you to apply for a license that’s to be renewed every year. There’s a limited educational version you can use more freely, but of course, that’s not necessarily sufficient for comfortable work.

This toolchain relies on the apicula project, an effort to reverse-engineer, reimplement and document the Gowin FPGA bitstream format, as well as the gowin integration for nextpnr (an open tool for FPGA place-and-route). With a combination of yosys, apicula, nextpnr and openFPGAloader, [Sevan] put together a set of commands you can use to build gateware for your Nano Tang FPGAs – without any proprietary limitations blocking your way. They show a basic blinkie demo, and also a demo that successfully operates a parallel LCD connected to the board.

The availability of open toolchains for FPGAs has always been somewhat of a sore point. Wondering about open FPGA toolchains? This Supercon 2019 talk by Tim [Mithro] Ansell will get you up to speed!

We thank [feinfinger (sneezing)] for sharing this with us!

iPhone 6 with Linux boot log on its screen

Boot Mainline Linux On Apple A7, A8 And A8X Devices

[Konrad Dybcio] tells about his journey booting Linux on A7/8/8X processors, playing around with an old iPhone 5 he’s got in a drawer. It’s been a two-year “revisit every now and then” journey, motivationally fueled by the things like Linux on M1 Macs announcement. In the end, what we have here is a way to boot mainline Linux on a few less-than-modern but still very usable iPhones, and a fun story about getting there.

[Konrad]’s work is based on the Sandcastle project research, but he couldn’t quite figure out how to make their code work, and had to make sense of it as he went. At some point, he got stuck on enabling the MMU, which was the main roadblock for a while. Joined by another developer intrigued by Apple hardware, they were hacking away at it, developing tools and neat tricks on their way, but to no avail. With the framebuffer accessible and no other decent debugging methods in sight, he tells about a code snippet they wrote that printed register values as valid barcodes Continue reading “Boot Mainline Linux On Apple A7, A8 And A8X Devices”

A disassembled EV charging station, and a working one

Modernizing An Outdated Electric Vehicle Charging Station

One of the drawbacks of being an early adopter is that you might end up investing in equipment that becomes obsolete rather quickly. Although it’s clear that electric vehicles are here to stay, those who bought a charging station for their EV a few years ago may find it slow and incompatible with modern cars or billing networks, necessitating an upgrade to one of the latest models.

If you don’t mind tinkering, these older chargers can provide an excellent base to construct your own state-of-the-art charging station, as [James] over at Diary-of-a-Geek did. He bought a Chargepoint CT2000 series charger and installed a brand-new charging unit inside based on OpenEVSE components. The CT2000 is an older model that’s no longer manufactured, and although it can still connect to Chargepoint’s network, a subscription renewal would cost several thousand dollars. [James] was not willing to make that investment for a unit that he was going to install at home anyway, so he decided to buy replacement parts from OpenEVSE, a supplier of open-source EV charging stations and components.

An OpenEVSE controller mounted on a bracket
The OpenEVSE charging controller sitting on the ChargePoint bracket

The insides of a charging station are actually pretty simple, since the real battery charger is inside the car: the station just contains a beefy contactor to switch the AC current on or off, along with some circuitry to measure the current flowing and an interface to connect to a payment network of some sort. The first step therefore was to hook up the contactor and current transformer to the OpenEVSE controller. This was easy since the new part was way smaller than the original and could simply be mounted onto an existing bracket.

The second step was to provide the user interface and network connections. [James] removed the displays and wireless systems from the head unit and cut a large hole into the front to provide space for new LCD displays. A set of status LEDs plus WiFi connections completed the system, which now looks just as professional as the original. Tests showed that the LCDs were hard to read in bright sunlight, so [James] replaced them with OLED displays, but otherwise the renovated charging station worked perfectly.

Of course, working with high voltages and large currents requires the proper skills and tools, which [James] clearly has available; he also stresses the importance of including a ground-fault circuit interruptor in any equipment placed outdoors. He isn’t the only one to make his own charging station either. If you’re confused by the many types of EV charging connectors, have a look at our recent article describing all those different plugs and sockets. Thanks for the tip, [Kevin]!

Screenshot of the EFI shell, showing doom.wad and doom.efi in 'ls' command output, and then doom.efi being loaded

DOOM? In Your BIOS? More Likely Than You Think!

We’ve seen hackers run DOOM on a variety of appliances, from desk phones to pregnancy tests. Now, the final frontier has been conquered – we got DOOM to run on an x86 machine. Of course, making sure we utilize your PC hardware to its fullest, we have to forego an OS. Here are two ways you can run the classic shooter without the burden of gigabytes of bloated code in the background.

[nic3-14159] implemented this first version as a payload for coreboot, which is an open-source BIOS/UEFI replacement for x86 machines. Some might say it’s imperfect — it has no sound support, only works with PS/2 keyboards, and exiting the game makes your computer freeze. However, it’s playable, and it fits into your BIOS flash chip.

But what if your computer hasn’t yet been blessed with a free BIOS replacement? You might like this UEFI module DOOM port instead, originally made by [Warfish] and then built upon by [Cacodemon345]. To play this, you only need to compile the binary and an UEFI shell, then use the “Load EFI Shell” option in your UEFI menu – something that’s widely encountered nowadays. This version also lacks sound, but is a bit more fully featured due to all the facilities that UEFI provides for its payloads.

Of course there’s far more efficient ways to slay demons on your computer, but even if they aren’t necessarily practical from a gaming standpoint, these two projects serve as decent examples of Coreboot and UEFI payloads. BIOS replacements like coreboot take up so little space, we’ve even seen Windows 3.1 fit alongside coreboot in the BIOS chip. Wondering what UEFI is, even? Here’s a primer for you. And, if you don’t mind the exceptional bloat of a stripped-down Linux install, here’s a Linux image built from the ground up to run DOOM specifically.

Continue reading DOOM? In Your BIOS? More Likely Than You Think!”

RC Car Repair With Beer Can Solder Stencil

Sometimes it might seem as if your electronics are just jinxed. For [Niva_v_kopirce] it was the control board of his nephew’s RC car that kept frying the transistors. In situations like this, you can either throw it in the bin, invest your time in troubleshooting, hoping to find the error and try to fix it then, or get creative. He chose the latter, and designed and etched a replacement board.

Of course, etching your own PCB isn’t that noteworthy for the average Hackaday reader, although [Niva_v_kopirce] did go the extra mile and added purple solder mask to it, turning the stylishness definitely up to 11. This is also where it gets interesting, when you think of the solder mask as complementary layer for a solder paste stencil. Growing tired of manually applying solder paste, he thought to give a DIY stencil a try this time — using a beer can.

After cutting the can open and flattening it, along with some sanding, he transferred the cutouts from the solder mask onto it, and started etching holes in it. While the result may not be exactly precise, it did the job, especially for a homemade built.

Despite their convenience, stencils are still a rather exotic addition for hobbyists as they rarely pay off for a one-off project with limited SMD component usage. But maybe this was a new inspiration for you now. And if etching metal is outside your comfort zone, cutting plastic can be an alternative, as well as 3d printing.

A PCB with an Arduino Micro Pro, RCA connectors and a sub-D connector

Odd Inputs And Peculiar Peripherals: Using A Commodore Light Pen On A Modern(ish) Computer

If you worked with computers back in the 1970s, there’s a good chance you used a light pen at some point: a simple input device that you’d point at the CRT screen to highlight text, choose menu options or manipulate graphic objects. Although ubiquitous in those days, the light pen lost the battle for ergonomics to the humble mouse and was all but extinct by the late 1980s. Touchscreen styluses implement a similar function today, but touching the screen somehow doesn’t feel the same as simply pointing at it.

We therefore applaud [Maciej Witkowiak]’s efforts to bring the light pen into the 21st century by building a USB interface for a Commodore 64/128 light pen. At its heart is an Arduino Micro Pro that implements the USB HID protocol to communicate with any modern computer. It connects to the classic light pen as well as to the computer’s analog display signal and uses those to calculate the delay between the video synchronization pulses and the light pen’s output. The sync pulses are extracted from the video signal by an LM1881, a sync separator chip that will be familiar to anyone who’s worked with analog video signals.

The Arduino calculates the light pen’s position based on the measured timing intervals and reports it to the computer, using the absolute positioning mode that’s also used by things like drawing pads. [Maciej] demonstrates his system in the video embedded below, in which he uses it to operate the menus on an X window system. A great success then, although there’s one catch: light pens only work on CRT displays, so you’ll need to drag one of those big glass beasts out of storage if you want to try this yourself.

We’ve featured the Commodore light pen before in this odd gaming input device. A similar device built with a discrete LED matrix is a good illustration of the light pen’s working principle.

Continue reading “Odd Inputs And Peculiar Peripherals: Using A Commodore Light Pen On A Modern(ish) Computer”