Simple motor question..

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.

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… SparkFun Motor Driver - Dual TB6612FNG (1A) - ROB-14451 - SparkFun Electronics. 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

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.

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?

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.

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

Justscary:
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?

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

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.

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.

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.

JimboZA:

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.

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?

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

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.