I got the VESC working with the magnetic encoder sensor, just like the original motor controller and firmware does.
Previously, after I tried the motor current ramp up, I could understand the HFI sensorless do not provide a soft motor startup. Even later I tried to follow the VESC tutorials for setup the HFI values and for some reason it does not work on this motor (motor specifics?? Flipsky 75100 issues ??).
So I received yesterday the AS5047D magnetic encoder board, did some tests to learn how to use it and finally I were able to make it working with VESC. I found that this board can be far away from the magnet and it will still work well, even with some misalignment related to the magnet.
To get the AS5047 magnetic encoder working with Flipsky 75100, I had 2 issues:
1. The SPI wires to read the AS5047 are the same for the hall sensors and so the low pass filters (capacitors and resistors) on the hall sensors circuit (inside the Flipsky 75100), had to be removed. After this, the hall sensor / SPI wires can only read 3.3V signals, so I had to configure the AS5047 board to work with 3.3V (I took the 3.3V to power the AS5047 board, from the EBike board).
2. Two hall sensor wires are incorrect labeled on Flipsky 75100 documentation - HALL 3 should be swapped with HALL 1 (what would be SPI SCK and SPI CS wires, need to be swapped).
So, here are the low pass filters on hall sensors circuit -- original Flipsky 75100:
I had to remove the capacitors and resistors as seen on the image. Plus, at red, I had to remove that resistor and solder a small wire / shunt. That is the path of SPI CLK and I saw the signal a bit deformed with the original resistor, but without it, after soldering that wire / shunt, the signal is good:
And here is the 3D printed cover, with the AS5047 magnetic encoder board in placed (I used thin double tape to glue the board):
And here is the cover in place:
What were the results??
Testing on the VESC tool, I can see the magnetic encoder read angle relative to the motor rotor shaft, at the values seem perfect.
Seems to me the motor startup is good. I tested what was the minimum motor power for motor to be able to run, I used a constant duty-cycle on VESC tool, and I got a minimum of about 0.08 duty-cycle (8%) to keep the motor running and in this case it uses about 1W of power (1.5A of motor current, 0.35A of battery current, on a 30V battery voltage).
I expect to need a minimum of 25W of motor power, anything less will probably be to much lower. So, if motor can runs with a minimum 1W, that is great!!
But next I need to install all this on my EBike and do the real tests. Let's see how it will go!!
Here is a video of VESC tool showing the motor running at max power it draws, on my bench, without any load. I also tested the min power needed for it run. Also we can see the read angle from the AS5047 magnetic encoder board: https://www.youtube.com/watch?v=OC0KvdqMl58
[youtube]OC0KvdqMl58[/youtube]