Testing and programming The Mechanical Key Calculator:

IMG_3889.jpg

I made two calculator prototypes, because in the first one I had spread too much solder on the 5V regulator circuitry and also had many solder “bridge” short circuits on the main microcontroller. Once I finished fabricating the prototypes, I realized that I had made an error on my board, and connected the voltage supply for the display to the wrong pin. This problem was solved with an external resistor:

I also had to desolder some components from the reset line on the LED microcontroller which were causing it to stop responding.

After making sure all of the hardware was functional, I moved on to the programming. I started with the LED microcontroller, and created 3 lighting animations, shown in the videos below.

 

“Rainbow Wave” Animation

“Light Ray” Animation

“Rainbow Wipe” Animation

After this, I first ran a screen test using publicly available code to gauge the performance of the microcontroller when driving a screen with a relatively high resolution. As you can see, it worked much better than I expected, and was able to refresh and draw shapes on the screen at an incredibly fast rate. Most of the tests ran too quickly to properly observe.

The piece of paper under the display is another quick fix: there is an sd card socket under the display that has a metal housing that was causing some pins on the calculator to short out.

I have been working on calculator firmware and have a working version that can get input from the buttons, functions as a number pad when plugged into a computer via the usb port and displays the battery voltage and charge percentage on a notification bar at the top (not pictured).

All of the code for this project was written in Arduino C++ and can be found here.