Document EDFA max-power characterisation; restore safe pump clamp

Swept pump-1 to find real output: 1 W (30.1 dBm) at 4000 mA, 1.22 W at
4500 mA still unsaturated. External Thorlabs meter read 1.05 W vs 1.22 W
internal PD -> telemetry is ~0.5-0.6 dB optimistic, path-dependent; treat
amp/output*_power_dbm as indicative, not calibrated.

- README: full pump-vs-output table, PD-vs-meter calibration note, >1 W
  output-connector warning, ramp/overshoot guidance
- config.h: PUMP_CURRENT_MAX_MA back to 4000 mA (1 W rating) after the
  supervised over-rating sweep; added get_thresholds probe to agiltron driver
This commit is contained in:
James Bateman (hp-laptop)
2026-06-19 10:34:46 +01:00
parent 58475386ba
commit 61f4526d09
5 changed files with 62 additions and 12 deletions
+19
View File
@@ -79,6 +79,25 @@ int Agiltron::getPumpEnabled() {
return (u16(r[8], r[9]) == 0) ? 1 : 0; // edfa.py: ==0 means enabled
}
long Agiltron::logThresholds() {
uint8_t r[64];
size_t n = transact(0x5F, nullptr, 0, r, sizeof(r));
if (!validate(r, n, 0x5F) || n < 48) return -1;
auto u32 = [&](int o) -> uint32_t {
return ((uint32_t)r[o] << 24) | ((uint32_t)r[o+1] << 16) |
((uint32_t)r[o+2] << 8) | r[o+3];
};
uint32_t maxPreampI = u32(8);
uint32_t maxPump1 = u32(24);
uint32_t maxPump2 = u32(32);
uint32_t maxPumpT = u32(44); // /10 = degC
Serial.printf("[agiltron] thresholds: max_preamp=%lu mA, max_pump1=%lu mA, "
"max_pump2=%lu mA, max_pump_temp=%.1f C\n",
(unsigned long)maxPreampI, (unsigned long)maxPump1,
(unsigned long)maxPump2, maxPumpT / 10.0);
return (long)maxPump1;
}
String Agiltron::getSn() {
uint8_t r[64];
size_t n = transact(0x1F, nullptr, 0, r, sizeof(r));
+3
View File
@@ -50,6 +50,9 @@ public:
// Authoritative pump-enable from get_settings (0x2E): byte[8:9]==0 => enabled.
// Returns -1 on no/invalid reply, 0 = disabled, 1 = enabled.
int getPumpEnabled();
// Factory safety thresholds (0x5F). Logs to Serial; returns max pump-1 mA
// (the device's own ceiling), or -1 on no/invalid reply.
long logThresholds();
// Control (return true if the device ACKed)
bool pumpOn() { return cmdAck(0x20, (const uint8_t[]){0x00,0x00}, 2); }
+1
View File
@@ -300,6 +300,7 @@ void setup() {
AGILTRON_UART_NUM, AGILTRON_RX_PIN, AGILTRON_TX_PIN);
String sn = agiltron.getSn(), pn = agiltron.getPn();
Serial.printf(" SN=\"%s\" PN=\"%s\"\n", sn.c_str(), pn.c_str());
agiltron.logThresholds();
if (sn.length() == 0)
Serial.println(" (no reply — Agiltron not wired? RX/TX swapped? wrong dev ID? GND?)");
#endif