2019-11-29 04:49 AM
Hi everyone,
I recently purchased the B-G431B-ESC1 kit. I did a sensorless experiment with the ST motor control workbanch and it worked as expected. However, when I want to test with the encoder, the rotor remains locked and does not rotate after alignment.
From the Digital I / O part, the encoder pins were initially connected to pins TIM2 A0 and A1. I corrected them according to the diagram and connected them to pins B6 and B7 of the TIM4 timer.
When I watched the function LL_TIM_GetCounter (pHandle-> TIMx), I saw that the encoder counts the pulses. So the MCU can read the encoder.
Despite all this, I did not understand why the motor shaft was locked.
I was working with STEVAL SPIN32F0 before and it was working with Encoder without any problems.
2019-11-29 05:02 AM
Hello,
One potential root cause can be the proper connection of the three phases.
With encoder setup, you have to respect the phases U,V, W of your motor and to connect them accordingly.
Be sure also to not swap Encoder A,an B input.
Regards
Cedric.
2019-11-29 05:26 AM
Thank you for your answer.
I've tried all the phase combinations of the motor. I also moved the A and B phases of the encoder, but it didn't.
2019-11-29 09:51 AM
Thank you for your answer.
I've tried all the phase combinations of the motor. I also moved the A and B phases of the encoder, but it didn't.
2019-12-02 04:35 AM
I still haven't solved the problem.
2019-12-04 03:04 AM
Ciao mckmk
The first important thing to understand if the counter of the timer is updating according to the movement of the encoder. So you can capture it in a variable and show it in the live watch.
Second point is the number of ppr is correctly set... so for instance if you make a full turn you can take a look at the value of the counter.
Another easy test can involve DAC putting in output the Observer and the Measured angles when you run the motor in sensorles mode with the encoder set as auxiliary. But I don't know if in the board that you are using the DAC channels are available. This can help a lot.
Ciao
Gigi
2019-12-04 10:19 PM
I am able to indicate that the number of pulses in the encoder is measured correctly. So my board can read the enoder correctly.
I bought two of these boards. Yesterday I tried the spare board and it worked.
However, I connected the motor to the electronic load and in the fourth test, the TVS diode and L7986 in the entrance blew up. The current protection of this board cannot be set down to 100A. Perhaps there are errors that need to be fixed on this board.
Thank you.
2020-03-13 12:55 AM
Hello!
I have same problems with encoder. counter in TIM4 counts encoder steps with error in some cases.
I made experiments without V+ connected, power was only through USB port.
value constanly (on pic 1)
I wondered this "magic" and used oscilloscope..
In RUN state:
Red line is V=0, Yellow line is signal on "Encoder A" pad on the board. with no encoder connected
In STOP state signal on this pad is correct.
My both kits has the same problem.
What should I do to fix this problem?
2022-12-13 06:00 AM
Hi all,
I'm seeing a similar issue. I attached a 540 sensored R/C motor to the board (in my case 3 hall sensors). When I turn manually the motor I can see that the edges of the hall sensors are detected as expected but when I try to run the motor one of the hall sensor channel does not perform as expected.
I did many tests that I don't want to list here, I jump directly to the conclusions.
I did a very simple set up where there was no motor phases connected (just the hall sensors). I modified the firmware in a way that the 6 PWM TIM1 channels are driven with 50% duty cycle. What I observed is that:
So, conclusion are that TIM1.CH2 disturbs PB6 input but only when PB6 is high.
I tried to disconnect all the analogic circuits from the TIM1.CH2 pin (I removed the pre drivers and the capacitors to the 10V) but the problem is still there. I tired on 3 boards, same problem. I checked on the STM32G micro errata sheet but there are no reported issues on TIM1/TIM4.
GianPaolo
2022-12-13 08:45 AM