Originally Posted by
gigaplex
It wouldn't surprise me if the method of measuring the rising edge would account for such a big delta. I've seen massive variances (15+ degrees) just between a SkyRC analyser vs a Hobbywing Tunalyzer. Though maybe they're also using different algorithms to compute the value.
Your back EMF signal looks pretty isolated. Are you measuring this on the slave motor? I'd expect the timing delta to be different on the driven motor. The EMF distorts as the motor rotates. There's also the winding time, which should be a fixed lag caused by the inductance of the stator. I'd expect the field distortion to be similar on the master vs slave, but the winding time might be an offset in the other direction since it's a lag of the input vs output.
https://pphaneuf.github.io/rccars/ar...timing-theory/
Does your margin of error vs the Motolyser decrease as the RPM is reduced?
The back emf is being measured on the motor I want the timing on. The slave isn't connected in this instance. When measuring the slave motor you don't see the duty cycle that you can see in the above pics. As far as the emf distorting as the motor rotates, it actually gets easier to read as the rpm goes up until you hit max duty, then it much clearer. And in discussions with Motolyser they have told me to use the full test for timing as that runs at fully duty. This gives the best results. The timing can change a couple of degrees through the rpm range with my measurements, with the motolyser it is generally only a few tenths.
As to the scope output, I have played around with different grounding points to see what gives the easiest output to trigger on. When using the virtual common ground between the phases it is extremely hard to trigger on the wave, but you do see the alternating voltage that way. The way I am measuring in the pics above is to use the ground on the rpm sensor and trigger on that. That square wave is easy to trigger on so it stabilizes the emf wave to read, but since the grounding is different, you only see part of the wave. If I use the virtual common, the rpm sensor wave is distorted and harder to trigger on. I have measured the intervals using the virtual common as well, and they are the same.
EDIT: For clarity, the virtual common is created by using a 10k resistor off each of the phases and connected together, creating a virtual common between each of the phases.
If inductance was playing a role, I would expect the 17.5 to have a smaller margin of error vs the 21.5 since the 17.5 has lower inductance. Also, I am not sure how the motolyser would account for that since that would change with each motor.
I did order some lm339 comparators to use for getting a more accurate zero cross, I tried using the internal comparator on the arduino, but I think my code was wrong.
EDIT: I tested my slot machine 13.5, certified slot machine 21.5, and my other R1 to compare. The slot machine and the v21s all have on offset of 17-18* throughout the timing range. It is only the mc4 that is higher. I need some other brands of motors to test with...