How Do You Use a Motor Driver?

Okay, so I recently got an Arduino uno, a Twin-Motor Gear Box, some other stuff for Arduinos, and a Dual Pololu Motor Driver. I was told I needed the driver. How do I use this?

I'd assume you are using DC motors, which means the "that dual controller" is what is known as an H-Bridge. Basically, it's the device that allows you to operate the motors in different directions, etc... kind of like an electronic transmission (okay guys, I know.. but the idea works).

There will be a datasheet on the Polou site, which will give you the hookup diagram for whichever particular chip you purchased.

The driver provides heftier transistors that can switch higher voltages & currents for your motors.
Do you have a link to one you have?

Hey focalist, how you doing? When will this rain stop, its gonna wash away all my new dirt & grass seedlings ...

Fair.. kids stuck inside too, son's been practicing drums for several hours today. He's pretty good, but.. well, it gets thin after the first two hours, no matter how good it is, hehe. You back in the mainstream workforce again, or still freelancing?

Been laid up off and on for a couple of weeks now, even more stupid than usual-- threw a kidney stone so on heavy stuff. This in time shall pass, lol...however the "duhhhh" factor of the meds cost me a 328 because of a foolish mistake. Might just have to grab a few off Newark while they are still on sale.

At the moment, I'm putting together a version of the whiteboard/wall plotter thing with "real" parts.. the UL2003's and the steppers are for that. Sweet little steppers.. not overly fast, but darn accurate and dirt cheap. Still a few software things to tweak, but it's a nice challenging project that keeps me coming back...

I wanna see a Bobduino!

Hey by the way, these guys are local in Kingston, MA- I've had regular mail delivery from them in 2 days. http://stores.ebay.com/thaishine

Yeah, back in the workforce. Got a job with engineering supoport services company, based on TN with local office in Bedford, turns to have several hundred folks at Hanscom. Drive up is the pits, 35-40-45 minutes, goes pretty smooth until the 2-3 miles along Rt 2 before 2A splits off. Same coming home, gotta make sure I get off by Emerson, or sit in slow traffic the rest of the way to Acton.
Took this week off, been working on the fencing club all week.
Masked & painted the walls, polyurethaned the floors, rehung all the scoring machines & secured the wires. Still working on a method to put strip outlines on the polyurethane, looks like we may have to go with darker polyurethane over the lighter wood, nothing else seems to stick well. Masking the stripes also difficult due to the OSB being not perfectly smooth.
Got some shots on my new club facebook page.

Got one more area to put polyurethane down, near the door (so we could actually leave!) Will do that tomorrow, then put everything back in place for Summer Programs that start Monday. Been a long week! Lot of climbing up & down 8' ladder to reach 12' paint line.

Newark still same price $3.42 for 1, $2.93 for 10+.
I bought 20 DIPs and 10 flatpacks. Fast delivery too, showed up today.

Bobuino - will have to do with this until the PCBs come in! All the parts & the PCB stencil are here, just nothing to mount them to!

1:15+ drive down I-495 - suppose they do any walk-in business?

Here's the link:
http://www.robotshop.com/pololu-dual-dc-motor-driver-1a-4-5v-3-5v-tb6612fng.html

Have you looked at the data sheet? If you look on the polou page under "useful links" for the item, there's the doc:

http://www.robotshop.com/content/PDF/Overview-713.pdf

It's good for at least an Amp per channel, so it should handle most small motors fine. The digital control inputs go in on the left, the outputs and feed for the motors on the right... you don't need any external transistor or anything because your motor falls within what the chip can handle on it's own.

Crossroads--- is the new place up there behind Kennedy's?

Hello Focalist. I'm new at electronics, and I can't really understand the data sheet. Could you explain what I need to do to make this work?

GND and VCC are ground and +5 respectively.

AO1 & 2 are Outputs, these are the wires for motor #1
BO1 & 2 are the Outputs for motor #2. These get connected to your motors.

Ain1 & 2 are the inputs from the arduino for motor #1
Bin1 & 2 " motor #2

STBY should connected to +5, it's an enable signal.

Unless you are using PWM you don't need to worry about the PWMA and PWMB pins.

Vmot is the power supply for the motors- I'd use batteries or a wall wart, you really shouldn't pull motor power over that 5v regulator on the Arduino in my opinion.. if you want a regulated voltage for the motors (no reason to in you case), then use an external voltage regulator to protect the Arduino...and don't forget to connect the grounds.

Okay, let me make sure I understand what to do correctly. So you connect A01 and A02 to the motor, and connect Ain1 and Ain2 to the Arduino (one of the pins and ground?) Also what's +5?

Sorry for how bad this drawing looks, but could you tell me why it doesn't work? And I'll be powering the Arduino self with 3 AAs.

EDIT: Answer the question according to the picture below.

Sorry, that last picture didn't work. Here's my diagram:

Focalist,
Yes it is :slight_smile:
Been busy painting walls & polyurathaning floors.
Moving stuff back in place tomorrow for Summer Programs starting on Monday. I think over the next several weekends we'll tape out strips and start putting outlines on the floor.

Could you help me?

You are not connected properly yet.

You need D8, say, connected to AIN1
You need D9, say, conneced to AIN2

You need VMot connected to your motor supply+, seperate from the 3 AAs for the Arduino.
You need the motor supply - (or ground) connected to Arduino ground (GND).
You need VCC connected to Arduino 5V (which will also be connected the + of the three AAs).
You need the controller ground connected to Arduino ground.

Arduino has 3 GND pins, they are all ground and connected together.

  • from the 3 AAs goes to Arduino 5V, - goes to Arduino ground.
    The Batteries will not be connected to the Power Jack, you will be bypassing the reverse polarity protecion diode and the 5V regulator - make sure the battery- goes to arduino GND, and battery+ goes to the 5V pin on the power header.

Now, when AIN1 is commanded High (digitalWrite 8, HIGH;) and AIN2 is commaned Low (digitalWrite 9, LOW;)
the motor will spin one direction. 8 Low and 9 High will spin the other direction. They will always be used in opposition like that, or both Low for no motor spin.

STDBY Connected to 5V also, or can be another Arduino output that you command High to enable the board to drive the motor when AIN1/2 are High/Low or Low/High.
Make sense?

First off, thanks for the help. I followed your instructions, but I decided to just to let the Arduino be powered by the computer. Here's what I did, and it didn't work. Please help

Powering Arduino from USB connection is fine.

You are missing connections still.
AIN2 needs to be connected. Standby needs to be connected.
Gnd on the pololu board needs to connect to arduino Gnd.
I can't tell if you have + and - from the motor battery connected; it appears that Battery (motor) GND connects to Arduino GND and to VMOT.
VMot needs to connect to Battery (motor) +.

What should be connected to AIN2? Also, red is usually positive right? So red is positive on my battery pack,then it's connected to the right place.

Ain2 needs to connect to an arduino output pin.
You need Ain1 Hi and Ain2 Lo for the motor to spin one direction
and
Ain1 Lo and Ain2 Hi for it to spin the other direction.

If you are only spinning 1 direction, you could have used a single transistor as a driver instead.