Commit Graph

272 Commits

Author SHA1 Message Date
Mitch Lustig 49e624ba3b Remove boring features 2021-03-27 12:17:10 -07: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
mattbutlar 583e62933d Add roll compensation to the balance app 2021-03-14 22:57:47 -07:00
Benjamin Vedder 703f1ed9a3 Fixed RPM limit bug for curret hyst rev mode 2021-03-13 11:33:29 +01:00
Benjamin Vedder 9a0973cba1 Style fix 2021-01-15 14:01:16 +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 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
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
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 52f8f2cf35 Merge remote-tracking branch 'vedderb/dev_fw_5_02' into balance_3 2020-07-09 01:06:02 -07:00
Mitch Lustig 27e1d11f4a Lil fixes 2020-07-04 03:35:19 -07:00
Mitch Lustig 0f5c6f5379 Add confgen and running states 2020-07-04 00:11:20 -07:00
Mitch Lustig 7db04df582 Add all the variables 2020-07-03 20:33:15 -07:00
Peemouse ca05c36c7f App PPM rework - fix previous commit
CHANGED : Master keeps the slave(s) running even if a local fault occurs
CHANGED : Master now sends relative value instead (%) instead of absolute value (A) (great for multiple VESC with different currents settings)
FIXED : Timeout current brake feature not working
FIXED : brake command sent over CANbus even if Multiple VESC over CAN disabled
FIXED : delay before switching slave off in case of RX timeout
ADDED : Traction control auto-disabling in case of fault on master, re-enable only if no effect on motors will happen (avoid weird behaviour exiting fault state on master).
2020-07-03 15:16:46 +02: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
Peemouse 37e9c2143b CHANGED : Master keeps the slave(s) running even if a local fault occurs
CHANGED : Master now sends relative value instead (%) instead of absolute value (A) (great for multiple VESC with different currents settings)
FIXED : Timeout current brake feature not working
FIXED : brake command sent over CANbus even if Multiple VESC over CAN disabled
FIXED : delay before switching slave off in case of RX timeout
ADDED : Traction control auto-disabling in case of fault on master, re-enable only if no effect on motors will happen (avoid weird behaviour exiting fault state on master).
2020-07-01 14:39:31 +02:00
Mitch Lustig b61a0ea7be Add additional timer for switch half state 2020-06-19 01:28:52 -07:00
Mitch Lustig da7b3a0ffb Mix of stuff (Not a working state)
Organize vars
Hack in dterm PT1
Improve faults
Remove dead state
2020-06-19 01:00:37 -07:00
Benjamin Vedder 6196805d8c Added CHUK_CTRL_TYPE_CURRENT_BIDIRECTIONAL, some fixes on last PR 2020-05-03 22:35:37 +02:00
Benjamin Vedder 80fffdea73 Fixed PPM bug in previous release 2020-04-27 14:23:49 +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 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 ffbc6eb89b First attempt at HFI 2020-01-20 09:39:33 +01:00
Benjamin Vedder b002e5d78e FW 3.66: Many changes, see changelog 2020-01-12 21:25:21 +01:00
Benjamin Vedder 210ec40d74 PTC motor thermistor support, APP_PPM sleep fix 2019-12-22 21:22:07 +01:00
Benjamin Vedder ceb8b7bf7d HW60_MK3 support, shutdown fix, added COMM_SET_CURRENT_REL, ramp fix, PPM timeout fix, IRQ prio fix 2019-12-19 16:55:38 +01:00
Benjamin Vedder 0855169754 Merge branch 'master' of https://github.com/vedderb/bldc 2019-12-09 13:47:34 +01:00
Benjamin Vedder 78d3cef3ff Added support for HW60_MK3 and disable shutdown when watchdog runs slowly 2019-12-09 10:57:33 +01:00
Kirill Kostiuchenko 72ab61ba1a pretty printing 2019-12-09 10:59:04 +05:00
Kirill Kostiuchenko f06d8b8bda convert units and accurate zero reach added 2019-12-08 15:02:22 +05:00
Benjamin Vedder 23e61925b6 FW upload compression support, TS5700N8501 support 2019-12-05 19:50:17 +01:00
Benjamin Vedder ce31092c1d Merge branch 'master' of https://github.com/vedderb/bldc 2019-09-21 12:50:41 +02:00
Benjamin Vedder f34d0159bf Fixed nunchuk bug and added COMM_BM_MEM_READ command 2019-09-21 12:50:39 +02:00
Benjamin Vedder 7a9fbae54c
Merge pull request #104 from Mitchlol/remove_axis_config_from_balance_app
Remove axis config from balance app
2019-09-21 12:49:53 +02:00
Mitch Lustig 343dba369a Remove axis config 2019-09-21 01:07:31 -07:00
Mitch Lustig 644e22a459 Add uart app to balance app when using internal IMU 2019-09-21 00:07:20 -07:00
Mitch Lustig b53102d6fd Fix build for versions without HW_SPI 2019-09-12 23:08:56 -07:00
Mitch Lustig d160f74651 Merge branch 'master' into balance 2019-09-12 22:50:12 -07:00
Mitch Lustig 3c31d264fd Add high voltage tiltback 2019-09-12 00:07:26 -07:00
Mitch Lustig 95483cff41 Centralise IMU startup sequence 2019-09-11 23:08:28 -07:00
Mitch Lustig 518776d04e Add basic low voltage tiltback 2019-09-10 19:29:44 -07:00
Mitch Lustig 22d4f7c99a Fix the index, fix the build 2019-09-10 02:25:13 -07:00
Mitch Lustig 8638036750 Fix wheel spin-up on boot
By waiting for gyro to be initialized
2019-09-10 02:04:04 -07:00
Mitch Lustig 67a4653bd8 Add support for dual fault switches 2019-09-10 01:07:05 -07:00
Benjamin Vedder eb6f5945ce FW 3.61: Added smart reverse mode to PPM app, and some fixes 2019-09-09 19:34:26 +02:00
Mitch Lustig 1cc9a9b14c Re-implement startup AHRS config override
So my EUC stops trying to kill me when i boot it up laying down
2019-09-08 22:38:09 -07:00
Mitch Lustig a4de5eb2b5 Cleanup 2019-09-08 22:23:31 -07:00
Mitch Lustig 72e9c24bd7 Make axes configurable, remove offset management 2019-09-08 18:32:53 -07:00
Mitch Lustig 011d3055f6 Merge branch 'master' into merge_new_master 2019-09-08 15:05:54 -07:00
Mitch Lustig 474d8c1691 Little more cleanup 2019-09-08 12:14:59 -07:00
Mitch Lustig 98652977a2 Merge master 2019-09-08 11:42:28 -07: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 e694aecaea
Merge pull request #101 from DooMMasteR/master
Enable the use of the reverse button in App-ADC with PID + rev button.
2019-09-03 20:50:06 +02:00
Benjamin Vedder 602db7435b FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
Mitch Lustig 7a47053ca6 Add startup calibration sequence 2019-08-27 19:57:35 -07:00
Mitch Lustig f257f77584 Implement calibration 2019-08-27 09:10:44 -07:00
Mitch Lustig a2231593b2 Start on better gyro config 2019-08-25 23:49:33 -07:00
Steffen Arntz f5b1653455 Enable the use of the reverse button in App-ADC with PID + rev button.
previously only the cc button was working, even if rx/tx as buttons was available.
2019-08-22 12:45:21 +02:00
Mitch Lustig bf27a308ab Rename thread 2019-08-10 22:00:00 -07:00
Mitch Lustig c3cf302ba3 FIx thread stopping synchronization. FIx gyro config not being applied. 2019-08-10 21:52:21 -07:00
Mitch Lustig 971957a0d1 Fix all compiler warnings 2019-08-10 00:16:48 -07:00
Mitch Lustig 62da9e5b83 Better peripheral gyro management 2019-08-09 23:16:20 -07:00
Mitch Lustig 7cd25a1252 Send app state 2019-08-09 20:55:58 -07:00
Mitch Lustig 2c41dda638 Add confgenerator fix bugs 2019-08-08 23:39:14 -07:00
Mitch Lustig 14faa2e593 Make all features configurable 2019-08-07 00:22:51 -07:00
Mitch Lustig bf566fe21a Add fault, smooth startup, and over speed tilt back safety 2019-08-04 23:13:35 -07:00
Mitch Lustig 15703429f5 Add gyro tuning functionality & state machine logic 2019-08-04 11:47:23 -07:00
Mitch Lustig 800115f683 Implement more data to help debug 2019-07-30 00:27:23 -07:00
Mitch Lustig bbba718140 Work to get GUI going 2019-07-29 00:31:48 -07:00
Mitch Lustig fccb59b2ef Merge branch 'master' into balance 2019-07-27 21:28:02 -07:00
Mitch Lustig 271dd21dab start in balanace app 2019-07-27 21:25:56 -07:00
Benjamin Vedder 8619ccf4f3 Updated compiled FWs 2019-07-01 19:29:09 +02:00
Benjamin Vedder c7d11ca431 Some fixes for previous PR 2019-07-01 18:35:27 +02:00
Benjamin Vedder 30aabb77d7 Detect FOC fix, adc brake multi fix, make ppm pulses invalid above 150 percent 2019-07-01 17:17:49 +02:00
Davide D'Agostino 19fb5e04c6 Rebuild the firmwares 2019-06-29 19:59:02 -07:00
Davide D'Agostino ce802e3547 Move the new smart revers funcion as separate control type
Removed unnecessary ADC fields from its config.
2019-06-24 13:36:55 -07:00
Davide D'Agostino 05b0f0dd9f Port Ackmaniac smart reverse 2019-06-19 19:00:46 -07:00
Benjamin Vedder a2bf8a87c6 Chuk RPM filter and output rate updates 2019-04-18 23:43:07 +02:00
Benjamin Vedder 5202ef41d9 Chuk stop PID on dropout, ppm multi vesc duty fix 2019-04-18 20:00:26 +02:00
Gavin Miller 9deee721f5 Fix indentation, restore proper include to app_custom 2019-04-09 19:12:09 -06:00
tipsmiller 583e71464e Update app_adc with new control scheme 2019-04-09 16:11:11 -06:00
tipsmiller 3639c6c5f8 Remove custom app. Add new entry for adc ctrl type 2019-04-08 17:45:46 -06:00
tipsmiller 48a1e395dd Change HW version to 4.12. Working "clone" of app_adc as custom app. 2019-04-07 19:05:26 -06:00
Gavin Miller 32853a9c4c Copy functionality from app_adc 2019-04-07 13:51:25 -06:00
Benjamin Vedder 65298263b6 75/300 R2 support, terminal sync cmd, IMU support, option to disable permanent UART, collected timer functions in one place 2019-03-10 14:57:42 +01:00
Benjamin Vedder 35c1c72ab4 Commands restructuring for thread safety, 75/300 vreg fix, fixed relative current commands 2019-03-04 19:23:38 +01:00
Benjamin Vedder f9ce429447 Ramping updates 2019-03-01 17:18:07 +01:00
Marcos Chaparro 32cf05629d Resolve merge conficts with major 2019 release
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-02-18 20:25:52 -03:00
Benjamin Vedder 123bb00ab4 Major 2019 update 2019-02-18 19:30:19 +01:00
Marcos Chaparro c59dd2b2fc Fix shadowed variables. Add -Wshadow.
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-28 16:52:02 -03:00
junwoo091400 93c9ad0205 pulses_without_power should be incremented if Absolute value of 'servo_val' is smaller than 0.001 2018-02-28 09:10:27 +09:00
Benjamin Vedder 5a189290bc FW 3.34: PID POS in values, inverted direction angle normalization, relative current mode in APP_ADC 2018-01-24 09:39:06 +01:00
Benjamin Vedder 5348662197 FW 3.32: Configurable CAN baud rate 2017-11-08 14:07:35 +01:00
Benjamin Vedder 6277cf74ca FW 3.31: Acc temp dec option, PID for APP_ADC 2017-10-27 21:29:12 +02:00
Benjamin Vedder 79bfbe6234 FW3.28: dual throttle curves, ntc beta factor config, board file added 2017-09-06 21:13:28 +02:00
Benjamin Vedder f141157358 First official commit after the VESC Project release 2017-09-04 21:12:43 +02:00
Benjamin Vedder 5dbc94c525 FW 3.7 2016-11-04 15:18:34 +01:00
Benjamin Vedder d2f6d87560 FW 3.0: HW60 support, 3 low/high side shunt support, permanent NRF option 2016-06-27 17:29:09 +02:00
Benjamin Vedder ed61c4d332 FW 2.18: Better FOC sensorless startup, app adc safety fix 2016-05-19 19:24:01 +02:00
Benjamin Vedder cb2a205cb8 FW 2.17: as5047 support, change sensor port mode in conf, better encoder detection, FOC ah and wh counter fixes 2016-04-27 15:32:32 +02:00
Benjamin Vedder d52906fbe8 FW 2.15: NRF configuration, PPM and ADC app duty mode scaling to max duty 2016-02-09 12:25:13 +01:00
Benjamin Vedder 6d33ac83b6 FW 1.13: APP_ADC input 2, interface locks during detection, inductance detection fix 2016-02-02 17:19:37 +01:00
Lucas Pleß 294d80b777 added ADC2 analog brake option 2016-02-02 16:28:55 +01:00
Benjamin Vedder 90986c31de FW 2.9: NRF updates (nunchuk has to be updated too), nunchuk command, small can fix, custom app data command 2016-01-24 13:44:51 +01:00
Benjamin Vedder 42c1b79a08 FW 2.7: Better encoder support, small UART and CAN fixes, NRF commands preparation 2015-12-28 01:50:23 +01:00
Benjamin Vedder ff090fd4e0 FW 2.3: MAJOR UPDATE: FOC!! 2015-12-08 21:01:23 +01:00
Benjamin Vedder c4ff81e849 Ported to ChibiOS 3, refactoring, cleanup, added safe start delay after fault for PPM app, removed unused ST libraries 2015-10-08 23:09:39 +02:00
Josh 55d660cdb3 Merge pull request #1 from vedderb/master
FW 1.13: Hw 4.8 support, new CC implementation for nunchuk, refactori…
2015-09-24 21:04:01 -07:00
Benjamin Vedder 06129bb66c FW 1.13: Hw 4.8 support, new CC implementation for nunchuk, refactoring, custom app and hw config support 2015-09-17 23:24:55 +02:00
Josh Dellay c756f00de0 Adding BLDC documentation using Doxygen 2015-09-16 12:26:52 -07:00
Benjamin Vedder 58d892935d PPM dec fix, current sampling updates, ADC cruise control, commutation fix, higher switching frequency, refactoring 2015-08-23 18:26:05 +02:00
Benjamin Vedder 383208bdbd Nunchuk speed control glitch fix 2015-08-03 23:43:34 +02:00
Benjamin Vedder f032111b9b NRF updates, better servo output support 2015-07-31 23:26:50 +02:00
Benjamin Vedder a89ad0f1f1 Fix bug #7, detection now works while apps are active 2015-06-09 06:11:41 +02:00
Benjamin Vedder 87932662b7 Long packet support, configurable min and max duty, longer CAN buffer, default parameter changes, appconf ack fix, refactoring 2015-05-20 16:13:48 +02:00
Benjamin Vedder 5a5ccfb4c3 ADC app added, nunchuk RPM filter, FW version added, feedback on appconf and mcconf set 2015-05-04 23:25:43 +02:00
Benjamin Vedder 85f0073105 PPM updates and safe start implementation 2015-05-01 01:57:55 +02:00
Benjamin Vedder 1ee40ce5ba Median filter option for PPM input 2015-04-20 22:09:53 +02:00
Benjamin Vedder 2ccb52514e Encoder support, NRF nunchuk support 2015-04-11 10:07:36 +02:00
Benjamin Vedder 3b43648803 Show battery level on ws2812 LEDs 2015-03-07 14:56:25 +01:00
Benjamin Vedder b3f8e3aa39 Nunchuk ramping fix 2015-02-21 23:13:33 +01:00
Benjamin Vedder 828cdd92f8 Chuk and PPM config structs, phase advance fixes and implementation for delay comm mode, CAN fixes and status message implementation, multi-esc mode for PPM and Chuk, traction control for PPM and chuk, CAN id config, multi-esc and traction control config, ADC sampling change, hall-sensor read bug fix for HW45+ 2015-02-19 21:20:07 +01:00
Benjamin Vedder 44c1701cf9 Included stable version of ChibiOS, fixed i2c issues, gave more RAM in linker script, added table-based gamma correction for PCB LEDs 2015-01-05 05:48:29 +01:00
Benjamin Vedder 8dc8ffe2c7 Nunchuk ramping, ws2811 configurable pin (Requieres latest BLDC_Tool) 2014-12-20 12:52:38 +01:00
Benjamin Vedder bc4409ba14 Full brake current estimation (NOTE: Extra parameter added, so update BLDC_Tool) 2014-12-13 01:31:54 +01:00
Benjamin Vedder 9ff0f99593 WS2811/WS2812 LED driver to use LEDs for turn and brake lights, etc 2014-12-09 00:11:29 +01:00
Benjamin Vedder 33c81db930 Deadband fix, configurable temperature limit 2014-11-25 21:05:46 +01:00
Benjamin Vedder d9c5ed7ac3 Added hw 46 and implemented an I2C reset function 2014-11-23 20:29:36 +01:00
Benjamin Vedder f7cda79d1b HW45-implementation, temp-protection, nunchuk-fix, i2c-fixes 2014-10-19 19:31:06 +02:00
Benjamin Vedder 38942b273e Added GPL to the nunchuk implementation 2014-10-19 01:06:20 +02:00
Benjamin Vedder 81a6d84113 Nunchuk implementation (Nyko Kama tested), mah and wh counting 2014-10-19 01:00:53 +02:00
Benjamin Vedder bc0ab63e21 app_sten fix 2014-10-05 16:23:02 +02:00
Benjamin Vedder 2119242b43 Soft RPM limit for current mode in ppm app 2014-09-21 19:29:26 +02:00
Benjamin Vedder 3430d61a6f Added missing timeout files 2014-09-21 17:41:11 +02:00
Benjamin Vedder 10bbe73206 Global timeout implementation 2014-09-20 13:41:18 +02:00
Benjamin Vedder d6beda7b47 Complete servo-decoding rewrite, common command module, full access to everything over uart, more ppm options 2014-09-20 03:22:38 +02:00
Benjamin Vedder 2e723ece6f App configuration, eeprom emu fix, reboot command 2014-09-18 23:00:14 +02:00
Benjamin Vedder 6d4e55051c Prepared applications for runtime configuration 2014-09-17 21:05:57 +02:00
Benjamin Vedder fd83286cd6 Parameter detection command and RC-car fix 2014-09-15 22:44:39 +02:00
Benjamin Vedder a0024affd4 Some longboard updates and a timer struct write move 2014-08-30 02:02:32 +02:00
Benjamin Vedder d205d2689a Added HDD motor configuration 2014-08-16 16:12:14 +02:00
Benjamin Vedder 2c7017c3a3 Voltage terminal command and ebike motor configuration 2014-08-14 00:23:32 +02:00