PCIe For Hackers: Extracting The Most

So, you now know the basics of approaching PCIe, and perhaps you have a PCIe-related goal in mind. Maybe you want to equip a single-board computer of yours with a bunch of cheap yet powerful PCIe WiFi cards for wardriving, perhaps add a second NVMe SSD to your laptop instead of that Ethernet controller you never use, or maybe, add a full-size GPU to your Raspberry Pi 4 through a nifty adapter. Whatever you want to do – let’s make sure there isn’t an area of PCIe that you aren’t familiar of.

Splitting A PCIe Port

You might have heard the term “bifurcation” if you’ve been around PCIe, especially in mining or PC tinkering communities. This is splitting a PCIe slot into multiple PCIe links, and as you can imagine, it’s quite tasty of a feature for hackers; you don’t need any extra hardware, really, all you need is to add a buffer for REFCLK. See, it’s still needed by every single extra port you get – but you can’t physically just pull the same clock diffpair to all the slots at once, since that will result in stubs and, consequently, signal reflections; a REFCLK buffer chip takes the clock from the host and produces a number of identical copies of the REFCLK signal that you then pull standalone. You might have seen x16 to four NVMe slot cards online – invariably, somewhere in the corner of the card, you can spot the REFCLK buffer chip. In a perfect scenario, this is all you need to get more PCIe out of your PCIe.

Continue reading “PCIe For Hackers: Extracting The Most”

Make Anything Clockwork With This Ridiculous Stick-On Device

Clockwork devices were popular right up until motors and electronics proved far more capable in just about every way. However, there’s something charming about a device you can wind up to make it do its thing. To recreate this feeling on modern technology, [Kousuke Saito] created a clockwork winder that you can fit to a wide variety of modern appliances. 

Somehow it just feels right.

The design is simple. It consists of a motor which is run from a battery. The two components are installed in a 3D printed housing with a magnet on the bottom. When the device is attached to a metal surface, a switch is activated which turns the motor on. The motor is attached to a large printed “winding key” that would be familiar to anyone who has used a clockwork toy or timepiece before. If the magnetic manner of activation is familiar, you might recall it from [Kousuke Saito’s] chirping cicada project.

It’s a silly build, to be sure. Regardless, when placed on certain appliances, like a simple fan, the motion really does imply that the clockwork winder is connected to the mechanism inside. It’s a falsehood, of course, but a joyous one.

We’ve featured some real clockwork hardware before, too, like these amazing time locks.

Continue reading “Make Anything Clockwork With This Ridiculous Stick-On Device”

Generating Instead Of Storing Meshes

The 64kB is a category in the demoscene where the total executable size must be less than 65,536 bytes, and at that size, storing vertexes, edges, and normal maps is a waste of space. [Ctrl-Alt-Test] is a French Demoscene group that has been doing incredible animations for the last 13 years. They’ve written an excellent guide on how they’ve been procedurally generating the meshes in their demos.

It all starts with cubes. By stacking them, overlaying them, reusing them, and tiling them you can get better compression than raw vertexes. Revolution was the next trick, as it uses just a few points, plotting it via Catmul-Rom splines, and revolving around an axis. The numbers are pairs of 32-bit floats and before compression, a detailed pawn on a chess board can weigh in at just 40 bytes. Just these few techniques can take you surprisingly far (as seen in the picture above).

They later worked on deforming cubes and placing them into a semi-randomized column, which happened to look a lot like plants. This isn’t the first generated vegetation we’ve seen, and the demoscene technique focused more on getting the shape and setting the mood rather than being accurate.

Signed distance fields are another useful trick that allows you to generate a mesh by implementing a signed distance function and then running a marching cubes algorithm on it. In a nutshell, a signed distance function just returns the distance to the closest point on a surface from a given point. This means you can describe shapes with just a single mathematical equation. As you can imagine, this is a popular technique in the demoscene world because it is so space efficient in terms of code and data. [Ctrl-Alt-Test] even has a deep dive into one of their projects, Immersion, with a breakdown of where the space is allocated.

There are plenty of other tips and tricks here, such as generating textures and developing a C++ hot reload system for faster iteration. It’s just incredible that the executable that plays the whole video is smaller than just a JPEG screenshot of the video. It’s a reminder that the demoscene is still fascinating with new tricks and experiences even as the hardware stays the same. Continue reading “Generating Instead Of Storing Meshes”

Compose Any Song With Twelve Buttons

Limitations placed on any creative process often paradoxically create an environment in which creativity flourishes. A simple overview of modern pop, rock, or country music illustrates this principle quite readily. A bulk of these songs are built around a very small subset of music theory, often varying no more than the key or the lyrics. Somehow, almost all modern popular music exists within this tiny realm. [DeckerEgo] may have had this idea in mind when he created this tiny MIDI device which allows the creation of complex musical scores using a keyboard with only 12 buttons.

The instrument is based around the Adafruit MacroPad, which is itself built on the RP2040 chip. As a MIDI device, it needs to be connected to a computer running software which can support MIDI instruments, but once its assembled and given its firmware, it’s ready to rock. A musician can select one of any number of musical scales to operate within, and the 12 keys on the pad are mapped to the 12 chromatic notes within that scale. It can also be used to generate drum tracks or other backing tracks to loop before being used to create melodies as well.

[DeckerEgo] took a bit of inspiration from an even simpler macro pad we featured before which is based around the idea that a shockingly high number of songs use the same four chords. His macro pad includes creation of chord progressions as well, but expands on that idea to make more complete compositions possible. And, for those looking to build their own or expand on this project, he has also made all of the source code available on his GitHub page.

Continue reading “Compose Any Song With Twelve Buttons”

A clear flexible PCB with a number of gold electrodes on one end. It is wrapped over a black cable to demonstrate its flexibility. A set of dashed white lines goes from one end to a zoomed in image of the circuit structure inset in the top right of the image.

Biohybrid Implant Patches Broken Nerves With Stem Cells

Neural interfaces have made great strides in recent years, but still suffer from poor longevity and resolution. Researchers at the University of Cambridge have developed a biohybrid implant to improve the situation.

As we’ve seen before, interfacing electronics and biological systems is no simple feat. Bodies tend to reject foreign objects, and transplanted nerves can have difficulty assuming new roles. By combining flexible electronics and induced pluripotent stem cells into a single device, the researchers were able to develop a high resolution neural interface that can selectively bind to different neuron types which may allow for better separation of sensation and motor signals in future prostheses.

As is typically the case with new research, the only patients to benefit so far are rats and only on the timescale of the study (28 days). That said, this is a promising step forward for regenerative neurology.

We’re no strangers to bioengineering here. Checkout how you can heal faster with electronic bandages or build a DIY vibrotactile stimulator for Coordinated Reset Stimulation (CRS).

(via Interesting Engineering)

The BLE Datalogging Scale Of A Thousand Uses

Whether you’re making coffee or beer or complex chemicals, weighing your ingredients carefully and tracking them is key to getting good results. [Tech Dregs] decided to build a logging scale that would work seamlessly with his smartphone, and shared the design on YouTube.

The design begins with a Greater Goods manual electronic scale, which was chosen for its convenient design and 750 gram load cell. Once cracked open, [Tech Dregs] pulled out the original PCB to replace it with his own. Only the original buttons are used, with an Seed Xiao ESP32-C3 replacing the scale’s original brains. The original LCD screen was swapped out for an OLED display, and it also got a rechargeable lithium battery for better usability.

The real value of the project, though, is its communication capability. It’s able to talk to an Android smartphone over Bluetooth Low Energy. Thanks to a custom app, [Tech Dregs] is able to log weight readings from the scale over time and even graph them live on the smartphone. As a demonstration, the scale is used to log the weight of a cup as it fills with a shot of coffee, which should serve [Tech Dregs] well in his coffee automation projects.

We’ve seen bathroom scales hacked before, too, with similar connectivity upgrades.

Continue reading “The BLE Datalogging Scale Of A Thousand Uses”

Stripped Clock Wheel Gets A New Set Of Teeth, The Hard Way

If there’s one thing we’ve learned from [Chris] at Clickspring, it’s that a clockmaker will stop at nothing to make a clock not only work perfectly, but look good doing it. That includes measures as extreme as this complete re-toothing of a wheel from a clock. Is re-toothing even a word?

The obsessive horologist in this case is [Tommy Jobson], who came across a clock that suffered a catastrophic injury: a sudden release of energy from the fusee, the cone-shaped pulley that adjusts for the uneven torque created by the clock’s mainspring. The mishap briefly turned the movement into a lathe that cut the tops off all the teeth on the main wheel.

Rather than fabricate a completely new wheel, [Tommy] chose to rework the damaged one. After building a special arbor to hold the wheel, he turned it down on the lathe, leaving just the crossings and a narrow rim. A replacement blank was fabricated from brass and soldered to the toothless wheel, turned to size, and given a new set of teeth using one of the oddest lathe setups we’ve ever seen. Once polished and primped, the repair is only barely visible.

Honestly, the repaired wheel looks brand new to us, and the process of getting it to that state was fascinating to watch. If the video below whets your appetite for clockmaking, have we got a treat for you.

Continue reading “Stripped Clock Wheel Gets A New Set Of Teeth, The Hard Way”