Encoder detection not working

Discussions regarding the Field Oriented Control (FOC) implementation on the VESC.
Posts: 4
Joined: 06 Jun 2017, 02:47

Encoder detection not working

Postby yhao1 » 06 Jun 2017, 03:34


I'm working on a VESC encoder position control project.

I'm using Maytech 6374 motor. My motor does not work with VESC encoder detection. I'm using a 1000 pulses ABI encoder. I set the encoder counts to 4000 and the encoder mode to ABI mode. The encoder reading is giving me a 0-360 degree reading and I think the VESC is reading the encode signal correctly.

While I am doing the encoder detection process, it keeps giving me 0 ratio and the detection only stops when the detection is timeout. The BLDC-tool does not response after the detection. I have to restart the VESC and reconnect to the BLDC-tool.

Since the BLDC-tool is reading the correct ABI encoder pulses. The degree corresponse to the motor changes. When I rotate the motor by hand, the BLDC-tool shows the corresponding angle. So I believe the encoder and the VESC board is working correctly when reading encoder pulses.

But when it goes to the encoder detection, the VESC does not give me a result and just keep moving. I tried to debug the detection process. I figured that the ratio is so small that the VESC consider it as 0.

Also is using firmware version 2.18 correct for encoder position control?

I watched the Benjamin's video about position control. He used version 2.10, and also it is a bin file. So I'm really confused about which software to use right now.

Thanks very much


Posts: 5
Joined: 11 Sep 2017, 13:43
Location: Beijing

Re: Encoder detection not working

Postby song » 12 Sep 2017, 08:45

I met the same issue, position control does not work. Not sure VESC6 fixed this issue or not.

Posts: 309
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: Encoder detection not working

Postby pf26 » 12 Sep 2017, 09:23

If the encoder seems to work by hand, and not when the motor is spinning, than you might have electrical noise issue ?
You can have a look in the rotor position tab of BLDCtools to check how the encoder position looks like when the motor is turned by hand, and when it is powered (possibly in sensorless mode).
For VESC HW4.12, you need to change the input resistors/capacitors to connect the encoder to the VESCs Hall inputs.

Posts: 1
Joined: 23 Sep 2017, 01:12

Re: Encoder detection not working

Postby seg » 23 Sep 2017, 08:35

I had the same problem.

I just solved the problem on my setup, which is an AMT102-v + Turnigy 6374-149kv.

I had good visual signal on the encoder using a meter and by checking signal within BLDC-Tool but encoder detection would always fail , forcing the need to hard-reset the VESC since it goes unresponsive during certain failures during encoder detection.

I did three things to solve my problem.

I switched to a metallic shielded jacket cable like this (http://www.mouser.com/ProductDetail/CUI/CUI-3131-6FT).

I shortened the cable to approximately the same length as the ESC-Motor wires, about six inches. I had encoder failures at 12 inches, 18 inches, and at the regular shipped cable length of 6ft I could barely even make out a good signal from the encoder on BLDC-Tool.

I reduced encoder detection amperage from 15A to 5A. I've found that if detection gets to the jerky last stage where it's supposed to do a revolution and then switch directions -- and it never switches directions -- reducing amperage helped progress to the next stage.

My first success gave me incorrect results, much like vedder in his youtube video about encoder use. Once detection succeeds do it again and compare results.

Once encoder detection succeeded with correct results it was smooth sailing. Fantastic low-speed start now. Remember to 'Apply & Write' once you succeed at detection.

Return to “FOC”

Who is online

Users browsing this forum: No registered users and 1 guest