Ternary RISC Processor Achieves Non-Binary Computing Via FPGA

You would be very hard pressed to find any sort of CPU or microcontroller in a commercial product that uses anything but binary to do its work. And yet, other options exist! Ternary computing involves using trits with three states instead of bits with two. It’s not popular, but there is now a design available for a ternary processor that you could potentially get your hands on.

The device in question is called the 5500FP, as outlined in a research paper from [Claudio Lorenzo La Rosa.] Very few ternary processors exist, and little effort has ever been made to fabricate such a device in real silicon. However, [Claudio] explains that it’s entirely possible to implement a ternary logic processor based on RISC principles by using modern FPGA hardware. The impetus to do so is because of the perceived benefits of ternary computing—notably, that with three states, each “trit” can store more information than regular old binary “bits.” Beyond that, the use of a “balanced ternary” system, based on logical values of -1, 0 , and 1, allows storing both negative and positive numbers without a wasted sign bit, and allows numbers to be negated trivially simply by inverting all trits together.

The research paper does a good job of outlining the basis of this method of computing, as well as the mode of operation of the 5500FP processor. For now, it’s a 24-trit device operating at a frequency of 20MHz, but the hope is that in future it would be possible to move to custom silicon to improve performance and capability. The hope is that further development of ternary computing hardware could lead to parts capable of higher information density and lower power consumption, both highly useful in this day and age where improvements to conventional processor designs are ever hard to find.

Head over to the Ternary Computing website if you’re intrigued by the Ways of Three and want to learn more. We perhaps don’t expect ternary computing to take over any time soon, given the Soviets didn’t get far with it in the 1950s. Still, the concept exists and is fun to contemplate if you like the mental challenge. Maybe you can even start a rumor that the next iPhone is using an all-ternary processor and spread it across a few tech blogs before the week is out. Let us know how you get on.

How I 3D Printed My Own Lego-Compatible Train Bridges

Lego train sets have been available for decades, now. The Danish manufacturer long ago realized the magic of combining its building block sets with motors and plastic rails to create real working railways for children and adults to enjoy. Over the years, Lego has innovated through several generations of trains, from classic metal-rail systems to the more modern IR and later Bluetooth-controlled versions. The only thing largely missing over all that time, though…? A bridge!

Yes, Lego has largely neglected to build any bridges for its mainstream train lineup. There are aftermarket solutions, and innovative hacks invented by the community, all with their own limitations and drawbacks. This glaring oversight, though, seemed like a perfect opportunity to me. It was time to fire up the 3D printer and churn out a fully-realized Lego rail bridge of my very own.

Bridges Are Hard

I’ve experimented with building Lego rail bridges before, using standard track and household objects like cardboard, books, and beer. Unfortunately, it can be very difficult to support the track evenly at the joints which occur every 150mm, and derailments are common. Credit: author

There’s actually a good reason Lego bridges aren’t a big thing in the company’s own product lineup, beyond a few obscure historical parts. This is probably because they aren’t very practical. Lego locomotives are not particularly strong haulers, nor do they have excellent grip on the rails, and this makes them very poor at climbing even mild grades. Any official Lego bridge would have to be very long with a shallow slope just to allow a train to climb high enough to clear a locomotive on a track below. This would end up being an expensive set that would probably prove unpopular with the casual Lego train builder, even if the diehard enthusiasts loved it. 

There are third-party options available out there. However, most rely on standard Lego track pieces and merely combine them with supports that hold them up at height. This can work in some cases, but it can be very difficult to do cool things like passing a Lego train under a bridge, for example. It can be hard to gain enough height, and the short length of Lego track pieces makes it hard to squeeze a locomotive between supports. Continue reading “How I 3D Printed My Own Lego-Compatible Train Bridges”

LEGO Machine Plays Tic-Tac-Toe Without Electronics

Tic-Tac-Toe is a relatively simple game, and one of the few which has effectively been solved for perfect play. The nature of the game made it possible for [Joost van Velzen] to create a LEGO machine that can play the game properly in an entirely mechanical fashion.

The build features no electronics to speak of. Instead, it uses 52 mechanical logic gates and 204 bits of mechanical memory to understand and process the game state and respond with appropriate moves in turn. There are some limitations to the build, however—the game state always begins with the machine taking the center square. Furthermore, the initial move must always be played on one of two squares—given the nature of the game though, this doesn’t really make a difference.

It’s also worth heading over to the Flickr page for the project just to appreciate the aesthetics of the build. It’s styled in the fashion of an 18th-century automaton or similar. It’s also been shared on LEGO Ideas where it’s raised quite a profile.

If you’ve ever wanted to think about computing in a mechanical sense, this build is a great example of how it can be done. We often see some fun LEGO machines around these parts, from massive parts sorters to somewhat-functional typewriters.

Continue reading “LEGO Machine Plays Tic-Tac-Toe Without Electronics”

ATtiny85 Plays The Chrome Dinosaur Game

If you’ve ever had your internet connection drop out while running Chrome, you’ve probably seen a little dinosaur pop up to tell you what’s going on. You might have then tapped a key and learned that it’s actually a little mini-game built into the browser where you have to hop your intrepid T-rex over a bunch of cactii. [Albert David] is well familiar with this little Easter egg, and set about building a system to automatically play the game for him.

The build uses an Digispark ATtiny85 microcontroller board to run the show. It’s set up to plug in to a PC and enumerate as a USB HID device, so it can spoof the required key presses to play the game. To sense the game state, the device uses a pair of LM393 light-dependent resistor comparator modules. The bottom sensor is used to detect cactus obstacles in the game, while the upper sensor detects flying bird obstacles. Armed with this information, the microcontroller can deliver keypresses at just the right time to jump over cactuses while dodging birds overhead.

[Albert] does a great job of explaining how the project came together in the write-up. There are also useful calibration instructions that indicate how to place the sensors and tweak their thresholds so they trigger reliably and help you net a suitably high score.

Interestingly enough, this isn’t the first time we’ve seen a microcontroller take Chrome’s hidden game for a spin. The game itself has become popular enough that we’ve also seen it ported to other platforms.
Continue reading “ATtiny85 Plays The Chrome Dinosaur Game”

Building A Rad Bluetooth Speaker That Didn’t Really Exist

[Nick] came across an awesome Bluetooth speaker online, only, there was a problem. It didn’t really exist—it was just a render of a device that would be nice to have. Of course, there was an obvious solution—[Nick] just had to build the device for real!

The key to the aesthetic of the build is the external case. [Nick] was able to recreate the rough design of the rendered device in SolidWorks, before having the components produced on a resin 3D printer which provided excellent surface finish. Internally, the Bluetooth audio receiver was cribbed from an old pair of wireless headphones. However, a little more oomph was needed to make the speaker really usable, so [Nick] hooked the audio output up to a small MAX98306 amplifier board and a pair of 3 W speakers. The tiny tactile buttons from the headphone PCB wouldn’t do, either. For a nicer feel, [Nick] hacked in a set of four hall effect keyboard switches to control the basic functions.

The result is a Bluetooth speaker that looks as rad as the rendered unit, only you can actually take it outside and bump some tunes! It recalls us of some fine up-cycling work we’ve seen done to vintage 80s radios in a similar vibe.

Continue reading “Building A Rad Bluetooth Speaker That Didn’t Really Exist”

Relays Run This Balanced Ternary Adder

If you’re at all familiar with digital computing, you’ll know that computers represent everything in binary values of one and zero. Except that’s not technically the only way to do computing! You can use any numerical system you like if you build your hardware to suit, as [Jeroen Brinkman’s] ternary adder demonstrates.

As you might guess from the prefix, “ternary” refers to a base-3 numerical system. In this case, [Jeroen] implemented a balanced ternary system, which effectively uses values of -, 0, and + instead of just 1 and 0. The adder is built using relay logic, and is designed to handle 4 trits—the ternary equivalent of bits, where each trit can have one of the three aforementioned states. On a hardware level, trit states are represented with voltages of -5, 0, or 5 V in this case, and are handled with special tri-state switching elements that [Jeroen] constructed out of simple SPDT relays.

[Jeroen]’s write-up does a great job of explaining both ternary basics as well as the functioning of the adder. It’s also quite intuitive because it’s possible to see the relays clicking away and the LEDs flashing on and off as the circuit does its work to add values stored in ternary format.

If you’re trying to get your head around ternary computing from the very lowest level, this project is a great place to start. We’ve seen base 3 hardware built before, too—like this simple ternary computer lashed together from accessible components.

If you’re cooking up your own computing apparatus that uses some weird number system or something, remember—we’d love to hear about it on the tipsline!

Building A Neatly Framed Word Clock

Reading analog clocks is a pretty straightforward skill to learn. However, if you’ve already learned to read and don’t want to pick up the extra skill, a word clock is a perfect solution for telling time. [povey_tech] found some nice examples in the wild but didn’t appreciate the price, so he set about building his own.

The build is based around an ESP32 microcontroller. While many projects in this vein would use the onboard wireless connectivity to query network time servers, in this case, the board relies on the user manually setting the time and a DS1307 real-time-clock module to keep a steady tick. Also onboard is a VEML7700 ambient light sensor, which the microcontroller uses to control the brightness of the WS2812 LEDs inside the board.

The words themselves are laser cut out of acrylic panels, with everything set inside a tidy oak picture frame. A layer of anti-reflective glass in front helps cut down on glare, while [povey_tech] was so kind as to implement two LEDs per letter to allow for lovely color gradients to be displayed. Configuring the clock is easy thanks to a webpage hosted on the ESP32 that allows for control of dimming modes, colors, and setting the time. Home Assistant integration is something planned for the future.

We’ve seen many great word clocks over the years. Perhaps the biggest leap forward in this world was the development of the addressable LED strip which made constructing these clocks much easier.

Continue reading “Building A Neatly Framed Word Clock”