I have a new VESC-based motorcontroller. I'm trying to get it to detect the motor that's currently attached. It is not working. Doing a goole for similar issues turns up my own struggles from a few years back.
I use VESC-based controllers to drive E-bike motors. These are still meant to drive an E-bike, so "removing the wheel" is not really an option. Getting the wheel back on, wile keeping it straight is supposedly quite tricky.
I tried both the "large 2kg motor" and "ebike motor 6kg" in the wizard, and both don't work.
One of the things that I don't understand is why it wouldn't be possible to spin it up in BLDC mode and then do the lambda measurement while it is already turning? Switch to openloop FOC at the measured average current and ERPM and you'd be fine.
This time BLDC mode does work, so it can be used to estimate the ERPM per volt. It went up to about 2120 ERPM at 95% dutycyle with 26V input. Voltage measurement in the VESC was a bit off. I trust my powersupply's 26V, the VESC indicated 26.5, so I think we should use the VESC's measurement to get the ERPM/V from the VESC's point-of-view. So I get 84 ERPM/V . We acutally measured the real RPM and found that the motor has 8.004 poles :-) .
OK. This results in a calculated linkage of .130 or 130mWb. I tried that, (on the FOC screen, modify lambda, then hit calculate-apply-old, Is that the correct way of doing things?).
That runs "reasonable" . Then I tried 120, 110, 100 and each time it ran a little better. Then I remember Benjamin telling me 7 years ago that there is a measure_flux_linkage terminal command. So I tried that, and got 106.... at duty .3. Then just for fun I tried .6 as well and got around 65mWb. Turns out .5 and higher result in .65, and below that there is a linear line or something like that. This detection would benefit from waiting a bit before doing the measurement and calling it a day. On .3, it took a while before it started to turn regularly, and then immediately the detection came with a result that apparently is not accurate. Hmm. With 130 calculated and 65 measured, is there an off-by-a-factor-of-two error somewhere? I calculated 60 / (sqrt(3) * 3.1415 * 84.21) = .130 (npoles * RPM/V = ERPM/V) Oh!... That should actually be npoles and not npolepairs???
Little bugreport: I saw it run "ugly" and at 1700 RPM. For a max speed of 27km/h I set the MaxERPM to 1700 yesterday. But VESC_TOOL told me -100000\ to 100000 and I "write-to-VESC" many times with that setting in the GUI. An upload settings (vesc-to-gui) didn't update that. So I was convinced the 1700 was no longer in the VESC. But when I changed the 100000 to 10000 and downloaded again... Sud\denly it goes up to 2120 again. And at top speed it runs much nicer.
At the max 1700 ERPM, I saw it regularly provide power to the supply. Does that mean that If I set 1700 ERPM as the max it will try to brake down to 1700 if I manage to exceed it? That's unwanted. I want to be able "catch a traffic light" by using muscle power to go 30+ for a short while....