Hi,
I have been working on an Arduino-based interface for a commercial Breakout Board complete with drivers.
(Commonly used with a real parallel-port and Mach3 SW)
During my work I have struggled to find the appropriate information, and I am now stuck ... =(
So I am hoping that my post is not out of topic for this forum, and that there could be a kind soul to help me out.
What I am trying to do:
Control the stepper drivers (CW230) through the DB25-port (parallel port - breakout board) using an Arduino UNO.
OBS.
I don't wish to run any G-code or nothing like that. I would only like to do a step forward and back.
What have I successfully done:
Connected the Arduino PIN's to the breakout board's parallel port.
Written a small test program, to step some steps of the engine.
.
..
// Move X - left [a]
if (incomingByte == 97) {
digitalWrite(dirPinX, LOW);
for (int i=1; i <= 500; i++){
digitalWrite(movePinX, LOW);
delayMicroseconds(spd);
digitalWrite(movePinX, HIGH);
delayMicroseconds(spd);
}
Serial.println("OK");
}
..
.
What is the problem?
Well, the engine moves .... but very slowly and not according to the iterations in the for loop.
i.e. one pulse (HIGH>LOW>HIGH) does not correspond to one step?!
[Triggers on LOW]
I actually get one turn, on 15000 pulses or so????
(almost like it's set on 1/64 microstepping?)
It seems like the drivers does not trigger on every pulse, but rather only a fraction of them? (I am running full-step)
Suspected issues:
1) The trigger levels are not set right
2) The stepper driver can_NOT be controlled in this simple manner? Since the standard setup with parallel port - Mach3
also sends control signals that I simply do not understand, and can't re-create?
3) The stepper engine is not wired correctly
If I look in the CW230 driver specification, there is one section that deals with the pulses:
CP +、CP -:Stepping pulse input+5V (Rising edge effective , rising edge duration >10μS)
Could it be that the Arduino is to fast when switching logical level?
----------------------------------------------------------------------------------------------------------------------------------
Here is the Hardware I am using (may or may not be useful info)
http://www.brundin.biz/images/datash...0Elschema1.pdf
The breakout board is a BK-1 (or BK-3?) (Chinese product with very little information)
BK-1 CNC breakout board with build-in DB25 connector - Detailed info for BK-1 CNC breakout board with build-in DB25 connector,CNC breakout board ,BK-1 CNC breakout board with build-in DB25 connector,BK-1 on Alibaba.com
Connected to 3 drivers (CW230)
http://www.brundin.biz/images/extra/...river40v3a.pdf
----------------------------------------------------------------------------------------------------------------------------------
Best Regards
//Martin