Skip to main content
der.ule
Associate II
February 2, 2022
Question

Strange current waveform driving a BLDC motor using the IHM08M1 with the Nucleo F303

  • February 2, 2022
  • 16 replies
  • 7193 views

I keep investigating why I have problems driving my motor with negative speeds.

I captured the phase voltage directly on the motor leads (yellow, cyan and magenta channels) and the current on the DAC output (Ia or Ib) and I noticed this peaks on the current waveform.

0693W00000JODPSQA5.png 

Zooming in, the currents themselves don't look bad at all

0693W00000JODMoQAP.png 

However I do not understand where does peaks are coming from

0693W00000JODRdQAP.pngAny ideas will be greatly appreciated.

This topic has been closed for replies.

16 replies

der.ule
der.uleAuthor
Associate II
February 2, 2022

Apparently those peaks in my current signal are somehow correlated to the switching of the hall sensors, instead of measuring the voltage in the motor phases, I measured the hall sensor signals and the output of the DAC (Ia or Ib current) and those peaks appear exactly when the H2 (on the J3 header of the IHM08M1) switches.

0693W00000JODzLQAX.png 

GMA
Technical Moderator
February 2, 2022

Hello,

Could you please give us your WorkBench version and if you are using "Additional Features"?

Best regards.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
der.ule
der.uleAuthor
Associate II
February 2, 2022

Hi GMA,

I'm using the version 5.4.8 (this is going to be on the future a dual motor solution, as such I am unable at the moment to switch to v5.Y) with CubeMX 6.1.2 and HAL with Firmware STM32 FW V1.11.3

MCSDK_v5.4.8
WB_to_Mx version "1.5.1"
WB_to_Mx.template version "21-11-15"
 
[Device]
Firmware: ST MC SDK Ver. 5.4.8
 
[Modules]
MMICalc DLL - Version 1.0.4.0
 Basic Motor Control Serial Protocolo Library - Version 3.3.0.0
TL_003 Frame Transport Layer - Version 1, 0, 0, 0
PL_001 Dynamic Link Library - Version 1, 1, 10, 0

As I mentioned in my other post, to start the development I am using a Nucleo F303 together with the IHM08M1 to drive a 24V Motor with 4 pole pair, rated speed of 3590 RPM and a calculated kv constant of 4,4V/kRPM.

der.ule
der.uleAuthor
Associate II
February 2, 2022

I created a new dummy project using a sensorless approach, but still with the hall sensors connected to the board, the strange waveform is still present

0693W00000JOHqwQAH.pngHowever, when I disconnected the hall sensors from the board, the waveform looks quite different:

0693W00000JOHrkQAH.pngNow I am a quite confused why this can be happening...

GMA
Technical Moderator
February 2, 2022

Hello,

Could you verify your HALL Sensor parameters setting please?

0693W00000JOIXCQA5.png

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
der.ule
der.uleAuthor
Associate II
February 2, 2022

Hi,

they are as shown (120 & 300) , I try varying the "placement electrical angle" from 300 down to 0, but I didn't see much change.

EDIT: My last statment is wrong, I did the tests changing the value directly on the "pmsm_motor_parameters.h", changing it on the Motor Control Workbench, did change the way my motor behave the waveform however, still looks similar.

GMA
Technical Moderator
February 2, 2022

And "Sensor displacement" is the correct one I assume...

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
der.ule
der.uleAuthor
Associate II
February 3, 2022

Yes, I left it at 120 following the recommendations of the UM1052 and looking at the output of the hall sensors shown above.

MK.1
Associate III
February 3, 2022

Hello, how do you measure the current? Are you using a DAC or current probe to your oscilloscope? If you are using a DAC, what pin of the board are you connecting from?

der.ule
der.uleAuthor
Associate II
February 3, 2022

Hello,

I'm measuring the current from the DAC output (don't have a current probe available at the moment). I'm connecting the oscilloscope in the middle pin of J7 and its ground lead connected to the test point J8.

MK.1
Associate III
February 3, 2022

Look carefully at the board diagram and you will understand that the signal from the DAC does not get to this connector in any way :)

der.ule
der.uleAuthor
Associate II
February 10, 2022

Thank a lot for the hint, this really helped me out!

MK.1
Associate III
February 10, 2022

glad i helped you

GMA
Technical Moderator
February 7, 2022

Hello,

I used a IHM08/F303Re/Hall Sensor Motor combo in order to display Ia current on PA4 pin (through DAC output), and I don't see difference between positive and negative speed in term of current or behavior.

Looking to the currents, did you check if the peaks are also present in positive speed?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.Best regards.GMA
der.ule
der.uleAuthor
Associate II
February 10, 2022

I did, the same waveforms were present on both directions, but check my answer below.

der.ule
der.uleAuthor
Associate II
February 10, 2022

Well, after a lot of testing, I want to log my experience here in case it helps somebody else:

While looking for a solution to my problems I stumble upon this thread, he had the same setup as me, it turns that I was measuring just noise (and the PWM). In summary, the IHM08M1 is somehow targeted to be used by the Nucleo F302R8 and the Nucleo F401RE and if you are using something else (like in my case Nucleo F303) you will need to grab the soldering iron and fiddle around with some resistors.

I feel like this statement from the UM1996 User Manual is a bit misleading:

The interconnection between the STM32 Nucleo board and the X-NUCLEO-IHM08M1
expansion board is designed for full-compatibility with a wide range of STM32 Nucleo
boards without any solder bridge modifications, except for the removal of resistor R60 on
the X-NUCLEO-IHM08M1 board if the NUCLEO-F401RE board is used and X-CUBESPN8 firmware is installed.

So, the changes that I had to do in order to get the DAC outputs working correctly and configure the board as a 24V, 3-Shunt, FOC with Hall Sensors were:

On the F303:

  1. Remove jumper JP1. (It was not set)
  2. Plug-in jumper JP5 connecting U5V and the middle pin together for power supply from USB connector of ST-LINK/V2. (Apparently more than 12V supply into the IHM08M1 can damage the Nucleo board)
  3. Plug-in the two jumpers on CN2, to program the STM32. (they were set)
  4. Remove SB21 on F303RE (LD2 interferes with signal on PA5). (it wasn't set on my board)

On the IHM08M1

  • Solder the jumpers J5 and J6 in the three shunt (3Sh) configuration
  • Remove resistor R181

0693W00000JPGVfQAP.png

  • Remove jumper J9
  • Plug-in jumpers JP1 and JP2 connecting both pins.
  • Connect the correct DAC output (PA4) to the J7 pin header, for this the R77 has to be removed and the R76 installed.
  • Connect the correct DAC output (PA5) to the J7 pin header, for this the R82 and R85 have to be removed an the R80 installed.

0693W00000JPGNTQA5.png

  • Remove R63, it conflicts with BEMF3

0693W00000JPGWiQAP.png

  • Remove R21. This is also used CURRENT REF which is input to OpAmp through a low pass filter so in the case of Observer Electric angle, the saw-tooth will appear chopped at the end. In my case maybe this wasn't necessary as I do not use the observers.

0693W00000JPGYPQA5.pngWith all this changes I was finally able to see the DAC output in my oscilloscope and cycle through the different variables without recompiling.

0693W00000JPGauQAH.pngUnfortunately for me, only the DAC Ch1 seems to be working properly, as I get lots of distortion in Ch2. Here a screenshot of both channels displaying the "measured electrical angle"

0693W00000JPGY1QAP.pngBut the one channel that works, seems to be working properly

0693W00000JPGdZQAX.png0693W00000JPGdjQAH.png 

ssipa.1
Visitor II
February 10, 2022

If this is trapezoidal drive, you appear to be turning on the gate of one of the "off" phases. This may be due to the reverse transfer capacitance which is quite high with all of those MOSFETs in parallel, or possibly you are drawing enough current in your inductive current path on board board to pull down the source with respect to some of the gates.

I would start by reducing the value of the 10K pull down resistor on the gate to 1K and see if this improves your problem - this may work if it is the drain-to-gate capacitance turning the FET on. In any case, measure the gate voltage on the FETs during their off period with respect to the source.

der.ule
der.uleAuthor
Associate II
February 10, 2022

I did read that answer too, however I do not believe it applies here, I did some measurements directly at the MOSFETs and all looks peachy, thanks.