Forums: 

I'm a total noob when it comes to LinuxCNC and I'm afraid I'm doing something fundamentally wrong, or don't do what I should be doing.

I've hooked up my motors according to http://www.micrometer.xyz/cdn/node/56 - although I've only hooked up the motors and the limit switches.

I started up the "taig-mill" configuration and figured I can probably jog around a bit and get accostumed to interface. I unlock the emergency switch and turn on power (the 2 red buttons in the top left),I switch to the command line tab and enter "G0X-5" and Go and the X axis value starts to change and the cone in the 3d view is moving also.

However, the steppers are not moving - in fact, they aren't even trying to move. I do hear a mechanical noise when I turn on the power (top second left linuxcnc button) so it seems the stepper drivers do get energized, but that's it.

I'm sure it's something trivial but I can't figure it out - any pointers?

Thanks a bunch,

Markus

Joel's picture

Usually, there are a few ways of narrowing down what the drivers are doing.

  1. Exit LinuxCNC and Power off the board (stop-sign)
  2. Check the lead-screws can be manually rotated by hand, and take a moment to lightly oil the screws with a few drops of sulfur-free (its corrosive) and detergent-free (some automotive solvents damage some alloys) oil prior to use. I just use a non-synthetic 100% additive-free 2-cycle motorcycle-oil dropper for the Taig. Note, If your machine used something like a synthetic white grease or odd looking powder, than one should always avoid mixing lubes (avoid skin/eye contact as some lubes are toxic). Remember, combining lubes chemistries can also damage the sliding surfaces with random surface galling and marring.
  3. Power up the board using the green check icon
  4. After powering up the board, try to lightly manually rotate the lead-screws again to check if the motors can be rotated by hand. They should hold their position rather strongly with the CNC firmware active, as this prevents loss of position during various changes in the software interfaces. If these screws can be easily moved while steppers are on, than it could mean :
    1. the motor wiring could be incorrect (there are several types of stepper motors, a photo posted with the chromium-browser in the internet menu may help me understand the setup better)
    2. current set too high for motor type, so output drivers over-heated and shut-off (will generate a high-pitched whine, and then turn off axis after a few seconds)
    3. output driver current adjusted while ON, wiring change and or no motor present while testing can fry part of a module chip's output section
    4. Current limit setting on output modules Potentiometer set too low (note your motors rated per field limit, as the driver can deliver almost 2A per winding with a heat-sink)
    5. Motor was designed to run at much higher drive voltages. Rare to see this these days, but some old equipment ran over 34v per field on some steppers to get them to move faster
  5. Start the linuxCNC taig profile
  6. Click the upper left button in LinuxCNC to unlock interface
  7. Click the other upper left button in LinuxCNC to activate interface
  8. Select an axis, an jog +1mm...  If the LinuxCNC e-stop-input is  or home-switches are active jog motions may be blocked
  9. If you hear a low frequency buzzing sound while trying to jog a move, than it could mean:
    1. The kinematics of your platform need lower acceleration limits (heavier machines must move very gradually to overcome inertia)
    2. the motor winding can limit how fast one can pulse them at 12v, so the step speed limits will need tuned to ensure the output torque is not lost

 

=)

Hey Joel,

thanks for all your debugging tips - unfortunately I seem to have a more basic problem. I checked the stepper drivers and they are all in sleep/reset mode (both pins are high).

I started collecting the Arduino's pin out and verified that the connections actually work (toggling the pin on the xHome connector actually toggles pin 47 on the Arduino. I've also verified that pressing the power button in the axis UI toggles pin 46 as it should. So far so good.

The problem is that the signals don't seem to be sent to linuxcnc. After opening axis I started up the "Hal Meter", and looking at the signals they remain static. Changing the input on xHome does not change what Hal Meter reports (it's always TRUE). The same is true for the eStop, which remains TRUE regardless if I short the 2 pins or not.

In fact there is only a pin I can trace in the hal meter which is the "probe". Shorting that connector does indeed change the value accordingly.

I'll keep poking around and try to figure out what's going on here.

Have fun,
Markus

Joel's picture

The GPIO are directly mapped into the HAL, and should respond accordingly unless there was a mistake in the firmware snap I pushed.

I wouldn't have seen this, as end stops are disabled on my taig (mostly fixture referenced work), but all end-stop pins should be internally biased and de-bounced with a cap.

I trying to integrate ROS right now (been a few evenings... ;-) ), but I will also have a look tomorrow to see if I missed something with the generic github version.

email me if you lost the documentation, schematics, and spreadsheet pin mapping.

edit: I just recalled we may have left  the linuxCNC inverted logic-flag on so the axis switches that are not connected don't prevent the machine from being jogged.

edit 2: Also check if the PCB routed uart jumpers are removed before running the USB serial link.  The pi uart PCB TX/RX lines can interfere with the USB TX/RX in the Arduino if both connected.

 

Joel - good pointers.

First off, I was mistaken, the emergency stop and power switch also work - except that their pins are swapped. I'm also not quite sure if the polarity is correct, it says TRUE when it's off and FALSE when it's on.

Also - looking at EmcArduino.cpp it seems the home state is only updated while jogging. That would explain why they're not updated in the "Hal Meter" when I toggle them - since I'm not jogging around ;)

There's only one jumper installed on the board which is in the IO Expander section.

I'll keep looking for what enables/disables the stepper drivers.

Have fun,
Markus

Joel's picture

pin D46 (see STEP_RST in the private board_pin_bindings.xls doc) is biased low to hold all steppers in "full-reset" for all outputs by default. With this firmware it should automatically go to logic +5 upon being powered-on to lock motors, and can be toggled by the LinuxCNC HAL during initialization.

The module EN pins do not have a logic input line, as they are always enabled  while powered. This was done to prevent an edge case where a micro-stepping setup resets into a weak initial drive condition based on its unknown old internal state.

If your logic is toggling (seems like it is), and the drivers are not held in reset... than the A4988 may be toast. Power down, and try swapping it out for another module.

Installing ROS is like a time machine back to the early Slackware dependency resolution process.  It is slow going... to put it mildly...  ;-)

 

I've updated the firmware and verified that the Arduino Mega does what it is supposed to do. I unplugged all stepper drivers, hooked up an oscilloscope and verified that the step/dir signals are correct and all control signals are as they should be (according to the data sheet).

Although the monitor is not visible, what you see here is the infinity board debugging itself. The Bitscope is plugged into the PI3 and the dso software is running on neptune cool

I hooked up LEDs instead of the stepper and - surprise - the LEDs light up in the stepper activation squence - as they should.

However, the moment I connect the actual stepper all signals vanish. And we're talking NEMA17 steppers, not some big iron stepper.

I guess things are pointing to the power supply. I'll see if I can find a replacement.

Have fun,
Markus

Naturally i was wrong again in my previous post, the stepper drivers are OK and the power supply is also not at fault.

As it turns out my steppers require a different wiring:

Left is the standard wiring and right is how I need to wire my steppers for them to move. On the plus side, if wired this way the steppers move correctly as  they are setup in the taig-mill example.

Obviously I feel quite silly - in hindsight it should've been one of the first things to check, or at least the 10th, or 20th.

Anyway, I guess I can start tuning this box and run it through its paces.

Have fun,
Markus

Joel's picture

Glad to hear there is progress as I was starting to review the last part bin for possible bad MLCC caps... I should post a how-to page on figuring out stepper winding's in general, as clearly documenting how to mod the 28BYJ-48 for bipolar mode is an excellent tutorial for students.

Personally, if using NEMA17 motors I'll upgrade a kit with the "JK42HM48-1684" (12v winding, 0.9 deg/step, 1.68 A/field, 4.4 kg/cm Holding Torque 'ideal').  Mostly because I like the resolution these offer with better repeatability, and the machines have to go slow anyway with small printers/tools. Recall steppers may be out +-5% of a given discreet position, and micro-stepping drivers can't fix that... a better $8 motor simply costs less than struggling with Trinamic modules.  However, I usually put the smaller 1.8deg factory kit motors in projects like plotters... where speed is needed, and the belt system elasticity limits precision anyway. ;-)

 

Seems both types of wirings are common:
https://blackforestmotion.com/product/motor-cable/

JK42HM48-1684 - those are nice steppers, thanks for the pointer!