Go Down

Topic: Common Grounds with capacitors and differing voltages (Read 1 time) previous topic - next topic

Vinterwoo

I am putting together a project that has a sensor requiring a 3.3 volt source, a LED, and a servo that requires 5 volts. I've also added in a 100uf cap to smooth out the servo (see attached diagram).

I've always been told to use a common ground with all of my Arduino projects, but I have a few questions concerning this project:

1- (Ignoring the CAP for now)...If the servo red wire is hooked up to the 5 volts, and the IR sensor is hooked up to the 3.3 volts- should I keep the ground wires separated (as pictured), or should I hook both of the ground wires to a common ground?

2- The Servo also has a CAP. If the CAP is wired up between the power and ground for the servo, can the servo share a common ground with the rest of the circuit? Or since it has the CAP does it need to remain separated, lest the CAP be affected by the rest of the circuit?

The circuit as pictured seems to work fine. I'm just wondering if I could/ if I should use a common ground for all of my components (with or without the CAP).



DVDdoug

Can we see a link to the datasheet for the IR sensor?  Is that black wire connected to ground (I can't tell exactly where it's plugged-in)?

Normally everything needs a "common reference" (ground).   For example, you can't measure battery voltage or get any current from a battery without two connections.   Although in some circuits, the IR sensor might have a series resistor to ground instead of the IR sensor itself having a direct connection to ground.

Or...  DON'T TRY THIS, but if you are completely insulated, you can touch the power line voltage in your house and you won't feel anything.   It's only if you have a ground or other return connection to "complete the circuit" that you get any current.    The power line voltage doesn't really exist, or it's meaningless without a reference.

Grumpy_Mike

#2
Nov 11, 2015, 10:36 pm Last Edit: Nov 11, 2015, 10:40 pm by Grumpy_Mike
Quote
should I keep the ground wires separated (as pictured), or should I hook both of the ground wires to a common ground?
Yes, you have drawn it with a common ground and you should have a common ground. The two ground pins on the Arduino are electrically the same place.

Quote
The Servo also has a CAP. If the CAP is wired up between the power and ground for the servo, can the servo share a common ground with the rest of the circuit?
It has to share a ground with the rest of the circuit in order for it to work.

Having said that you should never power a servo off the same 5V as the Arduino. At least not without a pi decoupling circuit like the last circuit in this link:
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Vinterwoo

Yes, you have drawn it with a common ground and you should have a common ground. The two ground pins on the Arduino are electrically the same place.
It has to share a ground with the rest of the circuit in order for it to work.

Having said that you should never power a servo off the same 5V as the Arduino. At least not without a pi decoupling circuit like the last circuit in this link:
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

I did realize the 2 ground pins are electrically the same place, so looks like my question is moot! Does this mean if I had another component plugged into 5 volt rail that the CAP would be regulating all the components in the 5 circuit?

As for the powering the servo off the same 5 Volts as the arduino board- in this example I have the Arduino plugged into a wall wart outputting 9 volts/ 650 mA. Are you saying I should have the servo on a separate power source even when my board is plugged into a wall power source?

Grumpy_Mike

While the cap smooths, not regulates, for all the components it is the one that is physically closer that gets the most benefit.

Yes it should be separate because of the interference the servo generates can upset the Arduino.

mrsummitville

#5
Nov 12, 2015, 12:38 am Last Edit: Nov 12, 2015, 12:40 am by mrsummitville
I did realize the 2 ground pins are electrically the same place, so looks like my question is moot! Does this mean if I had another component plugged into 5 volt rail that the CAP would be regulating all the components in the 5 circuit?

As for the powering the servo off the same 5 Volts as the arduino board- in this example I have the Arduino plugged into a wall wart outputting 9 volts/ 650 mA. Are you saying I should have the servo on a separate power source even when my board is plugged into a wall power source?
Technically, capacitors do not "regulate" voltage, they reduce ripple that may be present on the DC Voltage.

Correct, do not run motors from the On-Board 5 Volt Regulator.  Motorized devices should have their own power supply, with a common negative ground.  Motors are noisy.  You want a very smooth 5 Volts Supply to run the Arduino CPU.  The capacitor nearer the motor is a "good-thing".

Vinterwoo

While the cap smooths, not regulates, for all the components it is the one that is physically closer that gets the most benefit.

Yes it should be separate because of the interference the servo generates can upset the Arduino.
Thanks for the info. I can't rely on batteries, and I'd like to avoid having two separate wall warts (1 for arduino board, and 1 for the servo).

I'm running a SG90 micro servo:

http://akizukidenshi.com/download/ds/towerpro/SG90.pdf


Considering the load on the servo is minimal, is it possible for me to get away with running the servo from the Arduino 5v pin? Or do I really need a second power source for this servo (or use the pi decoupling circuit as Grumpy Mike mentioned)?

mrsummitville

Thanks for the info. I can't rely on batteries, and I'd like to avoid having two separate wall warts (1 for arduino board, and 1 for the servo).

I'm running a SG90 micro servo:

http://akizukidenshi.com/download/ds/towerpro/SG90.pdf


Considering the load on the servo is minimal, is it possible for me to get away with running the servo from the Arduino 5v pin? Or do I really need a second power source for this servo (or use the pi decoupling circuit as Grumpy Mike mentioned)?
Your wrote, "Considering the load from the servo is minimal"
From what I read, the Servo Stall Current is between 570ma and 730ma.
That is the opposite of "minimal".
And 4 Volts x 0.730 Amps = 3 Watts of heat the 5 Volt Regulator must dissipate.

And your AC Wall Adapter is only rated at 650ma ? ? ?




Vinterwoo

Your wrote, "Considering the load from the servo is minimal"
From what I read, the Servo Stall Current is between 570ma and 730ma.
That is the opposite of "minimal".
And 4 Volts x 0.730 Amps = 3 Watts of heat the 5 Volt Regulator must dissipate.

And your AC Wall Adapter is only rated at 650ma ? ? ?




This is the AC Wall Adapter I am using:

https://www.sparkfun.com/products/298


And I suppose this is where my inexperience come in, but when I say my load from the servo is minimal, I was referring to the fact that I'm not asking it to move anything heavy or act against resistance. Or for that matter to move for more than 5 seconds before I power it down (using detach() in my code).

Grumpy_Mike

Quote
Or for that matter to move for more than 5 seconds before I power it down (using detach() in my code).
That does not power it down.
If you want to minimise the current just don't ask it to move.

These forum pages are littered with cases of people driving a servo off the 5V power rail of the Arduino and it crashing the Arduino, or making it unreliable.

If you want to avoid the decoupling circuit then get another 5V regulator ( and capacitors ) and drive it off your single wall wart.

MarkT

One thing to be careful about - common ground means they are at the same voltage at
one point (typically the Arduino board here), but the wiring should not be shared between
sensors and high current loads - common the voltage, not the current.

The reason is that high current loads provide voltage noise across their ground and supply
wires since wires are resistors (fairly low value resistors, but resistors nonetheless).  This
means that voltage is "seen" by any analog sensor using the same ground or supply wire,
ie you have directly injected noise into your sensor circuit.

So run a separate pair of supply and ground wires from the Arduino to your sensors, not
shared with the motor supply, but meeting at the Arduino.

All power and supply wiring should ideally be twisted pair too - this reduces the amount of
EMI it radiates a lot.  Motor wires and motor supply wiring will radiate noise at the best
of time, using big open loops or wire rather than twisted pair makes this an order of
magnitude worse.  Shielding can also help (usually grounded at one end only is best).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Vinterwoo

That does not power it down.
If you want to minimise the current just don't ask it to move.

These forum pages are littered with cases of people driving a servo off the 5V power rail of the Arduino and it crashing the Arduino, or making it unreliable.

If you want to avoid the decoupling circuit then get another 5V regulator ( and capacitors ) and drive it off your single wall wart.
Part of the problem (at least for beginners like me), is that for every case of people asking about servos crashing their arduinos, there are 10 projects online with diagrams showing a servo directly hooked up to their board.

But thanks for the advice, it has been very instructional. My next project will involve 2 larger servos, so I will need to confront this problem then if not now. So in the end, I will probably end up just buying a motor shield to drive my servo. And either power that directly through a large battery pack, or through a wall wart plugged into my arduino.

Grumpy_Mike

Quote
So in the end, I will probably end up just buying a motor shield to drive my servo.
No you don't / can not power a servo through a motor shield.

Quote
is that for every case of people asking about servos crashing their arduinos, there are 10 projects online with diagrams showing a servo directly hooked up to their board.
Remember there is a lot of crap on line.

Vinterwoo

No you don't / can not power a servo through a motor shield.
Remember there is a lot of crap on line.
Ah Heck!

I picked this up last night:

http://osepp.com/products/shield-arduino-compatible/motor-servo-shield/


What's the point of selling a motor-servo shield that can't power a servo?

CrossRoads

Look at the Osepp schematic:
http://osepp.com/wp-content/uploads/2013/07/OSEPP_motor_shield_v1-0.pdf
"Servo power supply can be configured to source from the servo power terminal block or from the Arduino's 5V pin."
It provides two 3-pin headers with  power, gnd, and a control signal from a header pin for servo control.
So you can connect a servo to that. I wouldn't use the Arduino's 5V pin except with maybe a microservo like this one, no one seems to show a max current draw, so if you're seeing random reset issues, there's a good chance the servo is causing brownout resets.
http://www.adafruit.com/product/169
http://www.myrcmart.com/tower-pro-sg92r-sg90-upgrade-stanard-analog-servo-9g-25kg-01sec-p-5372.html
http://www.towerpro.com.tw/product/sg92r-7/
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up