
Control for potentiometer feedback linear actuator
Designed and tested using STM32 Black Pill Built for Arduino.
Explore the docs »
Report Bug
·
Request Feature
.
Donate
BTS7960AD actuator(R_EN, R_PWM, R_IS, L_EN, L_PWM, L_IS, sensor, strokeLength, debug);
- RPWM Forward Level or PWM signal, Active High
- LPWM Reverse Level or PWM signal, Active High
- R_EN Forward Drive Enable Input, Active High/ Low Disable
- L_EN Reverse Drive Enable Input, Active High/Low Disable
- R_IS Forward Drive, Side current alarm output
- L_IS Reverse Drive, Side current alarm output
- Vcc +5V Power Supply micro-controller
- Gnd Ground Power Supply micro-controller
actuator.init();
Resets actuator id's in EEPROM. (important)
actuator.begin();
Sets up actuator pins defined in object and EEPROM memory positions.
actuator.enable(true);
Enable driver pins R_EN and L_EN bringing them high. (May have issues - connected EN pins to the +ve rail so always on)
actuator.calibrate(127);
Fully extends and retracts to record min max potentiometer values.
On initial start the calibrate function will test to see if there are values saved in EEPROM, if not it will fully extend and retract and record the min max values of the potentiometer and save to EEPROM as these can differ from the min max values due to gearing, when the board is re-powered, the values can be pulled from EEPROM saving loading time.
actuator.recalibrate(127);
The actuators can be recalibrated by calling method, this is called from a button press in the example sketch.
Action | Direction |
---|---|
Extend | 1 |
Stop | 0 |
Retract | -1 |
input value between 0-255
actuator.controlActuator(1, 127);
Direction and speed
actuator.actuateByDistance(25, 1, 50);
Distance mm, direction and speed
- Add Calibration for multiple actuators - Test
- Synchronized motor movement function
- Add position memory
- Digital read buttons for memory positions
See the open issues for a full list of proposed features (and known issues).
A simple star to this project repo is enough to keep me motivated on this project for days. If you find your self very much excited with this project let me know.
Dean Bateman
Project Link: https://github.com/digitalbirth/BTS7960AD
____ _ _ __ __ ____ _ __ __
/ __ \(_)___ _(_) /_____ _/ / / __ )(_)____/ /_/ /_
/ / / / / __ `/ / __/ __ `/ / / __ / / ___/ __/ __ \
/ /_/ / / /_/ / / /_/ /_/ / / / /_/ / / / / /_/ / / /
/_____/_/\__, /_/\__/\__,_/_/ /_____/_/_/ \__/_/ /_/
/____/
------------ BRINGING YOUR IDEAS TO LIFE ------------