Capacitors and motors

Hi,
I am trying to build a robot tank with the motor driver Sn 754419ne. So my motor is a 6-12V motor, and I am using a power supply of 6V( 4 AA batteries). So I hear that I should attach a capacitor of 0.1u. My question is what does the capacitor do and how am I supposed to connect it to the motors( Do I connect it to the 2 little terminal on the motor?)
Thanks

I found this, does a better job than what I could explain until I looked it up to reassure myself

As the motor rotates, there will be positions where the commutator connects and disconnects the motor coils. These will produce sudden changes in motor current (much too fast to measure on a meter) which cause interference to radiate from the motor wires. This would cause crackling on nearby AM radio and could pick up on a nearby audio amplifier.

The capacitor acts like a small reservoir which helps to even out the spikes in current and reduce the interference. It plays no part in the operation of the motor itself, it is there just to kill the interference it creates.

( Do I connect it to the 2 little terminal on the motor?)

that is where they usually end up too keep the component closest to the problem

Also, does it matter if I use a ceramic or aluminum capacitor. Because I noticed the ends of the aluminum are different size. And finally, is it mandatory for a motor short term?

you want a ceramic in that situation, and no its not mandatory for hooking up a motor and playing with it

I found this

That was written by people who have never had the chance to put a current probe in there to see what their nice advise is doing, :slight_smile:

You need a diode there, and if you have to put a capacitor there, put a little resistor there as well (to form a dampening network).

But my motor driver already has internal diodes in it. Also, do I put a resistor across the motor terminals where the capacitor goes?

You want to at least put a capacitor across the terminals of the motor. This is to filter out the motor noise. Some applications also put a capacitor from each motor terminal to the motor can to give further noise suppression. Depending on what else is in the circuit this would help keep motor noise out of other sensors.

No resistor across the motor.

The diode won't work for a reversable motor. In reverse the diode would act like a short circuit.

Also - keep your motor wires seperated from sensor wires, a little space does wonders for reducing the induced noise. If motor wires must cross sensor wires do it at an angle of 90 degrees.

Thanks for the diodes warning, I knew it was an odd idea putting diodes in the circuit. Also, what is the "sensor" that you are talking about?

You mentioned that this was for a robot so I just figured you might put some typr of sensor for detecting walls or other objects.

Oh im sorry, I am not going to put a sensor, im just trying to get two motors running for now. Thanks for the tips though!