Translate

Friday 11 December 2020

Ham radio digital modes interface.

Many moons ago I built an interface to connect my computer to my IC-706IIG transceiver so I could operate a digital mode, PSK31.
I don't do much operating really, but quite fancy coupling my new Raspberry Pi400 up to a radio and having a go with another digital mode, FT8 (I know, I'm a bit late to the party.)

So, the plan is to re-jig my interface and up-grade it a bit. 

First things first, is to work out what I did originally !

It's all a bit of a lash up of parts. 

There's a stipped out USB hub, which has 2 USB to serial adaptors plugged in, and a really cheap USB sound card connected. 

The sound card mic and headphone sockets feed two pots on the front panel to control RX and TX level..



... and onto this PCB, where the audio is isolated by two transformers and connected to the transceiver via a 9-Pin D.










One of the USB to serial converters is just gunged to the back panel. It's the socket on the right. This was originally interfaced to the transceiver to control it's frequency. It's redundant now, as I have USB CAT control leads. 





The other USB to serial converter feeds two optoisolators on the PCB, which are used as KEY or PTT to tell the transmitter to go into transmit. Why two lines to do the same task? Practically speaking, there's no difference between KEY and PTT, except KEY is traditionally meant to mean a morse code or telegraph key, and PTT or "Push to talk" for voice modes. Software generally requires one or the other, rarely (if ever) both, and is generally configurable in your chosen software package anyway, so the RTS or DTR of the serial port can be specified to trigger transmit, as either PTT or KEY. 

A decision is made to rebuild. I want to upgrade the little USB soundcard in there, as it's not a great performer. After doing a bit of research, it seems the Sabrant USB soundcard rates well, and is only £9.99 from Amazon. As pointed out above, there's little point in having two PTT and or KEY isolators, so I'll make one, and make it switchable between a DTR and RTS, and output as either PTT or KEY to two separate jacks.

Both the serial converters in the box can go. I will use an FTDI board to control the PTT, which has the added benefit of only having a 5v output, rather than +/-15V (although I somehow doubt the original RS232 converters actually did this, I may be wrong!). Also it will provide convenient access to a +5V supply to run a level monitoring circuit.

The FTDI board is wired up to give a 5V supply, GND, RTS and DTR outputs.

After a couple of false starts, it turns out that the RTS and DTR signals are inverted, active low, but this was resolved by re-wiring the opto isolator, using the FTDI to sink the current. Whilst this seemed like a good idea at the time, something rang alarm bells with me... a check of the datasheet shows I can only sink 6mA, so I use a couple of BC547 transistors to invert the output and drive the optocoupler. 

More false starts... lord only knows what the isolation transformers I have are, but they're not the right thing at all  (did the original box ever work at all? I'm damned if I can remember!). 


I order some small 1:1 600 ohm isolation transformers from eBay








and conjure up a schematic in Kicad ...
I've changed the BC547 transistors to their smd brothers, to maximise the available space. It actually turned out a bit smaller than needed, but that's no bad thing...



Because (this time) our transformers are 1:1, we may well need to add a bit of attenuation into the signal. This is provided by the four SIT (suit in test) resistors R1, R5 ( transmit audio) and R11, R12 for received audio. RV2 is going to be mounted on the front panel, so it connects via a three pin header. I also plan to connect another front panel pot before the input at J1, it's the same deal as RV2. You may notice the RTS and DTR lines are coupled together. I'll feed one or the other from a change over switch. 

May as well design a board ...















I do love Kicad's 3d modelling. It's not just pretty, its great for polishing the layout of labels etc..






The gerbers are sent to JLC PCB for manufacture, and after a little wait for delivery, arrive. 


















A little while is spent mounting the components. 
The four SIT resistors are set for no attenuation to start with. (R11 & R1 S/C, R12 & R5 O/C)









... and as usual, an error is spotted... thankfully it's just on the legend for the FTDI, the 5V and GND are reversed! 








It's all wired up into the enclosure... I'll tidy it up later, after we're happy with the performance...










WSJT-X is loaded up onto the Raspberry Pi400, and set up, the interface connected to my FT-817, and we're decoding!







The two trimmers are adjusted on the PCB, to give an indication of level on the LED indicators...

Incidentally, my friend Pyers 3D printed the front and rear panels for me.













There's an issue though... the FT-817 won't transmit :( 

The PTT is working just fine, but there's no modulation.




A fair amount of time went into checking and re-checking cables, and audio levels, then caution was thrown to the wind, and the FT-817 gets it's first ever factory reset in the many years I've owned it... after resetting menu 26 to USER-U , it bursts into life and transmits. 

A few minutes later and our first QSO on 2m (144MHz) is complete, with Stuart, G0LGS a few miles down the road in Cheltenham.  

PSK reporter also reports my tiny signal is being heard just outside of Cork, in Ireland, and, although I can't hear him, that's not bad for 5W into a discone antenna!

I've got a number of boards left over... if you'd be interested in one, drop me a line.

Sunday 6 December 2020

NAD 3020 repairs

The famous George rang.

My NAD's developed a nasty hum, can you have a look?

Yeah, why not...


It's the very excellent NAD 3020.

A particular favourite of mine. These must have been one of the best selling amps throughout it's life...

(There's even a wikipedia article on it here.)





Now, many of these are getting a bit long in the tooth now.... and George's is no exception.

I switch it on, and there's some awful humming which just won't go away. Some of these amps suffer with a hum on switch on, which disappears after a few seconds, after frightening the user. We'll come back to that later.

Remove the screws on either side, slide the lid back slightly and lift it off...












One feature of this amp is the shelf at the back, where all the connections are located. Makes access easy if you're fishing around around the back. It's not without it's issues, however...








Turn the amplifier upside down, and remove the base plate (8 screws, short one's in the middle!) 











This is the underside of the connection "shelf" ... dry and broken joints are normal here, so solder the lot up...










There's some caps showing signs of their age, and have failed. I'm going to change the usual suspects..




... as well as the four main smoothing caps.












You'll need to pull the knobs off, and remove the four countersunk screws securing the front panel, and remove it ... be careful to support it, as we don't want to go to the hassle of removing the power meter's ribbon cable. The power LED will pull out.








Remove the screw securing the brace bar behind the front panel..

... and the other screw securing it on the back 









Two screws attaching the PCB to the brace bar, one through the heatsink.....












and the other towards the rear ...










You can now remove the brace bar to access the whole of the PCB. 


So after a quick cap change (there's 4 2,200 uF 63V caps, two 1,000 uF 6.3V caps (I fit 16V types here , I don't trust those 6.3V elctrolytics!) and two 330uF 63V caps...) 










(The other 330uF 63V is hiding!)











..things are much improved, but there's another fault... I mentioned it earlier. When you initially switch the amp on, there's a very unpleasant hum which decays, leaving the amplifier performing ok.. it's like a "whomp" as it turns on. It's a very common fault...


It's caused by this capacitor (and sometime's its neighbour too). I change them both for 47uF 63v types... whomp gone!









Bias is checked , and is spot on. Just got to button it up, and give it a good testing with "The Lasters" by Fred Deakin.

The guilty parties... 

Thursday 26 November 2020

Gould MMG5-5 early-ish switched mode supply repair.

I was thinking about another Arduino Christmas post. I'd got a string of 50 WS2801 LEDs left over from another project, so I thought I'd write some code to display some pretty patterns. As it turns out the FASTLEDS library had just what I needed in the examples section, so I uploaded that to a nano, and hooked up the GND. CLK and data lines to the nano, and was enjoying the lightshow. 

I needed to power the LEDs from a bigger supply than can be supplied by the nano itself, as the LEDs draw a shade over 1 amp when flat out, so I got out a little 5V 5A bench supply I bought from a car-boot sale in days gone by. When I saw it at the bootsale, I didn't know what it was, but for the price, there was a nice case, a panel meter and, somewhat unusually, a keyswitch.


It's a useful little thing, but doesn't get used that often. Great for when the main workshop supply just isn't quite big enough for the job.

All was well. I left it running for a bit, and went to watch some TV... I thought I heard a pop from the workshop. I glanced over, and could see the LEDs happily flashing away.... then about a minute later , that smell of burning molasses. Ugh... somewhere there's a Rfia let go!

Sure enough, the smell was coming from the supply. I switched it off and opened the window, and closed the workshop door behind it. 




Once the air had cleared, I disassembled the unit to find a Gould MMG-5 power supply module inside. It's all very nicely made.





It proved a little challenging to get open, this plastic rivet must be removed ...










... this cover removed ...











... this flexible solder tag unsoldered ...












... and that recessed nut undone ...










The electronics can then be removed.  











There's a nice date on the transistor , 44th week of 1977.

Switch mode supplies were starting to get commonplace in television sets around this time, so the technology wasn't exactly new...




... although, this small daughter board seems to have optical isolators, which TV's of the time certainly didn't have. There's no bespoke switched mode controller IC here. It's made up from a logic IC and a slack handful of opamps. 





And there's the guilty party. Sure enough a Rifa! It's replaced with a brand new X2 Class Epcos branded part of the same value.





And another saved from landfill...












Incidentally, the meter has a shunt to read 0-10A, despite the supply only being capable of 5! 

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.