Showing posts with label Keypad. Show all posts
Showing posts with label Keypad. Show all posts

Sunday, March 9, 2025

Tiny Calculator: New Hardware

After figuring out how to build calculator keypads with my new laser cutter, one of the first things I worked on was new hardware with a new keypad for my Tiny Calculator project. The original keypad was made by printing color labels on overhead transparency plastic then cutting those out and gluing them to 3D printed keys. Since the labels were printed in reverse and glued with the ink side down to protect the ink, the glue caused the ink to smudge in some cases. The laser-cut keys, on the other hand, are very crisp and look much better. The only disadvantage is that they come in just one color. Each key is glued down individually to a 3D printed grid, so it would be possible to make some of the keys a third or fourth color as long as there is no more than two colors per key. One thing I want to experiment with in the future is making keys out of two different pieces to get up to four colors on one key.

The original hardware was two circuit boards stacked together with headers that made everything pretty thick. The new version is just one circuit board with everything mounted on top. One way to squeeze everything in such a small space was using magnet wires which take up even less room than the wire-wrap wires on the original. Both sides of the LCD are encased in a 3D printed housing that is glued directly to the battery holder and microcontroller. This makes it impossible to make any changes to the circuit but is worth it to make the body thin. A small header above the LCD allows for programming.

Saturday, March 8, 2025

Calculator Keypads: Laser Cutter

My last post on building calculator keypads explained all the methods I tried then presented on at the 2023 Hewlett-Packard Handheld Conference. Last year, I bought an Elegoo Phecda Laser Cutter as the next step in building keypads, and the results are really impressive! This particular model uses a laser diode which is much cheaper than other types of lasers like CO2. Common power ratings for diode lasers are 5.5W and 10W although some as low as 1W are used for etching rather than cutting. My laser cutter is a 10W model and also comes in a 20W version that is a lot more expensive. As it turns out, 10W is more than powerful enough for building keypads. Diode lasers like this one have a couple limitations - they don't cut blue material well since it absorbs the laser wavelength and they can't mark or cut harder materials like metal. They also aren't supposed to be able to cut white acrylic but mine punched straight through 3mm of black acrylic and 3mm of white acrylic underneath it.

The first thing to figure out was the software to run the laser. A lot of people swear by LightBurn which is $99 for the license plus an extra yearly fee to access updates. Instead of that, I went with LaserGRBL which is free and works on Windows. Since then, I switched my laptop over to Ubuntu, so LaserGRBL needs to run in a virtual machine. My laser cutter was shipped to my next work destination, so I'll need to wait a few months to test that everything works. Setting up LaserGRBL was really easy. It includes test images for cutting to figure out the ideal number of passes and laser strength to use on a particular piece. For etching images, the default resolution was pretty low, so I changed it to 16 lines per millimeter since the focal size of the laser is 0.06 x 0.06mm. This was enough to get it cutting and etching exactly how I wanted. Generating images for etching was easy using Python to create an SVG then converting to PNG as with my other keypads. The laser's cutting mode uses SVG images directly.

Saturday, March 9, 2024

Calculator Keypads

As described in my 2023 goals post, my plan for the year was to finish enough projects to give a presentation at the 2023 Hewlett-Packard Handheld Conference (HHC). Even though I didn't finish everything on my list, there were still enough interesting things to give a presentation on including my Blinky Robot and 6507 Calculator Forth Virtual Machine. The largest part of the presentation was about building calculator keypads.

While building a circuit board or writing the firmware for a calculator are achievable goals for a hobbyist or amateur, building a keypad tends to be much more challenging. The keys themselves can be made on a 3D printer, but getting good quality labels on the keys is very difficult. Since none of my calculator projects so far have had really good keypads, I decided to try every method available for making keys to compare the results.

3D Model
The 3D model for the test consists of eight rows of five keys each designed in OpenSCAD for my still unfinished 6507 Graphing Calculator. OpenSCAD has been my go-to program for modeling since I started with 3D printing a few years ago. The biggest advantage of this program is that the entire model is specified by a script so nothing needs to be manipulated or placed by hand. This works well for people like me who don't have a lot of artistic talent but feel comfortable with programming. It's cheap and relatively quick to print out a set of these keys on my Ender 3.


Saturday, January 20, 2018

Pocket Calculator: Hardware

In the last two weeks I have made a lot of progress on my Pocket Calculator. Normally, I like to breadboard everything and have it working 100% before I solder anything, but I had to speed things up since I was leaving home where all my electronics stuff is. So far, the project has turned out reasonably well with only a few hiccups.

Microcontroller: LPC1114
First of all, I had to get out my old LPC1114s and figure out how to program them again, since I haven't worked with them in over 2 years. Like before, it was really easy to do so with an FT232 cable. After frying an MSP430 Launchpad a few years ago by accidentally giving it 5v from the cable, I was really careful about hooking it up this time. One thing I do is leave the cable unconnected from USB until I recheck all the connections, which saved me this time since I had accidentally plugged into the 5v line again.

Looking on the internet I was surprised to see that no one seems to sell the LPC1114 in DIP28 any more. That means the three that I have left might be the last ones I have to play with. There was some sort of announcement a few years ago that NXP would stop producing the chip then they changed their mind after someone pointed out that the company had promised to keep its chips in production. It looks like they might have decided to stop producing them after all, although they are listed as in production until at least 2022 on the NXP longevity page. One interesting thing I found was a listing for the chip in PLCC44 package with 8KB of RAM instead of the 4 the DIP version has. I'm not sure if those ever made it into production but it would be cool to have one to play with.


Sunday, March 1, 2015

RPN Scientific Calculator: Keypad

The last part of my RPN Scientific Calculator is the keypad. Before, I had considered trying to make individual key labels somehow. If I could print them on something like the material credit cards are made out of, I could cut them up and glue them to the keys. In the end, gluing on 42 labels without getting glue inside any of the buttons sounded daunting. Instead, I was able to make one out of stamp rubber on the laser cutter at our hackerspace. It turned out really well and I was able to paint the buttons different colors. At this point, there is nothing left to add, so I consider the project totally finished.

Thursday, May 30, 2013

RPN Scientific Calculator: Keypad

The next step of the hardware for my calculator is a keypad. I finished this several weeks ago but I haven't posted anything about it because I didn't have any pictures until now.


As you can see, the construction is pretty simple. My local shop had a new kind of perfboard that I wanted to try. It seems to be a little stronger than the kind I used before but still not really stiff like some of the high quality ones I have seen. It took some time to solder this together but it worked well in the end. Only one button connection had to be resoldered.

The circuit is a standard button matrix. A signal is sent through each of the green lines in turn and if any of the buttons are held down the signal will travel out of one of the yellow output lines and be recorded. Each button has a diode to ensure that the signal can only go one way. As you can see from the back side of the board, the columns are connected by solder and the rows by yellow jumpers. After I had soldered most of the columns, I realized that the two legs on each side of this kind of button are connected internally and don't have to be soldered together. The next time I make a button matrix I will leave them unsoldered so I will have room to make the rows out of solder as well. Avoiding jumper wires like I used here will make soldering simpler.

To read the matrix I am using a 74HC165 and a 74HC595 shift register. Output shift registers can easily be chained together but I also found out that an output and input shift register can be chained together as well sharing the same data, clock, and latch lines. Here I decided to use separate latches since the 165 is reading the output of the 595 but they do share data and clock lines which uses less microcontroller pins

Most of the time the shift registers will go unused since scanning the matrix only takes a fraction of a second. To save even more pins I decided to drive the LCD using the 595 shift register as well. This works out as long as communicating with the LCD and reading buttons never overlaps. I will have to take this into consideration if I decide to use an interrupt to read buttons. This also fixed a strange and unsolved issue that would occasionally cause the LCD not to receive commands when it was being driven directly by microcontroller pins.