-
11Step 11(OPTIONAL) ERROR FEEDBACK: If you will want error feedback to your motion controller:
[ ] First be very careful that it can accept an error signal on pin 7 of the PMinMO connector. This pin is normally grounded, and so it will make any error much worse if we activate a short to ground. Connect a low value resistor over the "X" just above U1 on the underside of the PCB.
-
12Step 12(OPTIONAL) ERROR LED: For an error indicator, this LED will light if the controller looses track of a shaft which is spinning too fast:
Install an LED with long lead in the A2D pin of J12 (lower edge of PCB) and the short lead in the hole just right of that. Keep the short lead long, and bend it over to also connect to J12 pin 1 (far right of J12) where a low value resistor (e.g. 330 to 560 ohms) should be installed with it's other lead in one of the GND pads of J11. (see center bubble in picture above)
-
13Step 13
Operation
TTL Serial 38400 N 8 2 X-ON/X-OFF: Connect a USB (or RS-232) to TTL serial converter to the J2 connector. e.g. FTDI Friend, RLC3 Again, pin 4 "TX" is data FROM the USB/Host going TO the PID controller. RX is TO USB/Host FROM PID controller. Configure your serial terminal program (e.g. Hyperterm, RealTerm, PuTTY, etc...) for whatever COM/TTY port shows up, and 38,400 baud, No parity, 8 data bits, and 2 stop bits. Select X-ON / X-OFF handshaking if available.
Note: The pre-programmed chips come with a bootloader installed. On power up, the serial connection will display a countdown in order to give time for the user to go into the bootloader mode if desired. Just wait for the countdown to finish for normal operation.
Commands:
- e Enable. On startup the unit will NOT drive the motor, until it is enabled.
- {space} Disable. To stop the motor at any time, just hit the space bar. This also disables tracking of the hardware input enable line.
- #p, #i, #d Set the constant to the value entered. For example, to set the p term to 14, enter 14p To set I to 0.1, enter .1i. Always use lower case (it's faster) and always enter the value first, then the letter. These settings only last as long as power is on, unless you save them into non-volitile memory.
- 216w Set Direction to positive high, negative low
- 286w Set Direction to positive low, negative high
- 60w Make the motor enable track the step/direction input motor enable line
- 50w Make the motor enable NOT track the step/direction input motor enable line. {space} also does this and disables the motor.
- #s (since v0.92) Set the number of steps per each step input pulse. e.g. 10s changes the setpoint by 10 positions each step. 1s is a one to one step to position setting.
- 321w Save settings / constants in non-volitile memory. Once direction is set, the PID tuning is done, and input enable tracking set, saving the settings allows you to remove the console cable and just operate from the hardware step/direction input.
- #{enter} Move to the location entered. e.g. to move to 100, enter 100 and press enter. To go to 1, press 1. For negative values, put the minus sign at the end, not the start, of the number. e.g. to move to -20, type 20-{enter}. The total range is double... 1.17549435 e-38 to 6.80564693 e+38 with 32 bit precision.
-
14Step 14
Troubleshooting
- On power up, after enable, the motor runs continuously in one direction or the other. The polarity of the direction signal is backwards. Swap the motor wires, or use the Set Direction commands (above) to make it zig or zag as it should.
- On power up, after enable, the motor holds position in one direction only. If you push it against the correct position, it will resist, but will then go dead as soon as it moves away from the set point. The Step / Direction lines from the controller to the driver are reversed. Step is feeding direction and direction is feeding step.
- The motor oscillates, moves slowly, shudders/grinds, or generally moves but not well. Please read and follow our PID Tuning / Troubleshooting page
- The error LED comes on, or the serial console shows "!", or the motor looses it's position 1.The encoder is putting out invalid phase A and B signals. The MassMind ENC1 Encoder will do this if it looses track of it's magnet. Recheck the positioning of the magent.
- Movement works ok from the serial console, but the step / direction interface has no effect. Especially when the step and direction signals are open collector You will need to provide 1K ohm pull up to logic power from each signal.
2. The PID controller isn't able to keep pace with the encoder. Please measure the RPM of the shaft if possible and contact us with this information. A firmware update may become available to improve speed.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.