Hi, I was thinking about using VESC in my next project. Control AC servo with quadrature encoder connected to VESC. LinuxCNC MESA card conected to VESC with ppm input. Servo thread with PID will be on PC and VESC will be responsible for torque control based on PWM duty.
My question is if VESC use on PPM input hardware counter and if it is possible to have good resolution at about 10kHz ( of course with firmware change ).
I assume if it use hardware than at 10kHz there are 16800 steps to play with.
Next if it can handle 2500 steps/rev(10000 resolution) quadrature encoder at 3000 rpm. That is 500kHz.
This could open new field for VESC because for CNC is better to have PID on PC with torque control then using STEP/DIR and VESC has good brain for this.
Maybe next board will be 220V 20A?
thanks in advance
With step/dir I assume that you want to control the motor in the same way as a stepper motor, right? Then you are actually running position control and not torque control. The difference is that stepper motors kind of run position control in open loop while the VESC runs position control in closed loop, which is much more efficient and gives higher power density compared to using stepper motors.
Connecting the encoder to the VESC should be no problem. The encoder goes to the timer hardware, so handling 2500 pulses/revolution (10k steps) at 3000 RPM is easy, as long as the cables are routed nicely to prevent most noise. The step/dir interface has to be implemented after that, but the hardware should support it and the software should be quite straight forward to write. I actually have a small 6040 cnc running linuxcnc in my garage, so I might also have some use for it :-)
I have added the step/dir app to the TODO list:
No, I want to control it like AC servo with torque input.
For step dir I think you need another hardware timer like encoder has and compare values in some pid thread but that is not what I want to do.
I want to control motor torque with PWM at 10kHz. For example I want at 10% pwm -10A current and at 90% pwm +10A, 50% pwm 0A. VESC has PPM input and I want to know if it is connected to hardware timer that is capable to convert this pwm at 10kHz to some integer +- 1000 so I can run torque control on VESC and position control on PC with linux/mesa.
Alright, now I get what you mean :-)
The PPM input uses a hardware timer that runs at 1 MHz, so if you use it as it is you should get a resolution of 100 steps across the range with 10 kHz input rate. It should be enough to change the pulselength start, end and center settings in the PPM app settings. It is possible to run the timer at even higher rate, but I don't think it gives any benefits because noise will give more jitter than the extra resolution helps anyway.
One thing you have to do to run PWM input at that rate is to change or remove the low pass filter on the PCB.
Thanks! I think MESA card will have very little jitter.