I need help mapping out pin locations.

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

  1. The Main Stepper is driven by a Rugged Shield and their code calls out pins 3, 11, 12 and 13. (purchased and working well)
  2. 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)
  3. I need to use 3 optical limit switches. (not yet purchased)
  4. 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.
  5. 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:
  6. It would be nice to add an LCD and board that require pins.
  7. 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:

  1. Are the pins that I have already, assigned wrong and/or over taxing?
  2. Can I stack all those boards together?
  3. How can I access what I want with what I have?
  4. If I can't, how can I get more pin locations.

These are the links to the boards:

I've had a look but some of those boards hide the documentation about which pins are used inside Eagle schematics and life is short - you need to delve into those schematics to be sure there's no conflict.

I think the BNC card can just use one analog pin, but the I2C/SPI card may well clash with the Rugged Motor Driver if its SPI function can't be disabled/left out - pins 11/12/13 are SPI on the Uno etc, so I suspect this card will use those pins. As you have a Mega (where the SPI are different pins) you wouldn't be able to use SPI on that shield anyhow - if you are lucky it won't have any components connected to the SPI pins, just connectors that you can ignore...

I can drill down to the information on the I2C/SPI card or ask for some support from Andrew Oke, once I know more about what I am doing. I guess what I need first is to be pointed to some succinct information on the pin layout system in general.

I had to cut pin 21 of the arduino board when I started using 30 volts for the motor so I know that there are at least that many. I have a brake out board, which I had supposed was just for even more pins. I also guessed that I could just start assigning pins above what I am using now and if there was a conflict, I would get faulty functioning from it and I would just move on to the next pin.

If this is not something that is not somewhat common knowledge and you guys don't know this kind of stuff off the top of your head, then I have to start researching.

It sounds a little funny but I'm dyslexic so I try to reserve reading for good over view and focused, targeted detail information. I use a text to speech reader but it doesn't help with scanning down to the right information.

I jumped over the pin-outs because those settings were called out in the sample code. I wanted to see if it was possible for me to accomplish what I wanted to do before I got an in depth understanding of the system. Now that I have pressed through the harder parts, with help, it is time to tie up some necessary loose ends and work on improvements.

What would be a good quality but short over-view to read?