I am using a ramps 1.4 board with my Arduino mega and am also using a Stepper Motor Driver Expansion Board to add the ability to control one more stepper motor using the auxiliary pins (as seen here https://www.youtube.com/watch?v=fHAO7SW-SZI). The question I am having is how would I go about controlling each motor independently with the potentiometers?
How are the pots to control the steppers? By position? By speed?
Use a library like AccelStepper or MobaTools (my preferred) to assign a name to each motor. Then you can use the library functions to control each motor. Name each pot the same as its associated stepper. The pot's pins and values could have names that associate each with a particular stepper.
Or, again using the library of choice, make an array of steppers and an array of pots. Then each pot and stepper has a matching array index that you can use with the library functions to control the steppers.
The pots will control the steppers by position. Using the ramps 1.4 board, can I use the auxiliary pins to connect the pots? How would I go about connecting them to the board?
You will need an analog input for each pot
As far as I can tell analog inputs 5, 9, 10, 11, 12 are available on the Ramps board. A5, A9, A10, A11 and A12 are available on the AUX-2 plug.
I am looking for the others. The thermistor inputs would be analog inputs but they have load resistors so may not work with pots.
How to wire a pot. The 5V and ground can be found in several places on the Ramps board. Pins 1 and 2 of the AUX-2 header are 5V and ground respectively. The cap is optional. It will help to bypass noise to ground and stabilize the pot reading. The value is not critical. Can be from 0.01uF to 10uF or more. I use 0.1uF usually.
I tested the thermistor inputs with a 1K and a 10K pot and they seem to work just fine. They read out the full range (0-1023) and look linear in the serial plotter. On the thermistor header pin 2 is A13, pin 4 is A14 and pin 6 is A15.
With pins A5, A9, A10, A11, and A13 now being occupied with pots, how would I go about adding a 6th stepper driver to the board via AUX-4? Or is there a better way to go about this? Lets say I am using a stepper driver expansion board like this one https://www.amazon.com/Ximimark-DRV8825-Printer-Stepper-Extension/dp/B07L74WZPS/ref=sr_1_5?keywords=stepper+motor+driver+expansion&qid=1686320226&s=industrial&sr=1-5
Or would it be better to not use the ramps 1.4 board and just do 6 stepper driver expansions directly to the Arduino mega along with the 6 pots?
Do you need the other features of the Ramps board? Like the MOSFETs for heater and fan control and limit switches?
Could you please give a description of the whole project and all of the parts needed. A schematic or wiring diagram would help a lot.
If all that the project entails is 6 steppers and 6 pots, I would be inclined to use 6 of the expansion boards and not use the Ramps shield.
This project is a robotic arm with 6 DOF. I would need to be able to use 3 limit switches. As for parts I am planning on using 3 NEMA 17s, 2 NEMA 14, and 1 NEMA 8. All with DRV8225 or A4988 drivers. I will not be using the MOSFETs or fan control. I do not currently have a wiring schematic at the time as I am still in the planning stage looking into seeing if a shield is the correct path to go with or not.
If you are using limit swithes as well as the motors and pots, the Ramps shield might make things easier.
To add the sixth stepper with the expansion module should be no problem. You have a lot of digital pins to chose from for the step and direction control pins.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.