- Notifications
You must be signed in to change notification settings - Fork1
Software defined haptics which can run on a MotorGo-Mini or on a test stand built with a little gimbal BLDC and some off the shelf dev boards
License
esp-cpp/software-defined-haptics
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This project contains the MCAD and source files for a BLDC motor test stand,designed to enable running various experiments in openloop control, closed loopcontrol, and user interface / haptics using a small BLDC motor that's commonlyused in camera gimbals.
The code supports running on the custom BLDC Test Stand (TinyS3 Test Stand),as well as on theMotorGo-Mini. You can select which hardware you want to runon viamenuconfig.
Either:
- TinyS3 Test Stand:
- TinyS3
- BLDC Motor (I usedthese A and B motors from aliexpress)
- MT6701 Magnetic Encoder Breakout (I usedthis purple one (color B) from aliexpress)
- TMC6300 BOB
- Mini solderless breadboard
- 3d printed test stand enclosure (.stl and source files in themcad directory)
- Benchtop power supply (currently running at 5V 1A so many things should work)or:
- MotorGo-Mini
idf.py menuconfigSelect which hardware you are building and deploying to.
Build the project and flash it to the board, then run monitor tool to view serial output:
idf.py -p PORT flash monitor(Replace PORT with the name of the serial port to use.)
(To exit the serial monitor, typeCtrl-].)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
The haptics (detent configuration, click/buzz) can be configured dynamically atrun-time using the provided CLI, see screenshot below:
bldc_test_stand-compressed.mp4
As you can see, the cli also allows you to start and stop the haptic engine(default is off when the program starts) and allows you to query the position ofthe motor based on the current detent config. The default detent config is theunbounded_no_detents configuration.
For more information, see the documentation or the original PR:esp-cpp/espp#60
Some examples:
coarse_values_strong_detents.mp4
magnetic_detents.mp4
on_off_strong.mp4
multi_rev_no_detents.mp4
Make sure to run the code once withzero_electrical_offset set to 0 so thatthe motor will go through a calibration / zero offset routine. At the end ofthis startup routine it will print the measured zero electrical offset that youcan then provide within the code, at which point it will not need to run thecalibration routine.
You must run this calibration any time you change your hardware configuration(such as by remounting your motor, magnet, encoder chip).
This example encapsulates the board support packages into one of two components:
espp::TinyS3TestStand(in this repo)espp::MotorGoMini(in espp)
These components build complex haptic behavior using thefollowing components:
espp::Mt6701espp::BldcDriverespp::BldcMotorespp::BldcHapticsespp::I2c
You combine theMt6701 andBldcDriver together when creating theBldcMotorand then simply pass theBldcMotor to theBldcHaptics component. At thatpoint, you only have to interface to theBldcHaptics to read the inputposition or reconfigure the haptics.
About
Software defined haptics which can run on a MotorGo-Mini or on a test stand built with a little gimbal BLDC and some off the shelf dev boards
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
