A set of solderless breadboards with op amps and their functions annotated

Op-Amp Challenge: Virtual Ball-in-a-Box Responds To Your Motions

With the incredible variety of projects submitted to our Op-Amp Contest, you’d almost forget that operational amplifiers were originally invented to perform mathematical operations, specifically inside analog computers. One popular “Hello World” kind of program for these computers is the “ball-in-a-box”, in which the computer simulates what happens when you drop a bouncy ball into a rigid box. [wlf647] has recreated this program using a handful of op amps and a classic display, and added a twist by making the system sensitive to gravity.

All the physics simulation work is performed by a set of TL072 JFET input op amps. Four are configured as integrators that simulate the motion of the ball in the X and Y directions, while four others serve as comparators that detect the ball’s collisions with the edges of the box and give it a push in the opposite direction. Three more op amps are connected to form a quadrature oscillator, which makes a set of sine and cosine waves that draw a circle representing the ball.

A miniature CRT viewfinder showing a small circleThe simulator’s output signals are connected to a tiny viewfinder CRT as well as a speaker that makes a sound whenever the ball hits one of the screen’s edges. This makes for a great ball-in-box display already, but what really makes this build special is the addition of an analog MEMS accelerometer that modifies the gravity vector in the simulation.

If you tilt or shake the sensor, the virtual box experiences a similar motion, which gives the simulation a beautiful live connection to the real world. You can see the result in a demo video [wlf647] recently posted.

The whole setup is currently sitting on a solderless breadboard, but [wlf647] is planning to integrate everything onto a PCB small enough to mount on the viewfinder, turning it into a self-contained motion simulator. Analog computers are perfect for this kind of work, and while they may seem old-fashioned, new ones are still being developed.

That Handheld 386SX Gets A Teardown

A few weeks ago our community was abuzz with the news of a couple of new portable computers available through AliExpress. Their special feature was that they are brand new 2023-produced retrocomputers, one with an 8088, and the other with a 386SX. Curious to know more? [Yeo Kheng Meng] has one of the 386 machines, and he’s taken it apart for our viewing pleasure.

What he found is a well-designed machine that does exactly what it claims, and which runs Windows 95 from a CF card. It’s slow because it’s an embedded version of the 386 variant with a 16-bit bus originally brought to market as a chip that could work with 16-bit 286-era chipsets. But the designer has done a good job of melding old and new parts to extract the most from this vintage chip, and has included some decidedly modern features unheard of in the 386 era such as a CH375B USB mass storage interface.

If we had this device we’d ditch ’95 and run DOS for speed with Windows 3.1 where needed. Back in the day with eight megabytes of RAM it would have been considered a powerhouse before users had even considered its form factor, so there’s an interesting exercise for someone to get a vintage Linux build running on it.

One way to look at it is as a novelty machine with a rather high price tag, but he makes the point that considering the hardware design work that’s gone into it, the 200+ dollar price isn’t so bad. With luck we’ll get to experience one hands-on in due course, and can make up our own minds. Our original coverage is here.

Protect Vintage Gear With Easy Capacitor Reforming

Having acquired some piece of old electronic equipment, be it a computer, radio, or some test gear, the temptation is there to plug it in as soon as you’ve lugged it into the ‘shop. Don’t be so hasty. Those power supplies and analog circuits often have a number of old aluminium electrolytic capacitors of unknown condition, and bad things can happen if they suddenly get powered back up again. After a visual inspection, to remove and replace any with obvious signs of leakage and corrosion, those remaining may still not be up to their job, with the oxide layers damaged over time when sat idle, they can exhibit lower than spec capacitance, voltage rating or even be a dead short circuit. [TechTangents] presents for us a guide to detecting and reforming these suspect capacitors to hopefully bring them, safely, back to service once more.

Capacitor failure modes are plentiful

When manufactured, the capacitors are slowly brought up to operating voltage, before final encapsulation, which allows the thin oxide layer to form on the anode contact plate, this is an electrically driven chemical process whereby a portion of the electrolyte is decomposed to provide the needed oxygen ions. When operating normally, with a DC bias applied to the plates, this oxidation process — referred to as ‘self-healing’ — continues slowly, maintaining the integrity of the oxide film, and slowly consuming the electrolyte, which will eventually run dry and be unable to sustain the insulating oxide layer.

If left to sit un-powered for too long, the anodic oxide layer will decay, resulting in reduced operating voltage. When powered up, the reforming process will restart, but this will be in an uncontrolled environment, resulting in a lot of excess heat and gases being vented. It all depends on how thin the oxide layer got and if holes have started to form. That is, if there is any electrolyte left to react – it may already be far too late to rescue.

If the oxide layer is sufficiently depleted, the capacitor will start to conduct, with a resultant self-heating and runaway thermal decomposition. They can explode violently, which is why there are score marks at the top of the can to act as a weak point, where the contents can burst through. A bit like that ‘egg’ scene in Aliens!

Yucky leaky capacitor. Replace these! and clean-up that conductive goo too.

The ‘safe’ way to reform old capacitors is to physically remove them from the equipment, and apply a low, controlled voltage below the rated value to keep the bias current at a low value, perhaps just 2 mA. Slowly, the voltage can be increased to push the current back up to the initial forming level, so long as the current doesn’t go too high, and the temperature is within sensible bounds. The process ends when the applied voltage is at the rated value and the current has dropped off to low leakage values.

A word of warning though, as the ESR of the reformed caps could be a little higher than design, which will result in higher operating temperature and potentially increased ripple current in power supply applications.

We’re really glossing over this subject fast here, but [TechTangents] was kind enough to link to some fine capacitor-related reading for those who need a primer. Here is a US DoD handbook for reforming capacitors with advice on storage shelf life, some tech notes on using electrolytic capactors from chemi-con, and a general capacitor guide from TDK. Reforming caps is nothing new, here’s an previous article about repairs, and something a bit more recent.

Continue reading “Protect Vintage Gear With Easy Capacitor Reforming”

Here’s How To Build A Tiny Compiler From Scratch

Believe it or not, building a tiny compiler from scratch can be as fun as it is accessible. [James Smith] demonstrates by making a tiny compiler for an extremely simple programming language, and showing off a hello world.

Here’s what happens with a compiler: human-written code gets compiled into low-level machine code, creating a natively-executable result for a particular processor. [James]’ compiler — created from scratch — makes native x64 Linux ELF binary executables with no dependencies, an experience [James] found both educational and enjoyable. The GitHub repository linked below has everything one needs, but [James] also wrote a book, From Source Code to Machine Code, which he offers for sale to anyone who wants to step through the nitty-gritty.

The (very tiny) compiler is on GitHub as The Pretty Laughable Programming Language. It’s tiny, the only data types are integers and pointers, and all it can do is make Linux syscalls — but it’s sufficient to make a program with. Here’s what the code for “Hello world!” looks like before being fed into the compiler:

; the write() syscall:
; ssize_t write(int fd, const void *buf, size_t count);
(syscall 1 1 "Hello world!\n" 13)
0

Working at such a low level can be rewarding, but back in the day the first computers actually relied on humans to be compilers. Operators would work with pencil and paper to convert programs into machine code, and you can get a taste of that with a project that re-creates what it was like to program a computer using just a few buttons as inputs.

It’s DOOM, But In Teletext

We’ve seen the 1993 id Software classic DOOM running on so many pieces of unexpected hardware, as “Will it run DOOM?” has become something of a test for any new device. But will it run in the circuitry of a 1970s or 1980s TV set? Not quite, but as [lukneu] has demonstrated, it is possible to render the game using the set’s inbuilt Teletext decoder.

Teletext is a technology past its zenith and which is no longer broadcast in many countries, but for those unfamiliar it’s an information service broadcast in the unseen lines hidden in the frame blanking period of an analogue TV transmission. Its serial data packets can contain both pages of text and rudimentary block graphics, and we’re surprised to learn, can include continuous streams to a single page. It’s this feature that he’s used, piping the game’s graphics as a teletext stream which is decoded by the CRT TV and displayed as a playable if blocky game.

Delving further, we find that DOOM is running on a Linux machine on which the teletext stream is created, and the stream is then piped to a Raspberry Pi which does the encoding on to its composite video output. More powerful versions of the Pi can run both processes on the same machine. The result can be seen in the video below, and we can definitely say it would have been mind-blowing, back when DOOM was king. There are plans for further refinement, of which we’d say that color would be the most welcome.

Continue reading “It’s DOOM, But In Teletext”

A Vintage Polaroid Camera Goes Manual

There once was a time when all but the most basic of fixed focus and aperture cameras gave the photographer full control over both shutter speed and f-stop. This allowed plenty of opportunity to tinker but was confusing and fiddly for non-experts, so by the 1960s and ’70s many cameras gained automatic control of those functions using the then quite newly-developed solid state electronics. Here in 2023 though, the experts are back and want control. [Jim Skelton] has a vintage Polaroid pack film camera he’s using with photographic paper as the film, and wanted a manual exposure control.

Where a modern camera would have a sensor in the main lens light path and a microcontroller to optimize the shot, back then they had to make do with a CdS cell sensing ambient light, and a simple analog circuit. He considered adding a microcontroller to do the job, but realized that it would be much simpler to replace the CdS cell with a potentiometer or a resistor array. A 12-position switch with some carefully chosen resistor values was added, and placed in the camera’s original battery compartment. The final mod brought out the resistors and switch to a plug-in dongle allowing easy switching between auto and switched modes. Result – a variable shutter speed Polaroid pack camera!

Sadly the film for the older Polaroid cameras remains out of production, though the Impossible Project in the Netherlands — now the heirs to the Polaroid name — brought back some later versions and have been manufacturing them since 2010. Hackers haven’t been deterred though and have produced conversions using Fuji Instax film and camera components, as with this Polaroid portrait camera, and [Jim]’s own two-camera-hybrid conversion.

A 4-Player Arcade Hidden Inside A Coffee Table

[Ed] from 50% Awesome on YouTube wanted to build a retro gaming system with a decent screen size, but doesn’t have a great deal of space to site it in, so a good compromise was to make a piece of useful furniture and hide all the fun parts inside.

Building an arcade machine usually involves a lot of wiring

This video two-part build log shows a lot of woodwork, with a lot of mistakes (happy accidents, that are totally fine) made along the way, so you do need to repeat them. Essentially it’s a simple maple-veneered plywood box, with a thick lid section hosting the display and some repositioned speakers. This display is taken from a standard LG TV with the control PCB ripped out. The power button/IR PCB was prised out of the bezel, to be relocated, as were the two downwards-facing speakers. The whole collection of parts was attached to a front panel, with copious hot glue, we just hope the heavy TV panel was firmly held in there by other means!

Continue reading “A 4-Player Arcade Hidden Inside A Coffee Table”