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
Custom wires are always a puzzle...
Usually, there are a few ways of narrowing down what the drivers are doing.
=)
some more data points
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
Hmmm, odd indeed
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.
some mystery solved
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
STEP_RST pin D46 in EN out in LinuxCNC
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... ;-)
Still no movement - but the plot thickens
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
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
Movement!
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
Huzzah!
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. ;-)
Sweet steppers
Seems both types of wirings are common:
https://blackforestmotion.com/product/motor-cable/
JK42HM48-1684 - those are nice steppers, thanks for the pointer!