Adding Portals To Quake

For those who have played Quake extensively, adding portals seems unnecessary, as teleporters are already a core part of the game mechanics. What [Matthew Earl] accomplishes is more of the Portal style of portal by rendering what is on the other side of the portal with a seamless teleportation transition.

Of course, Quake is an old game with a software renderer. Just throwing another camera into the scene, rendering to another texture, and then mapping that texture to the scene isn’t an option. Quake uses an edge rasterizer and generates spans along scanlines that track where edges intersect the current scanline. Rather than making expensive per-pixel comparisons, [Matt] stashes the portal spans and renders them in a second render, so even with multiple portals, only a single screen’s worth of pixels are rendered.

However, this technique has no near clipping plane, which means objects can appear in the portal that don’t make any sense as they are in front of the portal’s viewpoint. Luckily, Quake has an ingenious method for polygon occlusion: the BSP. While [Matt] is manually checking polygons, the BSP is the perfect tool for bisecting a room along a plane. It’s an incredible hack, and we’re excited to see Quake expand into a puzzle game. [Matt] dives into greater detail on how the software renderer works in another video that’s well worth a watch.

Perhaps the most incredible aspect of this technique is that it could run on original hardware. If you want to bring a little more Quake to life, why not get the Quake light flicker in your house? Video after the break.

Continue reading “Adding Portals To Quake”

A Peek Inside A 747 Fuel Gauge

It isn’t that often that we civilians get the chance to closely examine the fantastic internals that make up the modern marvels of avionic engineering. Luckily for us, [Glen] got his hands on a 747 fuel gauge and tore it down for our benefit. Not only does he tear it down, but he also builds a controller to display values.

Unlike your typical automotive fuel gauge that reports the distance from the top of the tank to the fuel level, this gauge reports the number of pounds of fuel. The fact that the indicator pictured above can go all the way to 95,000 pounds of fuel hits home the sheer scale of the fuel tanks on a 747 compared to your Volvo. Of course, where this gets interesting is the teardown with the metal sleeve removed. A 400 HZ AC servo motor moves the pointer and counter through the gearing with the help of a feedback potentiometer. The resistance tolerance is only 3%, as there are adjustment knobs on the back. But the linearity spec is only 0.06%, putting this part in a different grade from most pots.

One of the indicators was in worse shape than the others, so [Glen] got to work tapping into the internals of the gauge to drive the motor directly. A custom AC power supply repurposed from another project provided power, and a Raspberry Pi Pico was the PID controller. For [Glen], it isn’t all roses. Unfortunately, a noisy spot around 22,500 prevents accurate placement around there.

The code is up on GitHub, and we love having a gauge on the desk to show whatever value we like. If you are curious about more 747 instruments, this retro control unit might interest you.

Continue reading “A Peek Inside A 747 Fuel Gauge”

Nissan 300zx Dash Given A New Language

You don’t have to be a car enthusiast to recognize that the 1984 Nissan 300x dash is a work of art. The graceful swoops and multisegment VFDs evoke an aesthetic that reminds us of a particular era. Rather than replace his dash with something drab and modern, [Evan] modified his dash to accept input from newer devices. Many of the sensors that feed directly into the dash are becoming harder to find as the years wear on, and rather than spoof every old device, [Evan] looked at each gauge.

Temperature and oil pressure are variable resistance sensors, and by removing half the voltage divider, it becomes a variable voltage sensor, as modern temperature sensors can output a voltage from 0 to 5. The tachometer required tracing the signal through the PCB as it expects a pulse every time a cylinder fires. By simulating cylinder pulses with a function generator, [Evan] found the filtering circuit and the microcontroller pin monitoring it. An optoisolator to protect the delicate MCU makes it easy to pipe the signal directly in.

Of course, not everything needed to be modified. A vacuum sensor provides a signal to the dash to indicate how much power the engine produces, which is pretty easy to spoof with a teensy connected to the CAN bus. All these mods are easily reversible and allow [Evan] to keep rocking the iconic dash with a more modern engine.

It’s an incredible hack that offers a view into how to trace, understand, and hack old electronics. Of course, if you’re keeping old built-in car bits, why not keep the carphone but connect it to your smartphone?

Moving The Snail Mail To WiFi

[Zak] loves getting a notification on his phone when he gets physical mail. Enough to wire his mailbox slot with an ESP8285 to send him alerts. Previously, [Zak] used a cellular-based solution as the mailbox slot was not within WiFi range. However, the network provider for the A9G GPRS module decided to move to different towers, and suddenly the module didn’t work. Unable to find a provider that had sensible pricing, he got to work redesigning the module.

The mailbox was now in a WiFi network range, meaning he no longer had to use cellular. This dramatically simplifies the design and uses an ESP-M2 module (think ESP8266 but with embedded flash). To maximize battery life, the ESP is entirely off most of the time. A reed switch triggers a 74LVC1G98 NAND gate with an inverted input. This enables the 3.3 voltage regulator. A 4uF capacitor holds the voltage regulator on for 716ms, giving the ESP8266 time to boot and drive the second pin of the logic gate so it can stay on. Once the web request completes (a call to a PHP server that takes 4-5 seconds, including WiFi association), it pulls the pin low, and the system powers off. With a custom server, [Zak] can include a few goodies, such as temperature and humidity from the SHT32-DIS sensor.

So far, the system has been chugging along for seven months and over 110 mail notifications and has only dropped 0.3v, suggesting that the battery should hold out for another year or two before recharging. The code and schematics are up on GitHub. We love the low-power focus and the handy circuit explanation that makes it easy to use in other projects.

Hackaday Prize 2023: Bluetooth Spell To Speak

Have you ever known what you wanted to say but couldn’t figure out exactly how to say it? For some individuals, that’s all the time. The gap between intention and action can be a massive chasm. [Pedro Martin] is trying to help bridge that gap with a Bluetooth RPM letterboard.

[Soma Mukhopadhyay] developed Rapid Prompting Method (RPM) for teachers to work with students with autism. Gentle physical cues can help individuals complete motor movements, which can be used as a communication mechanism by pointing to a letterboard. Students can eventually move onto an tablet, but some students see the light as sensory noise or might associate it with playtime.

[Pedro] hopes that his letterboard will be able to provide tactile feedback for each letter to strengthen the connection the teacher is trying to establish. The letter board is a 22 by 14 grid (308 total) of touch electrodes connected to three MPR121 12-channel capacitive touch sensors connected to an ESP32 via I2C. Additionally, 60 LEDS controlled by two shift registers are interspaced between the touch electrodes. As only one LED will be on at a given time, [Pedro] can use the shift registers in a row/column setup since the current draw should be small. A piezo buzzer serves as additional feedback for the student. The ESP32 emulates a Bluetooth keyboard, so the teacher doesn’t have to keep track of what the student is spelling and can focus on RPM.

[Pedro] encountered the usual slew of debugging problems, such as ground bouncing, captive noise, and Bluetooth wonkiness. The code, KiCad, and STL files are on the Hackaday.io project page. If you want more accessibility-focused keyboards, look at the RP2040-based Intellikeys we saw recently.

Continue reading “Hackaday Prize 2023: Bluetooth Spell To Speak”

Motion Canvas Helps Get Your Point Across

Generating videos for projects can be difficult. Not only do you have to create the thing, but you film the process and cut it together in a story that a viewer can follow. Explaining complex topics to the viewer often involves a whiteboard of some sort, but as we all know, it’s not always a perfect solution. [Jacob] was working on a video game and making videos to document the progress and built a tool called Motion Canvas to help visualize topics like custom shaders. A few months ago, he decided to release it as an open source project.

Since then, it has seen quite a few forks and GitHub forks with a lively showcase on the community Discord. Looking at the docs, it is pretty easy to see why. The interface allows you to write procedural animations using the async semantics of TypeScript while still offering the GUI interface we expect from our video editors. In particular, the signal system allows dependencies to be defined between values. The system runs in Node, and the GUI runs in your browser locally while you edit the files in your terminal/notepad/IDE. CSS and Flexbox are available as the video is rendered to a web canvas and then compiled into a video via FFMPEG. The documentation is quite extensive, and it’s a great example of a tool someone built to fit a need they had going on to become something a little more fantastic.

This isn’t the first time we’ve discussed how to share your projects with the world, and we’ll freely admit we have a bit of bias toward encouraging folks to document their projects.

Continue reading “Motion Canvas Helps Get Your Point Across”

The Glitch That Brought Down Japan’s Lunar Lander

When a computer crashes, it usually doesn’t leave debris. But when a computer happens to be descending towards the lunar surface and glitches out, that’s a very different story. Turns out that’s what happened on April 26th, as the Japanese Hakuto-R Lunar lander made its mark on the Moon…by crashing into it. [Scott Manley] dove in to try and understand the software bug that caused an otherwise flawless mission to go splat.

The lander began the descent sequence as expected at 100 km above the surface. However, as it descended, the altitude sensor reported the altitude as much lower than it was. It thought it was at zero altitude once it reached about 5 km above the surface. Confused by the fact it hadn’t yet detected physical contact with the surface, the craft continued to slowly descend until it ran out of fuel and plunged to the surface.

Ultimately it all came down to sensor fusion. The lander merges several noisy sensors, such as accelerometers, gyroscopes, and radar, into one cohesive source of truth. The craft passed over a particularly large cliff that caused the radar altimeter to suddenly spike up 3 km. Like good filtering software, the craft reasons that the sensor must be getting spurious data and filters it out. It was now just estimating its altitude by looking at its acceleration. As anyone who has tried to track an object through space using just gyros and accelerometers alone can attest, errors accumulate, and suddenly you’re not where you think you are.

We know what you’re thinking: surely they would have run landing simulations to catch errors like these? Ironically they did, it’s just that after the simulations were run, the landing site for Hakuto-R was changed. Unfortunately, nobody thought to re-run the simulations, and now the Moon has a new lawn ornament,

We’ve previously written about why lunar landings are so hard. While knowing what led to the crash will hopefully prevent a similar fate for future missions, the reality is that remotely landing a robot on a dusty world without the help of GPS is fiendishly difficult and likely will be for some time.

Continue reading “The Glitch That Brought Down Japan’s Lunar Lander”