Hello All,
I'm a newbie to Arduino, although I have been making hardwired embedded systems since the 80s. I'm building a controller for my latest telescope mount and have opted to abandon the electronics I've built for it to date and use an Arduino to accomplish the tasks namely control and position acquisition.
I'm using an L293D based board I got off eBay from an American seller to control the DC motors bi-bidirectionally. I hope to use a Robogaia 3 axis encoder reader to read the quadrant encoders. I'm not married to either board. Please point out other non conflicting boards if you know of any.
First I could use a little clarification. The literature refers to lines as "pin" numbers. For example below it is noted that of the motor shield "Digital pins: used: 3,4,5,6,7,8,9,10,11,12 Pin 9 and 10 are only used for the servo motors." It makes sense that D9 and D10 would be used to control servos as they are both PWM lines but those lines actually come out of pins 15 and 16. Is it general practice to refer to the digital data lines as "pins?"
The problem I'm having is there are a few pin (digital line) conflicts. Specifically D8,D9,D10
From various places in the motor driver documentation
// Pin usage with the Motorshield
// ---------------------------------------
// Analog pins: not used at all
// A0 ... A5 are still available
// They all can also be used as digital pins.
// Also I2C (A4=SDA and A5=SCL) can be used.
// These pins have a breadboard area on the shield.
// Digital pins: used: 3,4,5,6,7,8,9,10,11,12
// Pin 9 and 10 are only used for the servo motors.
// Already in use: 0 (RX) and 1 (TX).
// Unused: 2,13
// Pin 2 has an soldering hole on the board,
// easy to connect a wire.
// Pin 13 is also connected to the system led.
// I2C is possible, but SPI is not possible since
// those pins are used.
The schematic can be seen at:
I can do without the servos so D9 and D10 aren't a problem but D8 still is. As you can see from the schematic D8 is used as a serial direction line (SER_DIR)
The schematic for the encoder board is at:
http://www.robogaia.com/uploads/6/8/0/9/680998/robogaia_arduino_encoder_shield_schematics_v3.pdf
It seems to me that D2 could be used to replace D8 with a simple change to the code. I believe this can be accomplished physically by cutting the D8 pin from the motor controller card and then running a jumper from the D2 pin. No additional cutting or routing should be necessary?
There doesn't appear to be anything special about D8. The encoder code uses it as an output and drives it high and low as needed. The motor control code similarly uses it as a output control line that could be changed in code. Does my idea have any merit? Are there other conflicts I'm not seeing?