Let's Make Robots!

Are my motors borked?

A couple weeks ago I posted about my Rebound RC car which I'm trying to make into a robot.  I had trouble getting the motors running at the same speed.  It was suggested that my H-bridge was bad, so now I've gotten a new one and am still having trouble.

I've simplified my code, so that it's not using PWM anymore.  It simply enables both motors (by setting the enable pins on the H-bridge to "high"), and then starts both motors (by setting the input pins for the motors on the H-bridge to "high").  Again, the one motor went full speed and the other one didn't move - the exact same problem as last time.  So I tried starting just one motor - the one that worked - and the both moved, at roughly the same speed.  But randomly it would sputter and the LED that indicates my breadboard's power would suddenly dim for a second, and then the motors would continue.

Enabling the "bad" motor doesn't do anything - nothing moves, nothing sputters.

I'm powering the motors from a wall wart at about 15 V (I know it's way over the recommended voltage but I only leave them on for a second).  I've got a working camera now too, so I can post pictures if needed.

Any suggestions would be much appreciated!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Do both motors work if you detach them from the circuit and power them one at a time directly from a battery (say, 4 AA's)?

If so, the motors are probably not the problem.

Only one motor works in the circuit. If you swap the motors' positions, does the same motor refuse to turn, or is the problem on one particular side of the circuit? (I.e, is it a motor or a circuit problem?)

I thought running motors at a higher voltage just shortens their life?


so what do you think at 15V? even a second can har mit enough, more even if you are doing this a lot of time...

by new motors and reduce the voltage

I thought running motors at a higher voltage just shortens their life?

Anyway, it does the same thing with 6 Vs and has always been giving me trouble since before I used 15 V.

e:  When I turn on one of the motors, they both turn on for some reason.  Trying to turn on the other motor doesn't do anything to either motor.

Here's the code -

#include <stdlib.h>
#include <avr/io.h>

#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))

void ioinit(void);      //Initializes IO

int main (void)
   ioinit ();
   while (1)  // Loop Forever
      //sbi (PORTB, 1);
      sbi (PORTD, 6); //turn on a motor

void ioinit (void)
    //1 = output, 0 = input
    DDRB = 0b11111111;
    DDRC = 0b11111110; //All outputs
    DDRD = 0b11111110; //PORTD (RX on PD0)
    sbi (PORTD, 2);
    sbi (PORTC, 5); //enable both motors

sometimes motors do weird things if you don't give them what they want. what are your motors' nominal voltage? 

also, if you give them that much voltage, motors heat up very quickly. the reason motors die is because when magnets get really hot, they lose their magnetism. this may have happened. also, it's never really a good idea to use high voltage when you don't need to. I don't know how much current you're using, but it can most likely do some damage if you get your fingers in there. 

but, this really seems like a lot of frustration over two little motors. have you tried direct driving (i.e. no h-bridge) them with your arduino? I'm assuming you're using arduino, which should have plenty of ouputs for you. are you sure you're connecting everything correctly?

also, you can get little motors for like $4 at radioshack or like a dollar if you have a real electronics store around. if these are picky motors, it's not really worth all this.

yeah, wall warts and little motors is bad. try using something more reasonable, like AAs. Have your motors ever gotten really hot? If they have, they're probably busted. 

Also, last time you said that only one would run at a time together, but they would do the same things if you switched them. Is one of them broken now?

also, you could have also just blown your h-bridge.

you know that you're over powering them, and you're wondering why they are failing?