2016-01-06 10:54 AM
Hello,
I've just designed and populated some prototyping boards which happen to connect the HALL sensor not on the correct TIM2-5 CHX pins. Instead of just throwing all in the garbage, I was wondering if is there a way to alternatively use the HALL information from these generic pins and forward it to the FOC speed n position classes? Best regards #stm32f103 #hall-sensors #foc2016-01-07 08:13 AM
Ciao
It is not so easy but I think that you can try using the TIM2 or 5 for the time measurement that can be started and stopped inside a generic GPIO routine. You can reuse the conversion algorithm to get the quantity speed and position in the units that the FOC library expects. Ciao Gigi2016-01-08 02:20 AM
That was my initial thought.
I thought about deriving SpeednPosFdbk class. But I don't have access to the confidential distribution and SpeednPosFdbk private class files. How can I inject my position and speed readings without deriving SpeednPosFdbk class? Cheers2016-01-13 05:01 AM
I'm in the process of obtaining the confidential distribution.
Is the best method to derive SpeednPosition class and implement the required methods? Do you have any general advice?2016-03-16 06:16 AM
I was able to derive the SpeednPosFbkClass, based on the HALL_SpeednPosFbkClass.
Instead of having just one Timer ISR doing the overflow counting and Hall pin change capture, I divided into two ISR calls. One for the Timer update, and one for the EXTI Hall pin change. Using Open loop I'm able to verify that I get the same ElSpeedDpp and the same Mec speed 01Hz as the VirtualSpeedSensor_SpeednPosFdbkClass that drives the open loop. However I'm confused on how to verify I obtain the correct ElAngle on my derived class. Can I just compared the ElAngle from open loop's VirtualSpeedSensor and my HALL class? I'm running open loop on slow speeds: 3-10 01Hz. On FOC_CurrController() function:hElAngledpp = SPD_GetElAngle(STC_GetSpeedSensor(oSTC[bMotor])); // Open loop's VirtualSpeedSensor
hElAngleDpp_aux = SPD_GetElAngle(oSpeedSensor_aux); // My derived HALL SpeednPos
I obtain different ElAngles.
I have followed instructions on section 8.3.3, from FOC manual.
I've confirmed the sequence of the Hall signal for the forward direction. I have manually measured the delay between the maximum Bemf_A and H1 rising transition.
What would be the best method to make sure I get the correct ElAngle on my HALL sensor class?
2016-04-01 06:10 AM
Ciao
It is not all clear for me. The difference is big? I mean that usually the forced angle of the Virtual Speed sensor is not exactly the angle of the motor because it have a difference that depends on the load. Better to compare for instance the sensorless angle (running the motor in senseless) and the angle of your sensors. Anyhow you can put the angle of you sensor in the DAC and verify if the shape is reasonable. Ciao Gigi2021-06-17 01:05 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards