Maximiliano Cordoba
390f1019ef
Axiom: adds input current sensor capability.
...
use HW_HAS_INPUT_CURRENT_SENSOR in hw_axiom.h to enable it, it is commented by default
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2020-05-16 17:56:08 -03:00
Benjamin Vedder
9781fb9563
Manually merged #166
2020-05-12 15:53:32 +02:00
Benjamin Vedder
ee8f946aa8
Hall sensor transition and interpolation improvements
2020-04-17 00:38:36 +02:00
Benjamin Vedder
c64e7987bc
Use fast speed estimator for hall sensors and encoder
2020-04-16 12:16:02 +02:00
Benjamin Vedder
dd48276163
Disable hight current sampling during inductance measurement
2020-04-16 11:40:56 +02:00
Benjamin Vedder
6f7c40b4e1
Improved flux linkage measurement
2020-04-16 09:12:08 +02:00
Benjamin Vedder
ca05b60802
Fixed inductance measurement scaling, decreased observer gain scaling
2020-04-08 11:05:58 +02:00
Benjamin Vedder
ef37c70911
Fixed new bug in previous commit...
2020-04-04 01:02:53 +02:00
Benjamin Vedder
09dc8ce384
Fixed resistance measurement current ramping bug
2020-04-04 00:58:42 +02:00
Benjamin Vedder
1016ab076b
Added hall_analyze terminal command
2020-04-03 22:57:43 +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
c0f75f14ac
Current ramping during resistance measurement
2020-04-02 20:43:11 +02:00
Benjamin Vedder
450ed15837
Some Fixes in prevoius PR
2020-04-02 16:26:59 +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
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
Benjamin Vedder
dd16cb7761
Updated ChibiOS to 3.0.5
2020-03-21 20:14:20 +01:00
Benjamin Vedder
b1945b7dfc
Cleaning, optimization and refactoring
2020-03-21 11:40:50 +01: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
5ba0c5543e
Removed some warnings
2020-03-20 22:33:20 +01:00
Benjamin Vedder
68163a88b6
Some optimizations to make mc_interface timer ISR run faster
2020-03-20 21:48:21 +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
Benjamin Vedder
a06f09e7f2
Observer gain scaling update, print correct motor on faults, updated timer terminal command
2020-03-17 09:38:09 +01:00
Benjamin Vedder
7cc7741279
Fixed dual motor three shunt bug
2020-03-16 22:54:38 +01: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
e1c859c894
Current controller windup protection improvement
2020-03-06 22:04:59 +01:00
Benjamin Vedder
5df92463f3
Pos PID fix, AS5047 fix, changed FOC time constant, updated conf generator
2020-02-27 17:49:35 +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
fa6f63970f
Removed unused variable
2020-01-28 21:24:32 +01:00
Benjamin Vedder
b6949d60dc
FW4.00: HFI and many updates, see changelog
2020-01-28 19:46:19 +01: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
34632b26e5
BRK: Avoid reassigning a value
...
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2020-01-19 15:36:40 -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
Benjamin Vedder
b002e5d78e
FW 3.66: Many changes, see changelog
2020-01-12 21:25:21 +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
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
dfc3ed2319
Final v3.62
2019-09-27 12:56:49 +02: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
Marcos Chaparro
6d758b38f2
Detect current sensor failures
...
2 failure modes added:
* On boot, when calculating DC offsets generate a fault if the offset is beyond
HW_MAX_CURRENT_OFFSET. Fault code reports which sensor is having issues (1, 2 or 3).
Most likely cause is a disconnected sensor, if hw has fault-detecting pullups.
* On runtime, in setups with 3 in-line phase current sensors, checks that the sum
of the currents is below MCCONF_MAX_CURRENT_UNBALANCE, with a configurable low pass
filter. If unbalanced current is high, it means a fault to ground, or a disconnected
sensor (this works at 0 Amp if hw has pullups in the sensor input to detect the
failure).
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-04-20 09:43:08 -03:00
Maximiliano Cordoba
4a94d0ec4c
Add command to connect a virtual motor with configurable parameters
...
This commit adds a motor model running within the vesc firmware,and
from the vesc terminal a user or a test script can set the
mechanical load torque, inertia, phase resistance, Lq and Ld phase
inductances (this generic model includes IPM motors), flux linkage
and battery voltage.
Virtual motor parameters set at the command line should match with
vesc configuration, for example phase resistance, inductance and
flux linkage should match and have the correct observer gain.
Observer works with the virtual motor, with some hiccups during
startup
For solid results its better to use sensored mode. If vesc is
configured to use an SPI encoder the virtual motor phase angle
will be injected as an encoder angle readout.
For safety PWM outputs are disabled during simulation.
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2019-04-06 10:36:00 -03:00
Benjamin Vedder
fb9442889a
Merge pull request #80 from paltatech/powerdesigns-revB-support
...
Extend support to older PowerDesigns RevB boards
2019-03-31 11:37:59 +02:00
Benjamin Vedder
1161f8417c
Added SWD programming support (based on Black Magic Probe) and open loop duty cycle control
2019-03-31 10:49:18 +02:00
Marcos Chaparro
3ab585cb9a
Force high current measuments when using big powerstages
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-03-28 20:33:21 -03:00
Marcos Chaparro
b2311b9eca
Extend support to older PowerDesigns RevB boards
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-03-25 18:02:26 -03: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
01e72eb555
Autogenerated config parsing with signatures, fixed previous PRs
2019-03-01 21:36:58 +01:00
Benjamin Vedder
18b79a3a09
Fixed some issues found by codacy
2019-02-19 22:06:34 +01:00
Benjamin Vedder
c76942009b
Some fixes after the merge
2019-02-19 18:55:18 +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
4ac69232d9
Configure deadtime by just defining it in nanoseconds. Firmware will calculate the required DTG register value.
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-31 00:51:35 -03:00
Marcos Chaparro
9652231edb
Allow to run PWM at frequencies multiples FOC loop to support applications with PWM running at 100+kHz.
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2019-01-30 00:33:56 -03: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
Marcos Chaparro
12fcffb629
Window Watchdog feed moved outside ADC ISR. Now it has the same coverage as the IWDG, with the extra capability of detecting that the timeout thread is running faster than expected.
...
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-24 13:16:28 -03:00
Marcos Chaparro
17f97763c0
Extend watchdog coverage with IWDG, a watchdog running from an independent LF oscillator. If any of the threads being monitored does not report for more than 12ms, a reset will be asserted. When a WDG reset happens, the user can see it in the fault logs from vesc tool
...
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-24 12:19:44 -03:00
Marcos Chaparro
add8b31975
Always measure phase resistance with MaxPhaseAmps/2 for consistent automatic resistance measurement
...
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2019-01-08 20:30:55 -03:00
Marcos Chaparro
e284d1ae5e
Compensate for line-to-line measurement in FOC
...
Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
2018-12-12 18:41:10 -03:00
Benjamin Vedder
22dc2ce33c
FW 3.37: FOC KI temp comp, configurable foc current filter
2018-03-24 22:32:58 +01:00
Benjamin Vedder
e83af32219
Some cleanup, updated speed PID controller, some NAN-checks, iterative observer
2017-10-20 20:06:06 +02:00
Benjamin Vedder
37bb857a58
Wrapped GNU_SOURCE in ifndef
2017-09-21 21:20:11 +02:00
Benjamin Vedder
7cc18a4fc3
Merge pull request #34 from kalvdans/fsincos-compilation-warning
...
Include declaration of fsincos.
2017-09-21 18:41:34 +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
Christian Häggström
fb8d9adf4f
Include declaration of fsincos.
...
Fix compilation warning about fsincos undeclared on Linux by defining
_GNU_SOURCE before including <math.h>
2017-05-28 21:47:25 +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
08a27cfbbd
FW 1.16: Hall sensor position control, brake at 0RPM setpoint in FOC, FOC parameter detection fix
2016-02-24 21:19:44 +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
Benjamin Vedder
02f140e335
FW 2.11: Refactoring, dead time comp fix for smoother braking when the speed is zero
2016-01-30 15:57:51 +01:00
Benjamin Vedder
e6ea308a48
FW 2.10: FOC hybrid hall sensor support with interpolation
2016-01-27 23:57:23 +01:00
Benjamin Vedder
cc17142264
Encoder position control fix
2015-12-29 02:37:09 +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
d995cf6749
FW 2.6: Slow abs current fix, current limit fix, FOC control CPU resource measurement, current filters, D current injection fix
2015-12-24 00:43:31 +01:00
Benjamin Vedder
2377a45bcb
FW 2.5: red LED fix on hw 4.5, updated default PID parameters
2015-12-19 21:24:46 +01:00
Benjamin Vedder
59309d9772
FW 2.4: some nan fixes that shoud prevent FOC from stopping and needing a reboot in some cases
2015-12-10 23:21:04 +01:00
Benjamin Vedder
ff090fd4e0
FW 2.3: MAJOR UPDATE: FOC!!
2015-12-08 21:01:23 +01:00