When testing motors to determine their speed-torque curves in this thread, it has been noticed that motors are reaching their maximum unloaded speed before the maximum possible control value. This can be seen in this post where there is a graph of control values to output speed.
These tests above were done using port 9 on the cortex and an external motor controller 29. This port (as we know) is different to ports 1 & 10 as the output is a RC style servo control signal that has a nominal pulse width of 1.5mS when a motor speed of 0 is requested. The spec for this type of signal usually has the width of the pulse varying between 1.0mS and 2.0mS to move a servo from one end of it’s range to the other.
Using an oscilloscope the pulse width on the input to the motor controller 29 was measured and the following results found.
control value pulse width -127 864uS -100 1.0mS 0 1.5mS 100 2.0mS 127 2.14mS
Here are the same pulses on the oscilloscope (a composite image)
I also looked at the output of the motor controller 29 and observed that as the control value passed 84 the output reached maximum duration. This is easiest done with a resistive load rather than a real motor. (ie. replace the motor with a suitable resistor).
This is illustrated in this scope composite.
**So from the above we conclude the following.
A control value of 100 corresponds to a pulse width of 1.5mS on the inout to the motor controller, this is nominally the maximum motor speed.
The motor controller 29 has a maximum output with slightly less than the theoretical 1.5mS pulse input, somewhere around 1.42mS or a control value of 84.**
While I was doing this I also wanted to compare the difference between a resistive load and the motor (which is both inductive and resistive) as the load. Here is a scope composite with both shown. The control value here is only 20 but this causes the motor to run at about half speed (no load). The lower trace shows a back emf voltage that could theoretically be measured to determine motor speed.
One final test was done to compare the speed for a given control value on port 10 to the speed from port 9. A control value of 20 was sent and the rpm of the unloaded motor measured. port 10 was found to be at 44rpm, port9 was at 56rpm, a significant difference.
**So the final conclusion from these tests is that a motor on a 3 wire port will not run at the same speed as a motor on a 2 wire port.
All of the previous tests were done with master firmware 3.21 and ROBOTC V3.08. EasyC V184.108.40.206 was spot checked and produced the same results. I also reverted back to both 3.16 firmware and 2.81 firmware (not a good idea, what a pain) and everything was the same as far as I could tell.