Using a Due with no shield
Hi again,
I'm trying to run repetier on a Due, but without a shield. Instead, I plug the wires directly onto the Arduino. Instead of normal stepsticks I'm using two ST-6560V3's, which re basically 3 TB6560's with their enable pins combined. With the provided DB25 connector I connected the pins to my arduino. I'm focussing this thread on just the X motor!
Using this sketch the X motor would turn fine:
[code]
I'm trying to run repetier on a Due, but without a shield. Instead, I plug the wires directly onto the Arduino. Instead of normal stepsticks I'm using two ST-6560V3's, which re basically 3 TB6560's with their enable pins combined. With the provided DB25 connector I connected the pins to my arduino. I'm focussing this thread on just the X motor!
Using this sketch the X motor would turn fine:
[code]
#define ORIG_X_STEP_PIN 48
#define ORIG_X_DIR_PIN 50
#define ORIG_X_MIN_PIN 38
#define ORIG_X_MAX_PIN 36
#define ORIG_X_ENABLE_PIN 52
void setup() {
pinMode(ORIG_X_STEP_PIN, OUTPUT);
pinMode(ORIG_X_DIR_PIN, OUTPUT);
pinMode(ORIG_X_ENABLE_PIN, OUTPUT);
digitalWrite(ORIG_X_DIR_PIN, HIGH);
digitalWrite(ORIG_X_ENABLE_PIN, LOW);
}
void loop() {
digitalWrite(ORIG_X_STEP_PIN, HIGH);
digitalWrite(ORIG_X_STEP_PIN, LOW);
delayMicroseconds(1000000.0 / 1600.0 / 15);
}
[/code]
Now, I took the latest repetier. In configuration.h I set #define MOTHERBOARD 999. My userpins.h looks like this:
[code]
Now, I took the latest repetier. In configuration.h I set #define MOTHERBOARD 999. My userpins.h looks like this:
[code]
#ifndef __SAM3X8E__
#erro oops! Be sure to have 'due Arduino' selected from the 'tools-> Boards menu'.
#define KNOWN_BOARD
#define CPU_ARCH ARCH_ARM
/*****************************************************************
* Arduino Due pin assignments
******************************************************************/
// First TB module
#define ORIG_X_STEP_PIN 48
#define ORIG_X_DIR_PIN 50
#define ORIG_X_MIN_PIN 38
#define ORIG_X_MAX_PIN 36
#define ORIG_X_ENABLE_PIN 52
// Left Y-motor
#define ORIG_Y_STEP_PIN 44
#define ORIG_Y_DIR_PIN 46
#define ORIG_Y_MIN_PIN 34
#define ORIG_Y_MAX_PIN 32
#define ORIG_Y_ENABLE_PIN 10
// End of left Y-motor
// Right Y-motor, abusing the second extruder for this
#define ORIG_E1_STEP_PIN 40
#define ORIG_E1_DIR_PIN 42
#define ORIG_E1_ENABLE_PIN 10
// End of right Y-motor
// End of first TB module
// Second TB module
// Left Z-motor
#define ORIG_Z_STEP_PIN 49
#define ORIG_Z_DIR_PIN 51
#define ORIG_Z_MIN_PIN 30
#define ORIG_Z_MAX_PIN 28
#define ORIG_Z_ENABLE_PIN 53
// End of left Z-motor
// Right Z-motor, abusing the third extruder for this
#define ORIG_E2_STEP_PIN 45
#define ORIG_E2_DIR_PIN 47
#define ORIG_E2_ENABLE_PIN 53
// End of right Z-motor
// Phi-motor
#define ORIG_E0_STEP_PIN 61
#define ORIG_E0_DIR_PIN 60
#define ORIG_E0_ENABLE_PIN 62
// End of Phi-motor
// End of second TB module
//Note that in due A0 pins on the board is channel 2 on the ARM chip
#define HEATER_0_PIN 10
// Because analog pin #
#define TEMP_0_PIN 11
#define HEATER_1_PIN 8
// Because analog pin #
#define TEMP_1_PIN 12
#define HEATER_2_PIN 9
// Because analog pin #
#define TEMP_2_PIN 13
#define SDPOWER -1
// 10 if using HW spi. 53 if using SW SPI
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define SUICIDE_PIN -1// Pin that has to be turned right after the start, to keep the power flowing.
#define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
#define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
#define TWI_CLOCK_FREQ 100000
// 20 or 70
#define SDA_PIN -1
// 21 or 71
#define SCL_PIN -1
#define EEPROM_AVAILABLE EEPROM_NONE
[/code]
Now the engine is not running anymore! I tried about everything and I am about to give up. I don't see any pins getting overwritten by IO from other parts of the firmware. I used a multimeter to measure the output of the pins 48, 50 and 52 while sending commands like G1 X100 F60 and G28 X. They are all always high, so somewhere in the firmware they're probably overwritten. I'm clueless since these pins are only defined once in pins.h/userpins.h.
Someone please point me in the right direction :S. You will be rewarded with a beer (paypal) and 10 kudos.
[/code]
Now the engine is not running anymore! I tried about everything and I am about to give up. I don't see any pins getting overwritten by IO from other parts of the firmware. I used a multimeter to measure the output of the pins 48, 50 and 52 while sending commands like G1 X100 F60 and G28 X. They are all always high, so somewhere in the firmware they're probably overwritten. I'm clueless since these pins are only defined once in pins.h/userpins.h.
Someone please point me in the right direction :S. You will be rewarded with a beer (paypal) and 10 kudos.
Comments
see comments in bold letters, you wrote "I'm using two ST-6560V3's, which re basically 3 TB6560's with their enable pins combined"
so the enable pins for each module should be the same number.
also you multiple used pin 10 and 53
#define ORIG_Y_ENABLE_PIN 10
#define HEATER_0_PIN 10
#define ORIG_Z_ENABLE_PIN 53
#define SDSS 53
multiple use of the pins for enable is ok, but not for different functions.
next possible error source regarding double use of pins is configuration.h .
check also the pin numbers there
be shure to have
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
in configuration.h
Still no turning motor :S
You could check if the enable/dir/step pins get power when moving. Reagarding enable some drivers need it 1 some 0 to deliver power to steppersm so check if inverting helps here.
Also make sure you have eeprom disabled since you have no eeprom without a board having eeprom.