ramps 1.4 and external stepper driver

Mithrendir
Plasticator
Posts: 7
Joined: Tue Mar 17, 2015 11:19 pm

ramps 1.4 and external stepper driver

Postby Mithrendir » Thu Apr 23, 2015 10:52 am

Hi all and thanks in adv for any help is appreciated.

I got an arduino mega and ramps board (wanted to start off cheep so when I cook it I wont feel bad. I will end up with a rambo or aligator) It is my understanding that the poloul driver clones (A4988) that it came with will operate at 12v and max at 2A. My stepper motors are Vexta/Oriental motor CSK266-at. They are rated at 5v and 2A so I dont think I can use the A4988 drivers. Lucky I have the drivers that came with the steppers (CSD2120-t) that are 24v or 36v input and 5v, 2A output. Sadly they only support full step or half step settings via jumper. But for now I was hoping it would all work.

So thats the electronics and here are the questions.

1. it looks like the ramps/arduino is providing a common ground and VDD to the board and then switching one pin HIGH/LOW fro the step and dir. From what I gather on this diagram.
Image

My stepper driver has separate + and - inputs for each input pair. If I understand correctly I should be able to use ground from the ramps 1.4 to all the - and the single pins on the ramps form "step" to "Pulse /CW" and "DIR" to "DIR/CCW" in the positive leads. Or is that backwards? Or am I missing something important ? I don't want to fry anything.
Image


2. I intend to use Repetier firmware on the arduino for this. Where do I set the pulse frequency for the driver. It looks like it needs a pulse of 5 micro seconds min. If i understand Repetier correctly that is a firmware setting and not a hardware thing. If I understand it correctly I have to tell Repetier that I'm using half steps to right?
Image


Sorry for asking stupid questions Its been more than 15 years sense I took my last electronics class and I didn't do that well.
I hope some of what I am asking makes sense to someone.

Again thanks for the help :)

Cheers

Eric
Printmaster!
Posts: 726
Joined: Sat Aug 18, 2012 4:09 am
Location: Chula Vista, CA

Re: ramps 1.4 and external stepper driver

Postby Eric » Thu Apr 23, 2015 4:05 pm

Ok, first I'll answer the question asked:

STEP and DIR are direct connections to output pins on the CPU. Your diagram indicates they're all opto-isolated, so I think you can probably connect them as you guessed with signal and ground...it will act like the PNP controller type in the diagram. Not sure what C.OFF is...it may correspond to ENABLE. Timing looks to be an output, not an input. I suspect it can be ignored. And from your second diagram, I'd say you need to be in 1-pulse input mode. I assume that's a jumper setting or something.

As for firmware, yes, the settings you're looking for are probably in configuration.h. I'd make sure you've learned how to successfully compile before you change anything.

Now to address your assumptions:

You appear to have a 6-wire motor, which is being used in unipolar mode with the 2120 drivers. It could also be wired in a bipolar mode using only 4 of the wires (the other two are center-taps on the coils). Google "unipolar vs bipolar stepper" for more info on this.

Stepper motors have a voltage and current rating. But in the end, the current rating is what matters! MUCH higher voltages are commonly used by current-limiting drivers without problems. Read the rest of the page that polulu diagram originated from, especially the part about current limiting: https://www.pololu.com/product/1182

The current rating is your upper limit...you don't need to set the current that high unless your application needs it. Most 3D printers don't.

In other words, I think you could use your A4988 drivers if you wanted to. If you set the current to more than 1A, make sure they have heat sinks on them and adequate airflow.

Mithrendir
Plasticator
Posts: 7
Joined: Tue Mar 17, 2015 11:19 pm

Re: ramps 1.4 and external stepper driver

Postby Mithrendir » Thu Apr 23, 2015 5:00 pm

Thank you for your reply that was supper helpful.

"STEP and DIR are direct connections to output pins on the CPU." I only used the pololu circuit diagram because I couldn't find a graphic of the RAMPS 1.4 that had the pin-out. My plan had been to stick pins from the RAMPS to the off board stepper driver. It seemed easy to hook it up that way.

"C.OFF" according to the manual disconnects the coils so when you move the motor by hand it has no holding force from the coil. So I don't think I have to use it at all unless I want to take the stress off the motor shafts when moving the carriages.

"Google "unipolar vs bipolar stepper" " I have and I have tested the motor running bipolar (led between a and a- lights up beautifully) The manufacture even gives the coil color layouts. So I understand that bit pretty well.

The part about using the A4988 as the driver is where i'm lost. The motor is rated at 10w = (2A * 5V). So if the voltage source were 12V wouldn't you have to use a decimal Amp number (.83A or .84A) to get the same 10w ? Or am I missing something because the motor is only receiving power for short pulses? If I used a .83 or .84 value for amps wouldn't I loos significant amounts of torque? Is it safe to run a 10w motor at say 19W (12V and 80% of A4988 output amps)? That would be a 90% increase in wattage. Wont something melt?

Again thank you for your help.

Eric
Printmaster!
Posts: 726
Joined: Sat Aug 18, 2012 4:09 am
Location: Chula Vista, CA

Re: ramps 1.4 and external stepper driver

Postby Eric » Thu Apr 23, 2015 8:58 pm

Everything about Ramps 1.4, including schematics, pin assignments, board layout, and assembly: http://reprap.org/wiki/RAMPS_1.4. It's all open source.

Here's a decent practical explanation of chopper driver theory for stepper motors: http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/application_note/CD00003754.pdf, but in essense you're right...the motors are being run with pulse-width modulation based on a current feedback loop.
Contrary to your thinking, it actually improves torque at higher speeds. If you can find the spec sheet for your motor, there's typically a torque curve given for some test cases.

As for melting, yes, sometimes that happens when people set things to the max without thinking. Stepper motors are typically rated for an 80C temperature rise and the real failure point is even higher, so plastic motor mounts tend to melt before the motor fails. My rule of thumb for 3d printers is if the motor is getting too hot to touch, you probably have the current set higher than needed.

Mithrendir
Plasticator
Posts: 7
Joined: Tue Mar 17, 2015 11:19 pm

Re: ramps 1.4 and external stepper driver

Postby Mithrendir » Fri Apr 24, 2015 10:04 am

Eric,

Thank you so much. I get it now it is all about duty cycle. The motor is rated at 10w at 100% duty cycle and nothing melts. But as long as I don't feed to much wattage to the motor to fast. When it is pulsed the pulse is short so it never sees the power for long. So it doesn't melt. Because the pulse is on and off the motor only essentially sees power half the time. So it is running @ 50% duty cycle. When I run the motor at twice the power rating for half the time. As long as nothing melts and the motor is cooler than its max running temp everything is ok and happy. It all makes sense now. I was thinking of it as if it was on all the time because the rotation is constant. But in reality the power is turning on and off rapidly.

Cant thank you enough you really helped out. I'm going to test the motors and the A4988 drivers today I will let you know how it works out.

Thanks again


Return to “RAMPS”

Who is online

Users browsing this forum: No registered users and 1 guest