Welcome! Log In Create A New Profile

Advanced

Stepper 2.3 is holding DIR pin high

Posted by Jamie.Bass 
Stepper 2.3 is holding DIR pin high
September 16, 2011 11:16PM
Good evening everybody,

I coach a high school robotics team, and we took on building a Mendel as our final project last school year. The kids did a great job putting together the physical portion of the machine, and over the summer I put together the electronics and have been working out the bugs.

I've been having a wierd problem with all three of my axes only wanting to go in one direction.... I did some troubleshooting by uploading multiple versions of the Five_D firmware, and I also tried Makerbot firmware too. All firmwares exhibited similar wierdness. Reprap only drives the motors one way, and ReplicatorG only drives the motors one way.

I am running a RepRap Motherboard 1.2, an Extruder Controller 2.2, and Stepper Controller 2.3. I found that the 20100806 firmware seems to communicate with my setup so that is what I am using.

Since I couldn't get the stepper motors to work right, I thought I would try the Imperial March stepper motor test. It is designed to move the axes forward then backward while playing the Imperial March song from Star Wars. My thoughs were that this would absolutely provide measurable test data for me.... So I loaded the firmware and pushed it to the motherboard, and it worked fine... The stepper motors still only in one direction though.

I started probing at this point and measuring voltages. Here's what I found:
(Note, just referring to X axis below, the other axes tested the same way)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CONTINUITY TESTING BETWEEN 644P CHIP AND STEPPER HEADER ON THE MOTHERBOARD:
Motherboard pin (X_Step_PIN) = 15 - Correctly Connected to Pin 3 of stepper header
Motherboard pin (X_DIR_PIN) = 18 - Correctly Connected to Pin 4 of stepper header
Motherboard pin (X_Min_PIN) = 20 - Correctly Connected to Pin 6 of stepper header
Motherboard pin (X_Max_PIN) = 21 - Correctly Connected to Pin 7 of stepper header
Motherboard pin (X_Enable_PIN) = 19 - Correctly Connected to Pin 5 of stepper header
***(NOTE: All of these are correctly mapped in software too.)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VOLTAGE TESTING AT STEPPER DRIVER **WITH** 10PIN RIBBON CABLE CONNECTED FROM MB TO STEPPER DRIVER:
Motherboard pin (X_Step_PIN) = 15 - Voltage Measured OK to Pin 3 of stepper header (Measured OK - jumped around as expected at about 2.5V)
Motherboard pin (X_DIR_PIN) = 18 - Correctly Connected to Pin 4 of stepper header ***(Always measured 5V when Enable was high)*** (this is the issue I believe)
Motherboard pin (X_Min_PIN) = 20 - Worked correctly to Pin 6 of stepper header when actuated
Motherboard pin (X_Max_PIN) = 21 - Worked correctly to Pin 7 of stepper header when actuated
Motherboard pin (X_Enable_PIN) = 19 - Worked correctly as measured at Pin 5 of stepper header
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VOLTAGE TESTING AT 644P CHIP **WITHOUT** 10PIN RIBBON CABLE CONNECTED TO STEPPER DRIVER:
Motherboard pin (X_Step_PIN) = 15 - Worked correctly as measured at Pin 15 at motherboard (Measured OK - jumped around about 2.5V)
Motherboard pin (X_DIR_PIN) = 18 - Worked correctly as measured at Pin 18 at motherboard ***(Voltage measured HIGH and LOW as designed and correctly executed by the program that was running.)***
Motherboard pin (X_Min_PIN) = 20 - CAN'T TEST
Motherboard pin (X_Max_PIN) = 21 - CAN'T TEST
Motherboard pin (X_Enable_PIN) = 19 - Worked correctly as expected when measured at Pin 19 at motherboard
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


So, long story short, When the 10pin ribbon cable is hooked between my motherboard and stepper, the DIR pin is held HIGH all the time. If I disconnect the 10pin ribbon cable and measure the DIR pin from the motherboard the signal goes HIGH and LOW as designed.

So, this tells me that
1. Software is working
2. The Motherboard is working and outputting the correct signals
3. The stepper board is potentially holding the DIR signal high.

So my question on #3 here is.... Why or How could the stepper board be holding this signal high. Is it a bad board? I have three stepper boards doing EXACTLY the same thing.... All the motors move in the same direction.

Any help or assistance on this matter would be greatly appreciated..... I have been combing the forums for a few weeks looking for answers and am out of ideas.

Thanks a million!!
Jamie
Re: Stepper 2.3 is holding DIR pin high
September 17, 2011 06:00PM
Can you verify that _DIR_PIN pins can sink current? When you detach ribbon cable and use some resistor (~ 5kOhm) to connect particular DIR_PIN to VCC (+5V) will it still change its value as expected or remain constantly HIGH?
Re: Stepper 2.3 is holding DIR pin high
September 17, 2011 10:01PM
Thanks for the reply Miso!

Good idea on the troubleshooting..... I disconnected the ribbon cable again and tested voltage:

NO LOAD PARAMETERS: Program directs the DIR pin HIGH for 26 seconds, and LOW for 26 seconds. Motherboard functions correctly with respect to program logic.

LOADED PARAMETERS: Still have Ribbon Disconnected from Stepper Driver. Used a 4.7K resistor in pin 4 (the DIR pin) and tied the other end to VCC. Tested voltages with the multimeter. The DIR pin HIGH for 26 seconds, and LOW for 26 seconds. Motherboard appears to function properly under load.

LOADED PARAMETERS: Still have Ribbon Disconnected from Stepper Driver. Used a 4.7K resistor in pin 4 (the DIR pin) and tied the other end to GROUND. Tested voltages with the multimeter. The DIR pin LOW for 26 seconds, and HIGH for 26 seconds. Motherboard appears to function properly under load.

+++++++++++++++++++++++++++++++++++++++++++++++++++

I did another test also..... I cut the end off of a 10 pin ribbon cable and tinned the ends with solder so that they would fit into the ends of the factory ribbon cable end (the one coming out of the motherboard).

So the cut and tinned cable is plugged into Stepper Driver, and the other ribbon cable with the factory ends is plugged into the motherboard.

I aligned all the wires in the cut cable in order like they were supposed to be and plugged them into the loose end of the motherboard ribbon cable. I kept the wire going to pin 4 (the DIR pin) on the Stepper driver out so I could play.

I used the 4.7k resistor and tied it to VCC and used it to SUCCESSFULLY change the direction of the stepper while it was running the program. So now it appears that the stepper driver WILL change the direction of the stepper motor when presented with the correct logic.

+++++++++++++++++++++++++++++++++++++++++++++++++++

CONCLUSIONS:

So here's what I'm thinking..... Please correct me if I'm wrong.......

1. The Motherboard logic appears to be working correctly.
2. The Motherboard appears to be functioning properly under load.
2. The Stepper Driver appears to be working correctly when presented with the proper signals.

POSSIBLE ISSUE: The Motherboard is not using enough current to pull the DIR pin HIGH or LOW.

Thoughts?
Thank you soooo much for the help!!
Jamie
Re: Stepper 2.3 is holding DIR pin high
September 18, 2011 06:10AM
You're welcome. When you connect stepper driver board but leave DIR signal disconected, then DIR signal remains constantly HIGH or swings HI/LO (measured on motherboard side)? Can you try to disconect also MIN and MAX signals? Be carefull not to damage printer, rather put the belt off.
Re: Stepper 2.3 is holding DIR pin high
September 26, 2011 09:21PM
Hi Miso,

Sorry for the delayed response... Been pretty busy lately.

The motherboard DIR pin measures high and low with the MIN and MAX disconnected. Everything seems to work right when the Opto home switches are disconnected!

Since I found that everything works fine with the Optos unhooked, I pulled down a copy of ReplicatorG and pushed the MakerBot cupcake firmware to the Gen3 Motherboard (Firmware v2.4 for Gen3) and I pushed the 2.6 Firmware (stepper w/o relay version) to my 2.2 Extruder board.

I fired up ReplicatorG and all three axes work as expected!!!

I'm not sure what I am going to do about the home switches, but I might just get some mechanical switches to do the job.... I know they're not as accurate, but I'll figure something out.

Thanks a million for the help Miso, It's great folks like you that really make the community grow!
Jamie B
Re: Stepper 2.3 is holding DIR pin high
September 27, 2011 02:37AM
Quote

I'm not sure what I am going to do about the home switches, but I might just get some mechanical switches to do the job.... I know they're not as accurate, but I'll figure something out.

I think actually micro switches are probably more accurate than optos. The slit in an opto is wide compared to the distances we are measuring so it is essentially an analogue measurement.


[www.hydraraptor.blogspot.com]
Re: Stepper 2.3 is holding DIR pin high
September 27, 2011 10:31AM
Hi Jamie,

Does the output of your endstops change when you trigger them? If so, they are most likely OK, probably just firmware expects different polarity of the signal. This can be adjusted in firmware, look for something like:

#define ENDSTOP_OPTO_TYPE ENDSTOP_OPTO_TYPE_H21LOI (FiveD)

#define DEFAULT_INVERTED_ENDSTOPS 1 (Gen3)

in configuration header files. Hope that helps.
Re: Stepper 2.3 is holding DIR pin high
September 27, 2011 10:58AM
+++++++++++++++++++++++++++++++++++++++++++

Hi Miso,

I tried to invert in software but had no luck..... As long as the optos are hooked up the stepper boards continue to malfunction.

+++++++++++++++++++++++++++++++++++++++++++

Nophead,

Thanks for the comment on the microswitches.... I did notice that the optos had some accuracy issues. When I homed my axes by hand while setting the flags I noticed the LED would fade before going out.... I didn't measure the electrical signal, but it looked like it was not a cleanly switched digital signal.

I would assume that a microswitch would be accurate within a few thousandths of an inch and provide a 100% digital signal.

+++++++++++++++++++++++++++++++++++++++++++

Thanks Guys!
Jamie
Sorry, only registered users may post in this forum.

Click here to login