Skip to content

Repository files navigation

DC Motor Controller Firmware for STM32F107/DRV8701

Software Features

  • Start/dashboard workflow for quick motor start-stop and live runtime status
  • Selectable control mode: PWM open-loop or RPM-based PID closed-loop
  • On-device tuning for speed, brake strength, and stall timeout
  • Configurable protection limits for input current, motor current, MOSFET temperature, and motor temperature
  • Advanced setup for RPM range, motor direction, and sensor direction
  • PID parameter tuning (Kp, Ki, Kd, anti-windup) with live parameter apply and graph
  • Diagnostics screen with firmware/PCB info and live min/max telemetry (VCC, current, temperatures, RPM/PWM)
  • EEPROM-backed settings with save/restore-defaults from the menu
  • LVGL TFT UI with rotary encoder plus dedicated start/back/knob buttons
  • Python script for PID parameter tuning over SWD connection

Hardware Features

  • 8-36V, 20A continuous, 40A peak
  • Adjustable cycle by cycle motor current limit (0.5-40A)
  • Adjustable current limit with signal LED (0.5-40A)
  • 1.14" 135x240 TFT display, rotary encoder and 3 buttons for easy navigation
  • Support for magnetic encoder MT6701 in A/B mode up to 1024PPR (55000 RPM)
  • Dimmable LED with CC driver 3-26V/350mA/5W
  • Current, voltage and temperature monitoring

Navigation

Rotary Knob Button

  • Start screen: open main menu (long press opens advanced menu)
  • Dashboard screen: select next value to change (RPM/PWM/PID parameters, etc.), long press selects prev. value

Start Button

  • Start screen: start motor
  • Dashboard screen: stop motor

Back Button

  • Start screen: toggle motor direction
  • Dashboard screen: stop motor
  • Menus: go back to previous menu
  • Long press (5 seconds): firmware reset

Controller schematics and PCB

Schematics & PCB

Schematics PDF

Schematic thumbnail

STL files for motor mount and enclosure

STL files

Some pictures

start_screen main_menu led_brightness_55

mosfet_temperature pid_tuning_graph motor_stall

kp_parameter diagnostic_screen

Enclosure and motor

PID tuning

PCB front

PCB back

STL files and MT6701

PID tuning

About

DC Motor Controller Firmware for STM32F107/DRV8701/MT6701

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages