I've gone ahead and decided to get outside of the 5 volt Arduino limits and without actually knowing anything, have ventured to a specific motor as a first test. I'm looking for help in picking the best way to interface from Arduino to this new motor.
Specs are here: http://www.robokits.co.in/downloads/Cur_Driver.pdf
Most importantly: Motor speed control interface via UART, I2C, PPM signal and analog input
Analog input seems the easiest to me, but I can't seem to understand the specs enough to figure out what they need to enable it. PPM is another possibility, but I've never had that opportunity before so I have no experience. Can someone please review the options and suggest the best interface for me to use? I'll likely also ask for suggested schematics (resistors) for connecting it up. For whatever reason, I don't care so much about blowing the motor, but I hate to damage the Arduino board.
Please note that the DC motor is connected to a 12 volt 7 amp external power supply and the Arduino has a separate power connection. They don't share the same positive voltage and also don't share the same ground as I currently have it configured.
The motor driver and the Arduino must share a common ground.
The PPM signal is misnamed (it should be PWM) and this looks to be the easiest option. Following the instructions on page 8, you can treat this motor as a standard R/C servo, using the Arduino servo library, except that you control rotational direction and speed rather than "servo position".
The second easiest way, but quite a bit more complex, is to use the UART (TTL serial) interface, as described on page 4 of the motor documentation. You connect everything as shown in the diagram on page 4, using the serial output and input pins of the Arduino as UART TXD and RXD. Set the serial baud rate to 9600 and send individual characters to control the motor, as described on page 4 and following.
The example on page 5 of the docs shows the motor being controlled by a terminal program on a PC (could be a Mac). You have to emulate a terminal program with the Arduino to control the motor, so it might be a good idea to get everything working with a serial adapter on a PC or Mac before going to the Arduino. For this you will need a USB serial-TTL adapter like FTDI to interface the PC/Mac and the motor driver.
Finally, the I2C interface may conceptually be a bit easier to use but in practice is much harder to debug if it is not working.
Thanks for the input. PWM sounds like a starting place but I do thank you for describing the ways to use the other.
Can you, or someone else, maybe broaden on the common ground issue? I have a 12 volt, 7 amp source and then I have an Arduino which I typically just power over USB connected to a desktop for simplicity during development. Sometime in the distant future I may have them share the same power source, but for the moment they're two different power sources as I don't have a way to feed 12 volts, 7 amps at the motor any other way.
Not sure how it would be possible to have the Arduino and Motor have the same ground. Suggestions?
The motor driver (not necessarily the motor itself) and the Arduino MUST share the same ground or the signals that you wish to pass between the two have no meaning. Ground serves as the common reference for voltage, and in the cases mentioned above, the signals are all voltage levels (0 or 5V).
Another way to think about this is that for voltage to have a meaning, current has to flow and current flows only in a complete circuit. That circuit includes the signal wire and ground. The connection diagrams on the motor documentation clearly show this common ground connection.
Do you see my dilemma though? The signals may be max of 5 volt, but the motor and driver require a 12 volt, 7 amp power source. Is there any way you see to ground the 5 volt signal separately from the 12 volt source?
I'll take a few days and try to figure this out. I absolutely understand the need for the common ground, but I also have no clue how to address that issue with multiple voltages needed for the two products.
I can't think this would work (what do I know?), but what if I had the Arduino connected on USB and then another wire also connected to the ground of the motor. The Arduino would have two grounds in essence depending on whichever was needed to complete the circuit.
If you connect the Arduino and the motor diagram as shown on page 8 of the motor documentation, with GND on the Arduino connected to GND on the motor driver and also to the negative lead of the motor power supply, the motor driver and the Arduino will be able to communicate with each other. Otherwise, they won't be able to communicate.
I really don't know how to explain it better, except perhaps to comment that the PC and the Arduino ALSO share a ground, otherwise the PC and the Arduino would not be able to communicate. The USB cable has a lead named GND and it must be (and is) connected to ground on both computers. In your case, the PC powers the Arduino but it doesn't have to do so. You could run the Arduino from batteries, but you would still have to connect the ground on the Arduino to a ground on the PC in order for them to communicate.
In your setup, the PC, the Arduino and the motor driver all share a common ground, but each has different power supplies with different maximum voltages.
Someone else is certainly welcome to jump in!
After some checks on having multiple grounds, it seems that this is normal and possible.
So the Arduino is grounded by both the USB and the high voltage ground. The driver and motor (which are a single unit) are only connected to the high voltage ground. My concerns before were regarding having multiple grounds for the Arduino as it needs to be grounded for a ~5 volt power source (USB in this case) as well as grounded to the same source as the driver (which happens to be a 12 volt source).
I'll consider some kind of flyback diode just to make sure the motor and Arduino don't accidentally mix in some situation. Shouldn't hurt anything anyways to be cautious.
The motor driver will already have a flyback diode built into it.
You probably can't access the internal circuitry without causing some damage.
Just for the sake of updating, it all worked out. It worked surprisingly easily; really really easily.
Connected the Arduino to USB for power and ground.
Connected the AC to 12 volt, 7amp into an adaptor which I split into one positive and two negatives. Connected one negative to the Arduino's ground. Connected the positive and remaining ground to the motor's integrated driver.
Pin 9 on the Arduino to the PWM input on the driver and shorted some other inputs per the motor's user manual.
I now have a working 10RPM, 120kg-cm / 11.7nm / 8.7 lb-ft motor at my disposal. Thank you to everyone, especially jremington (who I believe is "everyone" anyways).
11.7 N-m (newton-meter), not 11.7nm (nanometer!)