SimpleFOC with old BLDC motor

I have a couple of old (maybe late '90s, early '00s vintage) BLDC motors with no actual motor drivers. They are little used and their electronics (encoder, hall sensors) are working fine. I’d like to use them with a simplefoc controlled DRV8302 using an arduino due, but am having difficulties.

I’ve previously modified the FOC_DRV8032 example code to drive a Hudson M-2311P-LN-08D motor and it works fine. That motor has 8 poles (4PP) and is marked as having 8000 encoder counts per revolution (post-quadrature). I take the latter to mean I should setup the encoder like:

Encoder encoder = Encoder(Enc_A, Enc_B, Enc_CPR) #where Enc_CPR = 2000

Anyhow that setup seems to work fine.

When I changed to the older BL230A motor, I ran into issues around not being able to get a datasheet for it. The little info I have suggests a CPR of 400. Testing with the simpleFOC encoder_example code, if I set up the encoder as above with 400 CPR and run the code, then manually rotate the shaft 1 rotation, I get a rotation output of 2pi on the serial monitor. So that 400 CPR value seems good I think.

For the number of pole pairs, Running the find_pole_pairs_number example code with CPR at 400 tells me I have 2 pole pairs. I tried applying a 100mA current between 2 of the phase wires and manually rotating the shaft. I note 2 stable positions per revolution when I do this. Is that confirming I have 2 pole pairs??? Using 400 CPR and 2PP in my original example (with the winding resistance parameter changed to suit the BL230A, the debug output on the serial terminal indicated ‘PP check: fail - estimated pp: 2.35’. I can run the motor, but control is lousy.

I’d be grateful for any pointers on this. It may simply be that these motors are no use for this system, but I’d love to understand why exactly the PP check fails.

If it helps, the motors are branded Vexta. I believe Oriental-motor are the parent company. I was already in contact with them & they have no other info as these are old.

Thanks,

J

It’s not uncommon to have PP check fail. Maybe if you increase motor.voltage-limit a bit, you get better results.
But more important is to find out, if your encoder works flawless with 3.3V from the Due.

I’ll try that later thanks.

On the encoder, it should be fine. I supply it with 5V, but the outputs require pull up resistors which I connect to 3.3V.

J