Commit Graph

157 Commits

Author SHA1 Message Date
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
Benjamin Vedder 6196805d8c Added CHUK_CTRL_TYPE_CURRENT_BIDIRECTIONAL, some fixes on last PR 2020-05-03 22:35:37 +02:00
Peemouse f6d7ed1fd2 Add COMM_GET_MCCONF_TEMP command 2020-05-01 15:22:09 +02:00
Benjamin Vedder 57c5d04214 Added l_duty_start and set correct motor in mcinterface_timer 2020-04-21 19:58:12 +02:00
Benjamin Vedder d9fc2fc34c Moved IMU calibration to blocking thread 2020-04-19 10:20:48 +02:00
Mitch Lustig 7869b34cf1 Good start on IMU Wizard 2020-04-18 11:51:50 -07:00
Benjamin Vedder 2f19819d27 Fixed conflicts with master merge 2020-04-04 22:35:29 +02:00
Benjamin Vedder 76fd7a3917 Added COMM_SET_CAN_MODE and added support for HW75_300_R3 2020-04-04 22:28:41 +02:00
Jeffrey M. Friesen f7964e20c2 Few small changes and fixed bug with duals
Added ramping to current measurement to avoid steps during current calibration with an un-tuned current controller.

Added terminal command for mapping to internal nrf pins, useful when you want to erase_mass a locked nrf chip and dont want to cycle between a bunch of windows to scan connect etc.

Made fault led on duals blink if motor 2 is faulting.

Added break on inductance measurement if motor faults.

Added placeholder commands for changing name and pin of BLE module.
2020-04-01 17:58:37 -07:00
Benjamin Vedder 51f0fcea09 gpdrive fix, observer gain calc updates, added COMM_SET_BATTERY_CUT, added CAN_PACKET_SHUTDOWN, detect all fix 2020-03-20 17:35:25 +01:00
Benjamin Vedder 84ce74c325
Merge pull request #141 from Mitchlol/Balance_app_sprint_3
Balance sprint 3
2020-03-16 20:35:26 +01:00
Benjamin Vedder 52e17059e5 Major restructuring for dual motor support, and added unity hw files 2020-03-16 18:32:39 +01:00
Mitch Lustig 24afd4e6f3 Balance sprint 3
-Can steering based on speed
-Can steering current clamp
-Min rpm for half switch state fault
-Soft mode tuning (pitch angle affinity, setpoint affinity, setpoint limit)
-Reset I value on faults issue #117
-fix startup tiltback
2020-03-15 23:18:34 -07:00
Mitch Lustig 6d29b6741f Use ADC for switches 2020-02-23 13:34:51 -08:00
Mitch Lustig d4f6036de7 Implement nose angle adjustment 2020-02-23 10:23:19 -08:00
Mitch Lustig 2c07512091 Add can bus, 2 wheel steering & stabilization, brake, dead & fault dealy 2020-02-23 00:22:21 -08:00
Benjamin Vedder 97ef43cff8 Leave debug mode on NRF5x after SWD upload, more TS5700N8501 encoder features, more CAN baud rates 2020-02-01 00:37:25 +01:00
Benjamin Vedder b6949d60dc FW4.00: HFI and many updates, see changelog 2020-01-28 19:46:19 +01:00
Benjamin Vedder 287cabe76f Common motor temperature validity check 2020-01-21 09:13:18 +01:00
Benjamin Vedder ae5ea13998
Merge pull request #124 from powerdesigns/Axiom-resolver
Axiom full resolver support
2020-01-21 08:35:36 +01:00
Benjamin Vedder 2a910e17d6
Merge pull request #120 from ddosoff/master
KTY83/122 and priority to custom commands
2020-01-21 08:34:58 +01:00
Marcos Chaparro 9965bb52d5 Axiom: Full resolver support
Fixes a low level SPI timing bug.
Provide Loss of Signal, Degradation Of Signal and Loss Of Tracking
fault sources, and stats to the 'encoder' terminal command.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-01-20 11:06:02 -03:00
Benjamin Vedder 9b98afb5a3 Merge branch 'master' of https://github.com/vedderb/bldc 2020-01-20 09:39:38 +01:00
Benjamin Vedder ffbc6eb89b First attempt at HFI 2020-01-20 09:39:33 +01:00
Marcos Chaparro 356f3db20e Add Break function for instant PWM disable
When enabled, the Break (or BRK) is a mechanism that upon a active
level in the TIMx_BRK pin disables asynchronously the PWM output pins,
achieving fast reaction times when an external fault even happens.
See AN4277.

Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2020-01-19 15:36:40 -03:00
Kirill Kostiuchenko 2fa512b5ed merge 2020-01-14 22:04:02 +05:00
Benjamin Vedder b002e5d78e FW 3.66: Many changes, see changelog 2020-01-12 21:25:21 +01:00