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)?