Resurrecting the Sinclair

The first computer I ever used was a university mainframe, accessed through a teletype terminal in my uncle’s apartment. It played a mean game of Tic-Tac-Toe (and presumably helped with my uncle’s Finance dissertation.)

The second computer I ever used, the first one I ever owned, and the one on which I learned all kinds of horrible 1980s-BASIC programming habits on, was a Timex-Sinclair 1000.

The Timex-Sinclair 1000. (Thanks, Mom and Dad. Best present ever!)

The TS1000 had the distinction of being the first home computer under the magical $100 mark. While still not cheap, that put it within reach of normal people. The Personal Computer revolution was beginning!

The TS1000 is based on the deservedly popular Z80 microprocessor. Sinclair Research combined the Z80 with a custom video card, a ROM containing the BASIC programming language, and 2KB of RAM.

The Timex-Sinclair 1000 system board.

The keyboard no doubt contributed to the low cost of the Sinclair, as it was a very cheaply manufactured membrane keyboard which connected through a slit in the top case to plug onto the system board. These worked marginally well for a few years, but would inevitably become brittle with age. When this happened, the conductors would develop hairline cracks. If even one of the thirteen keyboard lines broke completely, a whole section of the keyboard would become unresponsive. It’s rare to see one working these days. Neither of my two did…

My original keyboard, showing the deteriorated connector.

Not only did these old keyboard connectors break — they would often break off in the connector, requiring exploratory surgery to clear them out before the connector could be inspected, cut cleanly before the break, and hopefully reinserted if it hadn’t become too short.

That’s not supposed to be there. Not without the rest of it, anyway.
Fortunately, it came right out.

Nostalgia being what it is, many of my fellow middle-age geeks fondly remember the Sinclair, keyboard problems and all. So I guess it’s not surprising that someone came up with a solution. I found a site selling replacement ZX81/TS1000 keyboards for about $15 or so. Not a bad price at all to resurrect an old (if temperamental) friend!

The new keyboard.

A few weeks later, the keyboard arrived. The key action is much better than the original, but the tinned metal connectors on the end appear to be intended for soldering rather than for plugging into the keyboard connector.

Tinned wire connections on the new keyboard. Good for soldering, not so good for staying in the old socket.

Never one to design an engineered solution when a perfectly good hack would do, I cut up a wire-wrap socket (probably half as expensive as the keyboard — they’re Not Cheap). It’s not going anywhere, now.

A hacked-up wire-wrap socket works perfectly.

With the new keyboard, the Sinclair is back from the dead! Now to fix up the case a bit and work on some peripherals — or at least a way to save and load programs from an mp3 player or something.

It’s alive! (And so is the 1970 Ford TV that I used to use with it.)


Posted in BASIC, Nostalgia | Leave a comment


The Maker revolution generally encourages adding to the repertoire of processes that can readily be done at home. Desktop soldering stations, multimeters, and power supplies have been available for decades; oscilloscopes have been getting more affordable recently, and the recent explosion of 3D printer technology has really made a lot of things possible.

The production of good quality circuit boards, however, is still a challenge. I can produce more-or-less-acceptable 2-layer boards on our LPKF PC board mill at work, but producing good circuit boards at home either requires a lot of patience and toxic chemicals or a circuit board mill costing probably into four figures. And even then, the boards produced lack through-hole via plating, solder mask, and silkscreen, and are generally cruder and less reliable than any industry standard. Some processes still require expensive equipment to do well.

Some circuit boards, freshly milled on the LPKF desktop mill at work.

Recently, however, a number of DIY-friendly, low-quantity solutions for getting PC boards made have become available. I recently placed an order for ten PC boards with Here’s how that went, and why I now have another go-to vendor for my list of favorites.

The process starts by creating a set of Gerber files. This is usually done automatically by PC board CAM software like Eagle CAD. I’ve been using FreePCB for years to make our boards at work, so I decided to see how it did.

CAD view of the top of the board

The test board (which needs several revisions, but that’s expected) is mostly a 24VAC-to-5VDC power supply for a Raspberry Pi and relay module, along with some extra connections to make hookup easier. I created the design in FreePCB, exported the Gerber files, and then uploaded the design to JLCPCB’s site. Design took a few hours; the upload and ordering process took maybe half an hour since I was unfamiliar with it. Now that I’m signed up and everything, future orders will probably take more like ten minutes.

…and that was it, really. I got a couple of emails later that day saying the boards had started production (even though it had to have been something like midnight in Shenzhen.)

Less than a week later, an express DHL shipment arrived. The boards look quite good, especially considering I paid $2.00US for the whole ten-pack. Shipping was just under $20, but that’s expected for essentially overnight shipping from China.

Ten boards, delivered in about a week, for $20 or so. Not bad.

I populated and soldered the first one off the stack (I only really needed one, but it’s the same price for ten), and it works well so far. Custom good-quality PCBs for twenty cents each (plus shipping). I love living in the future.

Posted in Electronics, Resources | Tagged , , , , , | Leave a comment


The traditional way to create models for 3D printing is to design them using a CAD program. Typically, the designer will draw a few rough shapes to build the basic outline of the part, extrude them, then add other features and/or remove material for holes, bezels, cutouts, etc. This works well for many designs, and is deservedly by far the most popular way of creating 3D models. However, it’s not the only available method. Creating models in code, from mathematical operations, opens up design possibilities that would be difficult or impossible to reproduce manually.

If you want a hole in your model, for instance, it’s generally straightforward enough to draw a circle and extrude it into the material. But if you want four hundred of them in a 40×10 matrix, that could take a while. And smooth, mathematical designs like a Moebius strip can be nearly impossible to create by hand.

A Moebius strip and the code to produce it in OpenSCAD. (Click for larger.)

OpenSCAD is a Free, Turing-complete modeling language for the creation of 3D models based on mathematical primitives. Basic shapes such as cubes, spheres, and cylinders can be scaled, translated, rotated as well as added to, subtracted from, and intersected with other objects. Control structures such as for loops allow for the automatic assembly of more complex objects like corkscrews based on the mathematical formulas. Define the shapes, and OpenSCAD creates the model.

Printing your creations is straightforward. After finishing the code for your design, press F6 to render your design (using a more accurate method than the quick preview). Once rendered, the design can be saved as an .stl file to be sliced into g-code by the slicer of your choice.


Posted in 3D Printing, Coding, Math, Tools | Tagged , , , , , | Leave a comment

Mystery Resistance

As part of a recent Girls, Inc. summer camp activity we hosted at work, I designed and produced about a dozen Electronic Mood Rings. This turned out to be a learning experience in many ways.

The prototype Electronic Mood Ring.

I learned that, while SMT devices are tricky to work with, SOIC parts can be reasoned with if you use a good iron, silver-bearing solder, and generous amounts of flux.

I learned that 1206 SMT parts are very forgiving but still a pain to solder by hand. Stencils and reflow may be the way to go, here. Or just outsourcing it.

I learned that PIC12F1571 microcontrollers should be able to run at 32MHz internal clock speed. Nice! Except that mine didn’t want to turn the PLL on, and I had to settle for 16MHz because it was easier than continuing to argue the point. Besides, the new BRW instruction means no more mucking about making sure my computed GOTO tables don’t cross 8-bit boundaries. So I can forgive a few quirks.

I learned that I still don’t know how to solder true SMT parts such as NeoPixel Mini PCBs. Might need a reflow plate for those.

I learned that, for whatever reason, clear PLA filament just will not print reliably on my machine. Purple printed fine. Pink printed fine. Blue printed fine. Even black cooperated and printed without problems, which isn’t always a sure thing. But three different reputable brands of clear filament caused 95% of the problems. It jammed. It blobbed. It strung. It refused to adhere to the bed at one point.


I also learned not to trust knockoff parts. The battery holders I bought only worked properly once I figured out you need to wedge a strip of aluminum foil under the negative contact, to get it to work. Pure Chinesium. Well, to be fair, they were a lot less expensive, and worked well other than that. My guess is they were tested with a different brand of battery.

The most surprising thing I learned about was the Phantom Voltage Divider.

I should explain. The battery holders I was using included a small circuit board, a CR2032 battery, a SPST switch, and metal contacts and traces. That’s it. No resistors or other electronics. Bare-bones simple.

So it was perplexing to put a 3V battery in and, with the switch off, measure 1.8V out. Changing voltages like that requires either active electronics or at the minimum, two resistors. There were no resistors anywhere on this board. What was happening?

Lack of sleep due to optimistic scheduling was what was happening. It turned out that the meter was correct. It really was reading 1.8V, and it was all my fault. Well, mine and the meter’s.

Multimeters (real ones) have a finite input impedance. This can be a calibrated high value of, for example, 10M ohms on professional desktop meters like the Agilent 34401A, or a similar, uncalibrated but high value on handheld meters. No doubt the Fluke that I was using has a well-understood input impedance. Or at least a high one.

Most of the time, this high impedance means that the meter won’t have a significant effect on the circuit voltage. What little current flows through the meter is lost in the (much greater) flow of current through the circuit.

This circuit was off, though — but still read 1.8V. Due to lack of sleep, it took me a few minutes to figure out the answer. I was the missing resistor. Part of my hand was in contact with the positive terminal on top of the battery, and a few microamps of current were leaking through my hand to the meter. Since the meter had roughly the same input resistance … it and I formed a voltage divider.

The laws of physics have a sense of humor, I guess.

Posted in 3D Printing, Design, Digital, Drexel, EET201, Electronics, Fundamentals, PIC Microcontrollers | Leave a comment