Motor won't run when encoder is enabled

Hello guys,

I’m new here so I hope you do mind if some things go wrong while sending messages.

So I have a problem, when I select my vesc to use the encoder my motor wont spin anymore. The current will go up but it wont spin. It seems like it is in position hold. When I disable thee encoder the motor runs perfectly fine. Do you guys have any idea how this can be solved?

My setup is: HW: vesc4.10 FW: 5.1 Motor: Multistar 9235 100kv Sensor: AS5047 encoder

Thanks in advance!

5.1 is the problem. Hi welcome to the forum. Glad you made it. :partying_face:

Hi thanks for the fast reply! What do you mean with 5.1 is the problem? Does it mean that I have to switch to another FW?

1 Like

I’m not the best one to answer that right now. @ShutterShock much more versed than I am. I’m the self appointed gate keeper and welcome committee. :grin:

I’ve personally never set up encoders before but I have always wanted to.

Can you take screenshots of your vesc tool and send them here? Seeing the settings you’re changing would be helpful. I think that there is a position hold option for encoders. Do you have your controller set up correctly too?

Sure! When I change settings its simply in the FOC tab switching encoder to sensorless. I think I have my controller set up correctly. I’m just jusing a pot connected to the ADC from the VESC.

Set encoder inverted to true.

Hm the settings all look pretty right to me, try what Cris says

Did you do the encoder detection on the encoder page?

1 Like

I tried that today, sadly it made no difference

I have done it again today, the results where alsost the same. I think I have another problem to, I tried to run the motor on currentcontrol(in the sensorless mode obviously) and the motor would just spin op to 95%. And it would not run on the desired current I wanted the motor to run on. Is this correct or do we have another malfunction here?

Btw thanks for all the replys!

Hw4.10 usually doesn’t run with as5047 encoders without small hardware modification. If you search here you might find how to mod the pcb. I remember it’s written in an old thread. If you have a hw6xx esc laying around, give it a try if that will work. Also make sure you choose the right voltage. 3.3 or 5V. Esc and Encoder need to be setup for the same value.

1 Like

Yes I read that topic to! I have removed te filter that is on the pcb. I have a good signal from the encoder so I don’t think that is the problem. I don’t have an hw6xx laying around but maybe I should buy one so I can see the difference!

Put the control on current no reverse with brake.

Most of the time the motors on VESCS don’t spin to 100% duty cycle. I think it’s a safety feature but I don’t remember what it’s protecting.

Sounds like @Andy87 knows a bit more about encoders than I do

Allright guys, I figured it out. My encoder wasn’t positioned right. I just taped it on for testing but that doesn’t work(obviously) If the encoder is positioned right the signal from the encoder is lineair from 0 to 360 if it isn’t positoned right it isn’t. Since the vesc tool expects the encoder signal to be lineair it somehow blocks the whole system if the signal isn’t lineair. So if you guys ever want to use encoders on your vesc, be sure that they are positioned well! Thanks for all the help!

3 Likes

Thanks for the update. :call_me_hand: