Commit Graph

85 Commits

Author SHA1 Message Date
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
Jeffrey M. Friesen 216a009d10 remove comment on motor temp 2020-07-28 13:04:39 -07:00
Jeffrey M. Friesen 75f9b1cdd0 removed motor temp offset and fixed bug in 60D header 2020-07-27 10:56:01 -07:00
Jeffrey M. Friesen f41a54c23d Merge branch 'dev_fw_5_02' of https://github.com/vedderb/bldc into dev_fw_5_02 2020-07-21 08:27:33 -07:00
Marcos Chaparro 2a3110cc53 Fix id and vd sign during inverted direction
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-06-06 22:14:06 -03:00
Jeffrey M. Friesen 6069b2f872 minor changes to fault reporting 2020-06-06 17:38:53 -07:00
jxltom 52a1e1d446 Fix warning: missing initializer for field 'ah_charge_tot' of 'setup_values' 2020-05-09 12:00:02 +08: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 4dab6ed9e7 Fixed merge, renamed utils_batt_norm_v_to_capacity, scale battery ah with 0.85 since the battery is not fully depleted at 3.2V per cell 2020-04-16 09:39:47 +02:00
Jeffrey M. Friesen acfc93e693 Patched some weird behavior with motor temp on stormcore and added #define for filter constant
Was seeing a lot of coupled noise on stormcore with phase currents so I turned up the LPF on the motor temp sensor. I think it might be a good idea to turn up that LPF generally since motor temp is generally slow to change anyways.

Also found a problem in the #define for motor temp 2 in my header file. Fixed it.
2020-04-14 14:05:47 -07:00
Jeffrey M. Friesen 6e83fd3408 Added gentle li-ion curve mapping
Should provide a slightly more accurate estimate of the remaining battery, I fit a fifth order polynomial to a discharge graph of a samsung 30q cell.

Technically the watt hours left should be integrated across this curve instead of using the average remaining voltage but maybe the combination of both provides a good midway estimate between the actual curve and a line since all cells are slightly different.
2020-04-14 09:12:57 -07:00
Benjamin Vedder 3ab8002fa4 Motor temperature filtering bug fix 2020-04-09 22:33:20 +02:00
Benjamin Vedder 282b40cbd5 Select motor in fault thread 2020-04-08 09:16:31 +02:00
Benjamin Vedder 88d74ae0b6 Added mutex to DRV SPI driver, moved fault stop to thread, smooth current ramping for sensor and flux linkage detection 2020-04-03 20:12:12 +02:00
Benjamin Vedder c408a86b21 Stop on faults for both DRVs on DUAL_PARALLEL hw 2020-03-29 17:24:07 +02:00
Benjamin Vedder 6b3bcca4c1
Merge pull request #143 from powerdesigns/BBSHD-tuning
More bbshd support
2020-03-29 17:12:21 +02:00
Benjamin Vedder 7ccf626b42 Some updates on PR 2020-03-29 17:00:43 +02:00
Jeffrey M. Friesen 47813b1ab6 One motor Double Current Drive on Dual 2020-03-28 11:21:45 -07:00
Marcos Chaparro 278f767854 BBSHD: monitor 12V rail
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-03-26 11:04:37 -03:00
Benjamin Vedder f4b31b8133 More refactoring 2020-03-21 12:04:20 +01:00
Benjamin Vedder b1945b7dfc Cleaning, optimization and refactoring 2020-03-21 11:40:50 +01:00
Benjamin Vedder 28d97a421d Updated changelog 2020-03-20 21:55:01 +01:00
Benjamin Vedder 68163a88b6 Some optimizations to make mc_interface timer ISR run faster 2020-03-20 21:48:21 +01:00
Jeffrey M. Friesen 1c29679218 Merge remote-tracking branch 'upstream/dev_fw_5_00' into dev_fw_5_00 2020-03-17 09:34:30 -07:00
Benjamin Vedder a06f09e7f2 Observer gain scaling update, print correct motor on faults, updated timer terminal command 2020-03-17 09:38:09 +01:00
Jeffrey M. Friesen 36bdbebae3 100D Functioning
Modified hw config of 100D to get running.

Increased delay in drv8323s to improve stability of spi bus (was getting erroneous read/write at anything lower)

added custom settings for drv8323s for things like adjustable gate drive currents and shunt amplifier gains.  Maybe should move to hw conf and do the motor switch from mc_interface.
2020-03-16 19:33:33 -07:00
Benjamin Vedder 5219bb36ff Better thread/isr motor selection 2020-03-16 22:42:44 +01:00
Benjamin Vedder 52e17059e5 Major restructuring for dual motor support, and added unity hw files 2020-03-16 18:32:39 +01: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 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
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 8bf645bbdf Motor resistance as polynom parameter used 2020-01-14 22:16:46 +05:00
Kirill Kostiuchenko 539a0ca327 PTC_1K_100C was modified to 25C by mistake, restored 2020-01-14 22:08:19 +05:00
Kirill Kostiuchenko b1a52d3ac0 KTY83/122 motor temp sensor added 2020-01-05 18:24:12 +05:00
Benjamin Vedder 210ec40d74 PTC motor thermistor support, APP_PPM sleep fix 2019-12-22 21:22:07 +01:00
Kirill Kostiuchenko 8dbdb1bc4d Set new tachometer value interface added. 2019-12-07 21:07:05 +05:00
Benjamin Vedder 23e61925b6 FW upload compression support, TS5700N8501 support 2019-12-05 19:50:17 +01:00
Benjamin Vedder a233367be8 MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
Benjamin Vedder 602db7435b FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
Benjamin Vedder 05b1a9483e Merge branch 'Axiom-board-support' of https://github.com/powerdesigns/bldc into powerdesigns-Axiom-board-support 2019-05-04 10:44:03 +02:00
Benjamin Vedder 404bbcf64b Fixed current offset fault bug, added support for multiple IMUs and ICM-20948 2019-05-03 19:55:36 +02:00
Marcos Chaparro 1d08745376 Axiom control board support
Rename paltatech naming to Axiom.

For safety set Axiom default max input voltage to 0.0V so it can not run a
motor without mc_conf being explicitly configured by the user.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-27 08:21:46 -03:00
Benjamin Vedder 8313b32c0c Some fixes on PR 2019-04-26 12:02:57 +02:00