Close
0%
0%

Hackulator

A Ti-83 Calculator with a Raspberry Pi Zero W, touch screen, Mini HDMI Output, and Li-Ion Battery

Similar projects worth following
A Ti-83 Calculator with a Raspberry Pi Zero W, touch screen, Mini HDMI Output, and Li-Ion Battery that also makes use of the existing keypad.

The idea of placing a Raspberry Pi Zero W and LCD Touch screen into a TI Graphing Calculator case came to me back in December of 2017 when I saw somebody had basically put a Gameboy in a TI Calculator and I thought it would be nice to actually have something that had a lot more functionality, could run a Calculator Emulator, Games, Browse the internet, etc. The idea originally was more to see if it could be done. However, I didn't actually start working on the project until July of 2018 due to moving around a bunch.

By that time, I had acquired a couple of cheap TI calculators that I purchased off eBay that were non-functioning. Unfortunately the first one (A TI-86) wasn't functioning because the batteries had leaked and corroded the circuit board beyond usability. The other was a TI-83.

I started by using a heat gun to remove all of the existing components because I needed the room and just wanted the raw circuit board traces. Next I used some solder wick dipped in flux to to clean any remaining solder and finally used some acetone to clean off any flux and adhesive from the board. I took a digital photo of the board and used photoshop to meticulously trace down all of the button pads in order to figure out the logical layout and plugged the information into a spreadsheet. It turns out they are arranged in roughly a 7x8 matrix with 6 missing potential buttons for a total of 50 buttons. After that, I soldered some thin wires that I took from an old printer cable to the vias on the circuit board so that I could access them later. Finally, I took a sheet of Kapton tape that I had for my 3D printer and covered the board to insulate it from the rest of the circuitry.

To get the screen and it's circuit board to fit, I ended up using the LCD from an Adafruit PiTFT 2.8" together with the circuit board from an Adafruit PiTFT 2.4" hat that I desoldered the connector from and cut down with a Dremel tool after looking at the board drawing in Eagle to make sure it would still work. I do recall it used a split ground plane, so I had to make sure to connect the ground of the Raspberry Pi  on both halves of the plane. One of the issues I ran into while attempting to get the screen working is that there seems to be an inherent incompatibility between the Raspberry Pi Zero and the Adafruit displays. I was able to trace it down to SPI not starting up soon enough and adding spi_bcm2835 to /etc/modules fixed the problem. I was able to help Adafruit resolve this issue with that fix.

I used an Adafruit PowerBoost 1000c for maintaining the Lithium Ion battery that I got from Amazon. Since this was intended to run off battery, I put together a voltage monitoring circuit based around the MCP3008. However, for the final circuit, I opted to go with an MCP3002 since it was smaller and had fewer pins. I also used a 74HC595 8-bit shift register for reading the keys on the keyboard since I was running out of GPIOs. I had a custom circuitboard made by OSH Park that had both the shift register and voltage monitoring circuit on it. It worked out well since I needed the board to be small and the smaller I made it, the cheaper it was. I think it was $3.65 for 3 of them, but I paid a little extra for expedited service on top of that to shave a week off.

Originally I was planning on adding an audio jack circuit, but I realized the Pi Zero W has bluetooth and since I have bluetooth headphones, that just made everything easier. That gave me a little room to add a mini HDMI jack to the top of the calculator.

While developing it,  I did a lot of testing on a Raspberry Pi 3 B+ and breadboard. Once I got the circuitry back, I soldered everything together and it worked pretty good. There was a small issue in that the code for the voltage monitoring circuit was not working properly because the MCP3002 has a slightly different instruction set than the MCP3008, but after comparing data sheets, I was able to modify the code to return the correct values.

Over the...

Read more »

  • Added another Keyboard Driver Feature

    Melissa LeBlanc-Williams10/30/2018 at 06:13 0 comments

    Looks like I lied. While working on it, I realized that I couldn't Control+C anything because I hadn't implemented the Control Key, so I quickly added a Control Lock Key so you push that, then the letter you want. Got RetroPie installed, but it doesn't want to run from the Pi Desktop, so I will have to look into that. Not a high priority though as it currently does all of the basics that I want.

  • Keypad Drivers now launching at startup

    Melissa LeBlanc-Williams10/29/2018 at 15:49 0 comments

    I now have the keypad drivers launching at startup. The only thing left that I would like to get done before Supercon is to get a few emulator games running. After I get back, I definitely have some ideas for hardware improvements. For instance, I want to design a more streamlined board so that it doesn't have so many modified boards in it.

  • Mode changing works great. Also can power off.

    Melissa LeBlanc-Williams10/18/2018 at 06:49 0 comments

    I finished up the mode changing by listing out all of the mode transitions and the conditions for switching to modes. With that clearly defined, making all of the changes in the code was easy. I also added the ability to power down by going to 2nd->Off which sends the shutdown command to the system.  If you're in TI-83 mode, then it will avoid powering off the system. Icons are loaded relative to the current directory rather than having the path hardcoded, which helps with flexibility. Earlier tonight, I was on Adafruit's Show and Tell and you can watch me give a brief overview of the calculator. In case it doesn't jump to the correct time from my link, my presentation starts about 11:37.


  • Keyboard Driver Almost Done

    Melissa LeBlanc-Williams10/16/2018 at 04:57 0 comments

    I ended up using the key combination for On and Mode (it seemed appropriate) to change the mode, which basically is between TI-83 keyboard mode for the TI-83 emulator and Regular mode which allows through various submodes access to just about all of the standard keyboard keys. Also, I finished up adding all of the keyboard layouts and most of the functionality for changing modes is in place. The only thing left is for changing having it drop out of alpha mode if alpha lock isn't engaged and 2nd mode after a key press. Since the TI-83 didn't originally have lower case alpha characters, I've been making up my own system that functions similar to the TI calculators with lower case such as the TI-85/TI-86/TI-89. Also, I may end up adding some game modes if necessary for playing emulators or whatnot. Perhaps even some mouse emulation.

    While adjusting the LCD brightness was originally a planned feature, running the GPIO commands does not seem to be working, even from the command line. If I have enough time, I may end up trying to debug that, but it's not a big deal as maximum brightness seems to be ideal anyways.

    There's a few other optional features that I'd like to add in that don't really affect the functionality as much as the portability. Since things are coming along so nicely, I'll probably have time to take a stab at that, but I have a lot of things on my plate, so I won't spend too long on that.

  • Ti-83 Calculator Emulation Fully Working

    Melissa LeBlanc-Williams10/15/2018 at 06:01 0 comments

    I now have all of the physical keys on the calculator including the On Key functioning within the calculator emulator. I still need to figure out how I want to switch to non-TI modes. I'm thinking maybe a key combination or mounting a hidden switch and maybe just wiring it up to one of the 7 unused button combos. Not much else to say than that it's looking good for finishing this on time.

  • Making some Good Progress with Keyboard Driver

    Melissa LeBlanc-Williams10/14/2018 at 05:01 0 comments

    I've been working on writing the keyboard driver, which has turned out to be the hardest part of this project so far. I ended up writing it with GTK+ 2 in C so that I could show a status icon depending on the mode it's in. Then I needed to use the X11 system to emulate a keyboard. At this point, I now have a status icon appearing in the system tray and it is successfully emulating typing. The next steps are figuring out the correct key codes to enter and having it change modes, update the icon, and change to the appropriate set of keys. The ultimate goal is to bring this around full circle and run a TI-83 calculator emulator, which I also got compiled and working. After that, I plan on installing some emulators and games that can be run on the calculator. I'm hoping to get this all finished by the Hackaday Supercon in a couple weeks or so.

  • Voltage Monitoring is now working

    Melissa LeBlanc-Williams09/29/2018 at 17:20 0 comments

    While doing research about how to display the battery voltage in the menu for the Raspberry Pi, I initially came across some information that developing plugins for LXPanel was the way to go. However, it seems the Raspberry Pi PIXEL environment is a highly customized version of LXDE and I was unable to find information of how to create a plugin. However, did notice that there is an existing plugin called "System Tray" which is part of the menu by default, so I looked in that direction and came across some python code that uses GTK+ to display an icon in that system tray. In fact the code I came across was for a battery monitor that read some system information about the battery and showed a representation there.

    I was able to adapt this code to work with my existing python code that read the MCP3002 instead of the system and now it's working great. I just need to find the best way to run this on startup and it should be finished.

    My plan is to take a similar approach for the keypad, except I'll be doing that in C since I'm more comfortable doing low level stuff there. However, if it turns out rewriting my keypad driver in Python is easier, I'll go that route.

  • Shutdown now blacks out the screen

    Melissa LeBlanc-Williams09/19/2018 at 04:35 0 comments

    I followed a tutorial on turning off the screen for the shutdown command and that worked with the shutdown command, but not by using the menu to shutdown. I ended up making a modified version of rpi-display-backlight.service that removes the conditional and runs the command to shut off the display and that worked great for the menu only, so I ended up just implementing both methods and it's working good. I also figured out how to disable the screen blanking because it was getting a bit annoying. It was really as simple as installing xscreensaver and disabling it through the menu, so turning it back on through the UI is pretty easy.

    I did a little bit of research and it looks like I will probably end up making my keypad driver into an lxpanel plugin so that I can display if the 2nd or Alpha keys are pressed. For the battery level, I think the best approach is to look at interfacing an existing battery lxpanel plugin with my code that reads the voltage level so that it will display on on the menu bar.

  • Fixed USB Extension

    Melissa LeBlanc-Williams09/17/2018 at 01:18 0 comments

    I fixed the USB extension on the bottom of the calculator so all hardware is now working. On the software side, placed code to control the backlight in a script and I'm trying to get it to run the script on shutdown. I may decided to actually create a simple service if I can't get that to work consistently.

View all 9 project logs

Enjoy this project?

Share

Discussions

Melissa LeBlanc-Williams wrote 09/13/2018 at 05:21 point

Thanks

  Are you sure? yes | no

Morning.Star wrote 09/12/2018 at 21:01 point

Nice hack :-D

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates