quinta-feira, 31 de janeiro de 2019

Return to origins

terça-feira, 15 de maio de 2018

HP-19BII door on the back calculator

This calculator operates on 4.5VDC from 3 x "N" or "LR1" battery cells.
From its serial number, I understand this calculator was made in Indonesia with a manufacturing date of July 2001 (week 29).

According to the Kees's site, the 19BII model was introduced in January 1990 and discontinued in September 2002.

There are two variants concerning the battery compartment door.
The common and original variant have the battery door on the side, as used on the HP-28S as well,
and due to a design flaw it breaks easily  after some battery replacement operations.

This issue was later fixed on the HP-19BII on the latest production batches made in Indonesia, probably starting in January 2000 (just a guess, see below) until the discontinuation date of September 2002.

I have got some pictures taken from Internet for this later variant with battery on the back and the lowest serial number I could find so far is ID004 (year 2000 week 04).

As it is now, the dates interval would be at least from January 2000 to September 2002, less than three years in production.

This would make this variant kind of rare, explaining the high selling prices on the auction sites.

Details of the original Panasonic "N" battery cells that came with the calculator bought new in the box on year 2001. These batteries shows a expiration date of 05-2006.

Somehow some batteries don't fit nicely inside the battery compartment. I had to apply serious force to convince the two batteries that goes in a row to go inside. The third battery going alone in its dedicated bay fits easily.

As the original Japanese Panasonic cells that the seller had were totally depleted (0.9V), I used some cheap supermarket Chinese OEM re-branded cells (in red color on the picture below) and these are bigger (around 1mm longer) than the original ones. This results in 2mm more to be fit between the battery contacts, creating a huge pressure on the battery compartment walls.

I also have some recent Maxell Chinese cells that are identical to the Japanese original ones.

sábado, 10 de fevereiro de 2018

SwissMicros DM42 Scientific Calculator

Long time ago (1987?) HP released the now famous among collectors 42S RPN based calculator.
In december-2017 SwissMicros have released its DM42 calculator, based on the popular Free42 simulator

The DM42 functions are well documented, as it is easy to find the HP-42S user guides here and here and the Free42 simulator has its own user guide.
SwissMicros have created its own user guide as well, to document the specific features unique to its hardware platform.

Currently (2018, February), there is little information on the hardware platform besides the processor type and memory, as a service guide is not available at the manufacturer. The same applies to the software environment used to develop the operating system where the free42 application runs.

From the point of engineering view, it is essential to know what is the hardware design in order to fully understand the other project ares like the software code built into the firmware.

So far no one have published reverse engineering or an analysis work by visual inspection of the calculator internals. In fact it is almost impossible to find high resolution photos of the PCB to learn what components were included in the hardware design.

Recently I found this medium resolution pictures, and it allowed to uncover some more details.

I understand that there are several hardware versions, and this PCB would be the most recent version, marked with "calcbase3b (c) SwiddMicros GmbH 2017".

I am publishing here a copy of the picture in question.

So far, i could identify the following hardware components:

Integrated Circuits:
- IC1: MX25R6435F M2ILO - Serial NOR FLASH ROM, 64Mbit (8M x 8), 80MHZ, 8-SOP package.
- IC3: STM32L476 VGT6 - SoC Processor (V = 100/104 pins, G = 1Mbyte Flash, T = LQFP 100-pin, 6 = -40°C to 85°C).
- IC4: 6-pin, Identification not readable in the picture
- IC5: 6-pin, Identification not readable in the picture
- IC7: D3985 - LDO VR Ultra low drop and low noise BiCMOS voltage regulator.

Active components:
- UD1: UL46 - ST USBLC6-4 SOT23-6L package, very low capacitance ESD protection. 
- D1: Diode, Identification not readable in the picture
- D2: Diode, Identification not readable in the picture
- Q2: Transistor, Identification not readable in the picture

Passive Components:
- Q1: 32.768K-E - CRYSTAL 32.768kHz, ±20ppm, 6pF, 50kOhms, 4-SOJ package. 

Not listing here the capacitors and resistors.

The total count of visible IC's are  5.
The total count of visible active components are  4.

This drawing (not to scale) list the above components in the PCB.


A few initial observations from the above:

- Q1: This is a high precision crystal and curiously was marked with a transistor label in the PCB silkscreen (it should be marked as X1 imho).

- UD1: The USB connector (JP1) I/O data lines connected to the Processor, are protected against external ESD or over-voltage by UD1, a fast high current low capacitance Diode/Zener based integrated circuit.
This is good engineering from SwissMicros and they didn't cut costs to do a proper design here.

- IC7:  Michael's comments on the LDO 3Volt regulator helped to identify IC7 that is not readable in the published picture, but from the IC pinout configuration it was easy to guess what this IC is.
So IC7 will be used when the calculator is connected via USB port to a computer, to regulate the external USB 5Volt down to 3Volt used to power the calculator, disabling the use of the internal CR2032 battery cell.
This allows to run the Processor at 80MHz instead of the regular 24MHz when the calculator runs on the battery.

-  IC1 and IC3: These two are the most obvious integrated circuits, but they are not alone. This is not a two IC's design.

- IC5 and L1:  IC5 is not readable in the published picture. However, it is close to the LCD connector.
Assuming that the LCD in use is a  LS027B7DH01 from Sharp Microelectronics (is it?), then it requires a 5Volt supply line to operate.
As the internal battery cell supplies just 3Volt, a step-up converter is needed and the IC5 and L1 combination may be in use for this purpose.
IC5 could be a single opamp on a 6-pin package, like the MAX4401.
Although a more conventional charge pump IC and capacitor (no inductor required) could be used here.
Just guessing.

- IC4 and Q2: IC4 is not readable in the published picture. But its close proximity to the buzzer would make it an audio driver (again, a MAX4401) using Q2 transistor to connect to the buzzer.
Again, just guessing.
Any corrections or even better, additional information on the hardware design and high resolution pictures of both sides of the PCB, is very welcome!

Estimate for battery current consumption:

Since SwissMicros is omitting the average current consumption on the DM42, here is a rough estimate for worst case scenarios:

- 11.4uA in power Off mode on average.
- 5.25mA in Power On state and running a non stop program
(Note that the power on state value will be higher when writing to the Flash ROM).

Can anyone with a current meter, an external 3VDC battery and a couple of wires take measurements for the benefit of all?

How did I get the above estimates:

Power On sate worst case scenario (running a non stopping program):
Avg: 45uA + 2400uA + 2800uA = 5.25mA
Max: 70uA + 2400uA + 4500uA = 6.97mA

LS027B7DH01: 1Hz refresh rate
35uA avg to 70uA max at 5V
3 to 5V step-up converter efficiency of 70% (guess value): 45uA to 91uA

STM32L476VGT6: on low power run mode:
100 μA/MHz x 24MHz = 2400uA

MX25R6435F: 100% reading mode only
2800uA avg to 4500uA max.

Power Off sate worst case scenario:
Avg. 10uA + 1.4uA = 11.4uA
Max. 25uA + 1.4uA = 26.4uA

LS027B7DH01: 1Hz refresh rate
10uA avg to 25uA

STM32L476VGT6: Stop 2 mode, with RTC:
1.4 μA

The larger consumer when in power off state would be the LCD display.

Input/Output interfaces visible on the PCB

Besides the standard USB I/O port and the InfraRed LED, at least two additional I/O ports are apparently available providing they are routed to the SoC STM32L476 VGT6 processor:

SPI2: This is an obvious standard Serial Peripheral Interface bus.
Located close to the battery cell and Reset/Pgm buttons.
This port is cleared labeled on the silkscreen close to the 32.768K-E Crystal.

Identified connector terminals:
GND: Ground
SPI2_SCK: Serial Clock
SPI2_CS: Slave select
SPI2_MOSI: Master Output / Slave Input
SPI2_MISO: Master Input / Slave Output
VCC: Power Supply

The STM32L476 provides three SPI buses and one Quad SPI bus.

LPUART1: This seems to be the Low Power Universal Asynchronous Receiver Transmitter interface provided by the SoC STM32L476 VGT6 processor.
Located close to the buzzer wires solder joints.

Identified connector terminals:
VDD: Power Supply
RX: Receiver Data line
TX:Transmitter Data line
GND: Ground

Two additional unidentified PCB interfaces are visible close to the buzzer:
J4 with 4 pins.
J1 with 6 pins.

The the SoC STM32L476 VGT6 processor provides a Serial Wire JTAG debug port (SWJ-DP).
According to the ST documentation, this is an ARM standard CoreSight debug port that combines a JTAG-DP (5-pin) interface and a SW-DP (2-pin) interface.
J4 could be used as the development/debug interface, but from the picture it is not possible to see where the PCB traces are going to. 
Estimate for battery current consumption - Take 2:

According to a video presentation of the DM42P prototype by Günter Schink at the HHC2016 published on youtube on Sept 21, 2016, the power consumption values were measured for a "few test runs" in these conditions (please check the video at 25:43):

DM42P Hardware

Power consumption:

- At 27MHz, continuous ops: 50h

- Screen ON but idle: 2000h (~80 days)

- While OFF ??

I don't know what battery capacity was used for the above test runs.
So, assuming a standard nominal 210mAh CR2032 battery cell, the current consumption for the above hours of operation would be:

- At 27MHz, continuous ops: 50h Translates to 4.2mA average (my estimate in a previous post above was 5.25mA avg in worst case scenario)

- Screen ON but idle: 2000h (~80 days) (This means Power ON, idling) Translates to 0.1mA average

- While OFF ?? Current consumption while in power OFF state remains unknown until a good soul can take some readings and share the results

One note on heavy loads on the CR2032 battery cells:

The DM42 figure of 4.2mA current consumption when running a looping program for long periods of time is above the recommended standard continuous current supply for any CR2032 battery cell if we want to be able to consume all the cell nominal capacity.

This applies also to other machines like the HP-35S, HP-20B, and HP-30B (however HP have designed two CR2032 cells in parallel in the power supply to reduce the heavy current loads imposed per battery cell).

The standard continuous current discharge for a CR2032 is 0.2mA (this corresponds to a 15Kohm load, and that is the value used by the manufacturers to test its CR2032 products in order to evaluate the actual available capacity).

Of course the CR2032 can supply above the 0.2mA, typically up to 10mA on extreme heavy loads (or even more, depending on brand/model), but the battery will be stressed and its life (meaning, its capacity) will be shortened accordingly.

Those extreme 10mA heavy loads may typically result in 1 Volt dropped in the battery internal impedance, meaning that for many processors the cut-off voltage is very close to happen in these conditions.

So, I would expect to see a single, good quality (lower internal impedance over time among other factors), above average 220mAh ~ 240mAh capacity, CR2032 battery cell powering the DM42 for a good amount of time (up to a maximum of 2000 Hours), as long as continuous looping programs are not run all the time (and the amount of write operations to flash kept to a minimum).  

 Notes on flash ROM performance

The STM Reference manual for the processor contains huge information on the subject, but we do not know how the system was implemented by SwissMicros, as many working parameters must be set by the operating system to set the hardware intended behavior.

As far as I know, the STM processor uses a linear 4GB address space divided in eight 512MByte blocks, where all memory and peripherals are mapped.

I would expect a performance degradation when accessing the external Flash memory when compared to the internal Flash.
By how much, probably only after exhaustive testing can be determined.

This is a complex processor architecture, and there are many parameters that need to be set at low level in the O.S. depending on the designer goals.

For instance, the memory latency (wait cycles) must be set depending on the intended processor operation/speed/voltage settings and this applies to the internal Flash as well.
On the internal Flash a variable number of cycles is required depending on the type of code. Also STM offers instruction prefetch and cache to increase efficiency when accessing the Flash at higher clock speeds. These features need to be configured by software as well.

On the other hand the external Flash connected to the Quad-SPI processor interface can be accessed in a number of different ways, namely direct memory-mapped or indirect using registers or interrupt driven, different data word sizes can be accessed, etc.
Anyhow, the QUADSPI interface talks to the external Flash using 5-phase commands, and any one of these 5 phases needs to be set/skipped, so this introduce more indeterminacy on the performance. For example, the dummy cycles phase (wait cycles) can be used when operating the processor at higher speeds to let the Flash be ready for the processor.

Notes on power consumption when powered off

grsbanks Wrote:  Power consumption when off is in the region of 3uA.
Thanks for your information, Godwin.

Assuming that the DM42 O.S. leaves the STM32L476VGT6 processor in Stop 2 mode with RTC when the calculator is powered off, then only 1.4μA should be accounted for the processor as documented by the manufacturer.
The remaining 1.6μA are consumed by one or more of the other calculator components that will not be totally shutdown during the power off state.

So, concerning the power consumption, here is what we can assume at this point:

1. Assuming a standard 210mAh 3Volt CR2032 battery cell as the power supply.
2. Power ON state, continuous operation: 50h (~2 days) or 4.2mA average.
3. Power ON state, idle: 2000h (~80 days) or 0.1mA average.
4. Power OFF state, battery left inside: 70000h (~8 years) or 3 µA average.

8 years would be a nice lifespan for any coin cell battery if they could survive that long. Maybe they can if the environment conditions are ideal and a good brand advertising expiration dates is chosen. Otherwise battery internal current leakage would usually prevent a CR2032 to maintain its ability to supply current for that long.



sábado, 27 de janeiro de 2018

HP-50G Blue Graphical Calculator repair

This machine was dropped on a desk and stopped working.
This was a new calculator, in pristine condition, barely used before.
Well, in fact the calculator would turn because it beeped after a memory clear, but the display appeared to be totally dead. No scratches or dents were visible after the accident, and the display looked physically perfect.

So I had nothing to lose, and decided to have a look inside.

Using a suction cup, have removed the plastic screen lens.
This operation requires a small suction cup (see this example by Erwin Ried), no larger than 5cm in diameter, in order to be able to apply extraction force at one of the corners at a time.
I had to apply a few Kg of force in order to be able to lift the plastic lens. This is because the adhesive underneath is very strong.
I have worked one corner at a time, and initially the cover lens didn't move at all, but the adhesive was being broken underneath.
I thought to use an hair drier to apply hot air over the display to soften the adhesive a little bit, but it was not needed.

Have removed the two top self tapping screws, in order to have both halves of the case free to be taken apart.

To take the two halves apart, I used two of my usual pry plastic tools (easy to find them on eBay under repair tools for mobile equipment) to separate them. Have started at the top side, by inserting the pry plastic tools between the lower white cover and the upper blue cover and sliding the tools towards each corner.
We need to be patient doing this, until the lower cover starts to lift on one of the lateral sides, so have slide the tool along the that lateral side to open the latches (four per side). Then repeated the operation on the other side.
If you try this, please do not use metallic tools on the plastic case as it may leave marks (dents, scratches) of the operation.

A word of caution: Do not separate the two halves apart more than two cm (one inch), or the buzzer wires may be broken and the worst case scenario would be a inoperative buzzer if the wire rips off part of the delicate buzzer structure.

Should a wire broke at the buzzer side,  a low power (20Watt maximum) iron solder should be used to solder the wire back to the buzzer.
I have just cut the buzzer wires at the PCB side in order to be able to troubleshoot the problem.

Then have removed the RF shield by just peeling it of with caution to not rip it of.

This calculator was never opened before, because the RF shiled was intact.
It is impossible to remove it without breaking it at both sides because it is wrapped around the PCB before the PCB was fixed to the upper case using plastic rivets (and a few self tapping screws as well).

The two PCB components quality is good and up to the current standards in automated manufacture.

However, the assembling of the PCB's really have space for improvement. The solder joints were left uncleaned of the solder flux/resin, some had that look of badly soldered joints, most probably due to insufficient applied heat to melt the solder with the leads. Obviously this was a manual assemblage using man power.

So, because the display failure was caused by a sudden deceleration, and considering the lousy aspect of the solder joints, I used a ohmeter to check it.
And yes, one of the solder joints was simply broken.  Now, this solder joint was a time bomb waiting to explode any time. The calculator accident just triggered it.

Have used a low power solder iron to fix the joint, inseretd a set of batteries, and the display was back.


quarta-feira, 24 de janeiro de 2018

HP-49G scientific graphic calculator

The last native Saturn processor based machine, running at 4MHz, with 512KByte of SRAM, introducing flash-able firmware for the first time on HP calculators by using a 2MByte Flash ROM, and featuring symbolic calculus (CAS).

Initial production batches had a few hardware issues, later corrected.
The famous rainbow effect is present on my calculator, serial number: ID934.... (Indonesia, 1999, week 34).

One nice touch are the blue colored annunciators:

segunda-feira, 22 de janeiro de 2018

HP-25 Battery replacement

Instead of breaking the plastic holder at the usual place to remove the dead batteries (cutting the middle plastic strip at the batteries side), I prefer a different approach.

The battery holder is made of two plastic pieces welded together at factory. So to open it on the original place we can use a X-acto knife and lots of patience to not destroy the plastics.

After inserting a new set of batteries, the back cover can be glued to the case.

quarta-feira, 6 de dezembro de 2017

HHP-16K and 32K EPROM Emulators for HP-41 calculator series.

HHP-16K DIP switches