Dual Brushless Motor ESC, 10-62V, up to 50A per motor. Motors ganged or independent, multiple control input methods, cycle-by-cycle current limit, speed mode and torque mode control. Motors tiny to kW. Speed limit and other parameters easily set in firmware. As used in 'The Brushless Brutalist' locomotive - www.jons-workshop.com. See also Model Engineer magazine June-October 2019.
Dependencies: mbed BufferedSerial Servo PCT2075 FastPWM
Update 17th August 2020 Radio control inputs completed
Diff: brushless_motor.cpp
- Revision:
- 14:acaa1add097b
- Parent:
- 13:ef7a06fa11de
- Child:
- 16:d1e4b9ad3b8b
--- a/brushless_motor.cpp Sun Sep 29 16:34:37 2019 +0000
+++ b/brushless_motor.cpp Sat Nov 30 16:34:58 2019 +0000
@@ -1,4 +1,8 @@
-// Cloned from 'DualBLS2018_06' on 23 November 2018
+/*
+ STM3_ESC Electronic Speed Controller board, drives Two Brushless Motors, full Four Quadrant Control.
+ Jon Freeman B. Eng Hons
+ 2015 - 2019
+*/
#include "mbed.h"
//#include "users/mbed_official/code/mbed-dev/file/707f6e361f3e/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/device/stm32f401xe.h"
//#include "stm32f401xe.h"
@@ -61,7 +65,7 @@
}
/**
-* void brushless_motor::sniff_current () { // Initiate ADC current reading
+* void brushless_motor::sniff_current () { // Initiate ADC current reading of approx motor average current
* This to be called in response to ticker timebase interrupt.
* As designed, called at 200 micro second intervals (Feb 2019)
* Updates double I.dbl current measured in milliamps
@@ -235,7 +239,7 @@
*/
void brushless_motor::speed_monitor_and_control () // call this once per 'MAIN_LOOP_REPEAT_TIME_US= 31250' main loop pass to keep count = edges per sec
{
-#ifdef USING_DC_MOTORS
+#ifdef USING_DC_MOTORS // deprecated
if (dc_motor)
return 0;
#endif