Welcome! Log In Create A New Profile

Advanced

Y-Axis control in pronterface

Posted by simactive 
Y-Axis control in pronterface
September 06, 2013 09:07AM
I am using the pronterface UI progam and when I am using the Y-axis the motor only moves one way. in the Y+ direction. I was wondering where the coding went wrong and if it got reversed some how to only move it one way.

Thanks! (I'll post control code soon)
Re: Y-Axis control in pronterface
September 06, 2013 09:26AM
Check your Y ENDSTOP.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: Y-Axis control in pronterface
September 06, 2013 09:35AM
Sorry I phrased that wrong. In the UI no matter which direction I push for the Y axis to move it only moves in one direction.

So Y+ will move in positive dir and Y- will move in positive dir.

My mistake.

Thanks!
Re: Y-Axis control in pronterface
September 06, 2013 05:12PM
Did you do what Bob suggested?


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
September 07, 2013 07:38PM
yes i checked my Y endstops. Are you refering to the code or phsically?
Re: Y-Axis control in pronterface
September 08, 2013 02:25AM
I mean, have you checked that the signal from the Y end-stop is registering?


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
September 08, 2013 10:58AM
yes it all works. It is the programming which is confusing me. Since both buttons on the UI (user interface) will move my plateform in the same direction. Does that make sense?

It isn't that my y-axis is moving in only one direction when I press only one button on the UI. It is it travels the SAME direction when I press the either of the buttons.

Or am I completely missing something here?

Edited 1 time(s). Last edit at 09/08/2013 02:57PM by simactive.
Re: Y-Axis control in pronterface
September 08, 2013 08:36PM
Its still an endstop problem or a setting in firmware for the endstops.
Can you post your firmware settings?


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
September 10, 2013 09:14PM
Hmmm alright. I have copied over the config files I was using, I am not sure if this is the same as the other ones out there but everything was working good. Even the bed and hotend heating. Just that one little hick up.

Thanks for all the help!

#ifndef CONFIGURATION_H
#define CONFIGURATION_H

// BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration

//// The following define selects which electronics board you have. Please choose the one that matches your setup
// MEGA/RAMPS up to 1.2 = 3,
// RAMPS 1.3, 1.4 = 33
// Gen6 = 5,
// Sanguinololu up to 1.1 = 6
// Sanguinololu 1.2 and above = 62
// Gen 3 Plus = 21
// gen 3 Monolithic Electronics = 22
#define MOTHERBOARD 33

//// Thermistor settings:
// 1 is 100k thermistor
// 2 is 200k thermistor
// 3 is mendel-parts thermistor
// 4 is 10k thermistor
// 5 is ParCan supplied 104GT-2 100K
// 6 is EPCOS 100k
#define THERMISTORHEATER 1
#define THERMISTORBED 1

//// Calibration variables
// X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder:
//float axis_steps_per_unit[] = {80, 80, 3200/1.25,700};
//mg metric prusa with XL pulleys
//float axis_steps_per_unit[] = {52.4934, 52.4934, 3200/1.25, 1487};
//Prusa Mendel Metric Calc 53.33
float axis_steps_per_unit[] = {53.333, 53.333, 3200/1.25, 618};

//// Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool ENDSTOPS_INVERTING = true; //set to true to invert the logic of the endstops
//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here

// This determines the communication speed of the printer
#define BAUDRATE 115200

// Comment out (using // at the start of the line) to disable SD support:
#define SDSUPPORT


//// ADVANCED SETTINGS - to tweak parameters

#include "thermistortables.h"

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0

// Disables axis when it's not being used.
const bool DISABLE_X = false;
const bool DISABLE_Y = false;
const bool DISABLE_Z = true; //false; //true;
const bool DISABLE_E = false;

// Inverting axis direction
const bool INVERT_X_DIR = false;
const bool INVERT_Y_DIR = false;
const bool INVERT_Z_DIR = true;
const bool INVERT_E_DIR = true;

//// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = false; //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 200; //200; //
const int Y_MAX_LENGTH = 200; //200;
const int Z_MAX_LENGTH = 135;

//// MOVEMENT SETTINGS
const int NUM_AXIS = 4; // The axis order in all axis related arrays is X, Y, Z, E
float max_feedrate[] = {200000, 200000, 240, 500000};
float homing_feedrate[] = {1500,1500,120};
bool axis_relative_modes[] = {false, false, false, false};

// Min step delay in microseconds. If you are experiencing missing steps, try to raise the delay microseconds, but be aware this
// If you enable this, make sure STEP_DELAY_RATIO is disabled.
//#define STEP_DELAY_MICROS 1

// Step delay over interval ratio. If you are still experiencing missing steps, try to uncomment the following line, but be aware this
// If you enable this, make sure STEP_DELAY_MICROS is disabled. (except for Gen6: both need to be enabled.)
//#define STEP_DELAY_RATIO 0.25

// Comment this to disable ramp acceleration
#define RAMP_ACCELERATION

//// Acceleration settings
#ifdef RAMP_ACCELERATION
// X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
float max_start_speed_units_per_second[] = {25.0,25.0,0.2,10.0}; // //10 for mosaic?
long max_acceleration_units_per_sq_second[] = {1000,1000,50,10000}; // X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts //100 Z for mosaic
long max_travel_acceleration_units_per_sq_second[] = {500,500,50,500}; // X, Y, Z max acceleration in mm/s^2 for travel moves //100 Z for mosaic
#endif

// Machine UUID
// This may be useful if you have multiple machines and wish to identify them by using the M115 command.
// By default we set it to zeros.
char uuid[] = "00000000-0000-0000-0000-000000000000";


//// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!

//// PID settings:
// Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful.
//#define PIDTEMP
#ifdef PIDTEMP
#define PID_MAX 255 // limits current to nozzle
#define PID_INTEGRAL_DRIVE_MAX 220
#define PID_PGAIN 180 //100 is 1.0
#define PID_IGAIN 2 //100 is 1.0
#define PID_DGAIN 100 //100 is 1.0
#endif

// How often should the heater check for new temp readings, in milliseconds
#define HEATER_CHECK_INTERVAL 500
#define BED_CHECK_INTERVAL 5000
// Comment the following line to enable heat management during acceleration
#define DISABLE_CHECK_DURING_ACC
#ifndef DISABLE_CHECK_DURING_ACC
// Uncomment the following line to disable heat management during moves
//#define DISABLE_CHECK_DURING_MOVE
#endif
// Uncomment the following line to disable heat management during travel moves (and extruder-only moves, eg: retracts), strongly recommended if you are missing steps mid print.
// Probably this should remain commented if are using PID.
// It also defines the max milliseconds interval after which a travel move is not considered so for the sake of this feature.
#define DISABLE_CHECK_DURING_TRAVEL 1000

//// Temperature smoothing - only uncomment this if your temp readings are noisy (Gen6 without EvdZ's 5V hack)
//#define SMOOTHING
//#define SMOOTHFACTOR 16 //best to use a power of two here - determines how many values are averaged together by the smoothing algorithm

//// Experimental watchdog and minimal temp
// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
// If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109
//#define WATCHPERIOD 5000 //5 seconds

//// The minimal temperature defines the temperature below which the heater will not be enabled
#define MINTEMP 5

//// Experimental max temp
// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
#define MAXTEMP 245

// Select one of these only to define how the nozzle temp is read.
#define HEATER_USES_THERMISTOR
//#define HEATER_USES_AD595
//#define HEATER_USES_MAX6675

// Select one of these only to define how the bed temp is read.
#define BED_USES_THERMISTOR
//#define BED_USES_AD595

// Uncomment the following line to enable debugging. You can better control debugging below the following line
//#define DEBUG
#ifdef DEBUG
//#define DEBUG_PREPARE_MOVE //Enable this to debug prepare_move() function
//#define DEBUG_BRESENHAM //Enable this to debug the Bresenham algorithm
//#define DEBUG_RAMP_ACCELERATION //Enable this to debug all constant acceleration info
//#define DEBUG_MOVE_TIME //Enable this to time each move and print the result
//#define DEBUG_HEAT_MGMT //Enable this to debug heat management. WARNING, this will cause axes to jitter!
//#define DEBUG_DISABLE_CHECK_DURING_TRAVEL //Debug the namesake feature, see above in this file
#endif

#endif
Re: Y-Axis control in pronterface
September 10, 2013 10:38PM
simactive Wrote:
-------------------------------------------------------
> Hmmm alright. I have copied over the config files
> I was using, I am not sure if this is the same as
> the other ones out there but everything was
> working good
. Even the bed and hotend heating.
> Just that one little hick up.
>
>Do you mean the Y endstop was functioning correctly before?


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
September 10, 2013 11:56PM
Whoop sorry wrong sentence structure. I meant to say everything was working except that little bit.

Sorry =(
Re: Y-Axis control in pronterface
September 11, 2013 06:39AM
I guess your machine thinks that the Y endstop is already triggered, hence the reason that it is always trying to move away from it - it cannot move towards an endstop that it thinks is already triggered. So, if your endstops are wired to the C and NC connections, check your Y endstop (with the Y carriage well away from the endstop) for continuity. If its open circuit or high resistance, then the printer s/w will think its at the home position and will always try and move away from it. With the bed away from the switch, it should read around zero ohms resistance.


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
September 23, 2013 11:50PM
Hey so my machine doesn't think the end stop is triggered.

If i press the end switch in, the +Y direction wont do anything but then the -Y will move it away from the switch.

If I open the switch again then, both the +Y and -Y direction buttons will move the hotbed in the same direction away from the switch.

Is something reversed in the code I am using?
Re: Y-Axis control in pronterface
September 25, 2013 07:21AM
Have you wired the end stop to the "C" and "NC" connections?
What printer do you have?
Where is the switch located?


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
September 29, 2013 11:02PM
Yep I have the switch wired right. I am the mendel V2, before the T frame one.

Switch is opposite side of Motor. Did I copy in the right code for you to look at?

thanks.
Re: Y-Axis control in pronterface
September 30, 2013 01:26AM
If your endstop have 3 pins
sett // to commet out this row:

#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.


If your end stop have 2 pins leav it like that.
Re: Y-Axis control in pronterface
September 30, 2013 07:22AM
Pull the Y endstop connector off the Ramps board and check it with a meter. (with the X carriage away from the switch)


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
October 01, 2013 12:06PM
Tintinz - My end stop is just a normal 2 pin.

Waitaki - Why do I need to check with a meter if it is reconizing when it is sending a signal and not sending a signal?

THanks for all the help help guys and gals.
Re: Y-Axis control in pronterface
October 02, 2013 06:30AM
To make sure the contacts are making and breaking cleanly - poor contacts can cause voltage drops across them.
Anyway, I notice that you have set the endstops in the Firmware to true.

//// Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.

const bool ENDSTOPS_INVERTING = true; //set to true to invert the logic of the endstops
//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here



This is set to true if your endstops are wired C and NO which you say are wired C and NC.

Check how all 3 endstops are wired.


_______________________________________
Waitaki 3D Printer
Re: Y-Axis control in pronterface
January 11, 2014 08:28PM
ok so I finally got time again to fix this thing.

waitaki - With the printer off and Pronterface off, the switches are acting all normally. The Switch is not connect when is is not pressed and when it is, it will connect the circuit.
Inerting end stops wasn't the solution.

You do get what I mean right, because normally when my printer thinks the end stops are depressed it will not activate ANY stepper to move unless I press the opposite direction. Although for my Y axis when I command it to move Positive or Negative it will move in the positive direction (pronterface HUD) away from the switch.

When I press the end stop it will still move in the same positive direction it did before but lock not move it towards the switch (disables steppers to go that direction)

Thanks again for all the help guys and gals.

Edited 1 time(s). Last edit at 01/11/2014 08:29PM by simactive.
Re: Y-Axis control in pronterface
July 21, 2014 05:23PM
anyone.....I went through the coding and it seems to be ok. Unless I am missing something cruicial here. The end stops are working fine,

waitaki - They are connected NC and C so it has to be set to true or else it doesn't work.

I am the only one with this problem? It can't be......everything works properly except the Y-axis. It will move in the same direction.

Am I just not explaining this properly so people can't understand? Please tell me if you don't get it because I will just draw a diagram in a few hours.

Thanks.
Re: Y-Axis control in pronterface
July 21, 2014 06:10PM
I just saw this bubble to the top of the forum.

The stepper driver has a direction pin--if it's HI, the motor is driven one way, if it's LOW, it's driven the other way. Do you have any way of looking at the Y-DIR pin of the board to see if it's changing with direction?
I can think of a few ways this problem could manifest:

1.) Bad solder joint or component on the Stepper Driver board.
2.) Bad connection through the RAMPS board.
3.) Bad solder joint or component on the Arduino board.
4.) Wrong pin defined within the firmware (looks like it should be pin 61, according to this page.
5.) The pin is configured to also have another duty, as with the Sanguino's fuse settings issue. I don't suspect this with RAMPS, though.

Have you tried swapping stepper driver with one from another axis? That would rule out the Stepper Driver board, at least.

But I would suspect that since there aren't more posts with this specific problem that you've got a unique hardware issue somewhere in there.
Re: Y-Axis control in pronterface
July 25, 2014 03:42PM
Alright sooooo problem was solved here is what happened and thanks to everyone who gave me suggestions and such. Much appreciated to all of you.

Since my problem was apparently more unique than I thought it took a longer time to diagnous, since busy with work and other things:

Check all the pins, the coding was good.
Swapped around all the motor controllers everything worked like I thought it would and the controllers weren't defective.
Seached through every solder joint on the Ramps 1.4 board, the Adrino Mega and again the controllers. All were solid, no cross overs and such, no signs of burning or prolong heat application.

Now when I was searching through I was inspecting each pin in the case there would be issues I found the Y-axis pin that controllers it to move in the -Y direction had a miro crack through it. For some reason it would back feed the signal and cause the motor to turn in the same direction. Once I fixed up that pin and put everything back together it work like a charm.

So if anyone else has issues like I did which I hope they don't this could be one solution. Check all the hardware first if you didn't solder everything yourself, there can always be issues with it. The software is generally pretty good from the internets, you can customize if you like.
Sorry, only registered users may post in this forum.

Click here to login