Skip to content

Troubleshooting

clough42 edited this page Feb 26, 2021 · 14 revisions

Having trouble with your Electronic Leadscrew? Here are some common problems and how to fix them.

Common Issues

My system works, but randomly changes mode, direction, or pitch

This happens when the firmware reads phantom button presses. This is usually caused by electrical noise or a loose connection between the LaunchPad and the control panel. The better you can make your electrical installation, the more reliable it will be. Here are some suggestions:

  • Make sure you are running the latest firmware. Release 1.2.00 added aggressive validation and filtering code to try to actively detect and ignore erroneous button reads. Keep in mind that this code may mask electrical problems in your installation, so you should still try to make your electrical setup as reliable as you can.
  • Make sure all of the connections are tight and making good contact. Try wiggling the connectors to see if it causes the issue.
  • Keep the control panel cable as short as possible.
  • Keep the control panel cable as far away from power wiring as possible. This includes wiring for the lathe motor and wiring for the stepper or servo.
  • Keep the logic ground for the 5V circuitry separate from the power ground for the stepper or servo motor. The driver should have optical isolators in it, so connecting the 5V ground and the 12/24/36/48/72V ground for the motor isn't necessary and can only cause trouble.

The buttons on the control panel don't work

The firmware ignores key presses while the lathe is turning (when the RPM is not zero). Normally, when the lathe is in motion, only the + and - buttons are active. When the lathe is stopped, all the buttons become active.

There is a setting in Configuration.h to disable all buttons when the lathe is turning. If you have this selected, even the + and - buttons will not work when the RPM is not zero.

Also, keep in mind that the second button from the right on the LED&KEY board is not used. It sits between the + and - buttons, so it normally cannot be pressed, and it isn't programmed to do anything.

If your buttons still aren't working right, try checking the contiunity of your connections.

My hybrid stepper motor from Automation Technologies doesn't turn

Make sure you're using the extension cable that came with the motor.

The hybrid stepper motor and driver from Automation Technologies comes with an extension cable for the motor encoder. This is not a straight-through-wired cable; it is an adapter from the pinout of the motor encoder to the pinout expected by the driver. If you plug the encoder directly into the driver, it will not work. The motor may click. It might take one step and stop. The driver may trip and flash an error code. The solution is to use the extension cable or make your own with the same pinout.

You can also try checking the contiunity of your connections.

My stepper or servo doesn't do anything or is intermittent

If you're using one of the Clough42 ELS boost boards, look carefully at the screw terminals. The terminals arrive from the factory already tightened in the fully closed position. To use the terminal, you must first turn the screw counterclockwise to fully open the connector. This lowers the clamping bar to the bottom of the opening. Insert the screw above the metal bar. Turn the screw clockwise to raise the bar and clamp the wire.

It is possible to insert the wire below the bar and turn counterclockwise to pinch the wire against the bottom of the connector, but the wire does not make reliable electrical contact in this position.

If the screw terminals look okay, try checking the contiunity of your connections.

My leadscrew isn't turning at the right ratio or my threads are the wrong pitch

Have you correctly set ENCODER_RESOLUTION in Configuration.h? This needs to be set to the number of counts your encoder will produce for one spindle revolution. Since you are using a quadrature encoder, this is four times the pulse count. A 1000P/R encoder produces 4000 pulses per revolution. This setting also needs to account for any gearing between the spindle and the encoder. If the same 1000P/R encoder is geared 2:1 to the spindle, you would set ENCODER_RESOLUTION to 2000 instead.

If the RPM display on your control panel is correct, you probably have the ENCODER_RESOLUTION set correctly.

Have you correctly set STEPPER_RESOLUTION and STEPPER_MICROSTEPS in Configuration.h? These should correspond to the stepper or servo motor you are using, plus any gearing or microstepping in your setup. Stepper motors are typically 200 steps per revolution and a microstep setting of 8:1 (1600 steps/rev) is common. For this case, values of 200 and 8 would be used.

For a servo motor with a 1000-step encoder connected directly to the leadscrew, you would set STEPPER_RESOLUTION to 1000 and STEPPER_MICROSTEPS to 1. The same servo connected through a 3:1 gear reduction could be configured with STEPPER_RESOLUTION of 1000 and STEPPER_MICROSTEPS of 3.

If you have both the encoder and stepper configured correctly, check to see if there is any additional gearing between the servo or stepper and the leadscrew. The G0602 and similar lathes have two knobs on the built-in gearbox. Mark the leadscrew and the input pulley with a marker and rotate by hand to be sure you have this set at 1:1. If your lathe has both a leadscrew for threading and separate gears for feeding, make sure you have it set in threading mode.

I can't get the firmware to compile properly in Code Composer Studio 8 (or 10)

The firmware project is set up for Code Composer Studio 9. There is no reason the underlying code can't work in CCS 8 or 10, and some users have succeeded, but the project files were generated by CCS9. CCS9 is 64-bit only, so you will need to run it on a 64-bit machine.

The connector on the LED&KEY PC board interferes with the front panel of the box

Yup. Whoever manufactures these boards put the connector on the front for some reason. To use it in an enclosure, you need to move it to the back of the board. The PCB kit comes with an extra right-angle header for this purpose.

Desoldering tip: If you grab the pins with needle-nose pliers, you can heat up the solder joint and pull them out one by one. The pin will pull right out of the plastic carrier once it gets hot. Once all five pins are out, clean up the excess solder in the holes with solder wick. It's sometimes helpful to add fresh solder or flux to get everything flowing well and then use wick to pull the solder out of the holes. One the holes are clean, solder the new header on the back of the board.

The power and settings buttons don't seem to do anything

Update to the latest firmware. As of version 1.3.01, the power button now turns off the display and disables the stepper or servo. The settings button is not yet active.

My leadscrew keeps running when I stop the spindle

Update to the latest firmware. The ELS is limited to an output step rate of 100KHz (100,000 steps/second). If you configure your lathe with a large number of steps per leadscrew revolution, set a very high feed rate or coarse thread, and then run the lathe at high speeds, it is possible to exceed this rate. If that happens, the ELS can get behind and then output the missed steps after the machine stops, in an attempt to catch up to where it thinks it should be. As of version 1.4.00, the ELS firmware detects if this condition occurs and automatically stops the leadscrew, disables the motor, and displays the message "too fast - reset." If this occurs, stop the lathe and turn the ELS off and on with the power button.

If you hit this limitation, see below for some suggestions.

The ELS stops suddenly and displays "Too Fast - Reset" on the display

The ELS is limited to an output step rate of 100KHz (100,000 steps/second). If you configure your lathe with a large number of steps per leadscrew revolution, set a very high feed rate or coarse thread, and then run the lathe at high speeds, it is possible to exceed this rate. If that happens, the ELS can get behind and then output the missed steps after the machine stops, in an attempt to catch up to where it thinks it should be. As of version 1.4.00, the ELS firmware detects if this condition occurs and automatically stops the leadscrew, disables the motor, and displays the message "too fast - reset." If this occurs, stop the lathe and turn the ELS off and on with the power button.

If you hit this limitation, here are some things you can do to reduce the required step rate:

  • Reduce the microstep setting on your stepper driver
  • Reduce the resolution of your servo driver
  • Reduce the drive reduction between the motor and the leadscrew

You will need to also edit Configuration.h to update your configuration to match. All of these will reduce the number of steps the ELS has to output. For example, if you are using 16X microstepping and the ELS needs to output steps at 150KHz, reducing to 8x microstepping will reduce this rate to 75KHz, which it should handle easily.

Something is wrong with J12 on my LaunchPad; can I use J13 instead?

Yes. There is now a #define in Configuration.h to use J13 instead of J12. If the problem with your board is mechanical (broken pin, lifted trace) this may help you. If you damaged the input electrically, this will probably affect both ports, since they use the same voltage converter chip.