Go Down

Topic: Connecting grounds (Arduino UNO) (Read 1 time) previous topic - next topic

duje

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).  :~
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?  :.

holmes4

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

Drew Davis


duje

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

duje


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


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 :)

terryking228

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??
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

duje

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.

jack wp

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

duje

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...

jack wp

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.
Good luck, Jack

duje

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.  :~

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

Grumpy_Mike

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.

duje

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...

jack wp

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?
Good luck, Jack

Grumpy_Mike


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.

Go Up