Commit Graph

183 Commits

Author SHA1 Message Date
Benjamin Vedder 3c88ecb7aa Added configurable PID loop rate and more AUX port modes 2021-07-12 14:31:01 +02:00
Benjamin Vedder 1ab25a47db Added position PID offset support and KD_PROC term 2021-07-11 20:19:26 +02:00
Dado Mista 813d5b15fa Balance App: introduce new speed based variable tiltback
Nose angle adjustment, similar in purpose as constant tiltback
but it is proportional to erpm aka speed.

Signed-off-by: Dado Mista <dadomista@gmail.com>
2021-06-25 21:42:37 -07:00
Benjamin Vedder 029bd88981 Make CAN-enum 32 bits 2021-06-19 19:40:07 +02:00
Benjamin Vedder 32af87b08a Added aux out modes 2021-06-19 17:50:44 +02:00
Benjamin Vedder 75b84f1f2d Added kill switch support 2021-06-13 13:46:27 +02:00
Mitch Lustig d561c2669b Add balance loop time correction 2021-06-06 14:01:42 -07:00
Mitch Lustig de9400e461 Add brake timeout 2021-06-05 16:05:19 -07:00
Mitch Lustig d68fc0ff4f Balance: Updates
-Fix D term to use angle rather than error (which includes tilt steps)
-Switch TT to Biquad (Clear z1 z2)
-Split TT Relax speed
-Add Biquad to D term
-Add console command to graph specific variables
-Add console command to dump realtime data from specific variables
2021-06-01 03:20:00 -07:00
Mitch Lustig b237cf4b9f Add High Pass FIlter, implement current off delay, refactor constanttilt 2021-05-16 14:53:03 -07:00
Benjamin Vedder 77af43935a Removed outdated LED-support 2021-05-11 09:57:27 +02:00
Benjamin Vedder dfe17ac334 Dynamic QML-script write support 2021-05-01 13:28:46 +02:00
Benjamin Vedder f25144cc30 Removed iterative observer, added p_pid_gain_dec_angle 2021-04-26 23:14:05 +02:00
Benjamin Vedder 5767b703b7 Custom UI support 2021-04-24 22:36:00 +02:00
rodale75 b01930d586 commands: Added COMM_BM_HALT_REQ
Command added for being able to halt the CPU while connected via
blackmagic probe.
2021-04-23 15:58:24 +02:00
Mitch Lustig c9ed013f13 Fix low speed Full switch faults, Fix Booster, Improve turn/torque tilts 2021-04-17 18:05:24 -07:00
Benjamin Vedder 14b25e9aa4 Added foc_fw_q_current_factor 2021-04-15 10:04:28 +02:00
Benjamin Vedder 3a9d3bfe10 Remove old define 2021-04-11 19:44:31 +02:00
Benjamin Vedder 55dba9a79d Made odometer persist after firmware updates, added hw runtime counter 2021-04-11 19:36:11 +02:00
Benjamin Vedder 9dff7b42c4 Resolved conflict 2021-04-11 09:38:33 +02:00
Benjamin Vedder feb1be5fbd First attempt at field weakening and current controller windup protection improvement 2021-04-10 11:37:35 +02:00
dnordahl83 33da036106 commands: Added COMM_GET_BATTERY_CUT.
This command returns a buffer with the following parameters:
[type, scale, size]

 * cut off start [float, 1e3, 4b]
 * cut off end [float, 1e3, 4b]
2021-04-09 14:31:23 +02:00
Benjamin Vedder 101f293389 Added new BMS counters 2021-04-08 22:34:01 +02:00
Benjamin Vedder 2848ec1b54 Merge branch 'dev_fw_5_03' of https://github.com/vedderb/bldc into dev_fw_5_03 2021-04-08 18:09:56 +02:00
Benjamin Vedder 1aef262cf1 Added more BMS datatypes 2021-04-08 18:09:53 +02:00
Mitch Lustig 08f27f433c Add turn tilt 2021-04-06 02:18:32 -07:00
Benjamin Vedder fcb7e12158 Made servo output a config option 2021-03-31 16:28:46 +02:00
Mitch Lustig decdc7e7d6 Add torquetilt 2021-03-27 20:13:22 -07:00
Mitch Lustig 3b9fe6ec67 Add Booster 2021-03-27 14:00:55 -07:00
Mitch Lustig 49e624ba3b Remove boring features 2021-03-27 12:17:10 -07:00
Benjamin Vedder 3b4e601f61 Offset calibration update 2021-03-22 12:13:19 +01:00
Benjamin Vedder bdb7b0bf7b Added KTY84 temp sensor support 2021-03-17 11:54:42 +01:00
Benjamin Vedder 9c0eb285bb Added BMS FWD CAN mode 2021-03-13 11:36:47 +01:00
Benjamin Vedder 69c6939b15 Added power switch can commands 2021-02-28 20:29:51 +01:00
Dado Mista e567c460f1 NTC 100K@25C Temperature Sensor support added
Some PHUB188 hubs have a 100k instead of 10k temperature sensors, including the first
few batches of Fungineers hubs for balance vehicles.

Signed-off-by: Dado Mista <dadomista@gmail.com>
2020-12-18 09:09:38 -08:00
Benjamin Vedder cd513297d8 Added 100K CAN-baudrate 2020-12-15 00:27:58 +01:00
Marcos Chaparro 33b5d5c1ba Pedal assist support (PAS)
This commit enables cadence-based pedal assist for ebikes using
quadrature-style pedal speed sensors.

There are 2 operation modes:
* PAS only: Motor current is based only on pedal feedback
* ADC + PAS: The code will use both ADC and pedal feedback and use
the strongest command to provide seamless overlap when the user is
pedalling and requests extra torque with the throttle.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-12-07 17:06:36 -03:00
Benjamin Vedder 66b4d8f56d Added FOC D axis controller gain scaling at max modulation 2020-12-06 21:33:08 +01:00
Benjamin Vedder 55096f93cc Added UAVCAN raw throttle modes 2020-12-04 17:54:22 +01:00
Marcos Chaparro 50bc55e487 MT6816 SPI encoder support
This encoder needs x2 16bit SPI transfers so the hardware SPI peripheral
was used to run SCLK at 10MHz and reduce the ISR duration.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-11-30 19:12:58 -03:00
Benjamin Vedder 6509065ca2 Added BMS module 2020-10-22 08:32:51 +02:00
Benjamin Vedder cabd83a8a6 Fixed merge conflict 2020-10-09 21:19:16 +02:00
Benjamin Vedder c77f92470b IO board support, initial bms support, more openloop parameters, removed D current injection, added new HWs 2020-10-09 21:08:48 +02:00
Till Rosenband 5d26063152 Store odometer in emulated EEPROM (update at shutdown).
* New "dist" terminal command shows odometer and trip distances.
* Odometer value is sent to UI via COMM_GET_VALUES_SETUP.
* UI can set the odometer via COMM_SET_ODOMETER.
* Unfortunately, the bootloader clears the odometer to 0 when FW is reprogrammed.
2020-10-04 00:33:06 -04:00
Till Rosenband 82e5bcd845 Verify FLASH integrity of MC and APP config with CRC.
* Currently the FW code has CRC checks, but configs are also important!
* This helps maintain FLASH integrity when the config pages are occasionally
  re-written due to odometer updates (later commit).
* If the config CRC checks fail, store the fault and fall back to default config.
* New 'crc' terminal command displays CRC values.
2020-10-04 00:31:31 -04:00
Mitch Lustig 7db04df582 Add all the variables 2020-07-03 20:33:15 -07:00
Mitch Lustig 8299445c66 Basic feature set complte
Fix some bugs
Add D-Term PT1 Filter
Add all the fault delays
Setpoint clamp no longer breaks tiltback
Add configurable constant tiltback erpm
2020-07-02 01:07:54 -07:00
Marcos Chaparro 42926d530e Add MTPA support
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-06-06 22:14:06 -03:00
Mitch Lustig 976413887b Working LSM6DS3 needs lil work but its 3 am and i need to save progress 2020-05-29 03:10:43 -07:00
Benjamin Vedder 9781fb9563 Manually merged #166 2020-05-12 15:53:32 +02:00