Close

Speed-up then slow-down

A project log for OpenOpener

Open source (software and hardware) DC motor controller for electric gates

manuManu 08/18/2014 at 23:480 Comments

To make a DC motor move, it has to be connected to a DC power supply. Its speed is somewhat proportional to the voltage value. The more the voltage value is (until its nominal voltage), the more the value of the speed of the motor is (until its nominal velocity). As a DC motor is pretty much a low-pass filter (as many of physics systems, by the way), you can switch its DC power supply fast enough to use it as an integrator of the voltage. To do this, you can setup a MOSFET between the motor and it DC power supply. By using a PWM output of a microcontroller (my Arduino board, in this case) connected to the gate of the transisitor, you can make as if the motor sees the mean value of the DC voltage depending of the duty cycle of the PWM output (from 0 to 100%, i.e. from 0V to it nominal voltage).

If you do this on the dc-voltage of the H-bridge, you can control the speed and the direction of the motor.

To speed the motor up, you increase the PWM duty cycle / To slow it down, you have to decrease the duty cycle.

To prevent vibration in the gate, we can use a linear acceleration, or better a S-curve (no discontinuity in the velocity) to make the motor start smoothly.

Discussions