Welcome! Log In Create A New Profile

Advanced

Marlin: No step/dir signal on motor output

Posted by sam0737 
Marlin: No step/dir signal on motor output
July 16, 2012 05:36PM
I have a Arduino Mega + DIY breaking board for connecting to existing CNC steppers drivers.
I am using Reptier-host for the host.

The problem is: I can't get the motor moving. I can get motor heater and thermistor working but not motor.
I was clicking the axis nudge button on the UI (X,Y,Z as well as the extruder - with PREVENT_DANGEROUS_EXTRUDE off) - gcode is sent and ack'ed, but the motor does not move.
The activity LED on the driver that should response to step signal suggests that no steps were sent. With the multimeter, the DIR pin does not change. Sadly I don't have a scope.

The motor is properly powered (shaft is locked when powered on) and enable pin is active as expected.

Because it's not a standard RAMPS I modified the pins.h and configuration.h a bit.
I bet I might have overlooked some really obvious settings...Appreciate if someone could just throw me some idea that I should verify.

Thanks.
Attachments:
open | download - pins.h (30.5 KB)
open | download - Configuration.h (11.1 KB)
open | download - Configuration_adv.h (9.6 KB)
Re: Marlin: No step/dir signal on motor output
July 16, 2012 07:18PM
The step pulse may be too short for a CNC driver. Many have opto isolated inputs which are relatively slow. Reprap boards have a direct connection from the micro to the stepper driver and only need a very short pulse.


[www.hydraraptor.blogspot.com]
Re: Marlin: No step/dir signal on motor output
July 16, 2012 11:00PM
Thanks, Nice call. I found the following pull request which add delays and lengthen the pulse.
But it wasn't that.

1. Tried with 30us, doesnot work.
2. And even the DIR pin, which should flip to the other side when the motor direction is changed...isn't changing.

---
Maybe I should just start going back to the old school debug method tonight: printf and trace...

Edited 1 time(s). Last edit at 07/17/2012 02:52AM by sam0737.
Re: Marlin: No step/dir signal on motor output
July 17, 2012 02:15AM
If you're not getting dir working it's most likely the pin configuration.
Re: Marlin: No step/dir signal on motor output
July 17, 2012 03:41AM
Or possibly the CNC driver inputs need more current than ATMEGA can supply. Does the dir pin work when it is not connected?


[www.hydraraptor.blogspot.com]
Re: Marlin: No step/dir signal on motor output
July 17, 2012 02:47PM
Alright. At least I got E working now - short answer: wrong pin configuration.
It's nophead last post ring the bell - i just noticed the DIR is actually reading 4.5V, not exactly 5V. I take the header off, and it's still 4.5V in the open - sounds like the pin mode wasn't set to output but left at the default input mode + no pullup. I added some debug message to verified that the mode was indeed set. So I take the shield and going to check the output right at the IC pin.

Until then, I realized that the digital output start from VCC then 22, 24, 26...and I have shifted everything by one pin!
My enable pin is on the top row so it wasn't effected, only DIR and STEP pins.

Got lucky that I didn't assign anything for pin 22/23 (the top pin) or it would actually be VCC by now and who knows what happened.

Lesson learned? Check everything and never assume anything?...Ya I have probably gone through this lesson so damn many times but...
Now while E is ok, X,Y,Z isn't moving yet (E is on a newly bought driver, XYZ are on the old 3 Axis driver) - but with one mystery solved I am more confident with the whole setup now.

Thanks folks.

BTW, the opto of the E is HCPL2630, which is stated as capable sending 10M/s. TB6560 chip is expecting just min 100ns pulse for step signal too.
With DIP switches to all the configuration pin + bigger switch to select the sense resistors array for current limit, I am very satisfy with the driver. Cheap Chinese thing wasn't that cheap after all =P Just bought it for 10 USD including shipping.
Sorry, only registered users may post in this forum.

Click here to login