Linux Fu: The Infinite Serial Port

Ok, the title is a bit misleading. Like most things in life, it really isn’t infinite. But I’m going to show you how you can use a very interesting Linux feature to turn one serial port from a microcontroller into a bunch of virtual ports. In theory, you could create over 200 ports, but the reality is you will probably want to stick with fewer.

The feature in question is what’s known as pseudoterminal or sometimes a pty or pts. These special files were made to feed data to programs that expect to accept data from a terminal. The files provide two faces. To the client, it looks like any other terminal device. To the creator, though, it is just another file. What you write to that file goes to the fake terminal and you can read anything that is sent from the program connected to the terminal. You use these all the time, probably, without realizing it since running a shell under X Windows, for example, doesn’t attach to a real terminal, after all.

You could, of course, do the same trick with a composite USB device, assuming you have one. Also assuming you can find a working driver and get it working. However, many microcontrollers have a serial port — even one with a USB converter built-in — but fewer have full-blown USB hardware. Even the ones that do are often at odds with strange drivers on the PC side. Serial ports work and work well even on the simplest microcontrollers.

The Plan

The plan is simple enough. A Linux program listens to a real serial port and watches for special character sequences in the data stream. Those sequences will allow you to switch data so that the data stream will go to a particular terminal. Data coming back from the terminals will go to the real serial port after sending a sequence that identifies its source.

Continue reading “Linux Fu: The Infinite Serial Port”

A Kurzweil K2500 piano

Patching The Kurzweil K2500 Synthesizer

Despite being a computer with some extra chips, synthesizers today are still quite expensive. They used to cost far more, but we tend to think of them as instruments instead of computers. And just because it is an instrument doesn’t mean someone like [Peter Sobot] can’t crack it open and patch the OS inside.

The synth in question is a Kurzweil K2500, released in 1996 with a Motorola 68000. Rather than directly start pulling out parts on the kitchen table, [Peter] began by doing some online research. The K2500 operating system is still available online, and a quick pass through Ghidra showed some proper instructions, meaning the file likely wasn’t encrypted.

He found the part of the code that reads in a new firmware file and checks the header and checksum. Certain functions were very high in memory, and a quick consultation of the service manual yielded an answer: it was the volatile RAM. With that tidbit, [Peter] was able to find the function that copied chunks of the new ROM file to RAM and start decoding the file correctly. [Peter] changed a few strings, made sure the checksums were correct, and he was ready to flash. The actual tweaks that [Peter] are made are left up to the reader, but the techniques to get a working decompiled build and a viable ROM image to flash apply to many projects. One benefit is now the K2000 simulates correctly in MAME due to his spelunking. He has his flashing script up on GitHub for the curious.

Ghidra is perfect for this kind of thing. We’ve seen people tweaking their water coolers with it. It opens to door towards tweaking anything to your liking.

Ask Hackaday: Repair Café Or Not?

A huge part of the work our community does, aside from making things and doing a lot of talking about the things we’d like to make, involves repair. We have the skills to fix our own stuff when it breaks, we can fix broken stuff that other people throw out when it breaks, and we can fix broken stuff belonging to other people. As our consumer society has evolved around products designed to frustrate repairs and facilitate instead the sale of new replacements for broken items this is an essential skill to keep alive; both to escape having to incessantly replace our possessions at the whim of corporate overlords, and to fight the never-ending tide of waste.

Repair Cafés: A Good Thing

A German repair cafe
A German repair café. , Redaktion NdW, CC BY 2.0

So we repair things that are broken, for example on my bench in front of me is a formerly-broken camera I’ve given a new life, on the wall in one of my hackerspaces is a large screen TV saved from a dumpster where it lay with a broken PSU, and in another hackerspace a capsule coffee machine serves drinks through a plastic manifold held together with cable ties.

We do it for ourselves, we do it within our communities, and increasingly, we do it for the wider community at large. The Repair Café movement is one of local groups who host sessions at which they repair broken items brought in by members of the public, for free. Their work encompasses almost anything you’d find in a home, from textiles and furniture to electronics, and they are an extremely good cause that should be encouraged at all costs.

For all my admiration for the Repair Café movement though, I have chosen not to involve myself in my local one. Not because they aren’t a fine bunch of people or because they don’t do an exceptionally good job, but for a different reason. And it symbolically comes back to an afternoon over thirty years ago, when sitting in a university lab in Hull, I was taught how to wire a British mains plug. Continue reading “Ask Hackaday: Repair Café Or Not?”

Moon moving from inside a large glass sphere into screens of two vintage television sets

Blending Pepper’s Ghost, Synths, And Vintage TVs

We were recently tipped off to the work of [Joshua Ellingson], and digging in, we found an extensive collection of art and ongoing experiments, with synthesizers deforming and driving old black-and-white clips played on vintage television sets, objects jumping from screens into the real world and back, and cathode ray tube oscilloscopes drawing graphics in the air (loud sound!) (nitter). It’s recommended that you check out the short showcase videos we embedded below before you continue reading, because transcribing these visuals into words won’t do them justice.

In case you’re not up for a video, however, we shall try transcribing them anyway. Animals, shapes and figures appear in the real world, bound by glass spheres and containers, using the technique known as Pepper’s Ghost. A variety of screens used for creating that illusion – sometimes it’s a tablet, and sometimes it’s an old television set rested upside down on top of a glass aquarium. Vintage television sets are involved quite often in [Ellingson]’s experiments, typically found playing movie scenes and clips from their appropriate eras, or even used as one of the locations that a Pepper’s Ghost-enchanted object could move into — firmly a part of the same imaginary world turned real.

It’s not always that things move from a TV screen into their glass boundary, gaining an extra dimension in the process, but when it happens, the synchronization is impeccable. All of that is backed by — and usually controlled by — Moog synthesizer sounds, knob turns driving video distortions or aspects of an object movement. Not all of his clips have synthesizers, old TVs, or Pepper’s Ghost illusion in them, but every experiment of his contains at least two out of these three, working in unison to create impressions. And as much as the art value is undeniable, [Ellingson] also adds a whole lot of hacker value for us to take away!

[Ellingson] understands what goes into building optical illusions like Pepper’s Ghost — using a variety of different glassware, from Erlenmeyer flasks to teapots, producing a consistent and ongoing stream of new ideas with unique spins on them. His aim is to share and create beyond what his art can achieve, which is why he encourages us to try it out ourselves — with this one minute video of a quick Pepper’s Ghost build, using nothing but a generic tablet, an emptied-out plastic snow globe and a piece of cheap transparency film used for school projectors. If you want to go beyond, he’s made an extensive tutorial on illusions of the kind he does, their simplicities and complexities, and all the different ways you can build one.

We all benefit when an artist finds a technology and starts playing with it, closing the divide between technology and art – and by extension, the divide between technology and nature. Sometimes, it’s flowing light art installations where you are a boulder in route of plankton’s movement, other times, it’s through-hole component-packed printed circuit birds that sing not unlike the non-printed-circuit ones, or manipulation of CRT displays with function generator-driven coils to offset the beam and turn the image into a pattern of lines.

Continue reading “Blending Pepper’s Ghost, Synths, And Vintage TVs”

Wearable Electronics Takes The 3D Printing Route

There was a time when a cheap 3D printer was almost certain to mean an awful kit of parts, usually a so-called “Prusa i3”, which was of course as far away in quality from the machines supplied by [Josef Průša] himself as it’s possible to get. But as Chinese manufacturers such as Creality have brought machines with some quality and relaibility into the budget space these abominations have largely been crowded out. There are still cheap 3D printers to be found though, and it’s one of these that [3D Printing Professor] has mounted on his wrist (Nitter) for the ultimate in portable manufacturing.

The Easythreed K7 is a novel take on a 3D printer that positions the device more as a child’s toy than a desktop manufacturing solution. It’s somewhat limited in its capabilities by its tiny size but by all accounts it’s a usable machine, and at around $100 USD it’s about the cheapest 3D printer for sale on the likes of AliExpress. The wearable mount is probably best described as a forearm mount rather than a wrist mount, but has provision for a battery pack and a small roll of filament. And this contraption is claimed to work, but we maybe would think before committing to a day-long print with it.

This may be the smallest wearable 3D printer we’ve shown you so far, but it’s not the first. That achievement goes to Shenzhen maker [Naomi Wu], who strapped one on her back way back in 2017.

Thanks [J. Peterson] for the tip!

A vacuum tube computer next to a part of its schematic

This Colossal Vacuum Tube Computer Plays A Mean Game Of Pong

It doesn’t happen often that we report on new vacuum tube based computer designs. Today however, we’re pleased to introduce to you the Fast Reliable Electronic Digital Dot Computer, or Fred.Computer for short. It’s the brainchild of [Mike] who also brought us ENA, which we featured earlier.

Fred is a new design that reuses the parts that made up ENA. It has an 8-bit CPU, 16 bytes of RAM, 256 bytes of NVRAM, and runs at a clock speed of 11.3 kHz. With its 560 tubes drawing a total supply current of about 200 A it also provides a fair bit of heating to [Mike]’s study. The main logic is implemented through NOR gates, built from 6N3P dual-triode tubes sourced from Eastern Europe. These NOR gates are combined into more complex structures like latches, registers and even a complete ALU. A total of sixteen machine code instructions can be used to write programs; clever design allows Fred to perform 16, 32 or even 64-bit calculations with its 8-bit ALU.

A PCB with many reed relays
Need some RAM? There’s sixteen bytes right here.

An interesting addition is a new RAM design based on reed relays. [Mike] realised that relays are actually very similar to digital transmission gates and can therefore be used to make a simple static RAM cell. If you thought relays were too slow for RAM cells, think again: these reed relays can toggle at a mind-boggling 700 Hz, making them more than fast enough for Fred.

The main I/O device is a console that contains several pushbuttons as well as a 12 x 8 LED display. All of this makes Fred a fully-functional general-purpose computer that’s even capable of playing Pong (video, embedded below). [Mike]’s website is full of interesting detail on all aspects of vacuum tube computer design, and makes delightful reading for anyone tempted by the idea of building their own.

Can’t get enough of vacuum tube computers? Have a look at this 1-bit MC14500 implementation, marvel at this modern interpretation of an adding machine, or find out how IBM designed its logic in the 1950s.

Continue reading “This Colossal Vacuum Tube Computer Plays A Mean Game Of Pong”

The Deadliest Project On The Internet?

Before deciding whether the headline of this article is clickbait, please take a moment to watch the excellent video by [BigClive] below the break. And then, go to your local search engine and search the phrase “fractal burning death”. We’ll wait.

With that out of the way, we have to admit that when we saw the subject “The most deadly project on the Internet” on [bigclivedotcom]’s YouTube channel, we were a bit skeptical. It’s a big claim. But then we watched the video and did some googling. Sadly, there are over 30 documented cases of this project killing people, and more cases of permanent grievous injury.

The results of Fractal Wood Burning with High Voltage

Fractal Burning is a hobby where wood is burned by slathering wood in a conductive slurry and then applying high voltage to either side of the wood, usually using something not rated for high voltage, such as jumper cables. The High Voltage is supplied by an unmodified Microwave Oven Transformer. Other projects using MOT’s typically rip out the high voltage secondary windings and re-wind them as low voltage, high amperage transformers, and are using in Spot Welders and even arc welders.

As laid out by [BigClive], the voltages coming from an unmodified MOT, ranging from 2-3 KV (That’s between two and three thousand Volts) at a very low impedance are right up there in the “Don’t go near it!” territory.

Continue reading “The Deadliest Project On The Internet?”