Electronic – arduino – DC motor speed control when having relay change directions

arduinomicrocontrollermosfetmotor controller

im building a circuit atm that drive a dc motor (24V, 5Amp) in both direction.
(Not using H-bridge because of the high amp motor, I cant find anything at the local store at least).
For now the circuit look likes this:
enter image description here

Which when the Arduino set pin 7 and 8 to HI-LOW, motor got 1 direction. And when LOW-HI is the opposite.(Relay switch the negative and positive connections)

However with this method I cant control the speed of the motor. I would love to make the motor slowly increase it speed.

I'm thinking to use a MOSFET and connect it to the PWM pin on the Arduino this method only works for 1 direction but not when reverse.

I'm lost, can someone point me a direction or giving me some link to go to.
Thanks you first in advance.

Best Answer

First make a unidirectional PWM speed controller, like this:-

schematic

simulate this circuit – Schematic created using CircuitLab

M1 is a 'logic level' FET rated to turn fully on with 5V on the Gate and easily handle the applied voltage and current. R1 keeps M1 turned off if the Arduino's PWM output is floating or disconnected. Lm and Rm represent the internal inductance and resistance of the motor.

D1 is a fast switching Schottky diode which prevents high voltage spikes (caused by magnetic energy stored in the motor's inductance) that would otherwise destroy the FET. It also improves efficiency by recirculating current through the motor while the magnetic field is collapsing.

To change direction you just have to reverse the motor leads like you did before. The relay contacts must be wired between the speed controller and the motor, like this:-

schematic

simulate this circuit

The motor goes forward when one relay is operated, and reverse when the other relay is operated. When both relays are released the motor has a short across it, so it will stop quickly and resist being rotated mechanically.

Before switching directions you should stop the motor by slowly ramping the PWM down to zero and then releasing both relays. Otherwise it will draw a very high current as it reverses, because while still spinning in the original direction it generates a voltage which adds to the applied voltage.

Related Topic