Pages: [1] 2   Go Down
Author Topic: Connecting grounds (Arduino UNO)  (Read 1134 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm trying to run a small DC electric motor. Every time I connect it to an arduino pin (set to be HIGH) and the ground, for some reason he drops it down to a very small voltage and the motor doesn't run. However, if I connect it to the 5V source it runs fine. But I need the pin to control it.
So, I figured I'll just use a relay and bring some external power to run the motor, BUT the relay is triggered on 5 or 6V and arduino for some reason gives only 4.3V on the pin (when it's HIGH).  smiley-confuse
Then I decided to substitute the relay with a transistor, BUT since the external source (battery 3V) is connected: positive side to collector and the negative side (ground) to emitter, and arduino pin is connected to the base and the ground to emitter, I have to connect two grounds. This actually worked and the motor started running, but it doesn't effect arduino too good, and the next thing I try to upload is denied with a message saying that the Serial port (COM4) is being used. I measured the voltage between grounds and it's about 4.5V...
Now I either have to find a relay that triggers on lower voltage or some other solution?  smiley-small
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 25
Posts: 1881
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can't connect the motor directly to the arduino's pins you will burnout the pins. You connect via a transistor. Look in the playground!

Mark
Logged

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this…
https://www.sparkfun.com/products/9457
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried connecting it with a transistor (common-emitter circuit), but it requires for me to connect the grounds of the 3V battery (running the motor) and arduino (feeding the base of the transistor)... And there's voltage difference between two grounds. That can't be good
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Well, the idea is to eventually have the ability to control the speed of the motor. This seams to give only four function modes - CW, CCW, short-brake, and stop. Thanks anyway smiley
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 24
Posts: 1766
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it requires for me to connect the grounds of the 3V battery (running the motor) and arduino (feeding the base of the transistor)... And there's voltage difference between two grounds.

If you have a wire between the two grounds there should be no voltage difference! Wiring problem??
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I meant there's voltage difference between the battery ground ( - side) and the arduino ground before I connect them. Around 3.5V to be exact, with arduino ground being the more positive side.
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you find useful information in playground. there is a wealth of knowledge there. Which playground article came closest to what you wanted?
Logged

Good luck, Jack

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found a lot of related topics, but none that really hit the spot. Or maybe I didn't look hard enough  smiley-red
It actually started to work now, strangely. :S
I assumed that the other (battery) ground by being more negative is drawing current from arduino ground and there for messing it up. I'll test it some more and see what happens...
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Normally, before you hook any wires between two devices, there should not be a voltage difference (since no connections).
You would normally connect the grounds together, and since they are connected, there will be no voltage difference.

Can you show us a schematic of what/how things are hooked up. If you have a digital camera, you can just draw it on paper, and take a photo to upload, or use some system more sophisticated.
Logged

Good luck, Jack

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's the schematic drawing, it's pretty simple. And today, the voltmeter is showing 4.5V difference between grounds, before I connect them of course (that's why I put the dotted line).
And once again after I connect them and try to upload something new to Arduino I get the message "Serial port "COM4" already in use. Try quitting any programs that may be using it.". Dunno if that has anything to do with connecting grounds.  smiley-confuse

Note: It should say 1k resistor instead of 10k.


* output.jpg (11.1 KB, 579x471 - viewed 24 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31548
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That measurement is meingless. It is just a stray interfering signal you are reading with a digital volt meter, you would not see anything with an analogue meter.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So you're saying that my arduino shows the message "Serial port "COM4" already in use. Try quitting any programs that may be using it." for some other reason? Even though it happens only when I connect those two grounds?

I just figured there must be some link to it...
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With that schematic, you would get voltage readings. But the circuit will not work. You must have the ground wire there.
But you also did not show how things are connected to the arduino. That is more of a question?
Logged

Good luck, Jack

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31548
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So you're saying that my arduino shows the message "Serial port "COM4" already in use. Try quitting any programs that may be using it." for some other reason? Even though it happens only when I connect those two grounds?

I just figured there must be some link to it...
There probbly is some link but it involves information you have not given us. Probbly because you do not realise it is important.
The grounds must be connected together, so that is the end of it. If that results in a problem you have something else wrong as well.
Logged

Pages: [1] 2   Go Up
Jump to: