2022-01-29

Current affairs

One of the problems that I really want to improve upon is PA current measurement. Reliably measuring up to 20A digitally in what is an electrically rather noisy environment has proved to be problematic, with a mix of common mode rejection issues and RF ingress.

I tried providing a separate 5V power line for the ACS712 current sensor and that did make an improvement, presumably tackling the common mode rejection problem. Still not really good enough though. Next I tried taking the mathematical mean of a series of measurements to try to smooth out noise on the sensor output. Rather surprisingly this didn't help noticeably at all. 

More research turned up a new device, the Texas Instruments INA253, which uses differential amplifiers rather than a hall effect device. This did make a noticeable improvement but the thing that really made the biggest difference was putting a choke/capacitor to ground RF filter very close to the microcomputer input pin. Obviously RF was still getting in there.

The TI INA253 also confers another significant advantage on the design. The differential amplifiers mean that it is possible to reference 0A to anything, including ground. That removes the need to determine the half-Vcc point, something that was a real pain with the ACS712.

First attempt at Mk II PCB circuit

So my current thinking is that I will use the INA253 and that pushes me firmly towards a new PCB, as the INA253 is a surface mount device. There are quite a few other changes that I've made by cutting tracks but there is no way I can do that to bring an SMD into the existing PCB.

Whilst I am at it I will also introduce a potential divider circuit into the temperature sensor input line because the 3.3V maximum input to the microcomputer limits the temperature range to 60°C.

I've made a first stab at the new circuit diagram and will do the PCB layout once I am as sure as I can be that it's correct and as good as I can make it for this iteration. This is normal - the first PCB shows up all the design faults and the second attempt is much better. Occasionally it takes three attempts!

2022-01-15

Improvements...

Well I did say that my projects are never really finished...

Paraphrasing Field Marshal Helmuth von Moltke's famous saying "No plan of operations reaches with any certainty beyond the first encounter with the enemy's main force", I have long since learned that however cunning the design, on the air experience will soon reveal its weaknesses. And so it is with the amplifier. 

Metering

The first problem is metering in general and 50V current monitoring in particular. The readings jump around like a kangaroo even when nothing much is going on (e.g. a steady carrier). Partly this was down to how I displayed the current - there really is little point displaying the load to two decimal places when it is 18 amps! So now, once the current is above 2A the resolution is reduced to 0.1A and above 5A it is further reduced to 1A. That helped.

The real problem though is the measurement methodology. I am using an ACS712 Hall effect device and that produces a voltage output that changes proportionally by 100mV per amp. That's easy enough to measure with the analogue input on the processor but the real problem is jitter on the 5V power supply to the device. A small amount of noise directly translates to changed readings, so, say 50mV of noise on the 5V line is equivalent to 0.25A of jitter. 

5V supply noise
I hooked up the 'scope and sure enough there is some jitter as loads come and go. There's also a lot of general crud on the 5V line as the 'scope image shows. I was rather surprised by how noisy the supply line was but I suppose the fact is that we're not generally too bothered about <100mV ripple on a 5V supply.

5V supply with decoupling
Next I tried putting 470nF + 10uF decoupling capacitors right by the ACS712 and that improved things slightly but it only really removed the high frequency spikes, see image. Most of the noise appears to be coming from the Arduino processor and it seems to be more or less impossible to filter it all out.

I think the solution to this problem is to provide the ACS712 with its own stabilised 5V power source. This is cheap and easy to try out with a low noise precision regulator device such as an MCP1702. I have some on order and will report back in due course.

Bias (again)

I know that I said I wasn't going to bother switching the bias. U turns seem to be quite the rage these days and if it's good enough for our politicians then it's good enough for me. And I think my reasons are better than theirs too.

Whilst I was messing around with the metering problem I decided I should accurately measure the amplifier's quiescent current consumption, which are 33mA unbiased and 225mA with the bias on. I had noticed that the heatsink temperature increased slightly when the amp was on but not transmitting. Well 225mA at 50V is 11.25W and that is not an insignificant amount.

So I decided to connect up the bias control line and write the few lines of code to bring the bias on when TX is requested by the radio and hold it on for five seconds on return to RX. The radio already inserts a 25ms delay before producing RF to give the changeover relays time to change state, so my thinking is that this will be sufficient time for the bias to stabilise as well.

It seems to work OK but I need to do some proper on the air tests to be sure.

There will be more to follow, no doubt.

2022-01-10

Hardware finished?

I think the hardware is more or less finished now but my projects are seldom ever completely finished, especially when it comes to software. Here's some pictures of the finished article

 

There are still various "improvements" to make but most of these are in the software and it's tricky to take pictures of software...

  • Removal of the tacho monitoring software - I can't find a way to keep RF out of the fans, which are, after all, right up against the "hot" parts of the amp. This is no great loss - I had vague plans of monitoring fan speed to create a control feedback loop but that is provided perfectly well by monitoring the heatsink temperature and setting fan speed accordingly.
  • Consolidation of fan speed control to a single output for both front and rear fans. In the end I couldn't think of any situation where I would want to control them separately, so the code can be simplified. If I do produce Mk II controller PCB it too can be simplified somewhat with the removal of a couple of transistors and associated passive components.
  • Removal of bias control. In fact I never wrote any code for this as in the end I couldn't see any situation when I would want to have the amp powered up (50V supply on) but not biased. There would be a small reduction in power consumption on receive if the bias was turned off but then there is the question of stabilisation of the bias at the same instant as RF is being applied. I don't feel the need to go there.
  • Calibration of the power meter. This really needs me to gain access to a calibrated RF power meter somehow because I have nothing that can measure 400W at 144MHz. If needs be I will rent one some time. It's not really too important, as I have an approximate indication, probably within 10% derived by measuring input power and multiplying by device gain. The 50V power input current provides a useful cross check and seems to be consistent.
  • General ongoing software improvements as I get more experience with actually using the amp - probably a never-ending project!

I fixed the problem of RF getting into temperature sensor logic by cutting a track on the PCB and inserting a 100uH choke with 10nF to ground. Good as gold now. Not worth commissioning a new PCB for that!

So I think I have a usable amplifier. It runs reasonably quiet and cool and local reports are that it is clean, so I shall install it as part of the station once I can find a space for it!

Updates to this Blog will likely be rather less frequent from now on, though I will try to remember to provide occasional updates as the software changes or other improvements come along.

I hope you have found the Blog interesting and comments are always welcome. 

2022-01-06

Something's happening

 Yes! We have progress. 

I finally finished the garage workbench upgrade and very splendid it is too. With the nice new heavy duty vice and bench drill installed, it was time to drill large holes for the fans and finish off the mechanical engineering side of the project. This was, more or less, completed just before the new year and since then I have been testing the amplifier in its almost finished state.

I quickly discovered that the sensors are a problem. RF gets into the wiring and gives silly readings, especially on SSB where the RF output level is continuously changing. The temperature sensor is especially prone to difficulties and I spent some time trying to analyse what was going on. 

Eventually, after much faffing around, I attached the oscilloscope to the temperature sense line and found much RF on the line and, oddly, a fairly significant level shift, suggesting that the RF was getting rectified along the way. This is problematic, as the fans are supposed to be speed controlled by temperature and, of course, that really wasn't working. Worse, because the RF interference made the processor think that the temperature had gone down, the fan logic was working the wrong way round!

Well it turned out that it was my wiring. I had naively assumed that the very well filtered temperature sensor output from the amplifier module together with the high level of screening in the case would mean I could get away with unshielded wires. Nope.

Replacing the sensor connections with shielded wire made a big difference but the temperature display was still slightly unstable. So I decided to go the whole hog and instal a filter comprising a 100uH series inductance and 10nF capacitance to ground at the PCB. That fixed it!

With hindsight, I should have put the input filtering on the PCB at the outset but I was too trusting of the amplifier module filtering and simply didn't think the RF could get around my carefully designed screening quite so easily. As I've said before, I'm not very good at RF engineering, especially the fast wiggles of VHF and beyond.

So I've had a bit of a redesign of the control circuit, putting choke/capacitor filters on all input lines, as shown in the circuit fragment to the left. It won't be possible to modify the existing PCB to accommodate these changes and I also have a couple of  other issues that I commented on earlier, so I reckon I am heading for a Mk II PCB. It's so inexpensive to get PCBs made these days that it's hardly worth doing otherwise.

I'm working on the new PCB layout and will probably get it into production in the next week or so. 

Meanwhile the amplifier has been getting some use in the UKAC contests, which seem to be the only time that there is any actual activity on 2m.

2021-12-20

Nothing happening?

No posts for 12 days! What's going on?

My plan was to get the front and rear panels cut by now but various things have got in the way, not least the fact that it is very cold in my garage and working indoors just seems to be more appealing. However, I have not been entirely idle...

I decided that I would invest in a bench drill (drill press to our American friends) as a prerequisite to drilling the large holes for the fans. While investigating how best to mount it, I decided that the old bench was in need of repair. It was built by my father, some time in the 1960s, using Handy Angle. UK readers of a certain age may well remember Handy Angle, slotted angle about 40mm a side, made from a strong aluminium alloy. The nearest thing to it these days is probably Dexion but I think that is only made in steel. 

Anyway, the wooden work top, which I replaced perhaps 30 years ago was very much on its last legs after a few decades of sawing and drilling and generally bashing bits of metalwork. As luck would have it, I have recently had a new kitchen fitted and the very substantial tall cabinet end panels from the old kitchen cabinets would make an excellent worktop so that became the cunning plan. The panel is almost exactly the right length, 2140mm but at 600mm wide it is about 100mm deeper than the original workbench. 

I thought it would be better to deepen the work bench rather than attempt to cut down the panel, so some more aluminium angle to extend the frame was needed. Of course Handy Angle is no longer available but in this case ordinary 40mm x 40mm x 3mm angle will do the job perfectly well - just drill M6 holes as needed, I ordered the necessary materials cut to length from Aluminium Warehouse a few days ago and they have just arrived as I am writing this missive, so I have work to do! I have a nice new vice (vise) and the aforementioned bench drill ready to go, once I finish the workbench. 

Meanwhile, in the warmth of the shack, I have added a fair amount of new code to the controller and tidied up the wiring somewhat. Having now fixed the problem with correctly measuring heatsink temperature I've also been able to complete the temperature sensor and fan control logic, so the fans only come on to the extent that they are needed.

The control touchscreen layout has also received some attention, with various options such as variable brightness and beep level added to a nascent "settings" page. I expect more stuff to be added to that page in due course. There is now a timer which counts the number of seconds that the amplifier has been in Operate mode (50V supply on) and the number of PTT seconds (actually transmitting). It'll be interesting to see what the ratio is but I am guessing less than 20% TX time in normal use.

Well, I suppose I had better go and brave the Cumbrian chill (3°C as I type this) and get that workbench finished.

2021-12-08

Some practical experience

It was time to get on the air. A convenient UKAC 2m contest was later in the day and first hand experience had shown that 100W really does not cut it from IO84. It nearly didn't happen because of storm Barra, which raced across 'WGV-land at a rate of knots during the afternoon, forcing me to luff my tower over. As the 8pm start time approached thing seemed to be calming down, so I decided to risk raising the tower and give it a try.

Yes, definitely an improvement. Conditions were pretty flat but QSOs were easier to come by and with less waiting around while all the other stronger stations made it ahead of me. A total of 25 QSOs was a bit better than I have managed in the past but importantly almost everyone I called I was able to make a QSO with and I even got a few replies to my CQs that hasn't really happened before.

A few minor problems emerged. The lash-up arrangement meant that RF was getting into places it shouldn't, making monitoring of power output and SWR difficult. I already knew that I would have to write software to perform peak hold/slow decay functions on the various meters and the contest proved that emphatically.

Post contest I have spent some time on the peak hold/decay software and that is now more or less working. I've probably reached the point at which I need to put more effort into the hardware, completing the front and rear panels and getting the amplifier into its case. Why do I always end up doing these projects in mid winter when the garage is more appropriately a place for the car to live in rather than a freezing cold workshop? 

Generally the software is now usable but working on that is a lot more warm and comfortable so no doubt that will continue. I know I have to fix some RF ingress issues and the heatsink temperature monitor is not reading correctly but those are (probably) minor issues.

Drilling big holes for fans is next I think.

2021-12-06

It works!

With the metalwork more or less completed, the PCB to hand and the software coming along nicely it was time to connect it all up and see what happened.

There is some serious electrical energy lurking around in this sort of kit, capable of making big (expensive!) bangs, so I wanted to carefully test out each stage as I went along. First up was checking that the power control logic was working OK, both hardware and software. As is the way with these things that showed up a couple of minor problems, or design mistakes as they are more properly known. A bit of hacking at tracks on the PCB soon fixed the problem that the PSU on/off control was working the wrong way round - on when it was supposed to be off. Note to self - you need the normally open contacts on the relay, not the normally closed ones... eejit! 

More and more components were added to the PCB as more functions were completed. The fan control software and associated circuitry turned out to be more of a challenge than it rightly should have been due to me forgetting which way up PNP transistors go. Once upon a time I understood all this stuff but I suppose I have been a software geek for too long now and I'm getting rusty on some of the electronics basics. Anyway, it's working now.

Eventually the PCB was fully populated and all tests completed. It was time to apply power to the amplifier. Scary stuff... mistakes could be expensive. In fact it was a complete non-event: the 50V and bias LEDs lit up and that was that. The RF side followed, with changeover relays , a 10dB pad on the amplifier input and the various coaxial cables to be connected. 

The amplifier lash-up ready for testing... wires everywhere!



An initial test with 10W output from the IC9700 (1W input to the amp) showed that the amp was producing about 150W output - an excellent result. Unfortunately, and to be expected, RF was now getting places it should not and it was time to apply ferrite rings/sleeves to the sensor lines to stop them jumping about, which seemed to do the trick.

Increasing input power easily pushed the output to our legal maximum of 400W without further incident. That's despite the fact that the amplifier is not in its case and has little of the screening that the completed unit will have. It seems to be a very stable set-up.

It was time to go on the air! Many thanks to Stuart, G4JHV for a useful series of tests, which suggest that all is well and the amplifier is not producing nasty sprogs or unreasonable splatter. Stuart is just 10km away and we had our beams pointing at each other, so this was a very harsh test indeed. Stuart was running low power but was pinning the IC9700 S-meter at the end stop.

So I seem to have a working amp, albeit something of a lash up for now. I plan to give it a more lengthy test in tomorrow evening's 2M UKAC contest and then, if all still seems to be looking good it will be time to complete the metalwork (holes for the fans, etc.), tidy up the internal hardware/wiring and get the amp in its box.

We're not done, of course! There is still a fair bit of software work to do and, as my software projects never really finish, that will be something of an ongoing challenge. I also need to calibrate the power output and SWR indications and to do that properly I shall need to find a suitable calibrated power meter. 

All in all a good day!