Designing A Single Instruction Computer

Today’s computers are unimaginably complex, and so complicated it’s nearly impossible for anyone to comprehend everything a CPU can do in excruciating detail. It wasn’t always like this – the early CPUs of the 70s and 80s were relatively simple and can easily be recreated at the individual gate level. CPUs can be even simpler, as [Jack Eisenmann] demonstrates with a single instruction computer, the DUO Compact 2, made entirely out of 74-series logic chips and a bunch of memory.

[Jack] has a long history of building strange computers out of individual chips, including a TTL logic CPU and a significantly more complicated single instruction computer. The latest, though, is as simple as it gets. It’s just twenty chips, capable of calculating prime numbers, sorting strings, and everything else a computer is able to do.

With every one-instruction computer, there is the obvious question of what instruction this computer uses. For the DUO Compact 2 it’s a single instruction that accepts three arguments, A, B, and C. The instruction copies a byte from A to B, then jumps to the instruction at C. Is it even possible for a computer to add two numbers with this instruction? Yes, if you have massive look up tables stored in 2 Megabytes of Flash and 512 kB of RAM.

In the video below, [Jack] goes over how his tiny computer works and demonstrates prime number generation (it’s slow), string sorting (also slow), and displaying ’99 bottles of beer on the wall’ on the computer’s LCD. All the files to replicate this computer are available on [Jack]’s webpage, along with an emulator in case you don’t want to break out a breadboard for this one.

Continue reading “Designing A Single Instruction Computer”

3D Internal Structure For Better 3D Printed Objects

Makerbot is in the gutter, 3D Systems and Stratasys stock is only a shadow of their 2014 glory, but this is the best year 3D printing has ever had. Machines are now good and cheap, there’s a variety of various thermoplastic filaments, and printing useful objects – instead of just plastic trinkets – is becoming commonplace.

Gradient-Grid
The standard rectilinear infill from Slic3r

There’s one area of 3D printing that hasn’t seen as much progress, and it’s the software stack. Slicing, the process of turning a 3D object into a Gcode file for a printer has been basically the same for the last few years. Dual extrusion is still a mess, and automated bed leveling is still in its infancy.

One aspect of slicing that has been severely overlooked is infill. Obviously, you don’t want to print plastic trinkets completely solid – only the outside surface matters, and a part with 100% infill is just a waste of plastic. Different slicers have come up with different ways of filling the inside of a print, usually with a grid of squares, triangles, or hexagons.

While the most popular methods of filling in a 3D printed objects do the job of adding a little bit of strength to a print and supporting the top layers of a print, it’s not an ideal solution. The desired strength of the finished part is never taken into account, print artifacts are sometimes visible through the side of a print, and the spacing of the infill grid is completely arbitrary. You can only set a percentage of infill, and telling a slicer to make an internal support grid with 10mm spacing is impossible.

Type A Machines just changed all of this. With the release of their public beta of Cura Type A, the infill for a 3D printed part is also 3D. The dimensions of the infill are predictable, opening the door to stronger and better looking parts.

From the Type A press literature and white paper, this new type of ‘infill’ isn’t; it’s more properly referred to as ‘internal structure’, with proper dimensions between infill features. Instead of a grid of squares or triangles stacked one layer on top of each other, it’s a true structure, with the infill following the perimeter of the 3D printed object.

Generating 3D Infill

3D
Infill generated from Type A Machine’s Cura beta. Note the 3D structure of the infill.

Right now, infill is generated in a slicer by specifying a percentage. Zero percent infill means a hollow object, and 100% infill is a completely solid part. These two edge cases are easy, but anything else means the slicer must fill the part with filament in a grid of tessellating shapes, either rectangles, triangles, or hexagons. With current slicers, the dimensions of this internal structure are, for all practical purposes, random. Printing an object with 20% infill might mean a grid of squares with 5mm or 2mm spacing. Telling the slicer to infill a part with a grid of squares spaced 10mm apart is impossible.

Type A Machine’s latest Cura release changes all of this, allowing a designer to set a precise distance between rows and columns of infill. By defining infill in absolute dimensions, this allows for stronger parts using less infill.

Absolute dimensioning is only one feature of the Type A Machine’s latest release of Cura. Even more exciting is the development of 3D internal structure. Instead of stacking layers of squares, triangles, or hexagons on top of each other, Type A Machine’s Cura uses an infill of cubes turned on their side. While each individual layer of infill looks like a series of triangles and irregular hexagons, when assembled into a printed 3D object, this infill forms a true 3D structure.

The closest comparison to this sort of structure is the difference between graphite and diamond. Both of these materials are made out of the same element, carbon. The physical structure of graphite is just, 1-atom-thick layers of graphene, producing a relatively weak material. Diamond, on the other hand, has a true 3D structure and is one of the hardest materials known to man. While adding 3D structure to the infill of 3D printed objects won’t make the objects any stronger, it will drastically reduce delamination, and be much more resistant to stresses in all three dimensions.

While Type A Machines has done some great work here, it does mean there’s yet another version of Cura to deal with. Type A Machine’s Cura, in addition to the LulzBot edition and the original are now the defacto standard for turning 3D objects into printed parts. Having an open source solution is great, but forking the development this much surely can’t be ideal.

Hackaday Prize Entry: Programming Juggling Props

It takes balls to learn how to juggle, but once you do you’re quickly moving on to rings, chainsaws, and those very strange juggling clubs. For their Hackaday Prize entry, [Laurent B] and [michael.creusy] are bringing the Internet of Things to juggling clubs. Their Rastello Club is a glowing, LED illuminated juggling prop with a 9-DOF IMU that makes juggling look even cooler than it already is.

Because there is a market for everything, glowing, programmable juggling clubs already exist. These clubs have a few limitations, though. They don’t have nine-axis orientation sensors, there is no communication to a computer or between individual clubs, and of course they’re not Open Source. The Rastello Club fixes these problems, makes programmable juggling clubs easy to use, and adds a bunch of visualizations.

Inside these juggling clubs are a bunch of LEDs, of course, along with a rather powerful STM32F4 ARM processor, the 9-axis IMU, and the circuitry to charge a battery. The radio connection between individual clubs and a computer will be handled with an RFM75 transceiver. No, it’s not WiFi, Bluetooth, or ZigBee; this radio module is faster than Bluetooth, cheaper than Zigbee, and lower power than an ESP8266.

The HackadayPrize2016 is Sponsored by:

Hackaday Prize Entry: There’s An Elephant In The Room

Elephants and people don’t mix as well as you’d hope. Human-elephant conflict causes deaths of both pachyderms and man alike. Elephants raid crops. Elephants are killed by trains. Obviously, where elephants are is useful knowledge. This is the problem [Neil] is solving for his entry into the Hackaday Prize. His project detects elephants, whether they’re on a railroad, in a field gorging on crops, or… in the room.

[Neil]’s goal is simple – he’s building a distributed elephant detection system that can be deployed at railway crossings, between forests and farmland, and along established elephant trails. This gives [Neil] exactly two problems: detecting elephants, and communicating that information to humans.

To detect elephants, [Neil] is relying on a webcam and Raspberry Pi 3 running OpenCV vision processing. He’ll either be comparing histograms, for faster and less resource intensive image processing, or feature matching. Each detector is equipped with a PIR sensor, so at the very least the Pi won’t be looking for elephants all the time.

Notifying humans of the existence of elephants is the next step of the project, and one that might even be harder than finding the elephants in the first place. [Neil] settled on using ZigBees on each Pi to talk to at least one base station. This base station then sends a message to the local human population over a much longer-range radio link. Networking a bunch of Pis in the middle of the African savanna is a hard problem, but by separating the communication aspect of this project into two radio links, [Neil] has a fairly robust solution.

The HackadayPrize2016 is Sponsored by:

These 20 Projects Just Won $1000 In The Hackaday Prize

For this year’s Hackaday Prize, we’re doing something spectacular. We’re funding the next great piece of Open Hardware by giving away thousands of dollars for the best hardware projects. Just a few days ago, we wrapped up the Anything Goes portion of The Hackaday Prize, an electronic free for all to build the coolest gizmos imaginable. Now, it’s time to announce the twenty winners of the Anything Goes portion of The Hackaday Prize.

The winners of the Anything Goes challenge, in no particular order, are:

These twenty project just won $1000 and will now move on to the last phase of The Hackaday Prize, to be judged by our fourteen celebrity judges. Congrats! There’s a lot of work for these project to do before the final judging in October. Better get to work!

citizenScienceIf your project didn’t make the cut, there’s still ample opportunity for you to build the next great hardware gizmo. For the next few weeks, we’re running the Citizen Scientist portion of The Hackaday Prize. We’re looking for projects that expand the frontiers of knowledge, and give the common man the tools to discover the world.

Citizen Scientist is this month’s Hackaday Prize challenge to create something new, study something undiscovered, or replicate scientific studies. We’re opening up the gates for everyone to build their own apparatus and do their own research.

Like the Design Your Concept and Anything Goes rounds of The Hackaday Prize, the top twenty projects will win $1000, and go on to the Hackaday Prize finals for a chance to win the Hackaday Prize – $150,000 and a residency at the Supplyframe Design Lab in Pasadena.

If you don’t have a project up on Hackaday.io, you can start one right now and submit it to The Hackaday Prize. If you already have a project up, add it to the Citizen Scientist challenge using the dropdown menu on the left sidebar of your project page.

The HackadayPrize2016 is Sponsored by:

The World’s Supply Of DB-19 Connectors

[Steve] over at Big Mess O’ Wires has a very, very niche product. It’s the Floppy Emu, a hard disk emulator for the Apple II, Lisa, and very old Macs. The Floppy Emu takes data stored on an SD card and presents it to these classic computers through a contemporary connector, the venerable DB-19. This connector is in the same family as the familiar DB-25 parallel port, DE-9 serial port and the old DA-15 joystick port, but there’s something very special about the DB-19 connector – nobody makes it anymore, and no surplus electronics store has any in stock. They’re unobtanium, and when you’re making a product built around this connector, you’re going to have a few problems.

Those problems have come to a head over the past year, but getting a few thousand DB-19 connectors manufactured has always seemed just out of reach. It would be a five-figure investment for a very niche product, and [Steve] would have to find someone to make the connectors.

The world’s shortage of DB-19 connectors is no more. After chatting up a few people in the NeXT and Atari communities, [Steve] set up a group buy and manufactured the first batch of DB-19 connectors in recent memory. The world’s supply of DB-19 connectors, all 10,000 of them, is now in [Steve]’s living room.

The process of manufacturing ten thousand DB-19 connectors actually wasn’t that hard for [Steve]. Over the past year, he’s reached out to manufacturers to get a quote, and he still had those numbers in his rolodex. The only problem was finding an engineering drawing of a DB-19 connector and transferring a large amount of money to Hong Kong. The drawing was easy enough, as datasheets sometimes last longer than the parts they describe. Transferring the money over to the manufacturer meant convincing a bank manager there is not a Nigerian prince in Hong Kong and thirty minutes of paperwork.

After a few months, a round of prototyping, and a trip through customs, the world’s supply of DB-19 connectors finally landed on [Steve]’s porch. He still needs to ship them out to the NeXT and Atari folk who participated in the group buy, but the great shortage of DB-19 connectors is over for now.

Hackaday Links: June 5, 2016

CERN is having a hackathon. It’s in October, yes, but the registration is closing on the 15th of June. They’ve been doing this every year, and the projects that come out of this hackathon are as diverse as infrastructure-less navigation, cosmic ray detectors, and inflatable refrigerators.

Have one of those solder fume extractors? Here’s an obvious improvement. [polyglot] put a strip of LEDs around the frame of his solder fume extractor to put a little more light on the subject.

A few months ago, [Bunnie] started work on a book. It was the Essential Guide to Electronics in Shenzhen. It’s made for hardware hackers to figure out how to buy stuff in Shenzhen, using a neat point-and-understand interface. Those books are now being shipped to people around the globe. I got one, and here’s the mini-review: it’s awesome. Is it a complete travel guide? No, but if you dropped me off at Hong Kong International, I could probably 1) Make it to Shenzhen 2) Buy random LEDs 3) Find a hotel 4) Get a beer 5) Not die. Pics below.

You’re hackers, and that means you’re the people who build stuff for all those ‘makers’ out there. Don’t have an MBA? No problem, [Dave Jones] has your back. He re-did his Economics of Selling Hardware video from several years ago. It’s 25 minutes long, and gives you enough information so you’re not a complete idiot at the business end of design.

Like Raspberry Pis stuffed into things? Here’s a Pi Zero stuffed into a MegaDrive cartridge. Now someone grab a Sonic and Knuckles cart, build a ROM reader, and do a proper cart-reading emulator.

If you’re into R/C, you know about Flite Test. They’re the folks that make crazy, crazy model planes out of Dollar Tree foam board, and have gotten hundreds of people into the hobby. Flite Test is having their own con, Flight Fest, in a little over a month. It’s in Ohio, and from last year’s coverage of the event, it looks like a really cool time.

So, No Man’s Sky is coming out soon. It’s a space game set in a procedurally generated, infinite galaxy. Does anyone have any idea on how to form a Hackaday clan? Somebody should start a Hackaday clan/alliance/thing. I’ll meet you guys at the core.