relay h-bridge / flyback diodes

I am planning to use Arduino to control a 24V/250W brushed DC motor (electric scooter motor MY1016). I have already bought a Chinese motor controller YK31C (el-cheapo like the the motor). It controls the speed as expected, but unfortunately it doesn't have the reverse function. So I guess I have no other choice but to add an h-bridge between YK31C and the motor.

After some consideration I have decided to implement the h-bridge using two spdt relays. I know that high power h-bridges are typically implemented using MOSFETs, but I think that in this case relays may be better a choice because:

  • in this case the h-bridge do not need to control the speed. Switching happens only when the motor changes the director or when
    it brakes (shorts the motor terminals), i.e., very low switching frequency.
  • relays draw power only when the coils are energized (when the motor reverses or brakes). The motor spins forward most of the time => very small average power consumption
  • relays don't need heat sinks.
  • relay contacts have virtaully zero resistance and don't cause voltage drop like MOSFETs
  • spdt relays make it impossible to accidentally short the terminals of the power source (the output from YK31C in this case)

The desing is otherwise quite simple, but there is one problem I can't figure out: Do I need flyback diodes over the relay contacts? And if I do, what kind of diodes? YK31C must have some kind of internal transient supression because it is normally connected directly to the motor's terminals and it produces PWM voltage.

The picture below illustrates the design. (I have simplified the wirings from Arduino and didn't draw the relay coils. They will follow the normal digital out/resistor/npn-transistor/snubber diode over relay's coil design pattern).

There are two cases when the relays switch: When the motor changes the direction and when it brakes. The motor is typically powered down before it changes the direction, so changing the direction probably doesn't cause any significant voltage/current spikes. Braking (shorting the motor terminals), however, takes place when the motor is spinning. Even in that case the motor terminals stay disconnected only as long it takes for the relays to switch. (The specs says 10-15 ms, but probably a few times longer because of the snubber diodes across the relays' coils.)

So do I need the flyback diodes or can I trust that whatever transient protection YK31C has, it also takes care of any transients that
switching the motor may produce? I would guess that the flyback diodes are needed because the time it takes the relays to swich may be long enough to generate bigger voltages than the controller's transient suppression tolerates. (I couldn't find the controller's datasheet so I can't check it). If I need the flyback diodes, do they need to be especially fast (schottky)? The relays' switching frequency is very low, even in the worst case no more than a couple of times in a second. Is the switching speed a determining factor or what factors I should consider when choosing the flyback diodes (in addition to the diodes' voltage/current ratings)?

I would put the flyback diodes on even if the controller has them, it will do no harm.
As to ratings basically use the same ratings as the motor is taking. That is if your motor takes 1A then use 1A. This is way over kill because all diodes will take ten times their ratings as a short pulse which is what you will get with the motor. There is no need for anything fast.

Thanks Mike! I will add the flyback diodes. I have already bought 25A/50V diodes (the max. motor current should be about 13A). Should be more than enough then.

pekkaa:
Thanks Mike! I will add the flyback diodes. I have already bought 25A/50V diodes (the max. motor current should be about 13A). Should be more than enough then.

Hi pekka

The voltage of the diode is also important. The initial voltage spike generated by the motor (inductor) when turned OFF is theoretically infinite (in reality a large very short spike), so you should at least plan for 4x the operationg voltage of the motor for your diode. A 100V diode or larger would be more appropriate.

Regards Bill

There is still one problem I don't quite understand. When braking a DC motor (shorting the motor poles), what happens to the motor's kinetic energy? I know that shorting the poles makes the current flow in a direction opposing the rotation, but if there is no load between the motor poles, doesn't the energy eventually turn into heat in the motor's coil? If it does, can it damage the motor?

The voltage spike is in the forward direction of the diode not the reverse direction. Even if it were in the reverse direction the whole point of the diode is that you want it to break down and short out the spike.

The kinetic energy in the motor generates a voltage but the polarity of that voltage is driving the motor in the reverse direction so the KE is used to counter the KE, it is very neat.

I realized soon after posting the KE question that it was a bit stupid :blush: If I got it right now, braking the motor by shorting the poles generates actually less heat than simply letting the motor to spin down (by disconnecting the poles).

Grumpy_Mike:
The voltage spike is in the forward direction of the diode not the reverse direction. Even if it were in the reverse direction the whole point of the diode is that you want it to break down and short out the spike.

Hi Mike

H Bridge, while stopping, two diodes are conducting the spike in the forward direction, two diodes are reversed biased.

Regards Bill

And the reverse biased diodes are shorted out by the H-bridge.