DC motors and relays

I am having a "burning" problem controling a standard 12DC motor with arduino. I used an H-bridge as shown in this link: http://itp.nyu.edu/physcomp/Labs/DCMotorControl

I wired it up to arduino and a motor and connected it to the 12V DC power source. When I tested this thing the motor worked for a second and then I heard a bang and saw a smoke cloud (the IC now has a hole in it :-[). At that time I was connecting some pins to arduino so I could make a short circuit but I am not sure. So I tryed another IC and this time there was nothing - no smoke and no working motor. So I used a multimeter to checked the connections and it seemed fine until I made a short with it (forgot to turn of the power supply) and there was a little smoke cloud again.

So I don't have any more ICs and I am looking for a new way to control the motors. Of course I want to control the direction and not just turn it on and off. Is it possible to control this thing using relays (I have a whole bag of 12V relays somewhere)? Or just something less likely to go up in flames ;D?

Well which IC are you talking about? The Atmega or the H-Bridge?

If you atmega blew up you might have a hard time controlling your motors.

If you blew your H-Bridge, you could make your own H-bridge circuit. Grumpy Mike has some schematics @ Motors 1
There is a schematic for controlling a DC Motor with 2 relays that will give you direction control

Do you have a schematic of your wiring? I am curious to figure out how you blew the IC the first time.

Remember to switch off the power supply before fiddling with the wiring!

I mean the H bridge.

The whole connection is the same as shown in a link that I posted. The only change is that I didn't use the capacitor (totaly forgot about it). The only problem is the motors are quite powerful (they are from an water pumps) and don't work with a 12V/250mA power supply (not even a little movement). So I used a big power supply that can supply up to 5A :). So maybe there was too much current running through the IC or I did make a short when connecting the IC to arduino (of course the arduino was powered on ;D).

I got an idea how to control the motor with realys shortly after I made the first post but my idea includes 4 relays.

Did you use the L293 or the SN754410? The SN754410 is rated at 2 Amps, max., so how does that compare with the curent drawn by your motor?

Yeah you might need to look into a bigger motor driver.

However, doesn't its 2 amps rating, mean it can only source 2 Amps? A motor which requires more current shouldn't have fried it right? Can someone confirm this?

A motor that requires more than 2 Amps will fry a 2 Amp rated device. That's what "maximum rating" means.

More problems with the motors. So I have built a motor driver from relays and it is working just fine. Problem is that I need two motors to be synced and I have only two pins to control them (one pin is left and other right). Problem is that they are not synced. One has a meter longer cable than the other and turns slower than the first. I tryed adding a resistor (100 ohms) to the first motor but then the motor doesn't turn at all.

The only way that will work is to use another relay and first turn one motor and then the other (they don't need to be running at the same time). Maybe any other way not involving relays?

Oh! My little explosive IC took arduino pin 5 with it! RIP! ::)

A motor which requires more current shouldn’t have fried it right?

Depends on the chip: some have circuitry that detects that they’re being overloaded, and shut themselves down. But many don’t, and will burn out if you try to work them too hard.

When a chip is rated at 2A, it means you shouldn’t use it to drive a load that draws more than 2A. Unless it has protection circuitry, it may well try to supply more. But, as you’ve discovered the hard way, it usually won’t do so for very long.

If you got those motors used, it’s possible that they’re running at much different speeds because one needs its bearings cleaned/lubricated/replaced. The cable length shouldn’t matter, unless you’re using wire that’s too thin to carry the current. Is the wire getting warm? If not, that’s not the problem.

Ran

Problem is that I need two motors to be synced

By synced do you mean that the motors must turn at the same speed in the same phase. That is the angle turned through by both motors has to be the same at each instant of time. If this is the case it can be done but is a bit complex. What are you making that requires this?

I mean that both motors must turn the same at a given moment. I am making a system for controling window blinds so if I want to open them one opens normaly but the other doesn’t. I noticed that if I unplug the first one the second spins faster. I think I will use another relay and turn one and then the other.

Ok so not actually synchronous, just the same speed.

I noticed that if I unplug the first one the second spins faster.

That sounds like your power supply isn't capable of supplying enough current.

You can never be sure that two motors will run at the same speed, even if they are the same kind of motor fed from the same power supply. You will need some kind of speed sensor on each motor, and use "closed-loop control".

Well I am back with my problems. So I built a cotroller with 5 relays (4 control direction and one controls which motor to turn). It works but problem is that relays are breaking down like mad. They are rated for 12V and are used to control such motors - so they should work. But I think that the power supply is too weak - it outputs only around 9V and when the realy is active I can hear it clikcing - probably because it doesn't get enough voltage to stay in one position.

So I think that buying better motor driver is the best option. So anyone has any idea what to use? Something that can work with more current than L293NEE4?

EDIT: The L29... is rated for 2A. I don't think that motors use that much. I remeber setting my A-meter to 200mA setting and the fuse blew out. But before I used 10A setting and I remember seeing a 2 somewhere. But I don't know if it was 2A or 200mA.

Getting a new motor driver won't help with your power supply problem. You probably need a larger PSU! If you can get an accurate current reading for the motor(s), that will be a start.

Well I replaced the fuse in my multimeter and checked. The current that drives the motor is around 600mA. And that is strange. This shuldn't blow out the IC. The voltage output is strange too. It is ranging from 5V to 9V. When there is no motor runnig the power supply outputs 9V but when I trun on the motor the value drops to 5V. Power supply is the only one that can turn the motors because it can get them enough current. But I don't know why the relays won't stay in one position - they are 12V but I think that when they are connected they shuldn't disconnect until there is practicly no more power. Still I want an motor driver to control this - I can't replace relays every week.

If the power supply drops from 9V to o5V when the motor is connected, this is a clear sign that the PSU cannot supply enough current. You need to get a bigger power supply.

I don't think that that is it! Because it can drive 3 motors at the same time without any problems. This is the only power supply that can actualy run one motor - another 12V supply couldn't even turn the motor. But this can drive 3. I tryed it again - now the normal voltage is 6V and it stays 6V with motor running. So this power supply is maybe a little unstable but it is strong enough.

I disagree -- the fact that the voltage drops so much under load shows that the power supply is too small.

I just noticed that I made a big error! Something that should never happen. I messured the voltage on one of the relays not on the power supply itself. So I tryed it there. The voltage when nothing is working is about 7V and when I turn on the motor the voltage goes to 6.5-6V. I think that this is preaty normal. But I find it strange - this is a 12V power supply.

And it can't run out of power that easy. It was intended for a caravan and has 3 12V lines -> two DC and one AC. One of the DC plugs can output 10A and the other 5A.

EDIT: Another error on my part - this isn't 12V supply - it is 11V. The DC lines are 11V and the AC is 12.

So I am still looking for a replacement for these relays.