Motor Shield Capable of Driving 5 DC motors?

Hi Everyone,

I'm in search of a motor shield that would be compatible with the Due that is capable of Driving 5 DC motors that opperate on 12 to 24V. I found one from Adafruit capable of controlling four DC motors at 4.5VDC - 25VDC. The link below contains information on the DC motors that are being used. I wouldn't call it a datasheet, as it is very limited in information, but has enough to determine what type of motor shield I'll need. As far as a solid datasheet goes, I've used search engines with the serial number in hand, called the manufacturer (Pittman), and offered compensation for a datasheet from Pittman, and did not get a response. The motors are on a SCARA robot that was used by the University back in 70's, so info is a bit tough to find. Thanks for the help in advance.

http://www.rhinorobotics.com/xrencoder.html

-Jeff

Using the SCARA motors, which have a 5.54A theoretical current draw at stall?

That's the real kicker right there. A motor shield is really nothing more than an H-bridge and associated support components. If you are handy with perfboard, you could build one yourself. I tend to use TA7291S (in a freindyl SIP package), but these are rated at 1.2A max. Putting two in parallel would handle 2.4A, and so on (starting to get pricey though.)

I would look for H-bridge ICs that can handle up to 6A. I have no idea how easily you would find one. The other option is to build 5 h-bridge circuits that can handle that load by hand or find a battlebot style board.

I am suggesting this because I am not aware of an existing shield that meets your specifications. If you do find one that drive that current, but only has a few outputs, you can usually stack shields.

Personally, I would just build my own. YMMV

Thanks! After looking more for shields that are capable of the specifications, I still cannot find one. I've found a few H-Bridge IC's capable of handling 6+Amps, but I have no idea where to begin on building my own H-Bridge circuit. Are the "support components" you mentioned absolutely necessary if I buy my own parts to build 5 H-Bridge circuits or can I just wire up the motors & Arduino Straight to the H bridges?

Thank you,

-Jeff

If you use H-Bridge ICs, they may already have flyback diodes installed. If they do not, they are a smart thing to add. Other than that, the IC really doesn't typically need anything extra. For my TA7291S chips for example, you have IN1 and IN2 which control forward or reverse, and you have OUT1 and OUT2 which you wire up to your motors. These also have the flyback diodes built in. Look at the datasheet for a "typical application circuit." I attached it.

The S comes in a really compact SIP package which I find nice to work with. You would need one for each motor. The L298 ICs are quite different, but they do have two H-bridges in them, so you can control 2 motors with one IC.

However, since these cannot handle 6A directly, point me to some of the ones you found and I might be able to give you a hand with putting the circuit together.

TA7291S H-Bridge IC.pdf (307 KB)

I've not seen any shields that can handle 6A per channel but I have found boards that are relatively easy to wire up over at Pololu.

Retroplayer:
If you use H-Bridge ICs, they may already have flyback diodes installed. If they do not, they are a smart thing to add. Other than that, the IC really doesn't typically need anything extra. For my TA7291S chips for example, you have IN1 and IN2 which control forward or reverse, and you have OUT1 and OUT2 which you wire up to your motors. These also have the flyback diodes built in. Look at the datasheet for a "typical application circuit." I attached it.

The S comes in a really compact SIP package which I find nice to work with. You would need one for each motor. The L298 ICs are quite different, but they do have two H-bridges in them, so you can control 2 motors with one IC.

However, since these cannot handle 6A directly, point me to some of the ones you found and I might be able to give you a hand with putting the circuit together.

Hi RetroPlayer,

Thanks again. I found http://www.ti.com/lit/ds/symlink/lmd18200.pdf this H-Bridge. I did see on the datasheet that it has a built in protection diode. It looks like it can handle the amount of current & voltage that is required. It has a continuous output current of 3.0A with a peak output current of 6A. Since the motors have a max peak stall of 5.54A, I figure this will be suitable. Although these would be $75 for five, I'm willing to drop the money if this is my only option. Would I be able to just buy these with no extra circuitry/design and connect them to the arduino & motors?

It looks like you would only need a few common components to get that H-Bridge running. The examples show a PWM chip being used, but if you will be using the PWM from the arudion, you don't need that. The bootstrap caps are necessary. Depending on whether you wish to use the current sense output, it looks like you may need a few more common components.

I have learned one thing from looking around at these.... I am in the wrong business. Good Lord on these prices. Ridiculous!

Retroplayer:
It looks like you would only need a few common components to get that H-Bridge running. The examples show a PWM chip being used, but if you will be using the PWM from the arudion, you don't need that. The bootstrap caps are necessary. Depending on whether you wish to use the current sense output, it looks like you may need a few more common components.

I have learned one thing from looking around at these.... I am in the wrong business. Good Lord on these prices. Ridiculous!

Ha! No kidding on the prices! I can get the bootstrap caps and necessary resistors (for the current sense output) from one of the labs at the university. Another question though, what is the current sensing actually there for? I read on the datasheet that the LMD18200 uses sinking and sourcing outputs. Does the statement (below) from the datasheet just mean that the current sensing pin is used for sourcing? I guess what I'm really trying to ask is why is pin 8 there and what purpose does it serve?

"USING THE CURRENT SENSE OUTPUT
The CURRENT SENSE output (pin 8) has a sensitivity of 377 mA per ampere of output current. For optimal accuracy and linearity of this signal, the value of voltage generating resistor between pin 8 and ground should be chosen to limit the maximum voltage developed at pin 8 to 5V, or less. The maximum voltage compliance is 12V. It should be noted that the recirculating currents (free
wheeling currents) are ignored by the current sense circuitry. Therefore, only the currents in the upper sourcing outputs are sensed."

Guessing - I haven't used one, but I'd assume that the current sensing pin gives you the opportunity to measure the current the motor is pulling, on the arduino by using analogread and doing a little math. This would let you detect when your motors are stalled.

wildbill:
Guessing - I haven't used one, but I'd assume that the current sensing pin gives you the opportunity to measure the current the motor is pulling, on the arduino by using analogread and doing a little math. This would let you detect when your motors are stalled.

Yes, that is typically what it is used for. It is also used for torque feedback, which some applications require.

Retroplayer:

wildbill:
Guessing - I haven't used one, but I'd assume that the current sensing pin gives you the opportunity to measure the current the motor is pulling, on the arduino by using analogread and doing a little math. This would let you detect when your motors are stalled.

Yes, that is typically what it is used for. It is also used for torque feedback, which some applications require.

Ok, sweet. Thanks a lot guys!

The short answer is that if you don't need it, don't use it. But it may be required to terminate it. Check the datasheet for that.

Retroplayer:
The short answer is that if you don't need it, don't use it. But it may be required to terminate it. Check the datasheet for that.

RetroPlayer,

I got my H-Bridge in and got it all wired up to the arduino, motor and external supply. I decided not to use the current sense pin (pin 8) or the thermal flag ouput (pin 9), as I have no use for them in this project. Since I'm not going to use it, I first tried my test program with pin 8 & 9 NOT connnected to anything. The program compiled with no errors, but I got no movement with the motor. I then tried connecting the current sense output pin to ground with a 2.7kΩ resistor between the connection and ground (see pg 6 on the datasheet, as it shows a test circuit example schematic), still nothing. I have yet to try to connect the thermal flag output to anything, as I figured it really shouldn't affect the program working properly. I've checked over my circuit to make sure all the connections are correct multiple times. Is something wrong with my code that it's not running properly? (Keep in mind that the only coding that I ever really mess with is assembly for one of my classes and ladder logic for PLC's, so I'm not the best with this C++ based stuff). My code is as follows:

int pwmPin=4;//defines PWM input to LM18200
int dirPin=5;//defines direction input to LM18200
int brkPin=6;//defines break input to LM18200
int speed=127;//defines the speed of the motor (half speed)

void setup()

	{

	pinMode(pwmPin,OUTPUT);
	pinMode(dirPin,OUTPUT);
	pinMode(brkPin,OUTPUT);

	}

void forward()

//Necessary conditions to drive the motor in the forward direction
	{

	analogWrite(pwmPin,speed);	//Sets speed of motor by PWM
	digitalWrite(dirPin,HIGH);	//Direction pin goes HIGH 
	digitalWrite(brkPin,LOW);	//Brake pin is disabled 

	}

void reverse()

//Necessary conditions to drive the motor in the reverse direction

	{

	analogWrite(pwmPin,speed);	//sets speed of motor by PWM
	digitalWrite(dirPin,LOW);	//Direction pin goes LOW, causing motor to turn opposite direciton
	digitalWrite(brkPin,LOW);	//Brake pin is disabled

	}


void brake()
//Necessary conditions to short the motor terminals and "brake" the motor

	{
	analogWrite(pwmPin,speed);
	digitalWrite(dirPin,HIGH);
	digitalWrite(brkPin,HIGH);
	}

void loop()

	{	
	forward();
	delay(4000);
	brake();			//Brakes inbetween directions to avoid immediate direction chnge
	delay(500);
	reverse();
	delay(4000);
	brake();	
	delay(500);
	}

Any suggestions?
Oh and here's the datasheet again to keep from having to hunt it down in previous posts:
http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS010568.PDF

Thank you,
-Jeff F.

Which Arduino are you using? I ask because pin 4 is not a PWM pin on any Arduino that I have used. An analogWrite to that pin will do nothing.

Code looks fine, but just one thing...

void brake()
//Necessary conditions to short the motor terminals and "brake" the motor

	{
	analogWrite(pwmPin,speed);
	digitalWrite(dirPin,HIGH);
	digitalWrite(brkPin,HIGH);
	}

You should probably make that analogWrite(pwmPin,0) since you are shutting off the motor. Or just leave it out. Since you are braking, it really shouldn't matter, but it is just pointless to leave it like that.

It's the Uno (Soon to have a Mega 2560 subbed in for it for more pins). I'm sure that's exactly what my problem is though. I just overlooked the pin with the "~" symbol on it in my haste. I'm not at home right now, but I'll give it a whirl when I get back. And thanks for the advice on the (pwmPin, 0) portion! I've saved the adjustment.

Thank you,
-Jeff F.