I have an Arduino Mega 2560 along with some other boards that I will list below. I have cobbled together some code and got the motor to do what I want. It works quite well to run a 2 axis machine that feeds six different stations. I have used these pin locations so far.
#define EN1_PIN 3 // Set up for Main Stepper
#define foodPumpMotorPin 4 //Turn on 110 AC for peristaltic pump 1 (might be upgraded to Stepper)
#define waterPumpMotorPin 5 //Turn on 110 AC for peristaltic pump 2
#define ledPin 7 // For LED on Motor Two board
#define motorPin1 8 // Set up for Stepper 2
#define motorPin2 9 // Set up for Stepper 2
#define EN2_PIN 11 // Set up for Main Stepper
#define DIR1_PIN 12 // Set up for Main Stepper
#define DIR2_PIN 13 // Set up for Main Stepper
- The Main Stepper is driven by a Rugged Shield and their code calls out pins 3, 11, 12 and 13. (purchased and working well)
- The Stepper 2 pins 8 and 9 along with pin 7 for the LED, are from code for the YourDuino 5V stepper motor + stepper motor driver board. (not yet purchased)
- I need to use 3 optical limit switches. (not yet purchased)
- The peristaltic pumps need to be turned on using a simple …I don't know what. At some point, I might look into changing one relay, I guess, back to another stepper using another board and its required pins.
- I will need a real time clock to set the program in motion every so often, throughout the day. (I bought an I2C/SPI/Onewire Shield. I believe that it has an on board clock.)
Now for wants: - It would be nice to add an LCD and board that require pins.
- Additionally, it would be nice to have several things like buttons, a manual/auto switch; perhaps I could add a rotary encoder for manual setup etc. I need/want lots of room. (I also bought a Breakout Board Shield and a (pH) BNC Sensor Shield from Andrew Oke)
Now that I have laid out my dream machine here are a few questions:
- Are the pins that I have already, assigned wrong and/or over taxing?
- Can I stack all those boards together?
- How can I access what I want with what I have?
- If I can't, how can I get more pin locations.
These are the links to the boards:
http://ruggedcircuits.com/html/rugged_motor_driver.html