Thursday, December 28, 2023

Try This Brand New Analog Computer




Once upon a time, if you cracked open the pages of IEEE Spectrum you could spot full-page advertisements for analog computers, boasting of their ease of use and even—in the case of one model built into a cart with wheels—their portability. Engineers connected potentiometers and op-amps to set up representations of knotty differential equations and read the solutions as varying output voltages. But then digital computers conquered all, making analog computing as obsolete as radio coherers, mechanical televisions, and punched cards. Almost.

Like other written-off technologies that have seen comebacks such as vinyl records, Nixie tubes, and airships, analog computers have their adherents striving for a revival. In 2017, Yannis Tsividis wrote a feature article for Spectrum describing his research at Columbia University into the possibilities of digital-analog hybrid computer chips. The digital element offers ease of use, while the analog element provides energy-efficient solutions to many real-world types of problems.

When the article was published, I thought it made some compelling points, but as a casual experimenter I didn’t really have a good on-ramp to analog computing. That changed last year when I saw that startup Anabrid was offering a brand-new analog machine, the US $513 THAT.

Anabrid’s main gig is developing hybrid analog-digital chips of the sort pioneered by Tsividis.

It’s THAT is intended to raise awareness of the possibilities of modern analog computing. THAT is an acronym for The Analog Thing, and it’s a small open-source machine composed largely of discrete op-amp integrated circuits.

The THAT is smaller than the industrial-grade machines of yore, with just eight potentiometers for setting parameters and five integrators, along with a collection of supporting summers, inverters, comparators and so on. But the THAT is not just a cut-down toy. Multiple THATs can be chained together if more processing power is required, and a hybrid connection port is provided to make it easier to interface a THAT with a digital computer.

The components required for digital-analog hybrid computing. The analog computer is a panel with many socket at the top and two rows of knobs at the bottom. The THAT analog computer [left] has sockets for connecting various components, such as integrators, that correspond to mathematical operations. I displayed its outputs using an LCD screen [top right], protoboard interface [middle right] and Arduino Uno [bottom right].James Provost

Like the analog computers that once graced the advertisements in Spectrum, the THAT is programmed by wiring up elements that perform mathematical functions with short patch cables. You need to provide your own way to display the THAT’s output voltages—for me it felt only appropriate to hook up an old analog oscilloscope that I’d cadged from my older brother some time ago on general principles.

It was time to try some computing. As it’s been a minute since I last took down Erwin Kreyszig’s Advanced Engineering Mathematics to ponder differential equations, I was glad to see that the THAT’s accompanying manual is chock-full of examples and patch diagrams. Soon I was watching Euler spirals and simulations of neural spiking bloom into phosphorescent life, observing their evolution as I twisted potentiometers to adjust parameters.

It felt only appropriate to hook up an old analog oscilloscope I’d cadged from my older brother.

But I wanted to test out the hybrid approach. The natural choice was to build on Anabrid’s demo patch for a lunar-lander game: starting above the surface with a limited amount of fuel, a spacecraft is in grip of the moon’s gravity. The player must control the spacecraft’s engine throttle by turning a potentiometer so that the spacecraft lands before the fuel runs out.

With an oscilloscope, the game lacks a certain visual élan, with the fuel and altitude readings displayed as two horizontal lines. And a critical element of any lunar-lander game is also missing—determining whether or not the spacecraft’s speed at the moment of landing results in a graceful touchdown or a fresh crater. But these deficiencies could be addressed digitally.

A block diagram showing how analog computing elements are connected. On the left are the differential equations that model the flight of the lunar lander in their textbook form. On the right is how they are encoded into the elements provided by the THAT, such as integrators and comparators. The numbers inside circles refer to the potentiometers used to set the values of parameters.James Provost

For my digital computer and graphics display, I dug out an Arduino Uno and a small LCD touchscreen shield. The LCD display uses nearly all the pins on a regular Arduino Uno, but two analog inputs remained available to read the voltages representing altitude and fuel.

This did entail sacrificing some precision. Internally, the THAT represents quantities using a range between -10 and +10 volts. That full range would curdle the analog-to-digital convertors built into most microcontroller boards, so the THAT compresses and shifts that range for the hybrid port. There, voltages vary between 0 V and 3.3 V. The Arduino Uno operates at 5 V, and reads with 10-bit precision, so the altitude and fuel level end up approximated as numbers between 0 and 675. But that’s tolerable, given that my LCD has only 320 vertical pixels at most to display the spacecraft’s location above the surface.

I made up an Arduino protoboard with connectors for the LCD shield and a ribbon cable running to the THAT’s hybrid port. It is possible to exert some active control of the THAT via the hybrid port, for example, commanding it to reset to its initial conditions and solving an equation. However, with only two analog inputs available after accommodating the LCD shield, I was using the Arduino as a purely passive display.

I wrote a program to display the lunar surface and the player’s spacecraft in classic vector-like style. Fuel is displayed as a dwindling horizontal bar. Speed is computed and displayed by sampling the spacecraft’s altitude about 10 times per second and dividing the change in altitude by the time interval between measurements. When the altitude reaches zero, the speed is checked and the player is told if they landed safely, damaged their spacecraft, or were destroyed on impact. The program then waits until the THAT is reset for another attempt.

Somewhat to my surprise, my hybrid contraption worked smoothly. Spacecraft rose and fell on the display in accordance with the laws of physics encoded in the THAT’s nest of wiring, and lived or died depending on my skill with the throttle. As an intro to a form of computing now alien to nearly all engineers, the THAT is about as well designed an on-ramp as you could wish for. Now it’s time to take down Kreyszig and start exploring my own physics models!

This article appears in the January 2024 print issue as “A Brand New Analog Computer.”

Reference: https://ift.tt/XD5pswO

No comments:

Post a Comment

NATO’s Emergency Plan for an Orbital Backup Internet

On 18 February 2024, a missile attack from the Houthi militants in Yemen hit the cargo ship Rubymar in the Red Sea. With the crew evacu...