We’ve talked about the Sinclair scientific calculator before many times, and for some of us it was our first scientific calculator. If you can’t find yours or you never had one, now you can build your own using — what else — an Arduino thanks to [Arduino Enigma]. There’s a video, below and the project’s homepage on Hackaday.io describes it all perfectly:
Special care was taken in the design of the emulator to match the execution speed of the
original calculator, which varies from acceptable to atrocious for trigonometric functions involving small angles.
When writing a recent piece about Reverse Polish Notation, or RPN, as a hook for my writing I retrieved my Sinclair Scientific calculator from storage. This was an important model in the genesis of the scientific calculator, not for being either a trailblazer or even for being especially good, but for the interesting manner of its operation and that it was one of the first scientific calculators at an affordable price.
I bought the calculator in a 1980s rummage sale, bodged its broken battery clip to bring it to life, and had it on my bench for a few years. Even in the early 1990s (and even if you didn’t use it), having a retro calculator on your bench gave you a bit of street cred. But then as life moved around me it went into that storage box, and until the RPN article that’s where it stayed. Finding it was a significant task, to locate something about the size of a candy bar in the storage box it had inhabited for two decades, among a slightly chaotic brace of shelves full of similar boxes.
Looking at it though as an adult, it becomes obvious that this is an interesting machine in its own right, and one that deserves a closer examination. What follows will not be the only teardown of a Sinclair Scientific on the web, after all nobody could match [Ken Shirriff]’s examination of the internals of its chip, but it should provide an insight into the calculator’s construction, and plenty of satisfying pictures for lovers of 1970s consumer electronics.
The Sinclair is protected by a rigid black plastic case, meaning that it has survived the decades well. On the inside of the case is a crib sheet for its RPN syntax and scientific functions, an invaluable aid when it comes to performing any calculations.
It shares the same external design as the earlier Sinclair Cambridge, a more humble arithmetic calculator, but where the Cambridge’s plastic is black, on the Scientific it is white. The LED display sits behind a purple-tinted window, and the blue-and-black keyboard occupies the lower two-thirds of the front panel. At 50 x 111 x 16 mm it is a true pocket calculator, with an elegance many of its contemporaries failed to achieve and which is certainly not matched by most recent calculators. Good industrial design does not age, and while the Sinclair’s design makes it visibly a product of the early 1970s space-age aesthetic it is nevertheless an attractive item in its own right.
Wow. Seriously… Wow! The work [Ken Shirriff] put into reverse engineering the Sinclair Scientific is just amazing. He covers so much; the market forces that led [Clive Sinclair] to design the device with an under-powered chip, how the code actually fits in a minuscule amount of space, and an in-depth look at the silicon itself. Stop what you’re doing and read it right now!
This calculator shoe-horned itself into the market when the HP-35 was king at a sticker price of $395 (around $1800 in today’s money). The goal was to undercut them, a target that was reached with a $120 launch price. They managed this by using a Texas Instruments chip that had only three storage registers, paired with a ROM totaling 320 words. The calculator worked, but it was slow and inaccurate. Want to see how inaccurate? Included in the write-up is a browser-based simulator built from the reverse engineering work. Give it a try and let us know what you think.
Now [Ken] didn’t do all this work on his own. Scroll down to the bottom of his post to see the long list of contributors that helped bring this fantastic piece together. Thanks everyone!
It’s the eternal question hackers face: do you built it, or do you buy it? The low cost and high availability of electronic gadgets means we increasingly take the latter option. Especially since it often ends up that building your own version will cost more than just buying a commercial product; and that’s before you factor in the time you’ll spend working on it.
But such concerns clearly don’t phase [Andrea Cavalli]. Sure he could just buy a scientific calculator, but it wouldn’t really be his scientific calculator. Instead, he’s taking the scenic route and building his own scientific calculator from scratch. The case is 3D printed, the PCB is custom, and even the software is his own creation.
His PCB hooks right up to the GPIO pins of the internal Raspberry Pi Zero, making interfacing with the dome switch keyboard very easy. The board also holds the power management hardware for the device, including the physical power switch, USB connection for charging, and TPS79942DDCR linear regulator.
The case, including the buttons, is entirely 3D printed. At this point the buttons don’t actually have any labels on them, which presumably makes the calculator more than a little challenging to use, but no doubt [Andrea] is working on that for a later revision of the hardware. A particularly nice detail is the hatch to access the Pi’s micro SD card, making it easy to update the software or completely switch operating systems without having to take the calculator apart.
After the kernel messages scroll by, the Pi boots right into the Java calculator environment. This gives the user a fairly standard scientific calculator experience, complete with nice touches like variable highlighting. The Mario mini-game probably isn’t strictly required, but if you’re writing the code for your own calculator you can do whatever you want.
A reasonable selection of the Hackaday readership will have had their first experiences of computing on an 8-bit machine in a black case, with the word “Sinclair” on it. Even if you haven’t work with one of these machines you probably know that the man behind them was the sometimes colourful inventor Clive (now Sir Clive) Sinclair.
He was the founder of an electronics company that promised big results from its relatively inexpensive electronic products. Radio receivers that could fit in a matchbox, transistorised component stereo systems, miniature televisions, and affordable calculators had all received the Sinclair treatment from the early-1960s onwards. But it was towards the end of the 1970s that one of his companies produced its first microcomputer.
At the end of the 1950s, when the teenage Sinclair was already a prolific producer of electronics and in the early stages of starting his own electronics business, he took the entirely understandable route for a cash-strapped engineer and entrepreneur and began writing for a living. He wrote for electronics and radio magazines, later becoming assistant editor of the trade magazine Instrument Practice, and wrote electronic project books for Bernard’s Radio Manuals, and Bernard Babani Publishing. It is this period of his career that has caught our eye today, not simply for the famous association of the Sinclair name, but for the fascinating window his work gives us into the state of electronics at the time.
We’ve all got calculators on our phones, in our web browsers, and even in the home “assistant” that’s listening in on your conversations all day on the off chance you blurt out a math question is can solve for you. The most hardcore among us might even still have a real calculator kicking around. So in that light, building your own DIY calculator might not seem too exciting. But we can’t deny this Arduino calculator project by [Danko Bertović] would look good sitting on the bench.
In the video after the break, [Danko] walks us through the creation of the calculator, from placing all the through-hole components to writing the code that pulls it all together. Special attention is given to explaining the wiring, making this is a good project for those just getting started on their digital hacking journey. It also helps that the whole thing is put together on perfboard with jumper wires; no PCB fabrication required for this one.
For the user interface, [Danko] is using an array of 17 tactile switches for the keyboard and a very crisp 128×32 I2C OLED display. Beyond the battery, a crystal, and a handful of passive components, that’s about all the support hardware it takes to put this project together. You don’t even need an enclosure: a second piece of perfboard and some standoffs are used to sandwich the battery and fragile wiring inside.
Of course, the star of the show is the ATmega328P microcontroller, which is mounted in a place of honor right under the OLED screen. The chip gets programmed in an Arduino Uno and then transplanted into the calculator, a neat trick if you don’t have a dedicated programmer handy. Given how cheap Arduino clones can be had online, this is becoming a more common practice.
If you’re looking to get started in designing a few PCBs, you could use one of the many software packages that allow you to create a PCB quickly, easily, and with a minimum amount of fuss. You could also use Fritzing.
The goal for this project was to create a rectangular board without any sharp corners for [Arduino Enigma]’s Sinclair Scientific Calculator Emulator. Fritzing can make a board in the shape of a rectangle, in fact, that’s all it can do, but [Arduino Enigma] wanted a rectangle with radiused corners. After hours of work, we have the writeup on how to do it.
The process to create a custom-shaped board, in this case, a rectangle with a 3mm radius on the corners, is simple. First, draw a rectangle of the desired shape, then draw even more rectangles as a sublayer of the current layer. Fritzing requires the layer ID to be named ‘board’, ‘silkscreen’ and ‘silkscreen0’, but this cannot be changed in Inkscape itself — you’ll need to edit the file with a text editor. After creating three layers, each containing the shape you want, simply trim the size of the page to the size of the board. Save the file, edit the file in a text editor, and click save. Launch Fritzing, load an image file, and select the SVG you’ve been working on. In just twenty or thirty quick steps, you too can import any shape you can imagine into Fritzing.
There is one pain point to this process. Editing the layer name manually with a text editor pushes this Fritzing hack from a baroque workaround into something that makes us all question the state of Open Source standards. Unfortunately, this is required because Inkscape does not use layer names as the ID in an SVG file. No, it doesn’t make sense, but that’s just the way it is.
For any other PCB design tool, creating a custom-shaped board is simply a matter of drawing a few lines. Fritzing is different, though. The top copper layer is represented as orange, and the bottom copper layer is yellow, a UI decision that doesn’t make sense, even if you aren’t colorblind. Putting more than two layers of copper on a Fritzing board is impossible. Fritzing is a tool you should avoid for PCB layout. That said, [Arduino Enigma] figured out how to do something in Fritzing that you’re not supposed to be able to do and that’s pretty cool.