Page not found, - commander motor commands needed

ok, thanks. Are you able to tell me what I would need to do to tune the voltage mode, at least at a high level? I could experiment with that and see how far I get using the uno.

For torque-voltage mode, it only uses the sensor to get the rotor position and then set the commutation patterns optimally.

So mainly its a matter of making sure the sensor is working well, the pole pairs are correct and the electrical zero is being found well.

For tuning you can look at:

  • what voltage is sufficient, probably lower voltages will result in less noise, voltage limits
  • commutation type - SinePWM should be more quiet
  • Iq - Q axis current - limit with motor.voltage_limit - it should not be set higher than 0.5 x driver.voltage_limit to prevent clipping.
  • that PWM is working well, you can see if setting different PWM frequencies helps with noise and/or running smoothly
  • loop speed, the faster the better
  • sensor latency, the lower the better. usually you don’t have much control over this, but for example you can increase the SPI bus speed if it works reliably.
  • sensor settings (depending on what you use, some have fairly complex options you can program in the sensor, which can impact accuracy and performance)

Ok, I will check these things out tomorrow. I have to figure out how to actually change them somehow, which may be impossible without access to the commander commands, but I’ll see. The noise being produced sounds like it is likely caused by the pwm frequency or some serious waveform distortion. I have not been able to figure out how to set the I2C pins or bus speed, for instance. In micropython it is easy, but it appears to be buried, probably I can find it by looking at the header files or something. I have an oscilloscope so I can use that to look in there. It’s definitely not bearing noise, or cogging. It’s some kind of electrical thing, a less than ideal waveform being fed into the motor.

I decided I will spend the working day tomorrow trying to get the uno with simplefoc working, if it looks promising I’ll go with that, if it doesn’t look promising by the end of the day I will order the eval board for a sensorless TI chip for $190. That might also not work. In which case idk wtf I will do… maybe back to simplefoc for another round, who knows.

I will sort of live blog my efforts.
Looks like Sine PWM is the default but I will try adding that line of code to set it anyway just in case, to double check.

Gotta reinstall arduino as something has happened.

looks like the pwm frequency is fixed at 32 khz for the atmega328, which is the uno BLDCDriver 3PWM | Arduino-FOC

oh I have a mega it has more memory, that may allow me to try the system in current sensing mode, just to see if it’s any quieter, however the lepton doesn’t have that anyway.

I set the voltage limits, driver limit is 11, motor limit is 5.

I hard coded the voltage for the torque control to be 4.5.

put the motor.move() command in the setup, at the bottom.
commented out everything in the main loop except the
motor.loopFOC();

when I put those lines back in/comment them back out again, the frequency of the noise changes. So looks like loop speed is somehow mostly responsible for most of the noise.

When the lines are not commented out the rpm is 497, when they are commented out it goes down to 470, based on my tachometer.

The motor gets pretty seriously hot even though it’s running with no load, and the system draws 300 mA. at rest it is about 70 mA.

If I use an stm32 which has 64mhz clock rate, suppose that comes to a de facto 4 times faster clock speed than whan I have right now, it does not look likely i will be able to get 3000 or 4000 rpm with reasonable efficiency and noise.

Maybe it’s possible it could be made to work but doesn’t look good, I will think about it till the end of the day before placing the order for that eval board.

The next version of the library will support setting it. If you want to try it in advance, the code is already on the dev branch…

Would not surprise me, as the ATMega is only 8bit 16MHz - on the very limit of what can run SimpleFOC. So any code you remove from the loop will immediately impact loop speed and performance.

Well STMs come in many different flavours, some with many MHz. And all of them are 32 bit, so can deal natively with the float values we use for math. Some also have FPUs. So you get more of a speed boost than just the MHz would imply.

420rad/s is fairly fast. But with a faster MCU, the right sensor and the right motor, it should be possible with SimpleFOC. Users have done even considerably more than this.
With UNO and AS5600, no chance.

In terms of noise, getting decent loop times will do a lot to help with noise, but at 4000 RPM, with a propeller attached, I can’t imagine it will be very quiet mechanically and due to the air-flow, even if the electrics were silent…

Hey, the page is still not found… I am trying to revisit simplefoc after an unsuccesful exploration of the TI MCF8316A chip. It is not able to drive my motor, it’s got bugs in the firmware which prevent it from driving small low KV motors.