Ramps 1.4 motor and communication questions
December 02, 2017 07:34PM
I have a few questions about the ramps 1.4 shield, and I've never really done anything like this before, so these may be weird questions. The first one is about establishing communication between an Arduino with the Ramps 1.4 shield and another Arduino Mega. For the machine I'm making, I will be running 3 stepper motors that are expected to be run simultaneously and two servo motors which will run at different times while nothing else is moving. There are also going to be 5 or 6 limit switches for the 3 stepper motors. There are no heat beds or anything like that which will be powered by the shield. However, I do want to use a Bluetooth module to control my machine and an infrared heat sensor to read the temperature of a surface.
I've read online that two Arduinos can communicate to each other through the RX and TX pins, and according to this link, the RX and TX pins are available as D1 and D2 in the AUX-1 block. Does that mean I can use those two pins on the Ramps shield to connect to another Arduino's RX and TX pins and establish communication between the two? I'm asking because I don't know how else I'd be able to use the infrared sensor (and possibly an ultrasonic sensor later) without the second Arduino, so I'd plan on setting up the Bluetooth module, IR sensor, and possibly an ultrasonic sensor to the second Arduino to gather the inputs required to decide what kind of movement the Arduino with the Ramps 1.4 shield will need to tell the motors to make.

My second question relates to the power supply and the motors. This is the first stepper motor this is the second stepper motor and this is the third stepper motor while this is the first servo and this is the second servo. If I got a 12V 5A AC/DC power adapter like this (I'd cut off the 2.1mm jack and use the ground and hot wires from that) and connected it to the 5A input on the left side in this link's diagram, would I be able to run the three steppers simultaneously and the two servos separately from everything else? With my limited knowledge, it looks like the three stepper motors would draw 4.7A at its peak, but my concern is whether or not the motors would receive 12V, since that's what I'm supplying the shield. The motors are rated for 2.4-3V, and if the Ramps 1.4 shield sends 12V at it, I'm not even sure of what would happen, but I'd imagine it'd be bad.

I'm sorry if I'm asking too much or making obvious mistakes; this is my first time doing anything like this and really need it to work for a group project.
Re: Ramps 1.4 motor and communication questions
December 02, 2017 09:31PM
The mega has 4 serial ports and yes you can talk to other aurduinos with them, either directly or using wireless connections

D1 and D2 are wired to the USB/serial interface, you cannot use these and the USB at the same time
Serial1 on pins 19 (RX) and 18 (TX), (on ramps Z-Min and Z-Max endstops pins)
Serial2 on pins 17 (RX) and 16 (TX), (on aux-4)
Serial3 on pins 15 (RX) and 14 (TX) (Y-Min and Y-Max endstops pins)

Seppers you use more than the listed voltage , normally 3-4 times the listed voltage
Servos you must use the listed voltage

On the ramps there are 4 servo pins. The 5v line of these pins only goes to the 3 pin connector to the left, the pins are labled vcc, 5v and ps-on

vcc is 5v, but low current. 5v is the 5v power pin for for servos. Most connect vcc to +5, but this is not a good idea. You really need a independent 5v supply to connect to the 5v pin.

Edited 1 time(s). Last edit at 12/02/2017 09:32PM by Dust.
Re: Ramps 1.4 motor and communication questions
December 03, 2017 12:47AM
Thanks for the help. So just to confirm that I have this right:
1) My best bet would be to connect a second Arduino Mega through the D16 and D17 pins of the shielded one to establish that communication (I don't plan on using the USB during final use but it'd probably be nice for testing, so the D16 and D17 pins seem like the most convenient of those options).
2) The 12V 5A power adapter going into the Ramps 1.4 shield would be good to cover the voltage of the two 3V 1.5 A/phase steppers and the single 2.8V 1.7A/phase stepper.
3) The servo motors should be controlled by the Ramps 1.4 shield, but the power should come from a separate 5V power supply, such as this adapter

My main concern now is about the current draw that would come from running those steppers at 12V. Would it exceed the listed current draws? Because the listed current draws add up to 4.7A, and if it draws more than that it would be bad for the 12V 5A power adapter. Also if it drew more current than the listed, I'd be concerned about the steppers because I'd imagine too much current running through the steppers would be bad. Would I have to put some sort of current limiting resistor in series with each stepper's power cable?

Sorry for all the questions, but I want to avoid plugging these things in just to find the magic smoke coming out of them.
Re: Ramps 1.4 motor and communication questions
December 03, 2017 01:59AM
1) yes
2) yes. Power usage is not as simple as adding up the amps when it comes to steppers... but 5amp is enough for 4 steppers of this type and a hot end.
3) yes, or a dc-dc converter from 12v to 5v. Then you only have one supply

Steppers driver have current limiting pots on them already, See [reprap.org]
So you can reduce the amount of current they use.
Sorry, only registered users may post in this forum.

Click here to login