CALPOLY MECHATRONICS
Documentation for all Mechatronics Labs
ME405_FP_DRV8847.py File Reference

This module contains several classes used to interface with the DRV8847 motor controller board. More...

Classes

class  ME405_FP_DRV8847.DRV8847
 The DRV8847 class is used to enable and dissable the DRV8847 motor controller board as well as handle fault detection. More...
 
class  ME405_FP_DRV8847.DRV8847_channel
 The DRV8847_channel class is used to set the duty cycle of an individual motor connected to the DRV8847 board. More...
 

Variables

 ME405_FP_DRV8847.pin_nSLEEP = pyb.Pin(pyb.Pin.cpu.A15, mode=pyb.Pin.OUT_PP, value=1);
 
 ME405_FP_DRV8847.pin_nFAULT = pyb.Pin(pyb.Pin.cpu.B2, mode=pyb.Pin.IN)
 
 ME405_FP_DRV8847.pin_IN1 = pyb.Pin(pyb.Pin.cpu.B4);
 
 ME405_FP_DRV8847.pin_IN2 = pyb.Pin(pyb.Pin.cpu.B5);
 
 ME405_FP_DRV8847.pin_IN3 = pyb.Pin(pyb.Pin.cpu.B0);
 
 ME405_FP_DRV8847.pin_IN4 = pyb.Pin(pyb.Pin.cpu.B1);
 
 ME405_FP_DRV8847.tim3 = pyb.Timer(3, freq = 20000);
 
 ME405_FP_DRV8847.motorBoard = DRV8847(pin_nSLEEP, pin_nFAULT)
 
 ME405_FP_DRV8847.motor1 = motorBoard.channel(pin_IN1, 1, pin_IN2, 2, tim3)
 
 ME405_FP_DRV8847.motor2 = motorBoard.channel(pin_IN3, 3, pin_IN4, 4, tim3)
 

Detailed Description

This module contains several classes used to interface with the DRV8847 motor controller board.

source code: https://bitbucket.org/eliotBriefer/me405_term_project/src/master/Drivers/ME405_FP_DRV8847.py

Author
Eliot Briefer
Date
6/11/2021