You are here

FOC with encoder

13 posts / 0 new
Last post
Ledz
Offline
Last seen: 2 years 1 month ago
Joined: 2018-04-18 19:45
Posts: 3
FOC with encoder

I want run 6374 motor in position mode with encoder.

Firstly I test motor in sensorless modes (BLDC and FOC), it work good. 

I connect  encoder, remove filters from h1,h2, h3 inputs, leave only pullup resistors.

Test with encoder, RL and lambda pass ok. But motor not work with encoder. It run slowly as stepper motor, with high current. Pid settings don`t give any effect.

enc1_0.png

Work with encoder 400 RPM max, very high current

enc2_0.png

I rotate motor by hand, step from magnet force.

enc5_0.png

FOC settings

 

Ledz
Offline
Last seen: 2 years 1 month ago
Joined: 2018-04-18 19:45
Posts: 3

Please help. I not understand what happened. Encoder work ok without noise. I don't see any problems. Encoder not have index pin perhaps problem in this?

Roger Wolff
Offline
Last seen: 2 years 5 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

Yes, the vesc is intended to work with an encoder with an index connection. The relationship between the encoder and the motor pahase can otherwise never be determined. 

 

Ledz
Offline
Last seen: 2 years 1 month ago
Joined: 2018-04-18 19:45
Posts: 3

I  buy encoder with index signal OMRON E6B2-CWZ1X, but I not see any changes. I check signals on H1, H2, H3 -  all near 4V, without noises. 

Encoder test pass, but every test give different offset. Can I see index signal in Vesc tool? I make length of wire to encoder near 30 cm, this not give any effect. In Vesc tool position show like in first post.

Encoder have some differences in index signal from AMT102-v may be problem in it.

encoder.png

 

Motor not spin in encoder mode. In senseless mode work good.

TechAUmNu
Offline
Last seen: 2 months 6 days ago
Joined: 2017-09-22 01:27
Posts: 575

You should be using an AS5047 encoder.

Kakskiv
Offline
Last seen: 1 year 5 months ago
Joined: 2017-09-29 16:48
Posts: 3

I'm having the same problem as Ledz. I've a setup with a AMT-102 quadrature encoder with 2048pulses pr phase and an index pulse.

The system detects the encoder without any problem, but just lik for Ledz, the offset keep changing. The motor runs fine in sensorless mode, but as soon as i set it to encoder-mode, the motor just keeps jumping, if moving at all. Looking at the RT-encoder data shows that the encoder signal is smooth and continuous.

I have tried with VESC-Tool 0.94 and 0.95 without luck.

Can anyone confirm that the encoder is still working with the latest software?

 

Kakskiv
Offline
Last seen: 1 year 5 months ago
Joined: 2017-09-29 16:48
Posts: 3

After some more research i got i working. My problem was the RC-filter on the input, which I was told by the manufacturer was not there.

This I figured out by running the motor in sensorless mode, and monitoring the encoder position from VESC-tool. There I saw that the encoder was not keeping up if the velocity was too high.

lukeSkypewalker
Offline
Last seen: 5 years 10 months ago
Joined: 2018-03-05 21:34
Posts: 1

Dear Kakskiv,

Could you kindly explain more verbosely what is the problem and what is the solution (maybe a photo?)
what vesc do you use (4 series or 6?)

linuxguy123
Offline
Last seen: 5 years 11 months ago
Joined: 2018-12-11 01:41
Posts: 1

What firmware file did you upload to VESC ?   I don't see the VESC encoder file that the Youtube video speaks of.    Where do I find it ?

Shaik Siraaj
Offline
Last seen: 5 years 10 months ago
Joined: 2018-12-13 09:36
Posts: 4

Hi

I think I ran into a similar problem as the Original Poster (OP) of this post. 1 thing you can try if you haven't is to increase your Kp values in the PID controller tab under 'Position Controller'. I increased mine from the default value to 0.07000 and above and the motor and encoder pair now works as intended.

 

SS

ripperpc
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2018-12-19 05:46
Posts: 20
I am facing a similar issue.

I am using AMT102 - 2048 PPR encoder; have removed the RC filter on the Hall inputs; when I set the encoder count to 8192 1 rotation of the motor gives me 1 complete rotation on the encoder live view.
Motor parameter detection works perfectly and the Encoder calibration results are consistent.

 
Thats about it - neither the 'arrow keys' control works after nor the position mode.

Any help would be highly appreciated.
 

ergnmnh
Offline
Last seen: 11 months 1 week ago
Joined: 2023-11-23 15:16
Posts: 5

hello sir , did you find anything about this issue , i also connect the encoder but The encoder I have is not standard, .How can I connect it to vesc6? I saw links to vesc4 on the internet, some resistors were being removed.But I'm not sure, the encoder I have has a total of 9 channels. of which 6 channels of axis, 1 axis vcc, 1 axis gnd and 1 axis shield. I don't know how to do this. Please help me with this issue because it seems like there is no other way for me to drive with POS.  here is the link of encoder's pinout : FNC 50H Connector Series (inelso.ru)

E.E.

Ramesh
Offline
Last seen: 6 months 1 week ago
VESC Free
Joined: 2023-10-09 11:11
Posts: 1

i was also testing the hw 4.12 usinhg as5047  with my r150 motor in vesc .i have tried many but nothing got worked well.my encoder is nt detecting and all.i have tried different versions of tool it is not working also.then i saw that the encoder will work in tool 0.95 i have caliberated the motor and while csliberating the encoder my board was disconnecting i have tried many times the board was disconnecting whenever i started caliberating the encoder. can anyone help this out.. thankyou