I am using this(also below in question) circuit to drive a motor, and I heard I should put a decoupling cap in there to smooth out voltage spikes. I have been told to put it close to the ic, and I have also been told not to put it in front of the ic, but between the battery terminals. Where should it go? Here's an image of how I have it worked out on the breadboard: http://dl.dropbox.com/u/10949404/P1010135.JPG


schematic for motor driver IC

  • 3
    \$\begingroup\$ Don't put the same logic level on A & B or the motor will break :o} \$\endgroup\$
    – MikeJ-UK
    Apr 8 '11 at 7:46
  • \$\begingroup\$ I haven't. I have been switching each from high to low every fifteen seconds to change the direction though. \$\endgroup\$ Apr 8 '11 at 11:41
  • 2
    \$\begingroup\$ Sorry for my poor wit - I was just joking about the spelling of brake (break) in the truth-table :) \$\endgroup\$
    – MikeJ-UK
    Apr 8 '11 at 12:05
  • \$\begingroup\$ @MikeJ-UK my first thought when I saw the truth table was "Who would ever design a chip that forces you to always have 2 pins inverted of each other or a motor breaks." Then I realized what it was trying to mean. \$\endgroup\$
    – Kellenjb
    Apr 8 '11 at 14:26
  • \$\begingroup\$ Ohhhh. Now I get it. lol. \$\endgroup\$ Apr 8 '11 at 20:35

You probably want the cap on (or near) the motor. The main purpose of the cap, there, is not to protect anything from ripple current, since neither the motor nor (probably) the output side of the IC, is particularly sensitive to it, but rather to reduce the stray rf caused by the commutation of the motor. Placing the capacitor near the motor means only a short region of the leads between the driver source and the motor is experiencing much ripple, and so there's less rf interference.

As for other places to use smoothing capacitors, the best option is to just hook everything up, turn it all on, and probe around sensitive areas (IC signal and power inputs, mainly) with an Oscilliscope and add enough capacitance to drop undesirable ripple to a few millivolts (or whatever the circuit requires).

  • \$\begingroup\$ Ok, if I am switching the polarity back and forth to make the motor turn differently, should I add two near the motor? One on each wire? Also, are there any cheaper alternatives to an oscilloscope? \$\endgroup\$ Apr 8 '11 at 1:30
  • \$\begingroup\$ No, you should use only one capacitor, with each lead attached to one pole of the motor. \$\endgroup\$ Apr 8 '11 at 1:36
  • 2
    \$\begingroup\$ I would also put bypass (0.1 uF) caps next to each power supply pin of the chip connecting from that pin to ground. It wouldn't hurt anything to have larger electrolytic caps at the point where power leads reach your (proto) board either. \$\endgroup\$
    – RBerteig
    Apr 8 '11 at 1:41
  • 2
    \$\begingroup\$ @TokenMacGuy, if he was told to put it at the battery terminals or at the IC he is talking about power decoupling for the IC. This should not be placed near motor(although a cap there is good), it should be placed near the IC it is decoupling for. \$\endgroup\$
    – Kortuk
    Apr 8 '11 at 1:47
  • \$\begingroup\$ So the new circuit would look like this? Sorry for bad schematic: dl.dropbox.com/u/10949404/schem.jpg \$\endgroup\$ Apr 8 '11 at 2:21

It depends on what you're trying to do with the caps. It sounds like you've just been told to use them, but not why or how. Generally you want to have a capacitor (or several, probably one's fine for you) to decouple the supply pins from the chip the supply is powering (the load). This "smooths" out the voltage response of the supply. This is why some people refer to them as smoothing capacitors. You do this because the supply voltage will change based on the demand the circuit is putting on it. When your circuit tries to draw more current, the supply cannot react immediately to the extra demand so the voltage it is supplying drops. A decoupling capacitor will charge when you turn the circuit on and will discharge during these load changes to counteract the supply's drop in voltage.

If you're trying to reduce noise from the motor, then do as TokenMacGuy says.

The best thing to do is to scope the voltage between your supply pins (8 & 16) and between each supply pin and ground as you operate the circuit and see if you're getting more than a few tens of mV of ripple. If you are, place a 0.1uF cap across the offending pins as close to the pins as you can, and re-measure to confirm the reduction in noise/ripple.

If you don't have a scope and can't borrow one, just put one 0.1uF cap across the supply pins (so between pins 8 & 16), and one each between pin 8 and ground and between pin 16 and ground. Again, try to get them close to the pins on the chip. The supply header on the edge of the board might be a good place to make those connections.

Make sure that in any case you pay attention to the voltage ratings of your caps and what voltage you're placing it across.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.