Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motors not moving to Gcode #5

Open
Power3DPrinting opened this issue Mar 17, 2018 · 32 comments
Open

Motors not moving to Gcode #5

Power3DPrinting opened this issue Mar 17, 2018 · 32 comments

Comments

@Power3DPrinting
Copy link

Hi, really glad there are people like yourself helping those who can't program still have access to SCARA firmware! I have recently built my own single arm but have been having trouble getting the firmware to respond to repetier host and gcode however, I'm hoping it is a simple thing I am missing, especially seeing most other people don't bring up the issue.

So to begin, I followed your very helpful video guide and machine demonstration. I configured my machine accordingly and uploaded to a RAMPS Arduino Combo. When I power my machine on, I check M119 and make sure the endstops are fine and then issue a G28 to home in a zyx order. First the z homes, pulls up, and then the y motor either moves a short distance and causes the x axis to move a short distance, machine stops. If the y motor contacts its endstop, the x axis homes properly and centers itself, then the machine stops without the y-axis pulling away and centering itself. I don't know if this has correlation with the repetier interface not being able to move the machine outside of homing or trying to print with gcode where none of the motors seem to respond and repetier believes prints finish in seconds rather than minutes.

I also tried attatching an LCD to manually move the machine but I could only move the z-axis in a very odd manner. First the y motor would jolt 1-2 degrees before I could move the arm up or down. The steps per mm were way too high so I lowered the steps on the z-axis to 25% of its previous value, reuploaded, and when I tried moving the z-axis again, the steps per mm were unchanged.

Could there be something wrong with my hardware? I do get this message from the Arduino IDE that the memory of my Mega is low and "stability problems may occur" but that seems like an out of the ordinary problem for the default board. Thoughts? I've seen some Issue pages where people copy and paste their config.h but that seems to stop people from responding. I'll do it anyways if you want. Many thanks to anyone who is willing to help!

@wangsamas
Copy link
Owner

wangsamas commented Mar 17, 2018 via email

@Power3DPrinting
Copy link
Author

Thanks for the quick reply! I'll double check my configuration and see about getting my hands on some spare motors and ramps/arduino to swap things out. I'll update as soon as I can, thanks again!

@Power3DPrinting
Copy link
Author

So an update, I need another day or two to get some fresh motors on the machine, but I have swapped out the Arduino, Ramps, and DRV8825's for some new ones and A4988's just to compare. The machine still homes, kind of, the repetier manual control interface is all but useless with exception with the command prompt input. There I issued G28 and I'm kind of still at the same place but worse, z triggers prematurely despite M119 checking out fine, y motor still has the short stop error, x-axis now tries to spin 360 degrees. I'll post another update when the new motors arrive.

In the meantime could you help me with configuring the machine? I genuinely believe I have followed your instructions in the video but you understand your firmware better than I ever could.

#define UI_PRINTER_NAME "Kusuma"
#define UI_PRINTER_COMPANY "Wangsamas"

#define NUM_EXTRUDER 1
#define MOTHERBOARD 33 // 33 untuk Arduino Mega 2560 dengan RAMPS 1.3/1.4, lihat BACAini, README atau pins.h untuk PCB lainnya
#include "pins.h"

#define DRIVE_SYSTEM 7 // Cartesian 0, Delta 3, Scara 7
#define SCARA_TYPE SINGLE // If drive system = scara -> choose SINGLE, PARALEL
#define FEATURE_CONTROLLER 2 // 2 untuk smart controller LCD 2004, 11 untuk Reprap Graphic LCD, lihat wangsamas.h untuk LCD display lainnya
#define DEFAULT_PRINTER_MODE 0 // 3D Printer 0, Laser 1, CNC 2

#define X_MAX_LENGTH 100 // Panjang maximum sumbu X //DP: doesn't matter
#define Y_MAX_LENGTH 100 // Panjang maximum sumbu Y //DP: doesn't matter
#define Z_MAX_LENGTH 515 // Panjang maximum sumbu Z //Height of machine
#define X_MIN_POS -100 // Posisi titik X minimum
#define Y_MIN_POS -100 // Posisi titik Y minimum
#define Z_MIN_POS 0 // Posisi titik Z minimum
#define XAXIS_STEPS_PER_UNIT 217.7777778/2 // Cartesian Steps/mm, Delta abaikan, Scara Steps/degree (200/360)32(198/16) = 217.7777778
#define YAXIS_STEPS_PER_UNIT 140/2 // Cartesian Steps/mm, Delta abaikan, Scara Steps/degree (200/360)32(126/16) = 140
#define ZAXIS_STEPS_PER_UNIT 800/2 // Cartesian Steps/mm, Delta Steps/mm, Scara Steps/mm

// Scara Setting
#define ARM_LENGTH 250 // dalam mm. in mm
#define FOREARM_LENGTH 250 // dalam mm. in mm
#define SHOULDER_MIN_ANGLE 36 // dalam derajat. in degree //DP: for use
#define ELBOW_MIN_ANGLE 155 // dalam derajat. in degree //DP: for safety
#define SHOULDER_MAX_ANGLE 270 // dalam derajat. in degree //DP: for use
#define ELBOW_MAX_ANGLE 5 // dalam derajat. in degree //DP: for safety
#define SHOULDER_BED_CENTER_ANGLE 135 // Posisi sudut bahu Scara di pusat papan dalam derajat. Position of Scara shoulder angle at bed center in degree
#define ELBOW_BED_CENTER_ANGLE 90 // Posisi sudut siku Scara di pusat papan dalam derajat. Position of Scara elbow angle at bed center in degree

// Delta settings
#define DELTA_ALPHA_A 210 // Sudut antara sumbu X positif dengan Tower A dalam derajat, Angle between positive X Axis and Tower A in degree
#define DELTA_ALPHA_B 330 // Sudut antara sumbu X positif dengan Tower B dalam derajat, Angle between positive X Axis and Tower B in degree
#define DELTA_ALPHA_C 90 // Sudut antara sumbu X positif dengan Tower C dalam derajat, Angle between positive X Axis and Tower C in degree

#define DELTA_DIAGONAL_ROD 445 // Panjang diagonal batang dalam mm, diagonal rod length in mm
#define DELTA_DIAGONAL_CORRECTION_A 0 // Koreksi panjang batang A in mm, rod A length correction in mm
#define DELTA_DIAGONAL_CORRECTION_B 0 // Koreksi panjang batang B in mm, rod B length correction in mm
#define DELTA_DIAGONAL_CORRECTION_C 0 // Koreksi panjang batang C in mm, rod C length correction in mm

// ROD_RADIUS = PRINTER_RADIUS - END_EFFECTOR_HORIZONTAL_OFFSET - CARRIAGE_HORIZONTAL_OFFSET
// Jika Anda mengisi ROD_RADIUS, rumus diatas diabaikan. Jika Anda tidak mengisi ROD_RADIUS, rumus diatas dijalankan
// If you enter ROD_RADIUS value, the formula above is ignored. If you don't enter ROD_RADIUS value, the formula above calculated

#define ROD_RADIUS 209.25 // Radius mendatar batang di posisi pusat papan, Horizontal rod radius at bed center position
#define DELTA_RADIUS_CORRECTION_A 0 // Koreksi jarak tower A ke pusat papan dalam mm, Tower A distance to bed center correction in mm
#define DELTA_RADIUS_CORRECTION_B 0 // Koreksi jarak tower B ke pusat papan dalam mm, Tower B distance to bed center correction in mm
#define DELTA_RADIUS_CORRECTION_C 0 // Koreksi jarak tower C ke pusat papan dalam mm, Tower C distance to bed center correction in mm

#define END_EFFECTOR_HORIZONTAL_OFFSET 0 // Jarak mendatar antara effector ke batang, horizontal distance between effector and rod
#define CARRIAGE_HORIZONTAL_OFFSET 0 // Jarak mendatar antara carriage ke batang, horizontal distance between carriage and rod
#define PRINTER_RADIUS 209.25 // Jarak antara nozzle dan tower, distance between nozzle and tower
#define DELTA_MAX_RADIUS 150 // Radius cetak maksimum, max print radius

#define MAX_FEEDRATE_X 100 // Kecepatan sumbu X, X Axis speed
#define MAX_FEEDRATE_Y 100 // Kecepatan sumbu Y, Y Axis speed
#define MAX_FEEDRATE_Z 100 // Kecepatan sumbu Z, Z Axis speed
#define HOMING_FEEDRATE_X 5 // Kecepatan sumbu X ketika menuju endstop, X Axis speed when go to endstop
#define HOMING_FEEDRATE_Y 5 // Kecepatan sumbu Y ketika menuju endstop, Y Axis speed when go to endstop
#define HOMING_FEEDRATE_Z 3 // Kecepatan sumbu Z ketika menuju endstop, Z Axis speed when go to endstop
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000 // Percepatan max sumbu X ketika mencetak, X Axis max acceleration when print
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000 // Percepatan max sumbu Y ketika mencetak, Y Axis max acceleration when print
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100 // Percepatan max sumbu Z ketika mencetak, Z Axis max acceleration when print
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000 // Percepatan max sumbu X ketika pindah, X Axis max acceleration when travel
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000 // Percepatan max sumbu Y ketika pindah, Y Axis max acceleration when travel
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100 // Percepatan max sumbu Z ketika pindah, Z Axis max acceleration when travel
#define MAX_JERK 5 // Hentakan maksimum sumbu XY
#define MAX_ZJERK 0.3 // Hentakan maksimum sumbu Z

// ################# XYZ movements ###################

#define INVERT_X_DIR 1 // Ganti 0 atau 1 jika gerakan arah sumbu X terbalik
#define INVERT_Y_DIR 1 // Ganti 0 atau 1 jika gerakan arah sumbu Y terbalik
#define INVERT_Z_DIR 1 // Ganti 0 atau 1 jika gerakan arah sumbu Z terbalik

// ################ Endstop configuration #####################

#define X_HOME_DIR -1 // X MIN Hardware endstop -1, X MAX Hardware endstop 1
#define Y_HOME_DIR 1 // Y MIN Hardware endstop -1, Y MAX Hardware endstop 1
#define Z_HOME_DIR -1 // Z MIN Hardware endstop -1, Z MAX Hardware endstop 1

#define DELTA_HOME_ON_POWER 0 // 1 untuk menuju home ketika printer menyala, 0 untuk diam ketika printer menyala
#define HOMING_ORDER HOME_ORDER_ZYX // Urutan sumbu menuju endstop X, Y, Z sesuai keinginan
//#define SOFTWARE_LEVELING

#define MIN_HARDWARE_ENDSTOP_X true // True Jika Endstop berada pada posisi X minimum, false jika tidak
#define MIN_HARDWARE_ENDSTOP_Y false // True Jika Endstop berada pada posisi Y minimum, false jika tidak
#define MIN_HARDWARE_ENDSTOP_Z true // True Jika Endstop berada pada posisi Z minimum, false jika tidak
#define MAX_HARDWARE_ENDSTOP_X false // True Jika Endstop berada pada posisi X MAXimum, false jika tidak
#define MAX_HARDWARE_ENDSTOP_Y true // True Jika Endstop berada pada posisi Y MAXimum, false jika tidak
#define MAX_HARDWARE_ENDSTOP_Z false // True Jika Endstop berada pada posisi Z MAXimum, false jika tidak

#define min_software_endstop_x false // True jika ingin X minimum dibatasi software, false jika tidak
#define min_software_endstop_y true // True jika ingin Y minimum dibatasi software, false jika tidak
#define min_software_endstop_z false // True jika ingin Z minimum dibatasi software, false jika tidak
#define max_software_endstop_x true // True jika ingin X MAXimum dibatasi software, false jika tidak
#define max_software_endstop_y false // True jika ingin Y MAXimum dibatasi software, false jika tidak
#define max_software_endstop_z true // True jika ingin Z MAXimum dibatasi software, false jika tidak
#define max_software_endstop_r true

#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING false
#define ENDSTOP_X_MAX_INVERTING true
#define ENDSTOP_Y_MAX_INVERTING true
#define ENDSTOP_Z_MAX_INVERTING true

#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX true

#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 5
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_X_BACK_ON_HOME 1
#define ENDSTOP_Y_BACK_ON_HOME 1
#define ENDSTOP_Z_BACK_ON_HOME 1
#define ALWAYS_CHECK_ENDSTOPS 1

#define STEP_COUNTER
#define DELTA_X_ENDSTOP_OFFSET_STEPS 0
#define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
#define DELTA_Z_ENDSTOP_OFFSET_STEPS 0
#define DELTA_FLOOR_SAFETY_MARGIN_MM 15

#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define DISABLE_X 0
#define DISABLE_Y 0
#define DISABLE_Z 0
#define DISABLE_E 0
#define ENABLE_BACKLASH_COMPENSATION 0
#define X_BACKLASH 0
#define Y_BACKLASH 0
#define Z_BACKLASH 0

// #################### Z-Probing #####################

#define DISTORTION_CORRECTION 0 // Menyesuaikan ketidakrataan papan
#define FEATURE_AUTOLEVEL 0 // Menyesuaikan kemiringan papan
#define FEATURE_Z_PROBE 0 // Z probe harus aktif untuk distortion correction & autolevel
#define Z_PROBE_PIN ORIG_Z_MIN_PIN

img_0361

@wangsamas
Copy link
Owner

wangsamas commented Mar 22, 2018 via email

@Power3DPrinting
Copy link
Author

I really appreciate the catch, I swapped the endstops on the control board and adjusted the config respectfully, I feel like I am asking for too much but could you take a look at these revised sketches down below if I got the angles right? I found if I disabled the pullup on the Z that it now homes properly but after I tried turning off the software endstops and turning them back on the machine now only homes in the z axis and stops whenever the y-endstop is triggered. Haha.. I am just a disaster train with this.. My school's lab was nice enough to let me cannibalize some motors from a partially assembled kit so I'll get to swapping my motors. I am incredibly grateful for your help!

img-0369

#define UI_PRINTER_NAME "Kusuma"
#define UI_PRINTER_COMPANY "Wangsamas"

#define NUM_EXTRUDER 1
#define MOTHERBOARD 33 // 33 untuk Arduino Mega 2560 dengan RAMPS 1.3/1.4, lihat BACAini, README atau pins.h untuk PCB lainnya
#include "pins.h"

#define DRIVE_SYSTEM 7 // Cartesian 0, Delta 3, Scara 7
#define SCARA_TYPE SINGLE // If drive system = scara -> choose SINGLE, PARALEL
#define FEATURE_CONTROLLER 2 // 2 untuk smart controller LCD 2004, 11 untuk Reprap Graphic LCD, lihat wangsamas.h untuk LCD display lainnya
#define DEFAULT_PRINTER_MODE 0 // 3D Printer 0, Laser 1, CNC 2

#define X_MAX_LENGTH 100 // Panjang maximum sumbu X //DP: doesn't matter
#define Y_MAX_LENGTH 100 // Panjang maximum sumbu Y //DP: doesn't matter
#define Z_MAX_LENGTH 515 // Panjang maximum sumbu Z //Height of machine
#define X_MIN_POS -100 // Posisi titik X minimum
#define Y_MIN_POS -100 // Posisi titik Y minimum
#define Z_MIN_POS 0 // Posisi titik Z minimum
#define XAXIS_STEPS_PER_UNIT 110 // Cartesian Steps/mm, Delta abaikan, Scara Steps/degree (200/360)32(198/16) = 220
#define YAXIS_STEPS_PER_UNIT 70 // Cartesian Steps/mm, Delta abaikan, Scara Steps/degree (200/360)32(126/16) = 140
#define ZAXIS_STEPS_PER_UNIT 400 // Cartesian Steps/mm, Delta Steps/mm, Scara Steps/mm

// Scara Setting
#define ARM_LENGTH 250 // dalam mm. in mm
#define FOREARM_LENGTH 250 // dalam mm. in mm
#define SHOULDER_MIN_ANGLE -54 // dalam derajat. in degree //DP: for safety
#define ELBOW_MIN_ANGLE 155 // dalam derajat. in degree //DP: for safety
#define SHOULDER_MAX_ANGLE 234 // dalam derajat. in degree //DP: for use
#define ELBOW_MAX_ANGLE 5 // dalam derajat. in degree //DP: for use
#define SHOULDER_BED_CENTER_ANGLE 45 // Posisi sudut bahu Scara di pusat papan dalam derajat. Position of Scara shoulder angle at bed center in degree
#define ELBOW_BED_CENTER_ANGLE 90 // Posisi sudut siku Scara di pusat papan dalam derajat. Position of Scara elbow angle at bed center in degree

// ################# XYZ movements ###################

#define INVERT_X_DIR 0 // Ganti 0 atau 1 jika gerakan arah sumbu X terbalik
#define INVERT_Y_DIR 0 // Ganti 0 atau 1 jika gerakan arah sumbu Y terbalik
#define INVERT_Z_DIR 1 // Ganti 0 atau 1 jika gerakan arah sumbu Z terbalik

// ################ Endstop configuration #####################

#define X_HOME_DIR 1 // X MIN Hardware endstop -1, X MAX Hardware endstop 1
#define Y_HOME_DIR -1 // Y MIN Hardware endstop -1, Y MAX Hardware endstop 1
#define Z_HOME_DIR -1 // Z MIN Hardware endstop -1, Z MAX Hardware endstop 1

#define DELTA_HOME_ON_POWER 0 // 1 untuk menuju home ketika printer menyala, 0 untuk diam ketika printer menyala
#define HOMING_ORDER HOME_ORDER_ZYX // Urutan sumbu menuju endstop X, Y, Z sesuai keinginan
//#define SOFTWARE_LEVELING

#define MIN_HARDWARE_ENDSTOP_X false // True Jika Endstop berada pada posisi X minimum, false jika tidak
#define MIN_HARDWARE_ENDSTOP_Y true // True Jika Endstop berada pada posisi Y minimum, false jika tidak
#define MIN_HARDWARE_ENDSTOP_Z true // True Jika Endstop berada pada posisi Z minimum, false jika tidak
#define MAX_HARDWARE_ENDSTOP_X true // True Jika Endstop berada pada posisi X MAXimum, false jika tidak
#define MAX_HARDWARE_ENDSTOP_Y false // True Jika Endstop berada pada posisi Y MAXimum, false jika tidak
#define MAX_HARDWARE_ENDSTOP_Z false // True Jika Endstop berada pada posisi Z MAXimum, false jika tidak

#define min_software_endstop_x true // True jika ingin X minimum dibatasi software, false jika tidak
#define min_software_endstop_y false // True jika ingin Y minimum dibatasi software, false jika tidak
#define min_software_endstop_z false // True jika ingin Z minimum dibatasi software, false jika tidak
#define max_software_endstop_x false // True jika ingin X MAXimum dibatasi software, false jika tidak
#define max_software_endstop_y true // True jika ingin Y MAXimum dibatasi software, false jika tidak
#define max_software_endstop_z true // True jika ingin Z MAXimum dibatasi software, false jika tidak
#define max_software_endstop_r true

#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING false
#define ENDSTOP_X_MAX_INVERTING true
#define ENDSTOP_Y_MAX_INVERTING true
#define ENDSTOP_Z_MAX_INVERTING true

#define ENDSTOP_PULLUP_X_MIN false
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN false
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX false
#define ENDSTOP_PULLUP_Z_MAX false

#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 5
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_X_BACK_ON_HOME 1
#define ENDSTOP_Y_BACK_ON_HOME 1
#define ENDSTOP_Z_BACK_ON_HOME 1
#define ALWAYS_CHECK_ENDSTOPS 1

@Power3DPrinting
Copy link
Author

Hi, I swapped several motors but didn't have any different results, I also tried another orientation shown below without luck. Nothing moves when the y-min end stop is triggered, a test print for a 20mm cube finished in 2m3s on repetier host without movement at 60mm/s with 2 perimeters, 10% infill, should have been a 30-40 minute job, only the temperature worked. I'll look to get a third Ramps and Arduino but I'm not really sure what else I can do.

@Power3DPrinting
Copy link
Author

img-8409

@Power3DPrinting
Copy link
Author

Sorry, I don't know why the image always comes out sideways, but if you click on it, it shows it in the correct orientation

@Power3DPrinting
Copy link
Author

Hello?

@Power3DPrinting
Copy link
Author

Sorry if I am annoying, I've been stuck on the firmware for a month now and trying to get the machine working has been a stressful ordeal

@wangsamas
Copy link
Owner

both shoulder and elbow calculated counter clockwise

@Power3DPrinting
Copy link
Author

@Power3DPrinting
Copy link
Author

Sorry for the long delay, was trying to figure out a way to provide a video of the uncontrolled spinning problem for the shoulder, I tried my best to measure and input all the angles counter clockwise

@wangsamas
Copy link
Owner

wangsamas commented Mar 30, 2018 via email

@Power3DPrinting
Copy link
Author

Thanks! and interesting, hmm, I'll swap the y-min plug to y-max and reconfigure the firmware to meet it as you say, meanwhile what you're saying about moving the x end stop makes sense, I'll get right away on printing some small pieces as a temporary fix, I wasn't thinking about whether the machine should be right or left handed when I first modeled the parts so it will take me a few days to flip things and print them out.

I did have a stab at swapping the x-max to x-min and configuring the machine as though I were mirroring a right handed arm homing to its min end stops. Thought the worst case would be that the motions would be inverted. Lost control of the acceleration, feedrate, and home offset angle so that was weird. I'll give your suggestions a shot, they sound very promising.

Eternally grateful for the support!

@Power3DPrinting
Copy link
Author

Hi! sorry for the long time it took me to update, since I was making some changes to several parts of the body I decided to print more optimal parts to clean the machine up. Anyways, I finally have the machine right handed and I uploaded your firmware, tweaked some parts like inverting the xy motors and endstops to make sure everything was set to home to the min endstops. Unfortunatly, since I have tried to get the machine to home, only the y-endstop rapidly homes, I also scaled the travel, home, and jerk feedrates/accelerations to 1/10 their values and didn't have any effect on the arm. I'll spend the rest of the day to really play around with the configuration and make a recording maybe tonight or tomorrow to show the best results.

Best wishes!

@Power3DPrinting
Copy link
Author

@wangsamas
Copy link
Owner

wangsamas commented Apr 9, 2018 via email

@Power3DPrinting
Copy link
Author

Thanks! Not entirely sure what I did to make it move in the video but I am incredibly grateful for your advice, I'll get straight away to swapping the angles in config and the endstops on my board and let you know how it goes! Good grief, kind of a bit embarrassed by how it didn't occur to me it was weird the min angle was larger.

@Power3DPrinting
Copy link
Author

Hi, I swapped the y-min to y-max and their min max angles respectively, machine is now homing regularly to 225 degrees to the shoulder and 150 degrees at the elbow, I'll post the recent tweaks I've been making down below. I tried changing the bed center angles but they didn't respond, same for the homing and travel feedrates. Not sure what is restricting me from editing them.

#define NUM_EXTRUDER 1
#define MOTHERBOARD 33 // 33 untuk Arduino Mega 2560 dengan RAMPS 1.3/1.4, lihat BACAini, README atau pins.h untuk PCB lainnya
#include "pins.h"

#define DRIVE_SYSTEM 7 // Cartesian 0, Delta 3, Scara 7
#define SCARA_TYPE SINGLE // If drive system = scara -> choose SINGLE, PARALEL
#define FEATURE_CONTROLLER 2 // 2 untuk smart controller LCD 2004, 11 untuk Reprap Graphic LCD, lihat wangsamas.h untuk LCD display lainnya
#define DEFAULT_PRINTER_MODE 0 // 3D Printer 0, Laser 1, CNC 2

#define X_MAX_LENGTH 500//400 // Panjang maximum sumbu X
#define Y_MAX_LENGTH 500//350 // Panjang maximum sumbu Y
#define Z_MAX_LENGTH 515 // Panjang maximum sumbu Z
#define X_MIN_POS -500//0//-999 // Posisi titik X minimum
#define Y_MIN_POS -500//0//-999 // Posisi titik Y minimum
#define Z_MIN_POS 0 // Posisi titik Z minimum
#define XAXIS_STEPS_PER_UNIT 110 // Cartesian Steps/mm, Delta abaikan, Scara Steps/degree
#define YAXIS_STEPS_PER_UNIT 70 // Cartesian Steps/mm, Delta abaikan, Scara Steps/degree
#define ZAXIS_STEPS_PER_UNIT 400 // Cartesian Steps/mm, Delta Steps/mm, Scara Steps/mm

// Scara Setting
#define ARM_LENGTH 250 // dalam mm. in mm
#define FOREARM_LENGTH 250 // dalam mm. in mm
#define SHOULDER_MIN_ANGLE 30//36//45//90 // dalam derajat. in degree
#define ELBOW_MIN_ANGLE 0//5//150//155//205//155 //5 // dalam derajat. in degree
#define SHOULDER_MAX_ANGLE 330//324//270 // dalam derajat. in degree
#define ELBOW_MAX_ANGLE 150//0//5//155//355//5 //180 // dalam derajat. in degree
#define SHOULDER_BED_CENTER_ANGLE 180//135//180//135 // Posisi sudut bahu Scara di pusat papan dalam derajat. Position of Scara shoulder angle at bed center in degree
#define ELBOW_BED_CENTER_ANGLE 0//45//90//126.87//90 // Posisi sudut siku Scara di pusat papan dalam derajat. Position of Scara elbow angle at bed center in degree

// Delta settings
#define DELTA_ALPHA_A 210 // Sudut antara sumbu X positif dengan Tower A dalam derajat, Angle between positive X Axis and Tower A in degree
#define DELTA_ALPHA_B 330 // Sudut antara sumbu X positif dengan Tower B dalam derajat, Angle between positive X Axis and Tower B in degree
#define DELTA_ALPHA_C 90 // Sudut antara sumbu X positif dengan Tower C dalam derajat, Angle between positive X Axis and Tower C in degree

#define DELTA_DIAGONAL_ROD 445 // Panjang diagonal batang dalam mm, diagonal rod length in mm
#define DELTA_DIAGONAL_CORRECTION_A 0 // Koreksi panjang batang A in mm, rod A length correction in mm
#define DELTA_DIAGONAL_CORRECTION_B 0 // Koreksi panjang batang B in mm, rod B length correction in mm
#define DELTA_DIAGONAL_CORRECTION_C 0 // Koreksi panjang batang C in mm, rod C length correction in mm

// ROD_RADIUS = PRINTER_RADIUS - END_EFFECTOR_HORIZONTAL_OFFSET - CARRIAGE_HORIZONTAL_OFFSET
// Jika Anda mengisi ROD_RADIUS, rumus diatas diabaikan. Jika Anda tidak mengisi ROD_RADIUS, rumus diatas dijalankan
// If you enter ROD_RADIUS value, the formula above is ignored. If you don't enter ROD_RADIUS value, the formula above calculated

#define ROD_RADIUS 500//209.25 // Radius mendatar batang di posisi pusat papan, Horizontal rod radius at bed center position
#define DELTA_RADIUS_CORRECTION_A 0 // Koreksi jarak tower A ke pusat papan dalam mm, Tower A distance to bed center correction in mm
#define DELTA_RADIUS_CORRECTION_B 0 // Koreksi jarak tower B ke pusat papan dalam mm, Tower B distance to bed center correction in mm
#define DELTA_RADIUS_CORRECTION_C 0 // Koreksi jarak tower C ke pusat papan dalam mm, Tower C distance to bed center correction in mm

#define END_EFFECTOR_HORIZONTAL_OFFSET 0 // Jarak mendatar antara effector ke batang, horizontal distance between effector and rod
#define CARRIAGE_HORIZONTAL_OFFSET 0 // Jarak mendatar antara carriage ke batang, horizontal distance between carriage and rod
#define PRINTER_RADIUS 500//209.25 // Jarak antara nozzle dan tower, distance between nozzle and tower
#define DELTA_MAX_RADIUS 500//150 // Radius cetak maksimum, max print radius

#define MAX_FEEDRATE_X 50//100//5/60//50//100 // Kecepatan sumbu X, X Axis speed
#define MAX_FEEDRATE_Y 50//100//5/60//50//100 // Kecepatan sumbu Y, Y Axis speed
#define MAX_FEEDRATE_Z 50//100//5/60//50//100 // Kecepatan sumbu Z, Z Axis speed
#define HOMING_FEEDRATE_X 15//30//5/60//10//30 // Kecepatan sumbu X ketika menuju endstop, X Axis speed when go to endstop
#define HOMING_FEEDRATE_Y 15//30//5/60//10//30 // Kecepatan sumbu Y ketika menuju endstop, Y Axis speed when go to endstop
#define HOMING_FEEDRATE_Z 10//20//1/60//20 // Kecepatan sumbu Z ketika menuju endstop, Z Axis speed when go to endstop
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 500//1000//50//500//1000 // Percepatan max sumbu X ketika mencetak, X Axis max acceleration when print
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 500//1000//50//500//1000 // Percepatan max sumbu Y ketika mencetak, Y Axis max acceleration when print
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 50//100//5//50//100 // Percepatan max sumbu Z ketika mencetak, Z Axis max acceleration when print
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 500//1000//50//500//1000 // Percepatan max sumbu X ketika pindah, X Axis max acceleration when travel
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 500//1000//50//500//1000 // Percepatan max sumbu Y ketika pindah, Y Axis max acceleration when travel
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 50//100//5//50//100 // Percepatan max sumbu Z ketika pindah, Z Axis max acceleration when travel
#define MAX_JERK .1//1//10 // Hentakan maksimum sumbu XY
#define MAX_ZJERK 0.3 // Hentakan maksimum sumbu Z

@wangsamas
Copy link
Owner

wangsamas commented Apr 9, 2018 via email

@Power3DPrinting
Copy link
Author

I heard some people might have problems with eeprom settings overriding their controls, I found the one setting in the configuration.h and changed the 1 to -1, I have full control of the printer now!!!!!!!!!!!!!!

@wangsamas
Copy link
Owner

wangsamas commented Apr 9, 2018 via email

@Power3DPrinting
Copy link
Author

Roger that, I'll give that a spin! The excitement is pretty overwhelming aaaahahahaahaha

@Power3DPrinting
Copy link
Author

Okay... I hate to be the bringer of bad news, G5 commands are not working, the log always returns this:

11:58:19.345 : X:0.00 Y:0.00 Z:0.000 E:0.0000
11:58:19.349 : Shoulder Angle : 180.00 Elbow Angle : 0.00
11:58:19.353 : X position : 0.00 Y position : 0.00

I do have control of the SCARA settings like steps per unit, feedrate, homing angles, which is stupendous and really grateful for!! I'll try digging around in the eeprom.h if setting eeprom mode from 1 to -1 in the configuration.h disabled a gcode system or anything of the sort, it might also explain why 30min prints finish in a spectacular 30 seconds, one day 3D printing will be that amazing right? haha

@wangsamas
Copy link
Owner

wangsamas commented Apr 9, 2018 via email

@Power3DPrinting
Copy link
Author

Hmm, alright, thank you, that is good to know so I'll run M502 every time I connect just to be sure everything is cleaned out.

@wangsamas
Copy link
Owner

wangsamas commented Apr 11, 2018 via email

@Power3DPrinting
Copy link
Author

https://www.arduino.cc/en/Tutorial/EEPROMClear

Like in this tutorial? Thank you, it was a good thing to look for.

I have some good news! When the machine homes, its position is set to X183 and Y85, if I run G3 X30 Y30 then the G5 X30, G5 Y-60 commands work! I'm still not sure what is happening but I just ran G1 X200 Y200 and the arm moved from one side to the other. Hmm oddly, if I run G3 X0 Y500 where the arm homes straight out at the shoulder being 180 degrees and the elbow being 0 degrees, I could not get any movement. May have just been a one time error so I'll try some other positions again.

@Power3DPrinting
Copy link
Author

I got the machine to make a square by using
G28
G1 X100 Y100
G1 X100 Y200
G1 X200 Y200
G1 X200 Y100

The square was not where it should have been but I will try to make a gcode file to see if I can get the machine printing, G5 still needs specific G3's to function.

@Power3DPrinting
Copy link
Author

Machine Moving to sliced Gcode, Z axis not moving
https://www.youtube.com/watch?v=FvMbkanvk9g

Machine moving to specific commands like G3, G5, and G32
https://www.youtube.com/watch?v=iP52zO3Z-so

@phearl3ss1
Copy link

I've been working with the wangsmas firmware and had the same issue with motors not working. Using dbug I discovered my steps per unit was very low maybe 32 and it appeared the number entered into config h XAXIS_STEPS_PER_UNIT was not the same as the number being displayed. However my number would work using M92 but when I tried using the lcd config low number would go to 999 and stop. My steps per unit is 2160. The config h registered the correct figure when I added a decimal point. ie. 2160.0 Likewise the bed center angle for each arm did not register correctly at 90 degrees but worked using 90.0 deg. The marlin firmware 2.0 indicates to start with the scara config h file in the example folder. However the scara config is not updated to the 2.0 marlin firmware and has all kinds of errors and if you use the confg H example with the older firmware it errors and instructs you to update the firmware. Have been unable to successfully compile to even test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants