Commit Graph

484 Commits

Author SHA1 Message Date
Benjamin Vedder f3ce571a4d Added missing files 2024-05-06 10:33:36 +02:00
Benjamin Vedder f30f271004 Fixed typo 2024-04-28 11:36:09 +02:00
Benjamin Vedder e3453e74f0 Added STR500 01mohm-version 2024-04-28 11:30:28 +02:00
Benjamin Vedder 61a3a3e022 str365-tweaks 2024-04-17 20:33:19 +02:00
Benjamin Vedder 76c2869461 Fixed temperature equations 2024-04-17 16:18:12 +02:00
Benjamin Vedder ec86166a3d Fixed current formula 2024-04-17 15:22:31 +02:00
Benjamin Vedder b987209e79 Updated str365 hw 2024-04-17 11:48:34 +02:00
Benjamin Vedder b9bccfd7d6 Added STR365 2024-04-15 17:36:49 +02:00
Benjamin Vedder fa544b7009 Fixed typo 2024-04-15 11:32:26 +02:00
Benjamin Vedder ef2a0faa85 Removed gpdrive leftovers 2024-04-01 00:14:44 +02:00
Euan 6b3fa1b64e Correct reference voltage 2024-02-26 00:26:15 +00:00
Euan d41466f5a3 Backport to A50S V23 which also has 25MHz clock 2024-02-23 23:20:37 +00:00
Euan b698a9da97 oversample voltage measurement to remove 25Mhz clock noise
The 25MHz clock couples through the floating phase filter capacitor opendrain output on 1 phase. Which appears as a voltage offset and screws up flux linkage measurements at lower voltages. By oversampling, this offset is removed and flux linkage measurements now work properly at all voltages.
2024-02-23 23:09:54 +00:00
Euan b3b047809a Refactor to allow custom voltage measurement
Allows the hw conf to control voltage measurement for foc, useful for adding oversampling.
2024-02-23 23:06:08 +00:00
Euan ad9ee2d24f Tune default calibration values 2024-02-23 19:38:49 +00:00
Euan 0f36dee181 Add config for A50S V23c
V23c version includes EEPROM chip to store calibration data.
2024-02-23 19:38:49 +00:00
Euan 77fde46d88 Update config for A50S V23
This update corrects the shunt resistance.
Adds generic calibration values for the current.
Adds 6 sample filtering for current (takes 6 current samples each pwm cycle and averages them to reduce noise)
Reduced max pwm in foc to 45khz
Disabled offset calibration on boot to speed up boot time. (Boots in under 2s now)
2024-02-23 19:38:48 +00:00
Benjamin Vedder a50829f55a Style tweaks 2024-02-23 07:22:06 +01:00
Euan e26a2bac38 Fix for hw defining index without has_3_shunts defined 2024-02-07 01:30:10 +00:00
Euan 1f3667018f Fix compiler errors. 2024-02-07 01:05:35 +00:00
Euan 0cd896ab5b make GET_CURRENT3 = 0 when not on 3 shunt hw
Some hw defines ADC_IND_CURR3 without defining HW_HAS_3_SHUNTS. So need to force GET_CURRENT3 to 0 in that case.
2024-02-06 22:16:09 +00:00
Euan c2878474a1 Refactor mcpwm_foc and fix bug in hw.h
Removed a bunch of ifdefs by making is_second_motor = 0 when not using dual motors.

Fixed a bug in hw.h where it wrongly defined GET_CURRENT3 when inverted shunts was selected. GET_CURRENT3 will now always be 0 by default, removing the need for a few ifdefs in the foc code.
2024-02-06 21:53:03 +00:00
Euan af65f521de Add support for calibrating current sensors
Hw_conf can define CURRENT_CAL1,2,3 to set individual calibrations for each current sensor.

By default no calibration is used. (x1.0)

For example this is used on the A50S by looping a calibrated current using a power supply through each phase. Then the correction is saved in external eeprom to persist across firmware updates.

Tested on FOC, DC and BLDC modes.
2024-02-05 23:55:42 +00:00
Benjamin Vedder c1f27b0478 Added hw_rb 2024-02-01 12:36:42 +01:00
Benjamin Vedder 1d9195f7e2
Merge pull request #700 from makerbase-motor/master
Makerbase - Implement shutdown support, onboard IMU, fix H file naming definition error
2024-01-11 08:40:36 +01:00
makerbase-motor 01651cf7f2
Close ADC-15, channel 16 2024-01-08 18:47:23 +08:00
makerbase-motor ad7850e630
Supports onboard IMU and shutdown 2024-01-08 18:43:41 +08:00
makerbase-motor 2b227199e7
Supports onboard IMU and shutdown 2024-01-08 18:42:57 +08:00
makerbase-motor 3e49c99d30
supports shutdown 2024-01-08 18:41:47 +08:00
makerbase-motor e934541740
supports shutdown 2024-01-08 18:41:01 +08:00
makerbase-motor a062730113
Fix. h file error 2024-01-08 18:40:12 +08:00
makerbase-motor 616f327594
New hardware supports shutdown 2024-01-08 18:39:35 +08:00
makerbase-motor 953263f007
New hardware supports shutdown 2024-01-08 18:37:58 +08:00
makerbase-motor a45b6a0222
Fix. h file error 2024-01-08 18:36:42 +08:00
makerbase-motor de16046dd6
Fix. h file error 2024-01-08 18:35:58 +08:00
makerbase-motor a1fe72c5f1
New hardware supports shutdown 2024-01-08 18:34:30 +08:00
makerbase-motor 013662c76f
New version of hardware with added shutdown function; 2024-01-08 18:31:08 +08:00
makerbase-motor 039eb23416
Fix. h file error 2024-01-08 18:28:55 +08:00
makerbase-motor f1dc7f82bc
Fix. h file error 2024-01-08 18:27:58 +08:00
Dado Mista dcbac81915 COMM_SHUTDOWN command for shutdown/restart
cmd[0] = [force] // 0=normal, 1=force (allow while motor is spinning)
cmd[1] = [restart] // 0=shutdown, 1=restart

Obviously, shutdown only works for hardware with shutdown support

Signed-off-by: Dado Mista <dadomista@gmail.com>
2024-01-03 22:14:38 -08:00
Benjamin Vedder 89bab0c286
Merge pull request #691 from luna-cycle/m600_update_2
luna_m600: UI update 2
2024-01-03 09:54:17 +01:00
Benjamin Vedder 63e536df85
Merge pull request #696 from surfdado/thor300
Fungineers Thor300 Firmware added
2024-01-03 09:51:23 +01:00
dcode c87d2032ea Resample shutdown before disabling gates in ALWAYS_OFF mode 2024-01-02 15:28:37 +01:00
Dado Mista ac13767556 Thor300_AO variant
Hidden variant added (won't be part of build-all) defining "ALWAYS_ON"
With ALWAYS_ON defined hw_sample_shutdown always returns false.

Signed-off-by: Dado Mista <dadomista@gmail.com>
2024-01-01 13:34:16 -08:00
Dado Mista 85d9c39b49 Thor300 firmware - official from Fajdiga
make Thor300_20s to build

Signed-off-by: Dado Mista <dadomista@gmail.com>
2024-01-01 13:34:16 -08:00
Marcos Chaparro 89cbf71abd luna_m600: UI update
And also fix max voltage setting for 60V builds

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2023-12-15 15:12:16 -03:00
Marcos Chaparro 95bdf83a9d luna_m600: new firmware that defaults to 60V battery settings
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2023-12-13 14:35:38 -03:00
Marcos Chaparro aa073f13df luna_m600: Fine tune motor parameters and use full clarke to avoid rpm runaway
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2023-12-06 13:23:25 -03:00
Benjamin Vedder efa3e7ea16
Merge pull request #681 from JohnSpintend/master
Update hw_ubox_100_core.c
2023-12-06 12:57:25 +01:00
Benjamin Vedder 05f400c023 Change IMU-type 2023-12-06 12:56:30 +01:00