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.h
- Revision:
- 13:ef7a06fa11de
- Parent:
- 12:d1d21a2941ef
- Child:
- 14:acaa1add097b
--- a/brushless_motor.h Mon Mar 04 17:51:08 2019 +0000
+++ b/brushless_motor.h Sun Sep 29 16:34:37 2019 +0000
@@ -6,7 +6,7 @@
#define MBED_BRUSHLESSMOTOR_H
#include "mbed.h"
-#include "DualBLS.h"
+#include "STM3_ESC.h"
#include "FastPWM.h"
class brushless_motor
@@ -15,7 +15,7 @@
uint32_t Hall_index[2], encoder_error_cnt, motor_poles, current_sense_rs_offset;
uint32_t Hall_total, // Incremented on every Hall sensor transition
Hall_previous,
- visible_mode,
+ visible_mode, // One of MOTOR_HANDBRAKE, MOTOR_FORWARD, MOTOR_REVERSE, MOTOR_REGENBRAKE
inner_mode;
uint32_t direction;
int temp_tick;
@@ -39,7 +39,10 @@
uint32_t tickleon;
double Idbl;
double last_V, last_I;
- double dRPM, dMPH, s[8];
+ double dRPM, dMPH,
+ sdbl[8]; // Filter coefficients for filtering RPM and MPH reading stuff, I think!
+ // Used in brushless_motor::speed_monitor_and_control ()
+
// brushless_motor () {} ; // can not use this with exotic elements PortOut, FastPWM etc
brushless_motor (PinName iadc, PinName pwv, PinName pwi, const uint16_t *, PinName h1, PinName h2, PinName h3, PortName, int, uint32_t) ; // Constructor
bool poles (int) ; // Set number of motor poles - 4, 6, or 8