Motors going wrong way

Topics Related to the ORD Bot Printer

Motors going wrong way

Postby keos » Tue Nov 27, 2012 8:57 am

guys in pronterface control screen
when i press (-X) it goes to the right
When I press (+X) it goes to the left

same thing for +y, -y, +z, -z is this because i connected the motors the wrong way.....


keos
keos
 
Posts: 160
Joined: Fri Oct 26, 2012 6:58 am
Location: Granada Hills, California

Fix motor direction in configuration.h

Postby bdring » Tue Nov 27, 2012 1:20 pm

You can invert the directions in configuration.h.

See... http://www.buildlog.net/wiki/doku.php?i ... directions
Bart
"If you didn't build it, you will never own it."
bdring
Site Admin
 
Posts: 2966
Joined: Sun Nov 22, 2009 7:33 pm
Location: Chicago, IL, USA

Re: Motors going wrong way

Postby keos » Tue Nov 27, 2012 5:02 pm

dbring thankx; in order to make the changes in configuration.h do i need to uninstall the Python family and pronterface or i can just edit configuration.h verify ,and upload the changes....

keos
keos
 
Posts: 160
Joined: Fri Oct 26, 2012 6:58 am
Location: Granada Hills, California

Re: Motors going wrong way

Postby bdring » Tue Nov 27, 2012 5:37 pm

Just compile and upload Marlin.
Bart
"If you didn't build it, you will never own it."
bdring
Site Admin
 
Posts: 2966
Joined: Sun Nov 22, 2009 7:33 pm
Location: Chicago, IL, USA

Re: Motors going wrong way

Postby Turbo442 » Wed Nov 28, 2012 12:57 am

You can also change your stepper motor wiring pretty easily at the connector to reverse the motor. Thats what I did to keep my original Marlin code as unchanged as possible. I doubt it really matters much in the end though.
Turbo442
 
Posts: 62
Joined: Sun Oct 28, 2012 7:47 am

Re: Motors going wrong way

Postby keos » Wed Nov 28, 2012 7:09 am

Thankx Turbo442, that worked..

so now when i am in proterface and i use the the buttons to move x,y,z....when i press on the -X it goes all the way to the edge (using incremental buttons) when i go to the right using +X it goes to about the center and stops and it does not move any further (using incremental buttons)
the Y is the same thing and the Z s fine

Guys what could be the cause of this...

Keos
keos
 
Posts: 160
Joined: Fri Oct 26, 2012 6:58 am
Location: Granada Hills, California

Re: Motors going wrong way

Postby cvoinescu » Wed Nov 28, 2012 12:21 pm

Marlin has a setting that tells it how far each axis can go. By default, it also refuses to move beyond those limits. If your machine doesn't go far enough, you have the wrong limits (so Marlin thinks your machine is smaller than it really is) and/or you have the wrong steps-per-mm (so Marlin thinks your machine moves more than it actually does for a given number of steps). This part of Configuration.h gives the machine size and enables soft limits (your numbers should be different, to match the travel of your ORD Bot's axes):
Code: Select all
#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true  //If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing
#define X_MAX_POS 210
#define X_MIN_POS 0
#define Y_MAX_POS 333
#define Y_MIN_POS 0
#define Z_MAX_POS 100
#define Z_MIN_POS 0

And this is where the the steps-per-mm are set (note that this is for an eShapeOko, not an ORD Bot, so your settings will differ):
Code: Select all
#define DEFAULT_AXIS_STEPS_PER_UNIT {16.0*200.0/18.0/2.032, 16.0*200.0/18.0/2.032, 16.0*200.0/1.25, 712.7}

The calculation for X and Y is <driver microsteps/step> * <motor steps/rev> / <pulley teeth/rev> / <belt pitch mm/tooth>. Units cancel out and you should have microsteps/mm. For Z, it is <driver microsteps/step> * <motor steps/rev> / <leadscrew lead mm/rev>; again, units should be microsteps/mm. Last value (extruder steps-per-mm) is set empirically by measuring actual length pulled through the extruder and adjusting to compensate. Tip: to avoid the non-obvious pitfall of integer division in C, the simplest way is to use a decimal point on all numbers (in C, 7/2 is 3, but 7.0/2.0 is 3.5). Another tip: it really helps to spell the units out, because it allows you to double-check that you're multiplying when you mean to multiply and dividing when you mean to divide. It was one of the most useful things I learned in first-year high-school physics.

You can change the steps-per-mm temporarily with the M92 g-code command (or even write them to EEPROM using M500 if that's enabled). However, to change the min/max limits and whether soft limits are enabled or not, you need to recompile Marlin and upload it.
cvoinescu
 
Posts: 501
Joined: Thu Aug 09, 2012 9:12 am
Location: Camberley, Surrey, UK

Re: Motors going wrong way

Postby Turbo442 » Wed Nov 28, 2012 5:18 pm

keos wrote:Thankx Turbo442, that worked..

so now when i am in proterface and i use the the buttons to move x,y,z....when i press on the -X it goes all the way to the edge (using incremental buttons) when i go to the right using +X it goes to about the center and stops and it does not move any further (using incremental buttons)
the Y is the same thing and the Z s fine

Guys what could be the cause of this...

Keos


Sounds like you don't have your home switches setup yet. Once you home x y and z you will get full travel enabled. The default marlin code should be 200 mm travel without changing anything, I could be wrong on this though. My OrdBot will act a strange until I home it the first time.
Turbo442
 
Posts: 62
Joined: Sun Oct 28, 2012 7:47 am

Re: Motors going wrong way

Postby cozmicray » Wed Nov 28, 2012 5:26 pm

Does your printer go to the stop switches when commanded to "home"
The stops are the only way for the printer to know an absolute position for the firmware/software to use.
Are the printer settings correct in prontorface?

Try Repetier-host ver 70
cozmicray
 
Posts: 168
Joined: Thu Sep 20, 2012 4:32 pm
Location: Blue Bell, PA

Re: Motors going wrong way

Postby Turbo442 » Fri Nov 30, 2012 10:03 pm

Here is the homing video I made for you guys. It seems like this is confusing to a lot of people. Sometimes its just easier with a video.

http://www.youtube.com/watch?v=53iErIKq4IE&feature=plcp

It will always home x then y then z.

Some one please correct me if I am wrong here, I think this is how the home sequence works.

When the home command is issued, If the home flag/switch is not triggered the axis will move in the negative direction until it sees the flag/switch.

When the home command is issued, If the flag/switch is triggered, it will move a short amount in the positive direction and keep doing this each time you press the button until is no longer sees the home flag/switch activated.

During a normal home sequence, the motor will run the axis in a negative direction until a home flag/switch is triggered. Then the motor is reversed to a positive direction a short distance reverses again in a negative direction at a slower speed and then stops immedately on a triggered home flag/switch.
Turbo442
 
Posts: 62
Joined: Sun Oct 28, 2012 7:47 am

Next

Return to ORD Bot

Who is online

Users browsing this forum: No registered users and 33 guests

cron