stabilizer icon indicating copy to clipboard operation
stabilizer copied to clipboard

Control Pounder through MQTT

Open occheung opened this issue 3 years ago • 3 comments

Description

This PR implements control of devices on Pounder through MQTT.

These parameters are configurable through MQTT (topic prefix: <prefix>/settings/pdh/ch/<n>).

pub struct PDHChannel {
    pub osc_frequency: f32,     // Frequency of the IN/OUT DDS pair
    pub out_phase: f32,         // Phase offset of the OUT DDS channel
    pub in_phase_offset: f32,   // Phase offset of the IN DDS channel relative to the OUT DDS channel
    pub amplitude: f32,         // Amplitude of the OUT DDS channel
    pub in_attenuation: f32,    // Attenuation of the signal injected to INx connector
    pub out_attenuation: f32,   // Attenuation of the OUT DDS channel
    pub enabled: bool,          // Amplitude of the IN DDS channel (0.0 or 1.0)
}

Temperature reading from Pounder (LM75) & input powers (after attenuators) are reported in telemetry.

I also tried reporting power level through the LED, but I got issues like AttRstN being stuck at low voltage. I have another branch in my fork that has working LED using the mcp23017 library.

occheung avatar Aug 30 '22 10:08 occheung

Added the same Pounder telemetry to lockin variant.

@jordens What are the plans of Pounder for lockin?

occheung avatar Sep 01 '22 02:09 occheung

There are no plans for Pounder and lockin.

jordens avatar Sep 01 '22 08:09 jordens

Most of the system clock calculation & parameter conversions are direct copy of those in ad9959. What about this:

  • Make associated functions in ad9959 for frequency/amplitude/phase to ftw/acr/pow conversions.
  • Refactor existing methods in ad9959 that use these conversions.
  • Fix the frequency boundary checks for clock configuration functions in ad9959.

occheung avatar Sep 02 '22 04:09 occheung

Closed in favor of #725

sbourdeauducq avatar Apr 24 '23 03:04 sbourdeauducq