https://github.com/roboticsbrno/esp32-dcmotor
A simple library to control a DC motor with a DRV8833 driver and a quadrature encoder using an ESP32.
https://github.com/roboticsbrno/esp32-dcmotor
Last synced: 11 months ago
JSON representation
A simple library to control a DC motor with a DRV8833 driver and a quadrature encoder using an ESP32.
- Host: GitHub
- URL: https://github.com/roboticsbrno/esp32-dcmotor
- Owner: RoboticsBrno
- License: mit
- Created: 2024-07-05T07:43:37.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-28T13:24:45.000Z (over 1 year ago)
- Last Synced: 2025-04-03T09:46:14.253Z (about 1 year ago)
- Language: C++
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Esp32-DCMotor
A simple library to control a DC motor with a DRV8833 driver and a quadrature encoder using an ESP32.
## Test firmware
The directory `test_fw` contains a test firmware, which can be used as an example on the usage of the library.
The firmware provides a console interface to control the motors as configured in the `main.cpp` file. The console
is accessible via USB-JTAG serial.
## Test tools
The directory `tools` contains Python scripts to test the library and to help with tuning the control parameters.
The script `run_test.py` allows to run a test of the motor control and to log the test progress. The test is
described in a text file, which is passed as an argument to the script. An example of a test file is provided in
the `tools\sample_test.txt` file. Each line of the test file describes a test step, with the following format:
```
:
```
where `` is the time in seconds since the start of the test, and `` is the command to be sent
to the motor controller. The commands are the same as the ones used in the console interface of the test firmware.
The report from the test is saved in a text file and can be plotted using the `plot_report.py` script.
If the test firmware runs out of memory while running the test, consider adding a command `everynth ` with a higher
`` value at the start of the test to only report every nth data point and reduce the memory usage.