Re: Jedicut and Arduino over USB

171
Hallo Ernst,

it is possible, that the "Step-Impuls-time" is to short for the TB6560.
You can test it with a larger value for the delay, befor set the "Step-Impuls" to low
in arduino-code.
Here the code:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void handleCommand()
{

byte val = cmdArray[arrayIdxRead+1]; // The command parameter value
switch(cmdArray[arrayIdxRead])
{
case 'A': // All Motors on/off
if(val == '1') {digitalWrite(12, HIGH);}
else {digitalWrite(12, LOW);}
break;
case 'H': // Wire Heat
if(val > 0) {digitalWrite(3, LOW);}
else {digitalWrite(3, HIGH);}
break;
case 'M': // Motor step Command
sendMotorCmd(val);
sendMotorCmd(val); // send it a second time, because of timing problems with the mdlcnc
//delayMicroseconds(5);here can you set the delay
sendMotorCmd(0); // and turn motors off, falling edge of pulse
break;
case 'F': // Change the timer frequency, the time between two steps
if(val>127) val =127; // restrict from 0 to 127 corresponds to 1kHz to 0.5kHz
val = 127-val;
initTimerCount = val;
break;
}

}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Manfred

Re: Jedicut and Arduino over USB

173
Hi Manfred,

sorry for the slow reply, and thanks for your answer! Unfortunately i havent't gotten a EMail from the forum stating an answer, so i overlooked it.

I've already tried increasing and decreasing the delay in line 99 of the current SVN Version:
https://code.google.com/p/jedicut-exten ... cnc.ino#99
Wouldn't that be the same as what you suggested?

On the other hand, the sendMotorCmd function already produces both a rising as well as a falling edge, right? As it toggle -> delay -> toggles the right bits on the ports. So the only delay that could possibly help the drivers find the right edge would be between the port toggles. I'm not quite sure what implications would result from calling sendMotorCmd three times with intermediary delay, but i'll be sure to give it a test nevertheless.

We'll report back, thanks for your help!
Best Regards
-Dario Ernst
("Dario" is the first name, btw :D)

Re: Jedicut and Arduino over USB

174
Hallo Dario,

this can you deleat:
"sendMotorCmd(val); // send it a second time, because of timing problems with the mdlcnc"
it was a problem by the boaed from Martin.

The edge was generate with :
sendMotorCmd(val);
delayMicroseconds(5);here can you set the delay
sendMotorCmd(0); // and turn motors off, falling edge of pulse

Manfred

Re: Jedicut and Arduino over USB

175
I've found a little bug, and the solution can be helpful to someone:

A have a TB6560 based board (4v3 - "the red one"). There were a lot of errors, missing steps, the motors sometimes worked sometimes not...I've tried everything. Finally the solution was, that I needed to invert the ENABLE signal:

case 'A': // All Motors on/off
if(val == '1') {digitalWrite(12, HIGH);} <----in here, change it to LOW
else {digitalWrite(12, LOW);} <---- in here, change it to HIGH
break;

The funny thing is, that without the signal inverting the motors sometimes worked. I don't know how...

The correct motor function needs the correct clock signal lenght:

PORTD = (PORTD & 0x0F) | (cmd & 0xf0); // Directions first!
PORTB = (PORTB & 0xF0) | (cmd & 0x0f); // and step
delayMicroseconds(25); // eventually wait a little bit <---- here change the value! According to the datasheet of TB6560 if you have 330pF on Cosc pin: the minimum clock widht must be higher than 30microsec
// and falling edge of step pulse
PORTB = (PORTB & 0xF0);

With these little modifications in the arduino code my motors are running perfectly (smooth, silent, without missing steps).

Re: Jedicut and Arduino over USB

178
Hello,

I'm trying to use an arduino nano to pilot my cnc cuting table with mm2001 by usb

I had well reading all the thread, but I have some problem...

I ve well download the usb.dll plugin for jedicut, but I don't find how to download the file.ino, to put in the arduino nano with the software I ve download on arduino website.

Thanks for all

Re: Jedicut and Arduino over USB

180
Hi,

my name is Christopher from Germany.

On my research for a low cost hot wire I stumbled about Jedicut and this USB extension. Since I got a small stock of usable parts in my junk box I thought it would be a worth a quick try. But I wouldn't be here if it has been successful :D

My setup ist currently an Arduino Mega 2560, 4 polou A4988 stepper driver and 4 NEMA 17 Steppers. All wired on a small breadboar.

Right now my motors wouldn't move at all -_- When powering up the system the Motors start humming and seem to be in "hold" mode.

The wiring has been redone two time to find an error. I've wired the Pololus according to the comments in the Arduino file
[quote]
EngineX1 Clock D8
EngineX2 Clock D9
EngineY1 Clock D10
EngineY2 Clock D11
EngineX1 Direction D4
EngineX2 Direction D5
EngineY1 Direction D6
EngineY2 Direction D7

All Engines On/Off D12
[/quote]

Set all Motors to full step for first try, but even microstepping didn't help

Modified the comport.ini to communicate on COM9 which is my Arduino according to the device manager (Win10). This is the part I'm most unsure about since I have no experience in programming *.ini files. The format is not "clean" with line break. So I'm not sure which part is commented, is the semicolon needed to finish a command and so on. So a screenshot of a "well formated" file would be awesome to eliminate this possible error.

But since the progress bar is moving when I try to start a cut or manual movement and Tx/Rx of my Arduino are flashing so I'd guess the communication is okay.

I'm not sure what is going on... Someone willing toe help me? :)
`); }); })(jQuery, window, document, phpbb);