tracked rover chasis with arduino mega 2560

Hello,

I have a Arduino Mega 2560 with an Arduino motor shield currently running two DC motors. The motors are being wirelessly controlled through a Raspberry Pi and my windows PC (through Tight VNC server/client). I have been trying to figure out if it would be possible to use a basic tracked chasis with 2 DC gear motors as a platform for my soon to be roverbot. Just wondering if anyone has had any experience with the chasis at this link: http://www.lynxmotion.com/p-577-tri-track-chassis-kit-no-electronics.aspx. I think it could work but am not ready to make the investment based on the results of my research thus far. Any advice, shared experiences, or general thoughts on the subject would be appreciated.

Thank you, elecrostudent

Yeah, it's all possible. You just have to be sure the h-bridges on your motor board can handle the motor currents. You need to check that.

What "motor shield"? Because the answer to that will determine if you can use the chassis.

These are the motors used on that chassis:

http://www.lynxmotion.com/p-94-gear-head-motor-12vdc-501-120rpm-6mm-shaft.aspx

According to the datasheet for the motor:

http://www.lynxmotion.com/images/data/ghm02.pdf

The maximum current of the motor at stall is 2 amps.

Here's the thing, though - most Arduino motor shields use one of two different common h-bridge chips - the L293 or the L298. The L293 only has a rating of 1 amp max per output - and the outputs can't be paralleled for more current driving capability (well, not according to the L293 datasheet, anyhow). So a motor driver shield using that h-bridge chip is out.

An L298-based shield, on the other hand, will allow you to drive up to 2 amps per h-bridge (of which there are two on the chip) - so you would think that would be enough...

In actuality, it's likely not. Generally, you want your h-bridge to have 15-20 percent over-capacity for the stall current capability; in this case, you'd want your bridge to be able to supply upwards of 2.4 amps; at only 2 amps for the L298 - you may easily trip over into the current limiting mode. Furthermore, most of those shields don't have any where near adequate heat sinks to be able to drive them at max current

There is a possible solution, though - a single L298 can be run in parallel mode - to allow you to draw up to 4 amps of current from it (but only running a single motor). You'll still need a good heatsink, though. Also - you'll need to find a shield that has two L298 chips on it (likely the surface-mount variant), and still allows you to run them in parallel. If you can't find such a beast (although I seem to recall one vendor offering such a thing) - then purchasing two separate non-shield L298 driver boards (they are sold all over Ebay and elsewhere), and using them in parallel mode (with a proper heatsink) - should work well.

Or, you can go to Pololu (or another vendor) and look into purchasing a more capable h-bridge motor driver (likely one based on mosfet technology).

I have the motor shield from arduino with the L298P. The max current according to the datasheet (motor shield) is 2A per channel. I had previously checked the datasheet for the motors (the same link) and the current at the rated load is <269mA for each motor (if I am understanding it correctly). Any suggestions on a motor shield that could reliably drive those motors?

I think you'll be ok, but like cr0sh said, pololu has some nice motor shields for higher currents.

elecrostudent:
I had previously checked the datasheet for the motors (the same link) and the current at the rated load is <269mA for each motor (if I am understanding it correctly).

You are understanding that correctly - that at “rated load”, the current draw is that low. However, that isn’t how you select an h-bridge. To properly select an h-bridge, you want to have the h-bridge be able to supply at least (and a bit more) than the stall current. For those motors, that would be 2 amps, at least according to the graph on the datasheet. You might think you’ll never hit the stall current - until you do, and your h-bridge goes “poof” (although, in the case of the L298 - it likely won’t go “poof” - it will just go into thermal protection mode when it overheats).

You could try it and see; it may work great. I’m just trying to inform you about best practices based on the specs.

As far as a good h-bridge for your motors:

That would probably work extremely well for your application; you may not even need heatsinks for the chips…

I just checked the Pololu link and it seems like that is a better idea. The datasheets for the Dual MC33926 however have left me a little confused as to how this shield should be connected to the Arduino MEGA 2560 (any ideas?). I briefly compared both the pinouts and datasheets (for the arduino mega and the pololu dual H-bridge shield) but haven't had time to get in depth with either yet The code has been written with a GUI (for driving controls) and it all works right now with my test motors, however they are not the motors on the chasis.

I was thinking that since the operating voltages range from 6V to 12V, maybe it would be possible to make 9V a "safe" operating voltage to reduce the current as well as lowering the PWM numbers for output (not sure if that would make any difference though). I am pretty sure this would make the speed slower and that is ok for me but I am unsure if this would affect the current draw.

I ordered the chasis today but don't think it will be here for a few weeks.

Once again thank you for your input. It has opened my eyes to factors I had not yet considered.

After a few more hours of research I have just ordered this one:

http://www.pololu.com/catalog/product/2503

Seems like a decent choice.

elecrostudent: Seems like a decent choice.

They seem to provide an Arduino library; if you run into any trouble, though - they should be able to help out, or you can always ask here.

Something I wanted to mention, in regards to why you should select an h-bridge with a current rating greater than the "stall current" of the motor:

The stall current of a motor isn't just the amount of current the motor will draw when it is completely stalled out (that is, it has a load on it greater than the shaft can move while energized) - technically, a motor is considered "stalled" when it is at rest, prior to any current being drawn. That is, when the motor does not have power applied to it, then power is applied - it is in a "stalled" condition - and will, for a brief moment, draw it's stalled current level. Then it quickly (unless it is truly stalled) drops in current need as it begins to rotate.

Thus - you need to size your h-bridge for the stalled current. For an h-bridge with thermal overload (or other over-current cut-out) protection, this may not be a large issue; but if you had an h-bridge that didn't have such protection - even if it never hit a "true stalled" condition, just the "start up" stall condition could be enough to blow the h-bridge, or at least seriously degrade the output components so that they might fail sooner than they should.

I appreciate the guidance and am anxiously awaiting the Pololu Dual MC33926 Motor Shield. I have already downloaded the Arduino library for this shield and have begun to work on a new code.

I had another thought though. What if I piggy backed a second Arduino Motor Shield (L298) and ran each motor through different shields. Motor A would be on the first shield and motor B would be on the second shield and fed both shields through the same voltage source?

Shouldn't that supply both motors with up to 4A each (for the stall curret at 2A)?

Just trying to think of alternative possibilities in case the motor code for the new shield (Pololu) turns out to be incompatible, or more complicated than I am expecting it to be, with the GUI code I already have working (running the two test motors).

elecrostudent: I appreciate the guidance and am anxiously awaiting the Pololu Dual MC33926 Motor Shield. I have already downloaded the Arduino library for this shield and have begun to work on a new code.

You'll probably be fairly happy with it - Pololu makes some nice stuff.

elecrostudent: I had another thought though. What if I piggy backed a second Arduino Motor Shield (L298) and ran each motor through different shields. Motor A would be on the first shield and motor B would be on the second shield and fed both shields through the same voltage source?

Shouldn't that supply both motors with up to 4A each (for the stall curret at 2A)?

In theory you could do that - in practice it may not be that easy; it would depend on how the pins are arranged (if they could be shared) - or if you would have to modify the boards in such a manner to re-route the pins so they could be stacked and shared. On top of that, you would need to make sure the boards were using the SMT version of the L298 - and be able to fit a heatsink on it - and be able to move enough air between the boards (for the middle board mainly) so that the heatsink would work properly (and not heat up and damage the board above it!).

You'd probably be better off using a couple of these style L298 modules:

http://yourduino.com/sunshop2/index.php?l=product_detail&p=127

(note: that shop is run by a long time member of this forum named Terry King - so don't be afraid to shop there)

...and wiring them up separately to the pins you want; you may still need to verify (and perhaps modify) the boards to run the L298 on them in parallel, but they are likely much easier to do this to than the shields would be.

elecrostudent: Just trying to think of alternative possibilities in case the motor code for the new shield (Pololu) turns out to be incompatible, or more complicated than I am expecting it to be, with the GUI code I already have working (running the two test motors).

Certainly - always a good thing to have a plan "B" (and "C", and "D", and...)! :D