Commit Graph

285 Commits

Author SHA1 Message Date
Benjamin Vedder 14b25e9aa4 Added foc_fw_q_current_factor 2021-04-15 10:04:28 +02:00
Benjamin Vedder ac360ae7f6 Give D-axis current priority when limiting current, added mcpwm_foc_set_current_off_delay 2021-04-14 22:29:50 +02:00
Benjamin Vedder 998bc17ba7 Cleanup 2021-04-12 09:48:29 +02:00
Benjamin Vedder ca8e7b4f05
Merge pull request #271 from CTSchorsch/dev_05_03
- Add driver for SX1278 LoRa boards, eg. HopeRF RFM95W (driver by Woj…
2021-04-12 09:35:38 +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 b49606be4c Updated changelog and beta number 2021-04-10 16:41:20 +02:00
Benjamin Vedder feb1be5fbd First attempt at field weakening and current controller windup protection improvement 2021-04-10 11:37:35 +02:00
Benjamin Vedder 101f293389 Added new BMS counters 2021-04-08 22:34:01 +02:00
Benjamin Vedder a9c2a4fcc9 Added ER application 2021-04-06 14:12:57 +02:00
Benjamin Vedder fcb7e12158 Made servo output a config option 2021-03-31 16:28:46 +02:00
CTSchorsch 755ff98ec9 fix spaces, delete lines and default config 2021-03-31 14:10:27 +02:00
CTSchorsch 331494291d - move lora files from hwconf/ to lora/
- modify Makefile and add lora/lora.mk
- hopefully have all idents fixed
- restore commands.c and add new function again
- fix memory leak bug in gesc.c
- rfm95w.c add delay in while loop
- add gesc to build_all / rebuild all works
2021-03-27 21:13:24 +01:00
CTSchorsch cdb8e82c32 - Add driver for SX1278 LoRa boards, eg. HopeRF RFM95W (driver by Wojciech Domski, https://github.com/wdomski/SX1278)
- Add a simple bool isInitialized() to commands.c, to check if commands are initialzied
- Add hwconf for GESC, hobby open source ESC (https://github.com/CTSchorsch/gesc) including a simple double pulse test function
- Add app_dpv.c to read out a simple I2C magnetic field sensor and two hall sensors to control a underwater scooter
2021-03-27 14:15:22 +01:00
Benjamin Vedder 2133d21fbc Avoid numerical instability when utils_map is used over a range that approaches 0 2021-03-27 11:18:47 +01:00
Benjamin Vedder 9ad604247d Updated changelog and minor fixes 2021-03-26 17:58:21 +01:00
Benjamin Vedder 8b9e3bf93f Offset calibration improvements 2021-03-24 13:09:05 +01: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 89c4d712e8 HFI-Start fixes 2021-03-13 15:41:57 +01:00
Benjamin Vedder c82346b42e Added HFI start sensor mode 2021-03-13 11:42:23 +01:00
Benjamin Vedder e877c43158 Added CAN ID to BMS packet 2021-03-04 10:34:39 +01:00
Benjamin Vedder 8900c41c34 First phase filter and offset calibration attempt 2021-02-28 20:36:02 +01:00
Benjamin Vedder ecb43e70bb Cleanup 2021-01-13 21:51:55 +01:00
Jeffrey M. Friesen 57a13ec2da cleanup merge 2021-01-13 09:05:16 -08:00
Jeffrey M. Friesen 8f703dace0 merge 2021-01-13 08:57:36 -08:00
Jeffrey M. Friesen d75069615c Merge remote-tracking branch 'upstream/master' into dev_fw_5_03 2021-01-11 13:51:52 -08:00
Jeffrey M. Friesen bddbbadc98 Added HWE Conf for 60D+ 2021-01-11 12:26:47 -08:00
Benjamin Vedder 3f670137e2 Rebuild firmwares and disabled test version flag 2021-01-11 12:19:10 +01:00
Jeffrey M. Friesen 1b67f3efaf Added build script for 60D+ 2021-01-05 12:36:52 -08:00
Jeffrey M. Friesen 6a3dfb8526 Patched bug with gpio AF in uart 2021-01-05 12:30:41 -08:00
Jeffrey M. Friesen e862f29298 Re-wrote uart driver a bit 2021-01-05 09:39:45 -08:00
Jeffrey M. Friesen f549090a03 Merge remote-tracking branch 'upstream/dev_fw_5_02' into dev_fw_5_02 2020-12-27 13:56:12 -08:00
Jeffrey M. Friesen 38fd15482e started adding 60D plus changes 2020-12-27 13:56:07 -08:00
Mitch Lustig 24e190c66c Merge branch 'dev_fw_5_02' into little_focer 2020-12-25 03:51:01 -08:00
Benjamin Vedder 64ed0df71a Only set one hw active and increase beta version number 2020-12-24 14:11:54 +01:00
Benjamin Vedder 4d73ba9bc6
Merge pull request #245 from Mitchlol/cfoc2_1.0
Add Cheap Focer 2 Hardware
2020-12-24 13:42:20 +01:00
Frank Severinsen 5eb935f3ce WIP, Current status DAC output 2020-12-22 00:24:19 +01:00
Mitch Lustig 7e72bda93c Merge branch 'dev_fw_5_02' into cfoc2_1.0 2020-12-16 02:34:13 -08:00
Mitch Lustig 5b36bc9538 Little bit of cleanup 2020-12-15 22:53:48 -08:00
Mitch Lustig 7458fdae10 Merge branch 'dev_fw_5_02' into little_focer 2020-12-14 23:41:24 -08:00
Mitch Lustig 7b81cfbf5b Add little focer 2020-12-14 23:40:58 -08:00
Benjamin Vedder cd513297d8 Added 100K CAN-baudrate 2020-12-15 00:27:58 +01:00
Benjamin Vedder fefb2b7d10 Set PAS pins to UART RX and TX if they are undefined, made PAS config serialization more compact, added PAS to changelog 2020-12-09 19:37:16 +01:00
Mitch Lustig 21f61c84ed Merge branch 'dev_fw_5_02' into cfoc2 2020-12-08 15:02:49 -08:00
Benjamin Vedder 66b4d8f56d Added FOC D axis controller gain scaling at max modulation 2020-12-06 21:33:08 +01:00
Mitch Lustig 8570b5fa14 Merge branch 'dev_fw_5_02' into cfoc2 2020-12-05 00:22:28 -08: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 b7b0182856 CAN fixes, renamed HD to HD60, fixed multiturn position control 2020-11-18 14:26:55 +01:00
Mitch Lustig e8d3e1c819 Merge branch 'dev_fw_5_02' into cfoc2 2020-11-06 09:39:53 -08:00
Benjamin Vedder af7cd36cb8 Added hall sensor interpolation ERPM config option 2020-10-22 08:37:32 +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
Mitch Lustig 268251fa69 Merge branch 'dev_fw_5_02' into cfoc2 2020-09-18 21:49:33 -07:00
Mitch Lustig fbe78dfe93 Add CFOC2 2020-09-18 21:47:00 -07:00
Benjamin Vedder f560f27871 Merge branch 'master' into dev_fw_5_02 2020-08-13 13:54:16 +02:00
Benjamin Vedder 2078dc1c43 added 140/300 hw and comm_can fix 2020-08-13 13:53:29 +02:00
Jeffrey M. Friesen 27ec82d785 set default build back to vesc 6 2020-08-10 09:29:32 -07:00
Frank Severinsen 5a52405a78 include default HW 2020-07-21 10:55:31 +02:00
Frank Severinsen 3acbfffa26 added custom HW file, support for ID pins, and fixed circular include 2020-07-21 10:54:04 +02:00
Benjamin Vedder 0b6ccb17f9 some cleanup 2020-07-21 08:50:09 +02:00
Benjamin Vedder 22b7eb8ce5 More blackmagic support and rebuilt firmwares 2020-07-06 17:20:45 +02:00
Benjamin Vedder 561e29cd36 fixed conf_general again 2020-07-02 12:42:49 +02:00
Benjamin Vedder 4adc989da7 Fixed blackmagic UICR bug, updated changelog and rebuild script 2020-07-02 12:39:54 +02:00
Benjamin Vedder 960cd3b992 Some updates to MTPA PR 2020-06-17 13:55:35 +02:00
Jeffrey M. Friesen 6d2e0831ac switch led ordering on gpio 2020-06-08 16:02:44 -07:00
Benjamin Vedder b1915b06a7 Some updates for PRs 2020-06-03 10:52:55 +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 36c56b38fc Updated changelog and version + test version numbers 2020-05-01 09:45:32 +02:00
Benjamin Vedder 80fffdea73 Fixed PPM bug in previous release 2020-04-27 14:23:49 +02:00
Benjamin Vedder b2bab06172 Turned off test build flag 2020-04-27 10:04:44 +02:00
Benjamin Vedder ef4ebfde93 Allow throttle in opposite direction even after passing speed limit for PPM and VESC Remote apps 2020-04-26 11:48:55 +02:00
Benjamin Vedder ee76eb4f09 Ignore FW update commands forwarded to the second motor on dual hardware 2020-04-25 17:54:12 +02:00
Benjamin Vedder 8b6f0680e4 Added HW60_MK4 support and added 60_MK4 and 75_300_R3 to build script 2020-04-24 20:48:21 +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
Benjamin Vedder d3c8d0a533 Add 1 to UUID for motor2 on dual motor HWs. 2020-04-17 20:07:03 +02:00
Benjamin Vedder c64e7987bc Use fast speed estimator for hall sensors and encoder 2020-04-16 12:16:02 +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
Benjamin Vedder 393363169a Merge branch 'dev_fw_5_00' of https://github.com/vedderb/bldc into dev_fw_5_00 2020-04-16 09:13:39 +02:00
Benjamin Vedder 6f7c40b4e1 Improved flux linkage measurement 2020-04-16 09:12:08 +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 0e6f8dd567 Change back motor thread after foc_sensors_detect_apply terminal command 2020-04-09 09:27:43 +02:00
Jeffrey M. Friesen 2b13131a44 Correctly log motor fault data and iterate beta version number 2020-04-06 13:52:04 -07:00
Jeffrey M. Friesen 1b67dc2666 Refactored name of is_test_build, also added dual stuff to foc_detect_apply_all_can 2020-04-05 12:28:08 -07:00
Jeffrey M. Friesen 30f3d8e455 Merge remote-tracking branch 'upstream/dev_fw_5_00' into dev_fw_5_00 2020-04-05 12:04:15 -07:00
Jeffrey M. Friesen 0bb5b2d99c Cleaned up detect_apply_all terminal command for dual hardware 2020-04-05 12:04:04 -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
Benjamin Vedder c0f75f14ac Current ramping during resistance measurement 2020-04-02 20:43:11 +02:00
Jeffrey M. Friesen 1d5ce285f6 Fixed build error 2020-04-01 18:24:25 -07:00
Benjamin Vedder dd16ce862d Added HW_DUAL_CONFIG_PARALLEL option 2020-03-29 17:07:31 +02:00
Jeffrey M. Friesen b4bf8408b4 fix USB freezing on windows bug
Intermittent freezing on windows connecting to vesc_tool. This seems to fix it, more testing needed since it is so intermittent.
2020-03-22 09:36:14 -07:00
Benjamin Vedder 10b700b74c Updated observer gain scaling, and implemented CAN shutdown on unity hw config 2020-03-21 01:05:42 +01:00
Benjamin Vedder a61e74db82 Fixed memory leak 2020-03-20 20:40:41 +01: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
Jeffrey M. Friesen 7d0c1ce650 Shutdown timeout for unity and tabs for spaces in hw conf 2020-03-17 10:48:34 -07:00
Jeffrey M. Friesen dceaece8f0 Updated configs for 100s and 60d 2020-03-17 10:18:39 -07:00