Translate

Sunday 22 November 2020

Strathclyde STD 305D Display fault

Remember the Strathclyde STD 305D I built a supply for here? Well, it ran for a while then the display started to play up .... 

It stopped indicating the correct speed. Ugh.


I got it back into the workshop, and poked around the board. 

The vacuum fluorescent display is driven by a long obsolete counter, a Plessey ZN1040. The good news is, it's actually counting. The bad news is that's all it does. The way it indicates RPM is it counts some pulses derived from the motor's tachometer , and a reset pulse comes along and resets the count. The display is then updated on reset, so 33 pulses per "reset" indicates 33 RPM on the display ... A prod round with the 'scope shows the reset pulse is missing. The pulse is generated from a Plessey ZN1034 precision timer IC, again long since obsolete. Damn. 


It's a bit like a posh 555 IC.. It's simply configured as a bistable. Replacements appear to be available on eBay, but are of questionable parentage. (You can't tell me that when this thing went obsolete in the early 80's, China had massive stocks of them).

We need to find another solution. 









This is a quick sketch of the relevant bit of the STD305D's schematic. 

As shown here, it's the Q output that feeds the reset pin of the counter. The complimentary output (not Q) of the ZN1035 timer is also feeding something, so we'll need to implement that also ..







 

The power supply available is 5V, so that's easy. How about an ATTINY85 ? Perfect. Two pins connected for both outputs, Q and not Q. Should be easy enough, and be easy to fit. Good, a plan. 

The program is simple enough ... 

#include <avr/io.h>
int timing = 1000;
void setup() {
  // PB 3 and 4 to output
  DDRB |= (1 << PB3);
  DDRB |= (1 << PB4);
}
void loop()
{
  //set PB3 , unset PB4
  PORTB = 0b001000;
  delay (timing);
  // set PB4, unset PB3
  PORTB = 0b010000;
  delay (timing);
}

I've used direct port manipulation to minimise the overlap between Q and not Q. digitalWrite takes longer to change the state of the port. I don't know whether that would be an issue in this application, but it's best practice. We can tweak the timing variable to suit.

The ATTINY85 is loaded into an adaptor and programmed using my ISP programmer



As power consumption isn't an issue, the micro is set to run at 16MHZ internal clock. 




The ATTINY85 is pressed into service, and produces odd results. The reset line still isn't resetting the ZN1040 counter. Checking through, I connect it directly to the reset line of the ZN1040 ... not a good idea, as this instantly kills the output pin on the TINY. :(

Liberating the ZN1040 pin from the board, the pin on the IC measures a few ohms to ground. Not only is our ZN1034 dead, but so is the ZN1040.... What's common here? Ugh , the +5V rail. 

I measure the 5V rail ... it's 5.1V , close enough.... hang on 5.2 .... 5.3 ... it ends up at 6V , the regulator on the power supply board is shot. It's a simple enough Zener diode and transistor affair... I sack it off, remove the BD239 pass transistor, and fit a 7805 on a heatsink. It's all a bit too late for our poor ZN1034 and 1040 though. 




So what to do? Obviously remove both IC's. Feed the pulses from the tacho into an arduino, calculate the speed, and output it over the existing discreet transistor drive circuitry to the display. Works for me. 

Studying the datasheet for the ZN1040 , gives us all the info we need... 


OK, so this is shown for LED displays, but the principle will be identical. Four lines switch on the supply to select which digit MSD (Most significant) to LSD (Least significant), only three are connected in our application ... We'll need to multiplex these, and the actual segment drives (A-G) need to be pulled low to illuminate the display. 







First up, is go get our arduino to read the pulses from the tacho. 

They should be arriving at pin 22...


















... and, sure enough there's a nice negative going pulse train arriving, and it varies with the speed control. Great. 

We'll drop these pulses into INT0 on our arduino, and trigger an interrupt on a falling edge.

 




A quick piece of code is conjured up to read RPM and output over the serial interface. It's uncalibrated at present, but is near enough , reading 33, 45 and 78 RPMish...
Excellent, we can return to calibration later (the turntable is currently upside down with no platter on it).

Now to deal with driving the existing display. The ZN7040 is capable of muliplexing a 4 digit display. In this application only three digits are used. A quick bit of reverse engineering shows those digits are the 3 most significant digits. These are coupled to  our arduino on pins A1- A3 and set to digital outputs. Each of these pins feeds a grid, and taking this high allows the display to function.


Arduino pins 3 to 9 are connected to the segments drives for A through to G. These are used to individually control each segment's anode. Pulling the pin low, switches on the anode, and illuminates the segment. 

Bingo, a muliplexed display. Now to couple the two parts together...




And finally to reassemble and calibrate ...



Nice!



I will NOT be beaten by mere machinery!!

The software is available as usual from my github.

And another saved from landfill, these really are a stunning deck. 

1 comment: