cancel
Showing results for 
Search instead for 
Did you mean: 

Board Designer - Current Sensing signals error

shane mattner
Senior

I'm trying out the board designer feature and ran into an issue where after succesfully making a board in Board Designer based on a custom STM32G431 motor controller board, MCWB gives this error about the current sensing not being found:

shanemattner_0-1729789348622.png

The Board Designer doesn't show any errors:

shanemattner_1-1729789499236.png

 

I have a current sensing feature added with 3 shunt resistor readings from a DRV8323 chip:

shanemattner_2-1729789548368.png

shanemattner_3-1729789605471.png

 

Can anyone give me some advice on what to try next to get this to work?  This is such a cool tool I'd love to get working.

 

2 REPLIES 2
shane mattner
Senior

Here is the board json file:

{
  "type": "inverter",
  "contentVersion": "1.0",
  "clockFrequency": 170,
  "name": "st_obake_0_4",
  "PN": "1",
  "longDescription": "",
  "algorithmCompatibility": [
    "FOC"
  ],
  "shortDescription": "",
  "mcu": "STM32G431CBTx",
  "clockSource": "internal_osc",
  "motorDrives": [
    {
      "name": "M1",
      "minRatedVoltage": 10,
      "maxRatedVoltage": 25,
      "maxRatedCurrent": 40,
      "features": [
        {
          "type": "CurrentSensing",
          "name": "CurrentSensing",
          "tRise": 10,
          "hwVariants": [
            {
              "signals": {
                "CURRENT_AMPL_U": [
                  {
                    "name": "PB0",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_AMPL_V": [
                  {
                    "name": "PB1",
                    "help": {},
                    "cost": 0
                  }
                ],
                "CURRENT_AMPL_W": [
                  {
                    "name": "PB2",
                    "help": {},
                    "cost": 0
                  }
                ]
              },
              "type": "ThreeShunt_AmplifiedCurrents",
              "cost": 0,
              "shuntResistor": 0.007,
              "amplifyingNetworkImax": 48,
              "amplifyingNetworkVm": 20,
              "amplifyingNetworkPrating": 1000,
              "opAmpGain": 5,
              "offsetNetworkAttenuation": 0,
              "polarizationOffset": 0
            }
          ]
        },
        {
          "type": "SpeedAndPositionSensing",
          "name": "SpeedAndPositionSensing",
          "hwVariants": [
            {
              "signals": {
                "QENC_A": [
                  {
                    "name": "PA0",
                    "help": {},
                    "cost": 0
                  }
                ],
                "QENC_B": [
                  {
                    "name": "PB3",
                    "help": {},
                    "cost": 0
                  }
                ],
                "QENC_Z": [
                  {
                    "name": "PA15",
                    "help": {},
                    "cost": 0
                  }
                ]
              },
              "type": "QuadratureEncoderAbsolute",
              "cost": 0
            }
          ]
        },
        {
          "type": "PhaseVoltageGeneration",
          "name": "PhaseVoltageGeneration",
          "driverName": "drv8323",
          "driverPN": "1",
          "tNoise": 10,
          "minDeadTime": 10,
          "maxSwitchingFreq": 60,
          "hwVariants": [
            {
              "signals": {
                "PWM_CHU_H": [
                  {
                    "name": "PA8",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHV_H": [
                  {
                    "name": "PA9",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHW_H": [
                  {
                    "name": "PA10",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHU_L": [
                  {
                    "name": "PC13",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHV_L": [
                  {
                    "name": "PA12",
                    "help": {},
                    "cost": 0
                  }
                ],
                "PWM_CHW_L": [
                  {
                    "name": "PB15",
                    "help": {},
                    "cost": 0
                  }
                ]
              },
              "type": "DrivingHighAndLowSides",
              "cost": 0,
              "deadTime": 10,
              "highSideSwitchesDrivingPolarity": "Active high",
              "lowSideSwitchesDrivingPolarity": "Active high"
            }
          ]
        }
      ]
    }
  ],
  "descVersion": 4
}

Hello shane mattner,

The PINs you chose for your current sensing are not compatible with any of our current sampling method.

For 3-Shunts sensing, we have different sampling methods :

- Single ADC sampling, if you want to do that, your 3 pins need to have access to the same ADC
- Dual ADC sampling shared phase, your pins need to have access to 2 different ADC, and one of the pins need to have access to both of them. This is for any ST Observer FOC algorithm (Sensorless + PLL or Cordic, or sensored)
- Dual ADC sampling for HSO only, two pins to one ADC, and the third pin to a second ADC
- Triple ADC sampling, (only available on HSO algorithm) each one of your pins need to have access to a different ADC.

Now, taking a look at your setup, you can see that PB0 goes to ADC1_IN15 only, PB1 to ADC1_IN12 only, and PB2 to ADC2_IN12 only, so only third configuration above fits. However, it only fits the HSO algorithm, which requires Phase Voltage Sensing on top of Current Sensing, so you would not be able to create a project like that. If you want to create an inverter for the HSO algorithm, you will need to add the Phase Voltage Sensing feature. If you want to create an STO project, then you will have to modify your Current Sensing pins in a way that fits the first two configurations listed above.

We are currently working on the Board Designer for it to tell you beforehand whether your chosen pin setting will in fact end up with a valid board for the WorkBench tool, but this is still work in progress, we apologise for the inconvenience, and thank you for the feedback !

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.