surfdem0n1
1 µW
Trying to wire a flipsky 75200 v2 pro to a bkb Voyager v2 remote for a belt drive longboard set up
So far I've had what I would desribe as strong regen with my VESC, what do you have the regen currents set to? Shuddering is probably the controller not being able to quite keep the current stable, may be able to be tuned out, perhaps with a little higher pid gains from lowering the time constant a little, just as a guess.Got a spintend 85V/240A. Working ok so far. Two issues thou. Regen not strong and motor shuddering when i apply throttle real fast.
And I think top end are Trampa, Triforce and Tronic.
So with a motor with an absolute encoder you skip all that and the controller always knows exactly where the rotor is. So perhaps pairing a cheap controller with an absolute encoder could yield very good perforamnce for little money and faff. The encoders are very cheap and depending on the controller just as easy as wiring the halls. Installing them is very easy as long as you can put something over the end of the motor shaft. This is however and issue for hub motors and I was trying to figure out how to do that.
Was comparing my spintend regen to my phaserunner ver3 regen. Spintend regen set at 120A phase/60A battery. Will try pid tuning soon as we get better weather dayThere are so many VESC brands it would take too long to talk about them all but Flipsky and Makerbase are bottom tier for sure and I would say Spintend and MakerX are probably above those and into the good but not premium pricing range. And I think top end are Trampa, Triforce and Tronic. And there are lots and lots of brands in the middle that it's hard to gauge how good they are because there are so few of them out there or have mixed reviews which are hard to sort out.
I do think there could be a real silver lining to these dirt cheap controllers though, in my expereince yes they have sone QC issues now and then but mostly that isn't the issue and they are assembled just fine, they are just designed like shit with poor board layout, lack of filter caps, incorrect firmware, etc. But here is the thing a lot of that really only relates to being able to drive the motor in sensorless mode using the current sensors. So with a motor with an absolute encoder you skip all that and the controller always knows exactly where the rotor is. So perhaps pairing a cheap controller with an absolute encoder could yield very good perforamnce for little money and faff. The encoders are very cheap and depending on the controller just as easy as wiring the halls. Installing them is very easy as long as you can put something over the end of the motor shaft. This is however and issue for hub motors and I was trying to figure out how to do that.
But I do have the perfect application for this as I have a bike with a motor I'm working on installing an encoder on with a shit controller that has issues dirving the motor past around 130PA and even at that after lots of tuning. So I guess eventually I'll give that a shot.
So far I've had what I would desribe as strong regen with my VESC, what do you have the regen currents set to? Shuddering is probably the controller not being able to quite keep the current stable, may be able to be tuned out, perhaps with a little higher pid gains from lowering the time constant a little, just as a guess.
I've seen so many people try to push the Abs current by just increasing it until it's out of the controller's reading range it's ridiculous haha it's obvious that's no sense, but 99.9% of ppl using Vesc just dont know how to connect a light bulb on a battery so ... not surprisedOne day, I intend to make a video on tuning motors. I will outline my methodology in limited detail... I think it is kind of important because the common internet folklore about it is garbage/dangerous.
DO NOT:
1) use slow abs max, EVER
2) blindly increase limits to make errors go away
These are two commonly cited suggestions. This is akin to ignoring problems.
When I set up a new motor/controller, I roughly follow this order:
1) plug in controller (preferably to current limiting PSU, 18V or the lowest it will turn on at and 0.2A), check FOC offets on current sensors are sensible (typically 2048+/-150 counts).
2) Set the general current to like 10A and 20A abs max
Set the voltage limits to be sensible... I tend to use 10-15% above battery max voltage but always at least 5V off the FET rating. Under voltage I just put at a level where going lower would result in the controller turning off (typically 20V)
Take care that the battery current and voltage cut off limits are sensible to avoid power rollback and wondering why you have no power. Or blowing your battery.
3) press the bandbrake button, measure the phase voltage with scope or multimeter - scope = 50% duty (might recently have changed to all low FETs on...) multimeter = vbus/2 (might now be 0V).
Now connect a motor.
4) repeat 3), watch out for overcurrents. At this stage, if you get overcurrents, you probably have bad hardware or shorts somewhere.
5) Set currents to like half what your motor/ESC should be capable of, abs max like 50A over.
6) FOC page... run detection RL and lambda, with PSU set to half your battery voltage and maybe 5-10A... Many people have not got a PSU and so this becomes a lithium battery and YOLO. Check the results are sensible!
Flux linkages for EVs are usually:
10-20mWb region for in-runners,
20-40mWb for hubs.
2-10mWb for smaller outrunners can be down in the region...
higher kV implies lower flux linkage, more PP implies lower flux linkage.
R and L... quite variable.
big inrunners are in the 2-10mohm, 20-100uH region
outrunners can belike 5-100mohm, inductance is hugely variable,
hubs maybe 10-300mohm and 20-300uH
It is usually best to decrease the time constant to 400us. I have not seen a case where higher time constants helped except with broken hardware, where it can mask really bad current sensor readings.
If you get values much outside this, check it is really correct. Without correct values, there is little point proceding.
7) Run hall/encoder detection - remember if doing encoder you need to manually enter the encoder counts and pole pairs in the General Sensors tab before doing the setup in FOC Encoder... It can be really tricky to guess what the real counts are given motor datasheets since there are counts, transitions, steps... many factors of 2 and 4 between the naming.
Remember to apply and write the values using the Mdown button on the right...
At this point, your motor should spin and if you are lucky you are done and just need to set up a throttle.
However, if you are pushing a motor to the limit, or running a highly salient motor you usually need to go further.
8) Engage MTPA if your Ldq difference is more than maybe 20% of the L value. Use IQ measured, always, otherwise you can get extreme amounts of unintended field weakening.
9) Now we get to the painful world of observers. If you have an encoder... and it works... just set the erpm limit in the FOC encoder tab to be higher than your max erpm and it should just be better that way without effort.
If you have not... then you just need to try various things. Different motors respond better to different observers.
Generally, highly salient motors run best with ortega original and a very low gain whereas a lot of problematic motors which have rapid saturation and high pole count (like Tmotor U15) run much better with mxlemming observer.
My findings with running Ortega back to back with an encoder has been that the lower the gain, the better it tracks... right up until it becomes unstable and stops working atall. If you run a higher gain, you can easily push more more more amps... btu the tracking angle is bad and the power output drops off so you create much more heat for not much benefit.
The flux linkage observer uses the same gain factor as the main observer, which means you cannot tune them independently - this causes trouble, and has led to some dislike of the flux linkage observer.
If running Mxlemming observer, you can use the gain factor independently for the flux linkage... if using Ortega... cannot. Frequent comment from scooters has been that Mxlemming observer gets more torque, but Ortega more amps. I have verified this, BUT if you sit and mess with gain and inductance tuning, eventually you get the best result with Ortega original in many cases.
Other tips for getting higher current under sensorless:
Use the FOC Sensorless Saturation Compensation Mode... use factor. Higher current = more saturation. Maybe start with like 30%. Maybe reduce the L or Ldq by 30%, this often improves stability but sometimes at the expense of efficiency.
I have never seen cross coupling help in an EV application. Turn it off, it is for things like servo drives with huge inductance and rapidly changing setpoints, not throttle twisting and accellerating.
The key thing is to identify the real source of your problem. This is done using the "trigger sampled at fault" option, and inducing the fault while connected (USB, BLE, wifi...) to a proper computer. Nothing else is much use. NOTHING.
View attachment 359817
This is a very nice looking trace, 500A, 60% duty cycle, 20s battery... But it was on low side shunts. Therefore, you start to get current sensing anomolies at high duty and current (dinks at the bottom of the sin). Perfectly useable though.
View attachment 359818
Same thing but 80% duty. This starts to be a problem, there is not much you can do about this, it is a hardware limitation this device still pushed like 20kW though so meh)
View attachment 359819
This is an example of unstable observer. The tracking goes off and therefore the currents go haywire. Need to fiddle the gain/inductance/saturation comp.
View attachment 359820
Here is an example of a small motor running field weakening on an ESC with 600A current meaurement range. It looks rough, but it is fine. The blue line is inverting because it cannot decide if it is breaking or accellerating - free spin. There is some evidence of low side shunt abbheration but it is minor.
View attachment 359823
The dinks in this are due to dead time abherration (ignore the first 0.02s, that is where it locks the rotor into synch). Not much you can do about it. Hardware limitation imposed by the maker. This is running on a phase current sensor board I had with very nice sensing but needed power stage tuning.
View attachment 359824
This looks horrid but is actually nice. Board was 1800A sensors, running 20A. Be aware of the noise floor.
Annoyingly, I cannot find an example of the typical unstable observer behaviour. That looks like a pulsating sin wave, with fault triggering when the pulsation goes above the abs max. If I find an example, or next time I experience it... I will post.
Field weakening:
the only setting I ever use on VESC is 200ms, 80-85% start duty. Ramp up the amps to taste... bear in mind infinite speed is when L*id = lambda.
I'm still not sure what connections, I would think you would short the signal ADC2 with the ground or positive, because wouldn't shorting the ground and positive together blow the controller? As for the switch, I learned they sell a antispark module with a switch attached, I will just get one of those.Few ways you could do it, that VESC doesn't have a power switch as in there is no way to turn the actual controller off although it will go to a low power mode after being not used but will still draw some power. As for a brake lever with the correct wiring you should be able to use it fine, just may need a pullup or down. Is it a brake switch as in for regen braking for a safety kill switch, setup and such would be different for that matter is it a switch or a variable resistor?