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

Quote

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.

Quote

( 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

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.