405 Documentation  9.0
motorDriver.py File Reference

Motor Driver. More...

Classes

class  motorDriver.MotorBase
 Fault Section. More...
 
class  motorDriver.DCMotor
 Motor Driver Class. More...
 

Functions

def motorDriver.makeMotorBase (motors)
 Function for making the motor base. More...
 
def motorDriver.makeMotors (freq=10000)
 Motor Making function. More...
 

Detailed Description

Motor Driver.

Runs the Motor.

Driver to interface the DC motors with the STM32 using PWM and the DRV8847 motor driver

Author
Hunter Morse and Jacob Everest
Date
March 11, 2021

Initializes a motor object when used by the user. This can be done with multiple different pin values in order to run more than one motor at a time. It uses timer channel objects and pulse width modulation to run the motors connected to the right pins at varying speeds. These pins can be attached to the same timer number, but must have different channels on that timer. Thus, they can run independently of each other.

Author
Hunter Morse
Jacob Everest

Function Documentation

◆ makeMotorBase()

def motorDriver.makeMotorBase (   motors)

Function for making the motor base.

Quickly make a MotorBase object given a tuple of 2 motor objects (from makeMotors() function

Parameters
motorsA tuple of 2 DCMotor objects
Returns
base MotorBase object

◆ makeMotors()

def motorDriver.makeMotors (   freq = 10000)

Motor Making function.

Quickly create to motow objects at a given frequncy (default 5000Hz)

Parameters
freqOptional motor timer frequency (default 5000 Hz)
Returns
motors A tuple containing two motor objects