Just destroyed 3 relay boards trying to reverse a motor

Hey guys,

I will try and keep it short. I have a linear actuator (a motor basically), which I am trying to run in one direction for 1 second and then run in the other direction for a second. The issue is, I am doing this with a relay module which has two SPST relays, and I have just gone through 3 relay boards and somehow destroyed all three boards! The way that the boards fail is one of the relays (always the same one) will not switch to the NC position. Either these are all faulty boards or something about my setup is killing the relays.

Now, I have seen a few people online draw up a polarity switching diagram, and some people will have the input power going to the NC and NO pins on both relays and the motor input going to the common pin. I have also seen others draw the diagram with the motor pins going to the NC NO pins and the input power going to the common. In my head this is the same thing, but maybe this is where I am going wrong? This to me seems like exactly the same thing, just slightly different. I drew 2 diagrams to show the difference (excuse my MSpaint drawing, but it gets the point across).

Does anyone know why these modules keep failing after running for an hour? Maybe I just bought cheap ebay parts, or is there some sort of quick moment of short circuit burning up the inside of the relay?

You need a module called H-bridge.

I'm just curious. The motor is being driver by 24V?

H-bridge.

Post some deets on the relay module.

Please post the code.
All relays have a limited life, a number of operations. Exceeding that the relay will stop working.
Post a link to the datasheet of the motor, and if possible, for the relay. Sales sites are uninteresting. Is the motor current exceeding the relay specs?

Hi, @bmarland
Welcome to the forum.
Look at this edit of your "circuit"
Note where the power supply is connected.

  1. .RLY1 OFF, RLY2 OFF, both motor terminals connected to 12V+, so motor is stop.
  2. RLY1 ON , RLY2 OFF, motor term A connected to 12V- and term B connected to 12V+, motor rotates one direction.
  3. RLY1 OFF, RLY2 ON, motor term A connected to 12V+ and term B connected to 12V-, motor rotates in other direction.
  4. RLY1 ON, RLY2 ON, both motor term connected to 12V-, so motor stop.

So you only get drive when one of the relays is activated.

Tom... :smiley: :+1: :coffee: :australia:

This is the linear actuator:
https://gimsonrobotics.co.uk/products/gla200-12v-dc-small-fast-travel-linear-actuator?taxon_id=2
This is the relay module:


And the code is basically switching the relay on then off for a period of time


  int relay1 = 6;
  int relay2 = 7;

  float upTime = 900;
  float downTime = 900;

void setup() {
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);
  Serial.begin(9600);
  //Move relay back to lowest postition
  digitalWrite(relay1, HIGH);
  digitalWrite(relay2, HIGH);
  delay(5500);
}

// the loop function runs over and over again forever
void loop() {
  StartMotor(false);
  delay(upTime);
  StartMotor(true);
  delay(downTime);
}

void StartMotor(bool motorDirectionDown){
  if(motorDirectionDown)
  {
    digitalWrite(relay1, HIGH);
    digitalWrite(relay2, HIGH);
  }
  else
  {
    digitalWrite(relay1, LOW);
    digitalWrite(relay2, LOW);
  }
}

Thanks for that! I will try an H-bridge. Any idea why the relay solution was failing? It would work perfect for about an hour, then the relay would fail to return to the NC position, even with no power connected (so basically, a physical failure).

Hi,

Regard these relays as hobby relays, not built for proper usage, cheap chinesium.

If you wanted reliable relays, then OMRON, PANASONIC, FINDER.

Your relays also probably welded the contacts due to arching, you need a snubber circuit to prevent damaging arcs, again cheap relays succumb quicker.

Tom... :smiley: :+1: :coffee: :australia:

Know that the reaction time of the relay switching to "On" very likely is faster than switching to "Off". That makes Your create a short short circuit when switch both relays at the same time! Depending on the power this will give short mmoments of full power supply current passing the relay contacts.
That "another method" does not.
Depending on the load the stall current will likely be higher then the rating of the relay spec. Know that Chinese ratings are often too high, like double the actual capacity.

1 Like

Hi,

Choose a MOSFET bridge, it will be more efficient and easier to drive.
NOT A L289.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

That actuator can pull 3.2 amp at maximum. Too much for an L298 I think. Double bad to use it.

Yes, I think that must be true:

With both relays off (coils not energised), the motor will run forward.

With both relays on (coils energised) the motor will run reverse.

With one relay off and one relay on, there will be a short-circuit from +12 to -12 through the relay contacts.

You have no way to stop the motor, except by causing the short-circuit.

With this code

There will be a brief moment (a few microseconds) where one relay is on and the other is off, causing the short circuit. Even if you can change both pins at the same instant, there is no guarantee that the relay contacts will move at the same speed.

I don't think it is the same.

So what do you suggest I do? Wire it up in the "another method" configuration, use an H-bridge, or something different which will support the 3.2 amps? Thanks for all the help guys!

That other method is actually an h-bridge. It's a mechanical H-bridge but you can also get electronic ones.

The electronic ones have the advantage that there is no clicking noise, they don't wear out as relays eventually do (even when wired correctly) and you can also use them to control both the direction and the speed of the motor.

There are many models of electronic h-bridge available. Pololu have a good range. Avoid those based on L293 or L298 chips, which are an old and inefficient design.

Yes. Your circuit is probably causing momentary short circuit across the relay contacts and eventually welding them closed. Use the standard one.

If you want to use a relay, get one that is DPDT, double pole, double throw. Will have TWO sets of contacts controlled by one coil.

A DPDT relay will work, but there is no way to shut the motor off in that case.

  • the electric component in a motor is a coil
  • when you pass a current through a wire you generate a magnetic field. this magnetic field is like a can around the coil
  • when you open the current path the magnetic field collapses, inward. this inward collapse is a motion of the magnetic field
  • when you pass a magnetic field through a wire you generate a current
  • this current is opposite in polarity from the current that generated it
  • the voltage produced by the current induced is not proportional to the voltage that created the magnetic field. It is proportional to the current developed by the collapsing magnetic field, and the rate of collapse, with an open circuit, there is nothing to snub the discharge of the current, and the rate of collapse is colossal
  • the reverse voltage caused by a 6 volt 1968 Triumph ignition coil primary magnetic field collapsing is -321 volts
  • that 321 volts jumps the gap and burns the contacts when the points open.

see youtube videos about DC circuit breakers for solar systems

an H bridge provides a current path for the spike induced by the collapsing field. the semiconductor is a resistor, and that slows the collapse and absorbs the shock.

Relay can't handle the stall current of the motor.
or
You forgot to use diodes across the motor.
The resulting back-emf spikes of the motor could weld the contacts together.
You can probably get relay function back by hitting them with e.g. the handle of a screwdriver.

Adding a bridge rectifier across the motor kills the back-emf spikes.
AC terminals to the two motor contacts, + to motor supply, - to motor supply ground.

A H-bridge has that diode bridge built-in.
Leo..

Keep in mind that when you try to "instantly" reverse a motor, the current draw is TWICE the stall current.

That could easily weld relay contacts shut, so wait until the motor shaft has stopped turning before reversing the voltage.