ORD Bot Hadron Inquiries - Help Appreciated

Topics Related to the ORD Bot Printer

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby JLG » Mon Oct 14, 2013 5:21 pm

Okay, another weird problem. I've made a bit of headway, my Configuration.h now looks like this:



//===========================================================================
//=============================Mechanical Settings===========================
//===========================================================================

// Uncomment the following line to enable CoreXY kinematics
// #define COREXY

// coarse Endstop Settings
//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
// fine Enstop settings: Individual Pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX
// #define ENDSTOPPULLUP_ZMAX
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.

#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

// Disable max endstops for compatibility with endstop checking routine
#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
#define DISABLE_MAX_ENDSTOPS
#endif



I can now see when endstops are triggered, however if I type M119 into Repetier Host repeatedly, the end stops report triggered and open randomly. Example: without touching any of the endstops or moving any of the axis, if i type in M119 3 times in a row, it might report this:



13:23:27.218 : N395 M119 *5
13:23:27.240 : Reporting endstop status
13:23:27.240 : x_min: open
13:23:27.240 : y_min: open
13:23:27.240 : z_min: open

13:23:31.434 : N397 M119 *7
13:23:31.452 : Reporting endstop status
13:23:31.452 : x_min: open
13:23:31.452 : y_min: open
13:23:31.452 : z_min: open

13:23:33.435 : N399 M119 *9
13:23:33.454 : Reporting endstop status
13:23:33.454 : x_min: open
13:23:33.454 : y_min: open
13:23:33.454 : z_min: TRIGGERED



sometimes y_min is triggered and its not even connected right now. it sound light something is setup incorrectly in the firmware, or the board itself is defective. because I don't see any way the board could report something as triggered when there is not possible way it could be (not hooked up)
JLG
 
Posts: 75
Joined: Thu Aug 22, 2013 3:22 pm

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby flickerfly » Mon Oct 14, 2013 5:29 pm

Victory! That's good progress. :D

An unconnected endstop would potentially cause the pin to float and could be just about any value somewhat randomly. That's the point of the pullup or pulldown resistor. It basically sets the default of the pin to high or low at a hardware level. The Arduino has some internal pullup resistors iirc that can be used, but are light weight and generally discouraged for reasons of dependability. In other words, an unconnected endstop will vascilate between values so that's perfectly okay.
flickerfly
 
Posts: 247
Joined: Sat Apr 27, 2013 10:04 pm
Location: Allentown, PA

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby cvoinescu » Mon Oct 14, 2013 5:58 pm

Let's go back to basics. Power up, and use your voltmeter to measure the output of an endstop (with reference to ground). What do you read when open, and what do you read when triggered? Check all your endstops.

If your endstop outputs are open-drain (or open-collector) type, they need the pull-up resistors to be enabled -- which you just disabled. If you don't have them enabled, an open endstop will read open or triggered, more or less randomly; a triggered one will always read triggered (unless you got the invert bit wrong, in which case it'll always read open).
cvoinescu
 
Posts: 501
Joined: Thu Aug 09, 2012 9:12 am
Location: Camberley, Surrey, UK

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby JLG » Tue Oct 15, 2013 1:35 am

flickerfly wrote:Victory! That's good progress. :D

An unconnected endstop would potentially cause the pin to float and could be just about any value somewhat randomly. That's the point of the pullup or pulldown resistor. It basically sets the default of the pin to high or low at a hardware level. The Arduino has some internal pullup resistors iirc that can be used, but are light weight and generally discouraged for reasons of dependability. In other words, an unconnected endstop will vascilate between values so that's perfectly okay.


cvoinescu wrote:Let's go back to basics. Power up, and use your voltmeter to measure the output of an endstop (with reference to ground). What do you read when open, and what do you read when triggered? Check all your endstops.

If your endstop outputs are open-drain (or open-collector) type, they need the pull-up resistors to be enabled -- which you just disabled. If you don't have them enabled, an open endstop will read open or triggered, more or less randomly; a triggered one will always read triggered (unless you got the invert bit wrong, in which case it'll always read open).


Thank you both! Thanks to you cvoinescu for suggesting a multimeter to test voltage, and thanks to you flickerfly for explaining to me about the random values. I now fully understand what's happening / what happened:

#1 While running the wires, I mixed up the y_min and y_max, so when I was testing the y_min earlier while the max Endstops were disabled, it's no wonder why I wasn't reading anything while jumping the wires.

#2 The connectors I used are functional and reliable (a ULC listed company relies heavily on them for their own electronics), however, they must need a thicker gauge of wire because my wires are not making contact inside them. The wires themselves read voltage, but the contacts on the connectors don't.

I just need to find a way to make these connectors work, now. And also switch the y_min and y_max. Thanks for the suggestions, guys.
JLG
 
Posts: 75
Joined: Thu Aug 22, 2013 3:22 pm

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby flickerfly » Tue Oct 15, 2013 1:51 am

Very good :-)
flickerfly
 
Posts: 247
Joined: Sat Apr 27, 2013 10:04 pm
Location: Allentown, PA

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby JLG » Tue Oct 15, 2013 11:00 am

Yeah, at least I know what the problem is now. I actually tried to home after I tested the motors movement, and it drove the axis' right into the ends causing the belt to skip, also drive the J-head right onto a screw. I'm actually kinda scared I'll have to replace it :-( Only way to tell will be to extrude something. Luckily I pulled the power before the z-axis got too far. I guess well see when that time comes. Let that be a lesson to everybody trying to built one: always test the limit switches before homing and never assume things are working.

I have another question. A while back I was discussing the orientation of the 1A 1B 2A and 2B contacts on the steppers being reversed, so by remapping them, they were in the exact opposite order, so that's how I hooked them up. They seem to work fine, and they move in the correct direction, but when I increase the speed of the motors to 400 mm/s, they move fast but then stutter when they're stopping. It's like a series a bad about 5 bad jerks near the end. Any ideas on why it's doing this? I've read that if the wires an not oriented properly it can cause jerking and stuttering, but if the motors move properly at lower speeds, wouldn't that imply the wires are set up properly?
JLG
 
Posts: 75
Joined: Thu Aug 22, 2013 3:22 pm

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby flickerfly » Tue Oct 15, 2013 12:43 pm

Just a guess, but does it make a difference if you turn up your pots on the stepper drivers?
flickerfly
 
Posts: 247
Joined: Sat Apr 27, 2013 10:04 pm
Location: Allentown, PA

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby JLG » Tue Oct 15, 2013 3:09 pm

flickerfly wrote:Just a guess, but does it make a difference if you turn up your pots on the stepper drivers?

I'm not sure what the "pots" are, are they the little screw on the driver? I'm assuming the "pots" will adjust voltage and/or amperage? If so, why would it affect the motor at the end of it's movement and not at the beginning or during? When the gantry or heatbed moves, it'll stutter at the end, not during it's movement. Just curious on the theory of it is all.
JLG
 
Posts: 75
Joined: Thu Aug 22, 2013 3:22 pm

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby flickerfly » Tue Oct 15, 2013 3:24 pm

Yes, the pots or potentiometers are the things with a phillips head like a screw. Turn them gently, as they can break if you go too far with them and they are very sensitive to small changes usually. Some turn a lot more than others.

Honestly, not much theory, but it is a simple thing to rule out. I'm guessing that the slower momentum at slower speeds cause a greater need for current to increase the magnetic field in the motors and keep things moving, but I may not know what I'm talking about.

I haven't seen any problems with reversing the A and B pairs on steppers. If you can find a wiring diagram of a bi-polar stepper like these, you should see that the two coils are basically the same, just offset so inverting them shouldn't make any difference however flipping the wires in a pair can make a difference as the result is (I think) opposing rather than complimentary electrical fields which cause lots of noise and jerk as they work against each other rather than with each other. I expect if you flipped within both pairs, but not the pairs themselves you wouldn't have a problem.

I'm certain there are people here who have much better knowledge of this whole area than I. Please jump in and correct me where I am wrong.
flickerfly
 
Posts: 247
Joined: Sat Apr 27, 2013 10:04 pm
Location: Allentown, PA

Re: ORD Bot Hadron Inquiries - Help Appreciated

Postby cvoinescu » Tue Oct 15, 2013 8:38 pm

You can wire the steppers any way you please, as long as you keep the pairs together. In other words, if your motors has red, blue, green and black wires, the pairs are red-blue and green-black, and all these eight combinations work equally well:

red blue green black
blue red black green
green black blue red
black green red blue

red blue black green
blue red green black
green black red blue
black green blue red

First four rotate in the same direction, last four in the opposite direction.

Any combination where red is pin 1 or 2 and blue is pin 3 or 4, or the other way round, is incorrect, does not turn properly, and can destroy the driver.


About the potentiometers: be careful with them. Read and follow the instructions for the drivers. It's easy to cause a Pololu A4988 driver to die spectacularly if you turn the pot too far clockwise. That said, they're likely to make a difference, so it's worth trying to adjust them.
Last edited by cvoinescu on Tue Oct 15, 2013 9:16 pm, edited 1 time in total.
cvoinescu
 
Posts: 501
Joined: Thu Aug 09, 2012 9:12 am
Location: Camberley, Surrey, UK

PreviousNext

Return to ORD Bot

Who is online

Users browsing this forum: No registered users and 6 guests