quarta-feira, 21 de fevereiro de 2024

 HP-41C Troubleshooting

I had these common symptoms on one of my 41CV calculators, and managed to fix it using a workaround.

It was presenting all sort of garbage at the LCD, processor lockups, effectively preventing a successful initialization.

Sometimes it would initialize completely, but it was basically unusable due to instability.

After analyzing the power supply IC voltages and signals (all OK, despite 140mVpp ripple from the DC-DC converter), power supply IC/Processor IC handshaking (OK), and Processor signals (OK, but lots of noise at the buzzer pin), I came to the conclusion that there was a failure in the Processor IC at the internal driver stage to the piezoelectric buzzer.

In one of the moments where it seemed to be working, I noticed that the execution of BEEP or TONE commands would systematically crash the machine (despite the sound output seemed to be normal), either with a blank LCD, or a "Memory lost" message, or just displayed lots of garbage characters.

I did the obvious next step, and removed the buzzer.
The calculator issues went away immediately. It never failed again.

So the failure was either due to a defective buzzer or an internal failure of the CMOS driver stage to the buzzer.

From the electronics point of view, the buzzer is essentially a capacitor (around 20nF).
Indeed the buzzer was fine. Infinite resistance, zero leakage DC current under 15VDC (maximum output from my lab power supply).

To confirm the Processor IC buzzer driver stage failure, I loaded it with different resistors (a benign load type as opposed to a capacitor or an inductor).
From 100KR to 1MR would crash the machine, the lower the value the more frequent crashes.
With 3M3 it would work, apparently normal.

I set for a 5M6 precision metal film resistor as a permanent load on the Processor IC buzzer output pin.
The reason for this pull down resistor is that I wanted to have the BEEP/TONE working (see below).

Under rest state, the Processor buzzer pin is at GND level (0 Volt).
Under BEEP/TONE execution, there is a square wave with +VCC peak-to-peak amplitude (6.6V in my unit, 6.5V nominal).
Lots of random noise with around 1Vpp at the GND level was seen as well, indicating the failure.

So I tested a simple CMOS NAND gate (set as inverter) from a CD4093B Schmitt-trigger IC, where the NAND input was connected to the Processor buzzer output having the 5M6 pull down resistor, and the output connected to one of the buzzer leads.
The other buzzer lead connected to +VCC.

This was 5 years ago. Recently I found the machine in a box of faulty machines, and tested it again.
As at the time I didn't care to install the workaround components properly, this time I have ordered a new CD4093 SMD type to be small enough to fit under the disc buzzer.


ADDITIONAL NOTES

Troubleshooting setup

In order to do a proper troubleshooting, I removed the zebra connector at the bottom and the flex power connector at the top.
The lab power supply set at 6VDC was connected to a pair of wires soldered to the KB/Display PCB assembly.
The Processor PCB assembly was connected to the KB/Display PCB by using 30 lengths of wire wrapping (thin teflon isolated wire) directly soldered.






For the final job, shorter lengths of wire will be used. to reduce signal cross talk. Despite the low frequencies in use (300 or 400 kHz), their square and pulse waveforms generates lots of RF harmonics. 
I will never use the zebra connector again in this unit because I was lazy and have soldered the wires directly over the PCB pads.

Soft reset versus hard reset

A soft reset uses the Back + ON keys combination, but it doesn't guarantee to do its job in every situation.

A hard reset guarantees to put the machine in complete absence of electrical potencial (voltage) at the components.
To do it, remove the power supply from the machine (batteries or external), then use a tweezer (or a clip) to firstly short the larger 470uF cap, then short the smaller 100uF one.

By the way, HP have chosen excellent electrolytic capacitors for this 41CV.
I removed them and they measured very well, as new, with very low Vloss (1 to 3%), low ESR (less than 0.5R on both), and the capacitance value was above nominal.










domingo, 11 de dezembro de 2022

O meu primeiro Alfa - Um carro com história


Corria o ano de 1975 quando deixei a Escola Industrial para começar a vida profissional, inicialmente na João ferreira dos Santos na oficina Grundig, mais tarde na Conrad na secção de telecomunicações Racal e Storno, sem antes ter passado pelo Laboratório de Electrónica da Faculdade de Engenharia Eletrotécnica como tarefeiro.


Conheci o Sr. Canhoto, chefe das oficinas NCR da Mecanodex por intermédio do Barbosa que lá trabalhava, meu colega da Escola Industrial, numa das muitas saídas da cidade para as praias do sul.  

Fiquei a saber que ele tinha um Alfa para venda, baratinho, que estava parado já há uns bons dois anos, a precisar de uma revisão mecânica aprofundada já que o motor deveria estar "colado".


O meu primeiro vencimento foi para pagar ao Canhoto o Alfa Romeo 1600 TI Super de 110 alegados cavalitos, em bela cor amarela com hard top preto.


Cravei o Lopes para me rebocar o carro para a garagem da vivenda do Barbosa, onde funcionava a Pensão Aristocrata, propriedade de sua mãe, Dna. Maria.

A ideia era restaurarmos o motor, aprendendo mecânica no processo, já que a nossa área era eletrotecnia, e com a ajuda de um hóspede que era mecânico especialista da Renault.


Desmontar motor e caixa de velocidades foi relativamente fácil, abrir o motor também, agora identificar os problemas já foi mais complicado. 

Aparentemente tudo estava bem, nada parecia danificado, a cambota e capas estavam intactas, as camisas, pistões e segmentos também pareciam isentos de danos, a corrente de distribuição, distribuidor, bomba de água, bomba de óleo, enfim, tudo parecia bem.


Contudo a cabeça com as suas duas árvores de cams, as 8 válvulas e pastilhas, tinha a junta de cabeça "queimada" e mais grave, já tinha sido retificada no torneiro pelo menos uma vez, e duvida-se se seria possível retifica-la uma vez mais.


Dada a escassez de peças que se fazia sentir na época, e considerando que uma cabeça completa custaria uma avultada despesa num motor cujo bloco de alumínio já mostrava sinais evidentes de desgaste nas sedes de parafusos excessivamente apertados provavelmente sem terem visto sequer uma chave dinamómetro, implicando ainda mais uma despesa a abrir novas roscas e mais alterações, optou-se pela ida ao sucateiro.


O sucateiro, lá para os lados do aeroporto, ouviu o meu pedido sem prestar grande atenção. Eu queria um motor em bom estado de um salvado Alfa Romeo. Disse-me para passar lá dentro de duas semanas. 

Acabei por ter que passar umas boas vezes, sem sucesso, até que um dia ele telefonou ao Arnaldo, meu amigo e funcionário da Volvo Penta acessórios, a dizer que a encomenda estava disponível para levantamento.


Depois de seis meses com o carro parado na garagem do Barbosa, finalmente pudemos montar um motor usado, em bom estado, que apenas necessitou de uma ida à Alfa Romeu na baixa para ajustarem as válvulas com as famosas pastilhas. 

Entrou a falhar e sem ralenti, saiu pela minha mão com o trabalhar regular e o som entusiasmante do escape, convidando a umas aceleradelas de teste.


Foi meu companheiro cerca de três anos, até o ter doado ao Barbosa e Arnaldo. O carro deu entrada na oficina do Dionísio e Zeca "Maluco" lá na Rua do Trabalho, para ser restaurado na chapa e pintado de vermelho, longe de imaginar que esta seria a sua cor original.


Vim a saber muitos anos depois, na era do Facebook, onde publiquei umas fotos do carro, que este tinha sido comprado pelo Walter Gameiro ao Alex Correia da Fiat/Alfa Romeo, originalmente em cor vermelha,  e devidamente modificado com escape de rendimento, cabeça rebaixada, carburadores duplos weber e por aí adiante, com suspensões adequadas ao objetivo da compra, que foi competir nos rallies.


Nota: Em 1975 vivia-se o tempo da mudança na África Portuguesa, e este relato teve lugar em LM (Maputo depois de 1976), Moçambique.


Circa 1975 76, eu e o Zé Maria, apanhados pela objectiva do Barbosa ao lado do Giulia TI.



O Walter Gameiro numa das suas participações em rallies na zona de Nampula, norte de Moçambique.





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

Details:
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

Details:
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: