Skip to main content
Visitor II
October 1, 2021
Question

Can we use Hall Sensor as main sensor and no auxiliary sensor to run the motor? Can we control the speed of the motor? how to decide the placement electrical angle? Default 300 in Workbench.

  • October 1, 2021
  • 11 replies
  • 3695 views

Hi, I am using Motor Control workbench to run the motor using Nucleo-F446RE and X-NUCLEO-IHM08M1. Initially I used Main Sensor "Observer+PLL" and auxiliary sensor "Hall Sensor" and I can able to control the motor. Now our requirement is to use only hall sensor as Main sensor. In this case the motor is able to run but at a fixed speed and not varying to any change in parameters.

Thank you.

Regards

Vijay Ganisetti.

    This topic has been closed for replies.

    11 replies

    Technical Moderator
    October 1, 2021

    Hello Vijay,

    To answer your question, yes you can use Hall sensor as main sensor and no auxiliary sensor.

    The fixed speed issue is due to a bad hardware connection of your hall sensor pins, so this is the first thing to fix.

    Once it is done, you need to properly configure the placement electrical angle.

    With the MCSDK 5.Y.2, and your project with the Hall sensors as auxiliary sensor, you can view the electrical angle coming from both algos STO-PLL, and HAll sensors. (even if only the STO-PLL is actually used to control the motor)

    The both sawtooth must be superimposed. The shift between them is controlled by the placement electrical angle parameter.

    Regards

    Cedric

    VGani.1Author
    Visitor II
    October 1, 2021

    Hi Cedric,

    Do you mean to measure electrical angle from the (observer+PLL ) and compare with Hall Signal (Ha) to see both are aligned together? If not check the displacement angle??

    0693W00000FB9DpQAL.png

    Technical Moderator
    October 1, 2021

    The idea is to print the Observed elec angle coming from the STO-PLL algo, and the measured electrical angle coming from the Hall sensor auxiliary. You should see the 2 sawtooth . The hall signals plot is not helpful for Hall sensor tuning.

    Do you use the 5.4.X or 5.Y.2 SDK ?

    Cedric

    VGani.1Author
    Visitor II
    October 1, 2021

    Hi Cedric,

    I use 5.4.7 version. Yellow curve is the observed elec. angle and green is the measured electrical angle, However it is difficult to observe the elec angle measured by Hall sensor.

    0693W00000FB9MNQA1.png

    Technical Moderator
    October 1, 2021

    0693W00000FBAwmQAH.pngThis is the curve you should observe.

    On 5.4.7 it can be observed with the DAC only.

    From your picture, the first thing is that your both curves are opposite, This means that your Hall sensors connexion are not Ok.

    The second point is that your observed angle go back to 0, could you print your three hall sensors signal ? I wonder if the three sensors toggle correctly.

    Regards

    Cedric

    VGani.1Author
    Visitor II
    October 4, 2021

    Hi Cedric,

    Since from the previous result, both measured and observed elec. angle are opposite. I changed Hall signal 2 and 3, now the measured and observed elec. angle are in right direction. I measured in both positive and negative direction to see the difference.

    in DAC channels, i think Channel 2 is damaged. The signal is not ideal.

    0693W00000FBIzsQAH.png

    Technical Moderator
    October 4, 2021

    Hello Vijay,

    With the release 5.Y.2, we have access to high frequency signals through the UART and the new motor Pilot tool.

    It would we worth to plot both angle with this release and the motor Pilot.

    If it is not possible, could you zoom in the observed angle to see at which frequency it toggles to 0.

    To be honest I have never seen such kind of shape before.

    Regards

    Cedric

    VGani.1Author
    Visitor II
    October 5, 2021

    Hi Cedric,

    I used 5.Y.2 but still the signal is same. I hope the pin (PA5) in CN10 might get damaged.

    0693W00000FBSCMQA5.png0693W00000FBSC2QAP.jpg

    Technical Moderator
    October 5, 2021

    Hello @Community member​ 

    Sorry, I was not clear enough. The purpose of switching to 5.Y.2 and the new Pilot is to be able to see these angles inside the mPilot, and not with the DAC output and the scope.

    If you look at the top right of your mPilot screen shot, you have two buttons in the box "Graph and Record". If you click on the graph button, it will open a new window. If you right click inside this window, you will be able to select the signals you want to plot. (HALL_EL_ANGLE & STOPLL_EL_ANGLE)

    With the new communication protocol we increased the communication speed so much that we are able now to dump FOC variables at PWM frequency.

    It will at least remove your concern about the DAC output pin.

    Before doing this, could you zoom in your oscilloscope to see at which frequency the HALL angle switch to 0.

    Regards

    Cedric

    VGani.1Author
    Visitor II
    October 6, 2021

    Hi Cedric,

    I tried measuring Estimated and Hall Elec. angles using Graph in Motor Pilot. But cannot increase the no. of cycles? Can I able to change the x-axis scaling? Because its difficult to calculate placement electrical angle using this reading.

    0693W00000FBbCVQA1.jpg

    Technical Moderator
    October 6, 2021

    Hello @Community member​ ,

    Good progress, your plot is pretty nice, I think you have already something functional with Hall sensors as primary sensor, even if it is not optimal.

    We are thinking of an application on top of mPilot to automatize all this process.

    From what I see, the angle computing by the Hall sensor algo is Ok. so the Issue with your oscilloscope plot is probably due to a signal conflict on your board with DAC output.

    Anyway, the shift can be tuned by dichotomy, the variable to change is HALL_M1->PhaseShift you can change it while your motor is spinning.

    (another option would be to record the plot, and do a post processing with a tool like scilab or matlab.)

    Regards

    Cedric

    VGani.1Author
    Visitor II
    October 7, 2021

    Hi @cedric H​ ,

    I calculate the angle displacement by manual calculation and find it is equal to 300 degree(default one). But however during our discussion on 04/10/2021, I just tried using default angle and motor rotates using Hall sensor as main sensor. Today it is not rotating again ??

    One more question, the motor is able to run with 24V and when I use 36V, motor profiler failed to generate motor parameters (Measurement is taking too long). Hence tried motor parameters saved under 24V and using motor control workbench, it generates a fault overcurrent when click on Start Motor. May i know the reason for this issue??

    Regards

    Vijay

    Technical Moderator
    October 7, 2021

    Hello Vijay,

    Once you changed your angle, are your two curves superimposed ?

    Regarding your profiling issue, it is due to the overvoltage trigger that is set at 36 V for this board.

    We plan to make it configurable in our roadmap, but for the time being, you can not profile at 36V and above.

    Regarding the reason of your overcurrent, is very motor dependent, but changing the gain of your PID and the current target of your rev-up phase should fix this issue.

    Regards

    Cedric

    VGani.1Author
    Visitor II
    October 7, 2021

    Hi @cedric H​ ,

    So if we change the placement electrical angle, the measured angle and STO_PLL_angle should superimpose?? If yes, then need to use the same angle in the project where Hall Sensor as primary sensor ??

    Technical Moderator
    October 7, 2021

    Yes, and yes, the purpose of having both angles plot at the same time is to compute the placement electrical angle to have both curves superimposed. This angle is actually a motor characteristic so it should be set for all the project using this motor, without distinction between primary or auxiliary sensor. The usage of auxiliary sensor is just a trick to be able to compute this placement angle.

    I hope it is clear now.

    Regards

    Cedric