cancel
Showing results for 
Search instead for 
Did you mean: 

STSPIN32g4 Custom PCB not Working with software from MCSDK

Afam_Nwokolo
Associate

Hi, 

 

I am having issues driving the STSPIN32G4 Motor controller with a custom PCB i made and am looking for help/Guidance with resolving the issue. 

Some background information: 

MCSDK Version 6.3.0

Motor Pilot 6.3.0

Custom PCB details: 

For our custom PCB we have the STSPIN32G4 and the MOSFETS on 2 different PCB's 

The image below shows the schematic for the STSPIN32g4 and the second schematic shows the schematic for the Hbridge 

Afam_Nwokolo_0-1718751074194.png

Afam_Nwokolo_1-1718751122539.png

The image below is a picture of my test setup. I have a breakout board connected to ribbon cables to transfer the signals from Board A to Board B. 

1000055929.jpg

Details: 

I setup the project from STM workbench. I am currently attempting to run in speed mode (I will eventually try and run in position mode as well) and have tested the Generated code on the EVSPIN32G4 Eval board and runs fine. The modifications i made between the EVAL board and custom board are 

- Disabled the Push button

- disabled the The temp sensor

- Disabled the Over current protection (This OCP kept being flagged as high, i do not quite understand why, but i have disabled it for now) 

Other than that the FW is exactly the same.

The video attached shows how the BLDC reacts to moving in Speed mode at ~1400 RPM As you can see the motor does not move smoothly and vibrates significantly. It also seems to start and stop when moving at slower speeds (under 100 RPM) Additionally ive attached a screenshot below that compares teh current through a phase of the windings on the EVAL board (left) and the custom board (right)

 

TO explain what tests i performed in the Video, I started by jogging at 1400RPM and then reduced to under 100 RPS. At the slower speed, i noticed that the motor will jerk, move and stop/stutter. Finally in increased teh speed and at about 2500RPM the motor just stopped

 

 

Afam_Nwokolo_2-1718752252357.png

 

In position control the behavior is worse. The motor vibrates more audibly when we click on start position. I then issue it to move to a target position of 100 Rad in 5 seconds, and then tell it to return to position 0 in 5 rads. Below is how the current waveform looks in this move

Afam_Nwokolo_3-1718753304308.png

 

 

 

Expected Behaviour

None of this behaviour is consistent with the EVAL board and we are not able to determine the source of this discrepancy. Our motor driving schematic looks identical to the EVSPIN32G4's schematic

1 REPLY 1
JFree.1
Associate II

Hi,

I would advise you to do some serious reading around Power Electronics, power switching circuits and PCB design (manufacturers data sheets can often be good for this).  You may then appreciate some of the reasons why inserting any length of ribbon cable between mosfet drivers and power mosfets might led to sub-optimal results.