Closed thijstriemstra closed 4 years ago
If you're interested in testing I can always order and send you such a BTS7960.
I don't think you need that library it's used to control the motor speed using PWM (Pulse Width Modulation), the motor on the actuators are either off (0V) or full speed (12V)
I used this board https://www.aliexpress.com/item/32821835744.html?spm=a2g0o.productlist.0.0.1e817501MJYbYr&algo_pvid=a486cb93-3348-4bdd-9e9e-e138d92e8bbc&algo_expid=a486cb93-3348-4bdd-9e9e-e138d92e8bbc-28&btsid=0ab6d70515842269997617572e56f1&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_ with the ESP32 pins as defined in the platform.ini file, the code sets PWMa high/low & PWMb low/high to set the direction then enable to run the actuator for the amount of time required.
[image: image.png]
line 147 LinearActuatorNoPot.cpp [image: image.png]
On Sat, Mar 14, 2020 at 6:47 PM Thijs Triemstra notifications@github.com wrote:
The actuators I'm using need 3A each (at peak) and we decided to use BTS7960 motor controllers.
There is a https://github.com/eicke123/BTS7960Library Arduino library for BTS7960 that seems to do the same. Any ideas on how to extend the LinearActuatorNoPot class? Could you add an interface that can be extended (I'm new to C++) with different types of Actuator implementations?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/graham22/SkyeTracker/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIYATK2ASDEXS6SQISGM43RHQCRBANCNFSM4LJ45XIA .
-- Graham A. Ross (613) 769-1331
I see. This setup looks similar to what you're describing: https://www.youtube.com/watch?v=QvXa6GKLu6E I'll give it a try asap.
Managed to get the actuator working using 3 ESP32 pins and it works the same as the SkyeTracker setup.
Note that PWM
covers 2 pins on the BTS7960: L_EN
and R_EN
receive the same signal from the ESP32.
The actuators I'm using need 3A each (at peak) and we decided to use 2 BTS7960 motor controllers.
There is a https://github.com/eicke123/BTS7960Library Arduino library for BTS7960 that seems to do the same. Any ideas on how to extend the
LinearActuatorNoPot
class? Could you add an interface that can be extended (I'm new to C++) with different types of Actuator implementations?