Open Source Calculator Teaches us about Quality Documentation

Graphing calculators are one of those funny markets that never seem to change. Standardized testing has created a primordial stew of regulatory capture in which ancient technology thrives at modern retail prices while changing little. The NumWorks calculator certainly isn’t the first competitor to challenge the Texas Instruments dynasty with a more modern interface (and a design from this decade), but behind it’s subtle color pops and elegant lines lies the real gem; a fantastically well documented piece of open source hardware. The last time we wrote about the NumWorks, it was to demonstrate a pretty wild hack that embedded an entire Pi Zero but it’s worth drawing attention to the calculator itself.

Hackaday readers traveling to the NumWorks website might spy the section at the bottom of the page titled “Developers” with tantalizing links like “Hardware,” “Software,” and “GitHub.” These lead to a wealth of knowledge about how the product is put together and sources to build the enclosure and firmware yourself (the PCB schematic and layout sources seem to be missing, though there is this handy gerber viewer). However merely posting sources is a low bar NumWorks far exceeds.

How is the firmware put together? Here’s a handy architecture guide! Why did they choose C++ and what tradeoffs were made to fit everything in a resource constrained embedded system? Here’s a design guide! How exactly does the math engine take in text, comprehend the expression contained therein, and evaluate it? There’s a document for it! There’s even a multi-platform SDK setup guide.

Firmware documentation is old hat; we’ve come to expect (or at least hope!) for it. For us the most interesting documentation is actually for the mechanical and electrical systems. The EE guides start with part selection (with datasheet links) then move on to walkthroughs of major areas of the schematic. At this point is should be no surprise that the board has pads for a completely standard 10 pin ARM debug connector and documented test points for UART, SPI, and an SD card.

The mechanical pages read like a quick primer on design for injection molding and tricks to reduce assembly errors (called “poka-yoke“). Ever wondered what that funny frame plastic models come in is called? The NumWorks calculator’s buttons are made in one, and it’s called a “sprue”. There are pages describing each piece of the housing one at a time.

Treat yourself to a reading of NumWorks’ excellent documentation. And if you need a new calculator, maybe consider the open source option.

Continue reading “Open Source Calculator Teaches us about Quality Documentation”

Graphing Calculator Dual Boots With Pi Zero

The nearly limitless array of consumer gadgets hackers have shoved the Raspberry Pi into should really come as no surprise. The Pi is cheap, well documented, and in the case of the Pi Zero, incredibly compact. It’s like the thing is begging to get grafted into toys, game systems, or anything else that could use a penguin-flavored infusion.

But this particular project takes it to the next level. Rather than just cramming the Pi and a cheap LCD into his Numworks graphing calculator, [Zardam] integrated it into the device so well that you’d swear it was a feature from the factory. By exploiting the fact that the calculator has some convenient solder pads connected to its SPI bus, he was able to create an application which switches the display between the Pi and the calculator at will. With just a press of a button, he’s able to switch between using the stock calculator software and having full access to the internal Pi Zero.

In a very detailed write-up on his site, [Zardam] explains the process of getting the Pi Zero to output video over SPI. The first part of the battle was re-configuring the GPIO pins and DMA controller. After that, there was the small issue of writing a Linux SPI framebuffer driver. Luckily he was able to find some work done previously by [Sprite_TM] which helped him get on the right track. His final driver is able to push 320×240 video at 50 FPS via GPIO, more than enough to kick back with some DOOM.

With video sorted out, he still needed a way to interface the calculator’s keyboard with the Pi. For this, he added a function in his calculator application that echoed the keys pressed to the calculator’s UART port. This is connected to the Pi, where a daemon is listening for key presses. The daemon then generates the appropriate keycodes for the kernel via uinput. [Zardam] acknowledges this part of the system could do with some refinement, but judging by the video after the break, it works well enough for a first version.

We’ve seen the Pi Zero get transplanted into everything from a 56K modem to the venerated Game Boy, and figured nothing would surprise us at this point. But we’ve got to say, this is one of the cleanest and most practical builds we’ve seen yet.

[Thanks to EdS for the tip]

Continue reading “Graphing Calculator Dual Boots With Pi Zero”