Close

Small Batch Production Trial

A project log for NP-41 RPN Calculator

NP-41 is a hardware realization of the Nonpariel calculator simulator. It executes the original HP-41C / CV byte-codes.

chris-chungChris Chung 07/05/2018 at 18:360 Comments

It had been quite a while since my last project log. I had worked on the project on and off for the last 2 years.

After successfully built the two-part prototype unit. My target was to create a design that allows me to offer the project as a DIY kit. And the two pcb design although works, is not ideal for DIYers. The headers need to be bent and it takes time to get the alignment right. I simplified the design into a single PCB to allow for easier assembly.

A buzzer had been added, along with an experimental application ROM support feature via USB-TTL upload.

I had also design a very simple case to house the PCB. A number of units were created in hope of that I can offer them for those who are interested. The units are hand soldered and after a few failures my skill was getting better and I had produced a dozen or so working units. Since the units were not reliable and did have intermittent failures, I held on to these for 5 or 6 months before finally offered them for sale. During which I would turn them on and off every few days and do simple operations to ensure their reliability, or so I thought.

10 units were sold and 6 of them were either DOA or failed after a few uses. I was not expecting this and it was a real set-back for my intention to provide the project as a hobby kit.

After retrieving some of the failed units I found that I can revive most of them by flashing the firmware again. I then spent time to reproduce this "bricking" problem and eventually found that the firmware was corrupted if the supply voltage was not stable during the application of initial power. This actually happens when the battery was being inserted. It had not happened during my 6 months testing with these units as I never tried to change battery. It was the jiggling of the CR2032 into the coin cell housing that triggered the failure.

Still this was a mystery as according to specification of the MCU this should not have happened. Eventually I found out that the issue lies on a custom bootloader I created to allow for user firmware upgrade via a USB-TTL cable. In my bootloader code I had relocated the PUR (power on reset) interrupt vector to point to my bootloader code. In my bootloader code I would wait for USB-TTL connection signals and instructions to upload firmware, which includes code to write to MCU's FRAM memory. There were certain standard MCU peripheral initializations that I had to skip (code space, I don't even setup a stack in the bootloader). And the jiggling of the coin cell had created a series of resets, combined with the lack of proper MCU startup, had caused random memory corruption.

This problem was corrected after I spent a couple of months of investigation. I had since re-written a more robust bootloader and had this issue fixed.

But this was not the only problem, newly assembled and repaired units were still failing, not when batteries were inserted but after a few days or weeks usage. There was something on the hardware side, not properly designed PCB, poor assembly method and skill, combined with environmental EMI issues is another challenge this project faces. I shall dictate that to another project log update.

Discussions