Go Down

Topic: Do i need capacitors (Read 9295 times) previous topic - next topic

zaxarias

Hi all, my system consists of an arduino Uno, a motor driver, a Bluetooth module, a distance sensor an LCD and a servo motor..
Arduino is powered through a 9V battery and the motor driver with 12V battery... Bluetooth, LCD , distance sensor are powered from arduino's 5V, while DC motors and servo motor through the motor driver.. My question is: Do i need capacitors to protect the system from noise, surges ,spikes and generally make power more smooth ? Or it's ok if i don't use???.. If i have to use, in what components shall they be used? Or can i use one capacitor as "main" in the 5V line ? If you need more details please let me know .. Thanks a lot !!!!  :D :D :D
z.p

retrolefty

Quote

Arduino is powered through a 9V battery and the motor driver with 12V battery... Bluetooth, LCD , distance sensor are powered from arduino's 5V,


Your main problem is that a small 9 volt battery will never be able to supply enough current for those devices, not enough current capacity. Even with a proper battery with enough current you will still be limited by the arduino 5V current capacity to power that much external stuff. You will need to use an external +5vdc power source with enough current capacity for all that stuff. How much current? Can't say without looking at the datasheets for each of the external devices to see what they require.


zaxarias


Quote

Arduino is powered through a 9V battery and the motor driver with 12V battery... Bluetooth, LCD , distance sensor are powered from arduino's 5V,


Your main problem is that a small 9 volt battery will never be able to supply enough current for those devices, not enough current capacity. Even with a proper battery with enough current you will still be limited by the arduino 5V current capacity to power that much external stuff. You will need to use an external +5vdc power source with enough current capacity for all that stuff. How much current? Can't say without looking at the datasheets for each of the external devices to see what they require.



Thanks for replying.. Let me tell you again, only distance sensor , Bluetooth and LCD are powered through arduino, nothing else..It's certainly not "too much staff".. Arduino's current consumption,with everything on and working, is a total maximum of 100mA(measured with a multimeter). So my problem is not the battery, it's if i do need capacitors to protect my system..
z.p

polymorph

A small 9V battery isn't up to putting out 100mA for very long. And they just aren't meant to supply that much current for any length of time. So the voltage is going to drop off much more quickly than the mAh ratings might indicate.

http://www.powerstream.com/9V-Alkaline-tests.htm

So, yes, the problem may very well be your battery.

Yes, you should have bypass capacitors around the circuit.

http://www.vagrearg.org/content/decoupling

Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Grumpy_Mike

To answer your question:-
Quote
Do i need capacitors to protect the system from noise, surges ,spikes and generally make power more smooth ?

Yes you always need capacitors.

zaxarias

#5
Jul 19, 2014, 12:25 am Last Edit: Jul 19, 2014, 01:01 am by zaxarias Reason: 1

A small 9V battery isn't up to putting out 100mA for very long. And they just aren't meant to supply that much current for any length of time. So the voltage is going to drop off much more quickly than the mAh ratings might indicate.

http://www.powerstream.com/9V-Alkaline-tests.htm

So, yes, the problem may very well be your battery.

Yes, you should have bypass capacitors around the circuit.

http://www.vagrearg.org/content/decoupling



Thanks for replying,
once again i don't have problem with my battery and i don't need my system to run for a long time..so i a m ok with that :D :D
Nice article about the capacitors!!! Can i have more details about the wiring of the capacitor?
Also, should i add a capacitor to each component or just to the power supply?


Grumpy_Mike thanks for replying  :D

For example ,this is how we should wire the capacitor ? https://learn.adafruit.com/adafruit-arduino-lesson-14-servo-motors/if-the-servo-misbehaves
z.p

polymorph

#6
Jul 19, 2014, 01:21 am Last Edit: Jul 19, 2014, 01:24 am by polymorph Reason: 1
As the article says, the capacitors act a bit like mini-UPSs to maintain voltage to things that draw current in spikes.

So anything that is electrically noisy. Motors, of course. CMOS ICs draw current in spikes at each change of state of a gate, so they need bypass capacitors. As close to the offending component as possible.

Someone here has a page on the proper application of bypass capacitors, and I don't recall who.

In general, larger value capacitors (10uF and up) work better at lower frequencies while not working well at high frequencies due to increased internal parasitic inductance and series resistance. Where lower value capacitors (0.1uF and below) don't work as well at lower frequencies, but get better at higher frequencies due to less internal parasitic inductance and series resistance.

Edit - sorry that is so big, I've downloaded and resized, see it attached below in a more reasonable size.


http://www.planetanalog.com/document.asp?doc_id=527551

This one goes into a bit more detail, note that sometimes you get unwanted interaction between bypass capacitors:

http://www.intersil.com/content/dam/Intersil/documents/an13/an1325.pdf

It is important to pay attention to where the ground lines run, too, not just Vcc.



As to your 9V battery, are you monitoring the voltage? It can sag under load to the point that Vcc can no longer be maintained at 5V.

Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

zaxarias

#7
Jul 19, 2014, 01:32 am Last Edit: Jul 19, 2014, 01:59 am by zaxarias Reason: 1
Yes i ve monitored the voltage, never less than 4.95V.. So you suggest me add capacitors to the servo motor and the DC motors?
I power arduino through the barrel jack, does it need a capacitor before that ? Is it a good idea to add a capacitor to the Bluetooth module ? Thanks again !!

Also, because the DC motors are mounted, and i don't really want to take everything apart, can i do something like the photo attached ? place the capacitors right to the motor driver's output A and B..
z.p

MarkT



It is important to pay attention to where the ground lines run, too, not just Vcc.




All of those 6 images are poor as the traces between IC pins and decoupling
capacitor are narrow signal traces, not low-inductance wide traces.   This is
more important than where you route the wires to the regulator, there must be
as low-inductance a path from chip to the fast decoupling cap as possible.  At least
they are short traces, but it shows a lack of understanding of Maxwell and Heaviside's
equations...

Also its perfectly fine to use planes in place of traces for GND and/or Vcc.  Planes
are as low-inductance as you can get!
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

zaxarias




It is important to pay attention to where the ground lines run, too, not just Vcc.




All of those 6 images are poor as the traces between IC pins and decoupling
capacitor are narrow signal traces, not low-inductance wide traces.   This is
more important than where you route the wires to the regulator, there must be
as low-inductance a path from chip to the fast decoupling cap as possible.  At least
they are short traces, but it shows a lack of understanding of Maxwell and Heaviside's
equations...

Also its perfectly fine to use planes in place of traces for GND and/or Vcc.  Planes
are as low-inductance as you can get!

Can you please take a look at the image i posted on my previous post and tell me if i can wire the caps that way ? thanks a lot !!!
z.p

Grumpy_Mike

You can place them like that but they won't do as much good as if you soldered them on the motor.

Those capacitors you show are polerised, that is no good if the motor can change direction.

TomGeorge

Hi, I hate to repeat what everybody has asked, but , what SIZE is your 9V battery?

A picture of your project would help us to see what you have and provide accurate information.

Tom..... :)
Everything runs on smoke, let the smoke out, it stops running....

zaxarias

#12
Jul 19, 2014, 12:14 pm Last Edit: Jul 19, 2014, 12:17 pm by zaxarias Reason: 1

Hi, I hate to repeat what everybody has asked, but , what SIZE is your 9V battery?

A picture of your project would help us to see what you have and provide accurate information.

Tom..... :)

6*AA ALKALINE batterries.. I rarely run the project on batterrties, most tests happen on usb..
I wikl post a picture later on the day..

Grumpy Mike, so its better to solder them on the motor, what capacitors should i use then??


Thanks a lot
z.p

Zapro

Ahh, a battery-holder with 6 AA-cells. That is much, much better than a 9-volt block battery that we thought you were using.
Like this: http://en.wikipedia.org/wiki/Nine-volt_battery

Actually, you could do yourself a favor. Only put 5 batteries in the holder, then you will not waste as much power in the voltage regulator on the Arduino, and your batteries will actually last longer! - Solder a wire across one position in the battery holder, or make a "dummy" battery out of a dowel wrapped in tinfoil, or whatever you can come up with.

// Per.

Grumpy_Mike

Quote
so its better to solder them on the motor,

Yes, as a rule it is best to get it as close to the source of interference as possible.
You need both a 0.1uF ceramic capacitor for high frequencies and a large one for the low frequencies. If the motor runs in both directions you need a non polarised  capacitor, otherwise an electrolitic will do. The larger the better.

Go Up