You are here

SINE/COSINE Encoder Support

11 posts / 0 new
Last post
shaman
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2018-12-09 15:59
Posts: 60
SINE/COSINE Encoder Support

SINE/COSINE Encoders are seen in higher powered PMAC motors like the Motoenergy ME1304. These encoders take the place of hall effect sensors. This feature would be helpful in high power VESC designs like the BESC which would be very useful to drive such large PMAC motors.

paltatech
Offline
Last seen: 1 year 6 days ago
Joined: 2017-09-10 22:50
Posts: 33

Hi Shaman,

you can follow this pull request:
https://github.com/vedderb/bldc/pull/81

 

If you beat me to testing it with a motor let me know, maybe I can help setting up the bench. In my hardware both analog throttle inputs are protected and buffered, but I guess for very light testing its okay to run an ADC pin that close to the motor (its probably not okay).

 

Cheers
 

shaman
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2018-12-09 15:59
Posts: 60

I saw that too. I've been following marcos and team's controller development. I was really glad to see this!

electricfox
electricfox's picture
Offline
Last seen: 1 day 5 hours ago
VESC Original
Joined: 2019-01-01 17:11
Posts: 60

I have an IPM Motor (Ashwoods IPM 200-33) which I want to run with the Vesc 75/300. As Ive seen Vesc supports Sin/Cos Encoders now but IPM benefits not yet offically? I want to run the motor in FOC with the implemented Sin/Cos Encoder. The Connectors of the Motor are described as VCC, GND, SINE, COSINE, PTTHERM. Where do I connect those wires on the Vesc? VCC, GND and PTTHERM is clear to me, but where do I connect SINE and COSINE? I was looking in the Github pull request but I didnt see the information, maybe because of I have no idea of reading coding :D 

district9prawn
Offline
Last seen: 1 month 3 weeks ago
Joined: 2018-04-26 12:18
Posts: 124

I don't think the 75/300 firmware has the adc ports for the sin cos encoder defined. The only spare adc ports you can repurpose are the two analog throttle inputs. 

There is a pull request from the Axiom guys with field weakening if you want to build the firmware and vesc tool. I gave it a try with a small outrunner but as soon as the controller tried to field weaken the motor halted and made a high pitched tone =( . I'm probably doing it wrong.

paltatech
Offline
Last seen: 1 year 6 days ago
Joined: 2017-09-10 22:50
Posts: 33

For sin/cos you need to use the accel/regen pins as inputs which forces you to provide torque commands over CANbus. This is natural for an Axiom board, not so much for a smaller vesc.

Some encoders provide sin+, sin-, cos+ and cos-, driven differentialy. Axiom supports that kind of differential signals unlike any other vesc variant. If your encoder provides single ended sin and cos signals, you need to make sure that signal is only lightly filtered, otherwise the waveforms will distort at high rpm. Its a though signal, every millivolt counts and you cant lowpass filter it too much.

 

The Field Weakening branch also includes Maximum Torque Per Amp control for IPM machines, but its not ready to merge, we had to steer our focus into the hardware side, but we will resume firmware dev asap.

electricfox
electricfox's picture
Offline
Last seen: 1 day 5 hours ago
VESC Original
Joined: 2019-01-01 17:11
Posts: 60

Thank you both for your answers. So, I wont use the Vesc in this case.

electricfox
electricfox's picture
Offline
Last seen: 1 day 5 hours ago
VESC Original
Joined: 2019-01-01 17:11
Posts: 60

Although I wanted to give up, today I tried to use the AM4096 Encoder which is used in the Ashwoods Motor with my VESC 75 300.

I made the connections on COMM PORT:

SIN+ from Encoder to ADC1 (SCK_ADC_EXT) PIN4

COS+ from Encoder to ADC2 (MISO_ADC_EXT2) PIN7

and of course 5V and GND for the Encoder.

 

Motor Settings:

General-> General -> Sensor Port -> Sin/Cos Encoder

FOC->General->Sensor Mode-> Encoder

 

App Settings:

General-> App to use-> No App

 

The motor detection wizard did not detect the encoder and went to sensorless mode.

Under FOC->Encoder trying to use "detect Encoder" an error message appears which says "Encoder support is not enabled. Enable it in the general settings."

In the status bar in it says "Encoder not enabled in firmware".

 

Do I need a special firmware?

I am using firmware 5.2 and Vesc-Tool 3.

 

Except from that, could I use PPM Signal to control the motor? I am not enough into the code.

 

 

Oliver

Aravinthkumar
Offline
Last seen: 2 days 11 hours ago
VESC Free
Joined: 2022-03-06 08:51
Posts: 1

Have you (electricfox) find any solution for  sin/cos AM4096 sensor integration with VESC?

electricfox
electricfox's picture
Offline
Last seen: 1 day 5 hours ago
VESC Original
Joined: 2019-01-01 17:11
Posts: 60

No, I am using a different controller in this case. There have been changes in the meantime in firmware according to encoders but I can not say if those affect the AM4096.

Rukus_racing
Offline
Last seen: 7 months 1 week ago
Joined: 2022-06-28 02:45
Posts: 1

Has there been any changes on this i have a ME1718 with cosine sensor and would like to try and use a 75/300