Kart/DC motor controller

From FSI
Revision as of 11:01, 10 June 2015 by Francois.corthay (Talk | contribs)
Jump to: navigation, search


DC motor board

DC motor

The DC motor is a Modelcraft RB350018-2A723R".

It is powered with 12 V and draws a maximal current of 0.7 A.

FPGA design

The DC motor controller has to generate the a pwm and a forwards signal to control the kart's speed. The kart's speed is set in the DC motor speed register.

To begin with, the design environment has to be downloaded. It comprises the dcMotorController block which contains the provided I2C bus interface and an empty dcMotorPwm block which is to be designed.


The block receives a speed signed number and has to drive the DC motor with a pwm and a forwards signal. These signals are sent to the daughterboard in order to drive an H-bridge. The daughterboard logic drives the bridge's power transistors from the two signals. The mean amplitude of the DC motor's voltage is controlled by Pulse Width Modulation (PWM).

The forwards signal is derived from the sign of the speed control. The pwm signal is derived from the absolute value of speed.

The PWM signal is implemented with the help of a free-running counter and a comparator. However:

  • the power transistors cannot switch at too high frequencies
  • there is a need for a dead time where all power transistors are open between the PWM transitions

Because of this, the PWM period is limited to a minimal value. This is achieved with the help of an en signal generated by a counter dividing the clock frequency. The counter only increments when this en signal is '1'.


Draw the schematics of the dcMotorPwm block.

The minimal value of the PWM signal is studied in another part of the kart project. The period of the en pulse train is set in the DC motor PWM period register.

Hardware orientation

The mechanical design can either lead the Kart to drive forwards or backwards when a positive voltage is applied to the DC motor.

In order to cope with this, a setup signal, normalDirection, is provided to the block. normalDirection being '1' means that a positive voltage applied to the DC motor lets the kart drive forwards.


Update the schematics of the dcMotorPwm block in order to cope for the different mechanical design possibilities.

The setup bit is configured in the hardware control register.

Personal tools
Modules / Projects