Pages: [1]   Go Down
Author Topic: Simple motor question..  (Read 1232 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have 2 brushed VDC motors.

I installed both motors on my robot I connected positive(red) to (+) on battery, and the common(black) on to the (-) of the battery.

They are both installed same way.

Problem: 1 motor goes forward, the other goes backwards. No clue why, I doubled checked all connections!

Can I just switch the wires and make it go forward? or its not good.
« Last Edit: February 22, 2013, 08:57:53 pm by husein06 » Logged

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

How are you controlling them? Does this use an Arduino? If your just connecting a battery to a motor then yes it should not be a problem to switch the wires.

 If you want to be able to switch directions frequently I would buy this… https://www.sparkfun.com/products/9457. That way you can change direction without rewiring it each time.

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you controlling them? Does this use an Arduino? If your just connecting a battery to a motor then yes it should not be a problem to switch the wires.

 If you want to be able to switch directions frequently I would buy this… https://www.sparkfun.com/products/9457. That way you can change direction without rewiring it each time.



Yes im using the arduino and a motor driver... its just that
I installed both motors on my robot I connected positive(red) to (+) on battery, and the common(black) on to the (-) of the battery.

They are both installed same way.

Problem: 1 motor goes forward, the other goes backwards. No clue why, I doubled checked all connections!

I was just wondering if hurts the motor if you switch the wires
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe you should think of the motors as going clockwise and anti-clockwise, not forwards and backwards? Forwards and backwards only have meaning with respect to the vehicle, and depend how the motors are mounted.

If you have a motor on the right going clockwise as you look from the wheel end of the axle say, that would be "forward". But if, looking from the top, you swing that motor so that it's now on the left, it will still be going clockwise but now going "backward" as far as the vehicle is concerned.

Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

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

There is no problem changing polarity on a permanent magnet motor so yes, you could just swap the wires, but couldn't you just do it in your code? I presume the motors will be bi-directional in the application anyway?
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't forget that an h-bridge is changing the polarity all the time anyway.... that's how it gets it to change direction in the first place. So all you need to do is set it up in hardware and software any way that makes sense to you, given the physical orientation of each motor, so that each side of the vehicle goes forward when you want it to and backwards when you want it to.
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't forget that an h-bridge is changing the polarity all the time anyway.... that's how it gets it to change direction in the first place. So all you need to do is set it up in hardware and software any way that makes sense to you, given the physical orientation of each motor, so that each side of the vehicle goes forward when you want it to and backwards when you want it to.
There is no problem changing polarity on a permanent magnet motor so yes, you could just swap the wires, but couldn't you just do it in your code? I presume the motors will be bi-directional in the application anyway?

Thank you both for the reply. So the speed and current draw and everything is the same in clock-wise and counterclockwise?

I just noticed why that happened. I installed both wheels the same way.
Meaning: when holding both of them the same way they both operate clockwise, but when I installed them I put one on the left side of the chasses and one on the right side of the chassis, now the left is still clockwise and the right became counterclockwise when spun 180 degrees to be bolted on the chassis. get it?
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So the speed and current draw and everything is the same in clock-wise and counterclockwise?

In theory I guess, but I think I have a motor which runs more slowly in one direction. I never investigated further though....
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

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

If you get into the nitty gritty, I believe there is a small difference in the load and current draw for each direction, but I have never had a problem and therefore never worried about researching why. There may also be a slight difference in each motor as well, even if they are the same model. The main issue you might have is getting the robot to track straight over a long distance. You can calibrate this with the code or, if you need to adjust it on the fly,via a trimpot on either the motors or for higher currents, run a trimpot into an analog input and use it as a reference to bias one motor or the other.
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
There may also be a slight difference in each motor as well, even if they are the same model. The main issue you might have is getting the robot to track straight over a long distance. You can calibrate this...
.

Hell yeah.... first rule of identical motors... they aren't.

Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

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

Post your code and we should be able to rewrite it so that both motors go in the same direction. However, you can just switch the motor wires if you want.
Logged

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So the speed and current draw and everything is the same in clock-wise and counterclockwise?

In theory I guess, but I think I have a motor which runs more slowly in one direction. I never investigated further though....

Some DC motors are intended to only spin one way - but most are happy to reverse.  If it goes a noticeably
different speed for the same voltage in the other direction something is wrong, there must be significantly more
friction on one direction, or the commutation point is advanced for greater efficiency with the rated load.
Logged

[ I won't respond to messages, use the forum please ]

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

is possible with arduino to control a big electric motor ex 200 watt dc?

how can i study and understand the way to control this motor?

is there a book?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5581
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

is possible with arduino to control a big electric motor ex 200 watt dc?

how can i study and understand the way to control this motor?

is there a book?


You might want to start your own thread.
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

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

Enrico, there is virtually no limit to what an arduino board can control, for instance, I have successfully controlled my milling machine spindles which has 2 by 2HP three phase electric motors on it! The trick is that the arduino board won't power these sorts of things directly (obviously), so you need to find something to interface with it, eg relays or in my case, a VFD (Variable Frequency Drive) which has a serial port interface. Also, when you get to these bigger items, you need to make sure your board is isolated from any feedback from these motors to protect your board and to ensure it functions properly.
Logged

Pages: [1]   Go Up
Jump to: