sinara-hw / Booster

Modular 8-channel RF power amplifier
Other
15 stars 3 forks source link

Booster: firmware review #8

Closed hartytp closed 6 years ago

hartytp commented 6 years ago

What's the current status of the firmware that's loaded onto Booster at the moment? Should the instructions on the Wiki all work at the moment?

To check I understand things:

Also, I need a way of finding the MAC address of booster (our department does MAC address whitelisting). How can I do that? Can I do that via the UART (e.g. by sending it a request, or if it prints out a boot message)?

hartytp commented 6 years ago

So, looks like this is all agreed then.

Let's freeze the specification here.

wizath commented 6 years ago

I'll grab one working module and start implementing fixes this week

hartytp commented 6 years ago

Great, thanks!

As I said, treat the above as more of a suggestion than a fixed specification. So, if you can think of better ways of doing this then please make suggestions. e.g. if you there is a more "standard SCPI" way of doing things then feel free to make changes (although, let's try to keep this as simple as possible, since this is just a simple amplifier and not a complex piece of T&M equipment.).

wizath commented 6 years ago

INTerlock:INPut max input power in dBm, e.g. INT:INP 0 -5 to set the input power interlock threshold for channel 0 to -5dBm. If the threshold is above a hard-coded (please document what the threshold is) maximum, an error is returned and the threshold is not adjusted.

Correct me if I'm wrong, but AFAIK there is no clear method to convert the measured voltage to direct (input) power level of the amplifier.

hartytp commented 6 years ago

@wizath why not? There is a power detector on the input with a threshold set by a DAC. This gives a direct input power measurement via a directional coupler. What's the issue with using that?

wizath commented 6 years ago

That's fine, but converting measured voltage from detector to power levels requires calibrations and some mathematical processing which I don't have at this moment.

hartytp commented 6 years ago

@gkasprow how accurate is the power measurement (coupler + detector) without calibration? It doesn't need to be very accurate, so hopefully no per-unit calibration is required. We must include the accuracy of the power measurements in the datasheet.

hartytp commented 6 years ago

@wizath yes, but the calculation is quite simple. In any case, I'm afraid we have to do it or there is no point having the detectors.

gkasprow commented 6 years ago

It depends on several factors - the coupler tolerance, its frequency response, detector gain, RC tolerances. We can calibrate it for certain frequency but it is time consuming and will influence the cost. Also the firmware need to store these calibration values in the EEPROM and then read id back. It also needs editor mode so the coefficients can be entered during calibration. The firmware needs to be written as well. I'm not sure if it's worth the effort.

hartytp commented 6 years ago

@gkasprow I'm not sure I follow you here. Are you saying that you do not want to have software adjustable interlocks or power monitoring on the input/output power?

gkasprow commented 6 years ago

@hartytp We can do it whatever is reasonable. If you need such calibrated, adjustable interlock, let's do it. I'm only saying that maybe it's enough to characterise it roughly and not calibrate on every module produced.

hartytp commented 6 years ago

Let me answer my own question about accuracy: Input power measurement coupler:

Output power measurement coupler:

Power detectors are all: ADL5904

Flatness over frequency between 50MHz and 500MHz looks much better than 1dB: screen shot 2018-05-23 at 19 36 14

hartytp commented 6 years ago

@gkasprow see my last comment

@gkasprow how accurate is the power measurement (coupler + detector) without calibration? It doesn't need to be very accurate, so hopefully no per-unit calibration is required. We must include the accuracy of the power measurements in the datasheet.

I do not want to calibrate anything here! As I said, none of these measurements need to be particularly accurate (1dB is fine IMHO).

What I do want is some specification for the expected accuracy in the data sheet for the final product.

gkasprow commented 6 years ago

@hartytp OK, I simply was talking about it with Tomasz who claims that without calibration we would end up with error of 3..5dB or more. Maybe he took into account his self-made coupler :) So if such accuracy satisfies you, let's go for it and hard-code the relationship between the volts and dB.

hartytp commented 6 years ago

Power detector accuracy over PVT looks to be about +-0.5dB for all inputs between something like +10dB and -15dB

screen shot 2018-05-23 at 19 50 31

hartytp commented 6 years ago

@gkasprow The design includes an adjustable interlock to protect sensitive loads, and the ability to measure forward and reverse powers for diagnostics. That has always been an important part of the specification, which we've included from day one. So, if it was a problem, we should have discussed it a long time ago. Otherwise, what was the point of adding all those DACs and ADCs?

Many modulators give optimal performance when run less than 3dB below their damage threshold, so a +-3dB error is too large for a useful interlock.

By looking at the design and the relevant data sheets, I think the accuracy should be something like +-1dB, which is (just) acceptable. But, I need the circuit designer (Maciej) to confirm what the typical/worst-case error will be without calibration.

If that isn't good enough then we can consider calibration. Roughly how much would it cost to have a 2-point calibration done at production time and stored in firmware?

hartytp commented 6 years ago

Essentially, I need to know

hartytp commented 6 years ago

@gkasprow The other question about power measurement is what temperature the modules will run at. How well controlled is this, assuming the bias voltage is fixed (how much does the PA power consumption change with input power)? The better controlled the temperature is, the more accurate the detectors are (they tend to be very accurate "out of the box" at close to 25C...

hartytp commented 6 years ago

I have edited the above posts to reflect the fact that we don't need input power measurements.

@gkasprow:

  1. Please can you get me an estimate of the accuracy of the forwards power measurement without calibration? This should take into account variations in the enclosure temperature with input power level. I know that Tomek provided an estimate before, but it seems too pessimistic for the current design, given the data sheet numbers I quoted above.
  2. Please can you ask Maciej to confirm that there are no easy ways to improve the accuracy of the power measurement without calibration (e.g. that we're using accurate components and setting signal levels appropriately)?
  3. Can you confirm whether the reflected power interlock is actually necessary to protect the device? Or, can we scrap it? Note that the reflected power measurement will be somewhat less accurate than the forward power measurement in most cases due to the lower signal level reaching the power detector. I'd be okay scrapping the reflected power measurement completely if it's not required to protect the device.
  4. How is the firmware development going?
hartytp commented 6 years ago

Had a discussion with Maciej offline.

@wizath I've updated the firmware instructions/interlock specification above. Let's freeze that as it is, and take it as the specification for Booster v1.0 (NB no per-device/per-channel calibrations required for any power measurements)

hartytp commented 6 years ago

Can you remind me how the fan control works? Do we feedback on the fan speed to stabilise the temperature of the unit?

If so, how is that set point controlled? Should it be user adjustable (in case some people's labs are hotter than others).

wizath commented 6 years ago

At this moment we're getting moving average from hottest unit and then scale the speed linearly from 30% to 100%, since below 30% fans "clicks" annoyingly. Also, the ghosts have been removed.

hartytp commented 6 years ago

@wizath

At this moment we're getting moving average from hottest unit and then scale the speed linearly from 30% to 100%

So, currently we feedback on the temperature of the hottest amplifier module (not on the chassis temperature)?

What is the set point that we try to stabilise this to? Is that set point controllable by the users?

Also, the ghosts have been removed.

:)

wizath commented 6 years ago

ATM fans start to work at 35 degrees and scale up to 80.

hartytp commented 6 years ago

I see, so it's basically proportional-only feedback done by the microprocessor? i.e. the fan speed is proportional to the temperature of the hottest amplifier with an offset. Out of curiosity, why not use PI feedback for this? That would give better stability, wouldn't it?

gkasprow commented 6 years ago

In theory yes, but we have many sensors and each channel is independent source of heat which we don't control. So tuning of such PI regulator would be a nightmare because heating ratio varies and this affects the system transmittance. We can always implement PI if existing scheme is not sufficient.

hartytp commented 6 years ago

@gkasprow good point. Okay, let's start with proportional control. That will probably be good enough, and we can always alter the firmware later if we find that we need something else.

hartytp commented 6 years ago

@wizath What do the front panel buttons do at the moment? As far as I can tell, the standby button does nothing. Pressing the interlock reset button once seems to reset the interlock for all channels. Pressing it a second time seems to put the unit into standby. I was expecting this behavior: https://github.com/sinara-hw/Booster/issues/8#issuecomment-390839820

When I press the interlock reset button, it seems to take a few seconds for the channels to be reset (about 2 lights go green per second). Why so slow?

hartytp commented 6 years ago

@wizath I turned Booster on and reset the interlock, but the fans didn't turn on. Let it for a while and it got quite hot and all the LEDs went off, but still no fans...

hartytp commented 6 years ago

Now none of the buttons do anything. No red leds (but an internal blue LED is on). Suggestions?

hartytp commented 6 years ago

@gkasprow @wizath ping

Left the unit to cool down for a while, but still no life. P30VC led seems to be the only power LED thats on. Pressing the FP buttons does nothing. The fans do not spin up when I power the unit.

What should I do?

wizath commented 6 years ago

Hmm, strange.

The first button should enable channels one by one, following the power sequence. Could you open serial console and see if the firmware is reading good temperatures?

Interlock reset should take about 200~ ms and during that time LEDs should change or blink. Could you try power-cycling whole device? The red led signals that channel is detected and initialized.

wizath commented 6 years ago

Fans should kick-in after passing 35 degrees.

hartytp commented 6 years ago

Not seeing a UART at all. As I said though, the power LEDs are all off, including the P5V0 regulator.

The unit got a lot hotter than 35deg without the fans turning on.

hartytp commented 6 years ago

Interlock reset should take about 200~ ms and during that time LEDs should change or blink. Could you try power-cycling whole device? The red led signals that channel is detected and initialized.

200ms for all channels, or 200ms for each channel?

Could you try power-cycling whole device?

I tried that, it didn't help.

The red led signals that channel is detected and initialized.

I didn't see any red LEDs.


Currently, when I turn it on, the blue LED comes on, as dies the P30VC. The buttons don't do anything and the whole unit slowly gets very hot without any LEDs going red.

wizath commented 6 years ago

You see only 30V led lit? You can also try removing amplifiers and check if board boots without them.

gkasprow commented 6 years ago

Please open the box and see which LEDs are on. Take a photo and place it here. Look what gets hot. Maybe sth got damaged during transport.

gkasprow commented 6 years ago

It looks like 12V is missing. And for some reason the 30V gets active and supplies the modules...

AUTProgram commented 6 years ago

img_4443

AUTProgram commented 6 years ago

As far as I can see, the large blue and small green LEDs are lit after powering on. None of the front LEDs are lit. I've indicated which areas feel warm and hot after about a minute.

wizath commented 6 years ago

Looks like the regulator is dead

gkasprow commented 6 years ago

If the electrolytic capacitor is hot, it means that for some reason too high voltage was applied to 3.3V. Maybe these 2 power resistors got shorted with some of the components on the PCB? It looks like catastrophical damage. Can you measure the 3.3 supply on the programmer pins?

hartytp commented 6 years ago

Maybe these 2 power resistors got shorted with some of the components on the PCB?

I don't think so, but I'll double check in the morning.

hartytp commented 6 years ago

From memory, the sequence of events was:

I wonder if the cooling/temperature interlock didn't work and the whole thing overheated?

gkasprow commented 6 years ago

Make sure that the DC power plug is inserted. It looks like missing 12V supply. Lack of that supply causes delivery of 28V and heating of the power modules since gate supply is 0. That "feature" was eliminated in next revision where lack of 3.3V disables 28V LDO.

hartytp commented 6 years ago

Make sure that the DC power plug is inserted. It looks like missing 12V supply.

I'll check tomorrow. But, as I said, it did start up initially, so it's hard to imagine that the 12V supply could have been missing.

hartytp commented 6 years ago

If I don't find anything obviously wrong when I look tomorrow, what should I do? Ship it back to WUT again????

gkasprow commented 6 years ago

well, it's really strange. Let's try to diagnose it remotely, starting with checking 3.3V supply.

hartytp commented 6 years ago

First check: I do have GND and +30V. There is about 0.2V difference between the V-terminals of the 12V and 30V SMPSs as measured on the shutter connectors (the blue and black wires).

hartytp commented 6 years ago

How do you want me to measure 3V3? The LED is off, is that enough?