# Computer Logic Spins With No Electricity

We’ve often said you can make a logic gate out of darn near anything. [The Action Lab] agrees and just released a video showing how he made some logic gates from chains and gears. Along the way, he makes the case that the moving chain is an analog for electric current. The demonstration uses a commercial toy known as Spintronics, but if you are mechanically handy, you could probably devise your own setup using 3D printing or gears.

A spring wound motor is a “battery.” Gears act like resistors and junctions to distribute “current” in multiple directions. Seeing series and parallel resistance as moving chains is pretty entertaining and might help someone new learn those concepts.

# Patching Together Logic Gates

The digital world offers many advantages over its analog relatives, the use of boolean logic among them. Some of the functions, like NOT, OR, and AND are fairly straightforward and line up nicely with their linguistic counterparts. Others are more elusive, like XOR and NAND. For those just getting their start in digital logic, this teaching tool allows different logic gates to be wired together with patch cables.

While [David] first thought to use 74-series logic circuits directly, a much more versatile solution was to use configurable custom logic — a feature found in AVR DA-series microcontrollers that allows for the creation of custom logic circuits without the need for external hardware or complex programming. He went with an ATmega4809 which is capable of supporting twelve gates which are depicted graphically on the board, where the patch cables can be connected between inputs and outputs from a set of switches on the left to another set of LEDs on the right. The microcontroller continually polls for connections, applies the correct logic via a lookup table, and lights the appropriate LED.

Even with only twelve gates, the amount of real-world analogs that can be created with this teaching tool are numerous and varied, from simple things like displaying traffic light patterns in the correct order to implementing a binary adder. It’s an excellent way to get started in digital logic or understanding gates, and much simpler than dealing with 74-series chips on a breadboard like many of us might have done, but those logic chips can be powerful tools to have on hand even in the modern world of microcontrollers.

# You Know You Can Do That With A 555

Hardly a week goes by that we don’t post a project where at least one commenter will lament that the hacker could have just used a 555. [Peter Monta] clearly gets that point of view. For a 555 design contest, he created both digital logic gates and an op amp, all using 555 chips. We can’t quite imagine the post apocalyptic world where the only surviving electronic components are 555 chips, but if that day were to come, [Peter] is your guy.

Using the internal structure of the 555, [Peter] formed a basic logic gate, an inverter, latches, and more. He also composed things like counters and seven-segment decoders. He had a very simple 4-bit CPU design in Verilog that he was going to attempt until he realized it would map into almost 400 chips (half of that if you’d use a dual 555, but still). If you built this successfully, we would probably post it, by the way.  You can see a video of the digital logic counter, below.

# Dual Complementary Optoisolator Logic

You’ve seen CMOS logic, you’ve seen diode-resistor logic, you’ve seen logic based on relays, and some of you who can actually read have heard about rod logic. [Julian] has just invented optoisolator logic. He has proposed two reasons why this hasn’t been done before: either [Julian] is exceedingly clever, or optoisolator logic is a very stupid idea. It might just be the former.

Inside each optoisolator is a LED and a phototransistor. There’s no electrical connection between the two devices, which is exactly what you need in something that’s called an isolator. [Julian] was playing around with some optoisolators one day to create a weird push-pull circuit; the emitter of one phototransistor was connected to the collector of another. Tying the other ends of the phototransistor to +5V and Gnd meant he could switch between VCC and VDD, with every other part of the circuit isolated. This idea whirled around his mind for a few months until he got the idea of connecting even more LEDs to the inputs of the optoisolators. He could then connect the inputs of the isolators to +5V and Gnd because of the voltage drop of four LEDs.

A few more wheels turned in [Julian]’s head, and he decided to connect a switch between the two optoisolators. Connecting the ‘input’ of the circuit to ground made the LED connected to +5V light up. Connecting the input of the circuit to +5 made the LED connected to ground light up. And deeper down the rabbit hole goes [Julian].

With a few more buttons and LEDs, [Julian] created something that is either an AND, NAND, OR NOR, depending on your point of view. He already has an inverter and a few dozen more optoisolators coming from China.

It is theoretically possible to build something that could be called a computer with this, but that would do the unique properties of this circuit a disservice. In addition to a basic “1” and “0” logic state, these gates can also be configured for a tri-state input and output. This is huge; there are only two universal gates when you’re only dealing with 1s and 0s. There are about 20 universal logic gates if you can deal with a two.

It’s not a ternary computer yet (although we have seen those), but it is very cool and most probably not stupid.

Video below.

# A Simple Nixie Clock With Logic Gates

Here is a very nice project that [Znaxque] finished a few months ago: a simple nixie clock made with logic gates only. In this build, the mains 50Hz is used as a time base instead of a 32KHz crystal that most readers here may use. In the very long term, this clock may actually be more precise than a crystal-based one as power companies in Europe adjust the mains frequency. However, at a given moment the difference between this clock and a reference may be as big as 60 seconds.

The design was sketched on a simple piece of paper and later made using salvaged ICs. [Znaxque] only bought the six IN-14 nixies for \$45 and the veroboard shown in the picture above. The BCD to Decimal decoders are 74141s and three buttons are present on the board to set minutes, hours, as well as resetting all the counters.

# Making Logic Gates Out Of Crabs

Building logic gates out of silicon is old hat, as is building them from discrete transistors, 555 chips, LEGO, and even gears. [Yukio-Pegio Gunji] and [Yuta Nishiyama] from Kobe University, along with [Andrew Adamatzky] from the aptly named Unconventional Computing Centre at the University of the West of England decided they needed a new way to build logic gates using crabs (PDF warning). Yes, the team successfully built functional logic gates using Mictyris guinotae, a species of soldier crab native to the South Seas.

The colonies of soldier crabs that inhabit the lagoons of Pacific atolls display a unique swarming behavior in their native habitat. When in a swarm of hundreds of individuals, the front of the swarm is driven by random turbulence in the group, while the back end of the swarm simply follows the leaders. Somehow, this is a successful evolutionary strategy, but it can also be exploited to build logic gates using only crabs.

The team constructed a Y-shaped maze for a pair of crabs to act as an OR gate. When two soldier crabs are placed at the top of the ‘Y’, they move forward until they meet and exit the maze through the output. This idea can be expanded to a slightly more complex AND gate, functionally identical to the electron-powered AND gate in a 7408 logic chip.

While the team has only made OR and AND gates – nothing functionally complete yet – there’s no reason to believe this crab-based system of computation couldn’t be expanded to a (very) basic calculator.