-
Modelling
09/06/2024 at 14:32 • 0 commentsSo I spent the last couple of days with calipers, rulers, and protractors measuring and modelling the Trekulator case. I really enjoy this kind of work. I find it to be challenging and relaxing at the same time. I helps when the end result turns out pretty good.
![]()
I'm on the lookout for a better color match but the case is pretty much done.
-
Original Trekulator Mostly Working
09/06/2024 at 23:58 • 0 commentsIn order to more easily model the Trekulator case I carefully removed all of the internal components. In the process I noticed a couple of loose wires, so when I reassembled the unit I reattached the wires. At the same time I installed a small speaker since my Trekulator did not come with one. It looked like the speaker had been intentionally removed since the speaker wires were cleanly cut, and after watching the STAR TREK Inside the RARE TREKULATOR CALCULATOR video I suspect the speaker was removed because the sound effects were pretty annoying IMHO.
At any rate my Trekulator now powers up. All of the keys and the display seem to be working. The two issues I have found are:
- The sound is not correct. Perhaps the speaker I installed is not a good match?
- The = button triggers the sound as expected but the display does not update with result of the last operation, it still shows the last number entered.
Here is a short video of my Trekulator in action.
If anyone has any thoughts on what might be causing these failures please get in touch.
-
Original Trekulator Working Better?
09/10/2024 at 19:49 • 0 commentsSo I was demonstrating the Trekulator to someone and at first it wasn't working correctly. The unit would power up but the buttons were not working. After a couple of power cycles the keys started working again and the = sign would now play the sound (badly as before) but would update the display with the result of the last operation. Yay. Seems to be holding after multiple reboots so fingers crossed.
I had another quick look at the speaker. When I first opened up the Trekulator I noticed that there were two short wires soldered to the PCB that had obviously been cut, and I just assumed that they were for the speaker. To verify this I watched the Computer History Archives Project video again and captured the following two screen shots:
![]()
The one on the left is from the unit with the working speaker, and on the right from the one where the speaker had been removed. Notice the blue and white wires in both images almost certainly verifying where the speaker was attached. Unfortunately for me this is exactly where I attached my speaker so I now know that wiring is not the reason my unit does not emit the "calculating" tones correctly. This will require further investigation, but then again maybe it will "just start working" down the road. It could happed ;-)
-
7-Segment Display
09/15/2024 at 16:38 • 0 commentsI purchased some MAX7219 based 7-Segment displays and reworked the case "small display" model to hold the display. The digits are larger than on the original and the color is wrong but I think I can live with that.
![]()
I had an ESP32 on hand and have decided to use it for this project. It's total overkill for the straight calculator version, but will hopefully have the horsepower to allow me to do some cool stuff for the "Next Generation" build. The display's 3-pin SPI interface leaves a lot of I/O pins available for other stuff.
-
Sounding Off
09/21/2024 at 15:37 • 0 commentsI added an Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A module and an Adafruit MicroSD Card Breakout Board+ [ADA254] so that I could play sounds starting with the original Trekulator’s “calculating” sound. There were cheaper modules available but I like to reward Adafruit whenever I can for their hard work especially w.r.t. library creation and maintenance. The amplifier is I2S based and the card reader is SPI based so only 7 IO pins are required. I based the setup on an excellent DroneBot Workshop article Sound with ESP32 - I2S Protocol.
Of course this sets me up for producing many sounds for my Next Generation project.
Given how jarring the “computing” sound is, I’m not surprised that the speaker wires on my original unit and one of the Computer History Archives Project’s units were snipped. I think I’ll find a better alternative for my reproduction. -
Keypad Considerations
10/01/2024 at 15:55 • 0 commentsI turned my attention to the Trekulator keypad. My plan is to design a PCB with a pretty standard 4 row by 5 column matrix requiring a total of 9 IO pins to read. I had a bunch of 12 mm x 12 mm push button switches left over from my CHESSmate project that I could use. Here is what one looked like.
![]()
Since the keycaps for the buttons have one correct orientation, and given the round protruding knob, I wondered how I could lock the keycap to that position. I could glue it in place but for me glue is a last resort. This is one idea that I came up with.
![]()
The square base slipped over the base of the switch with enough clearance to shift up and down as the button was pressed but locking the keycap to the correct orientation. While this would have worked it felt a little kludgy to me. The keycap had to be printed in two parts and glued together (ugh) and it just didn't look right.
I hit up DigiKey and found the following.
![]()
The square knob solves the orientation issue leading to a much simpler keycap.
![]()
Much better. I guess the lesson learned here is that you shouldn't necessarily force a design just because you have some parts on hand. Sometimes spending a few extra bucks is the way to go.
Just for fun I grabbed a standard protoboard and laid out 20 switches in a 4 x 5 grid. To my surprise the buttons aligned perfectly with holes in the Trekulator (on 18 mm centers). So I made a set of Trekulator keycaps to try it out.
![]()
The switches are just set into the protoboard not soldered. I wanted to check how everything fit together, nicely I must say. The buttons work great and have a nice feel, better than the membrane keypad on the original. For a second I considered wiring the keypad point to point as is on the protoboard, but ultimately decided to proceed with a custom keypad PCB which is what I will work on next.
CORRECTION: While I was laying out the keypad PCB I realized that this "coincidental" alignment was not quite true. The protoboard through holes are 2.54 mm apart. The buttons on the original Trekulator are in fact on 18 mm centers. With standard spacing the closest that you can get to 18 mm centers is 17.78 mm (2.54 mm x 7). Close enough that the buttons line up pretty well but not perfectly. I suspect that they worked as well as they did because the switches were not soldered in and thus had a some "flexibility" when pushing through the case holes. I corrected this alignment issue in the PCB.
-
Keypad PCB
11/13/2024 at 18:09 • 0 commentsI finally got around to designing a PCB for the Trekulator keypad. I used KiCad 7.0 to do the design. It's a pretty straight forward 4 row by 5 column matrix. I did add a diode per switch in order to be able to register "chorded" key presses for my next generation version.
![]()
PCB layout is another task that I really enjoy, especially with a simple design like this one. There is something relaxing about getting all the components in just the right positions and routing the traces so they look good without having to create any unnecessary vias. It can be like a very satisfying puzzle.
![]()
I'm also very impressed with KiCad's 3D view. I couldn't find a switch model with square buttons but otherwise it's perfect. I used the 3D view file to create a "dummy" populated PCB that I will use to finish the case w.r.t. mounting the PCB while I wait for the actual ones to ship.
![]()
-
Adding the Keypad
12/06/2024 at 18:24 • 0 commentsThe PCBs for the Trekulator keypad arrived this week. They look pretty good.
![]()
So I populated a PCB with switches, diodes, and headers. When I wired it up to the ESP32 I realized that I had a small issue.
The ESP32 has 40 GPIO pins, however only 22 of those pins are available as "unencumbered" INPUTS and 19 as OUTPUTs. By unencumbered I mean can be used without fear of clashing with special purpose functions like SPI flash, Rx, and Tx. Furthermore, of the INPUTS, only 10 have internal pull-ups and 7 have internal pull-downs (supposedly). So in general you have to be very careful when selecting IO pin usage on an ESP32. More so than in the Arduino world.
My Trekulator keypad PCB was designed with no external pull-down resistors because I had assumed that I would use MCU's internal pull-downs. In addition to the lack of IO pins with pull-downs I was having problems using pins that were supposed to have internal pull-downs. So in the end I decided to add external 10K pull-down resistors on the column lines of the matrix. Worked great. You can see in the rightmost image above where I bodged five 10K resistors to the column lines and tied them to ground. I have updated the KiCad design to include the resistors,
![]()
With all of the pieces in place I did an integration test.
Now all I have to do is figure out how to get all of this stuff to fit into the Trekulator case, and oh ya, write a calculator program. No problem.
-
Mounting the Keypad
12/12/2024 at 16:36 • 0 commentsI designed a mounting block for the Trekulator keypad.
![]()
I attached this with CA glue to the back of the front panel. To ensure the alignment of the keys with the holes I glued the mounting block to the back with the fully populated PCB in place.
![]()
With the keypad PCB in place I added the spacer ring (right side of the first image above). I created the block with a depth that can accommodate two PCBs. I did this having decided that I will create a second PCB to hold the ESP32, I2S, microSD reader, and amplifier cards. This second PCB will be the same size as the keypad and will greatly simplify the overall Trekulator wiring. In the rightmost picture immediately above I have used a keypad PCB as a placeholder for this new board, and used some 3D printed clips to hold everything in place.
-
Adding a TFT Display
01/14/2025 at 17:33 • 0 commentsThe original Trekulator has four red LEDs imbedded into the still picture of Kirk, Spock, and Uhura.
![]()
I was about to start adding these when I had a thought. My intention all along was to mount a real display back there for my Next Generation implementation. It occurred to me that with a display I could easily emulate the LEDs for an "authentic" original experience so I decided to avoid some rework and jump directly to adding a display.
I had purchased a 3.5 Inch TFT Display for this purpose. It has 480 x 320 resolution, a touch screen, and an integrated SD card reader; all of which use an SPI interface keeping the I/O pin count down. The display is based on the ILI8488 driver chip which is well supported library wise. These modules are readily available and relatively cheap.
![]()
The screen itself is not wide enough to fill the whole Trekulator display area, but the height is pretty close so I think I can make this work.
I added the display/touch/SD card to my breadboard and wired it to the ESP32. I removed the Adafruit MicroSD Card Breakout Board since I no longer needed it. I am using the TFT_eSPI library to communicate with the display devices. The library come with many great examples to test the device. Below is a "Cellular Automata" test of the display.
I also tested the SD Card and touch capabilities. With the display working, all of the components for my Trekulator reproduction are in place. Now I just have to figure out how to cram all of this into the case, and oh ya write calculator program.
Michael Gardi















