Commit Graph

16 Commits

Author SHA1 Message Date
EmanuelFeru 098ca9f97c Diag: beep numbers for errors
- implemented beep numbers in case of error for easier debugging
- fixed bug: power button needs to be pressed multiple times to turn on
2020-11-28 10:38:17 +01:00
EmanuelFeru b76e8ee466 Update BLDC controller
- added possbility to switch the Control mode while motor is spinning. NOT yet checked how motors behaves when swiching is triggered!
- added Cruise Control functionality: activated by button1 to GND (Blue Left or Right cable depending on selection). Functionality NOT yet tested in practice!
- extended Phase current measurements z_selPhaCurMeasABC : {iA,iB} = 0; {iB,iC} = 1; {iA,iC} = 2
- added interface for external motor angle measurement from as sensor, e.g., encoder. The selection can be done via b_angleMeasEna: 0 = Estimated (default), 1 = Measured.
- update the Field weakening Lo and Hi to fully blended.
- minor improvements:
   - Buttons initialization
   - lowered ADC margins in auto-calibration
   - commented out ADC_SAMPLETIME_239CYCLES_5, reported to give some issues when Hall sensor ADC input is used
2020-10-12 22:55:39 +02:00
EmanuelFeru 22984a7fd6 Fixed PPM, PWM timeout
- fixed the general timeout handling: there is no need to disable the MOSFETs timer because it will confuse the BLDC_controller, making him consider the timeout as a false MOSFET defective error.
- renamed `timeout` to `timeoutCnt` for consistency and to ease the search
#61
2020-07-01 19:50:32 +02:00
EmanuelFeru 526cee4c0f Lowered pwm_margin by 10
- to avoid virbation at maximum PWM = 1000, due to reduced Phase current accuracy, the pwm margin is lowered by 10.
Fixed #69
2020-06-23 20:13:05 +02:00
EmanuelFeru ac90ed1b6b Fixed initial condition bug
- the initial condition for the Battery and Board temperature was wrongly set
- the filter is fixdt(1,32,16), so the shift should be by 16 bits.
2020-06-22 20:21:18 +02:00
EmanuelFeru 205c054235 PWM Variant update
- made the 2 channels to operate independently #61
- added defines to enable/disable motors, if one motor is not needed #63
2020-06-13 10:57:54 +02:00
EmanuelFeru 72e6b30033 UART with sideboards works + major refactoring
► the mainboard can now send and receive Serial data from the sideboards
► heavy refactored the `main.c`. It was becoming too large to manage... Therefore, `util.c` and `util.h` was created
► added new functionality for `VARIANT_HOVERCAR` and variants with `CONTROL_ADC` in general:
- ADC limits auto-calibration mode (long press of the power button) - calibration will not be lost at power-off
- Max Current and Max Speed adjustment mode (long press followed by a short press of the power button) - calibration will not be lost at power-off
- added one sideboard functionality:
         - LEDs are used to display battery level,  Motor Enable, Errors, Reverse driving, Braking.
         - Photo sensors are used as push buttons: One for changing Control Mode, One for Activating/Deactivating the Field Weakening on the fly
2020-03-01 10:00:26 +01:00
EmanuelFeru 872d86f021 Added Keil project
Project can now be built and flashed with Keil uVision as well.
2020-02-16 21:58:15 +01:00
EmanuelFeru b4b23bbe9b Implemented HOVERCAR variant
Major:
- created HOVERCAR variant (selectable via platformio.ini) for driving via 2 pedals: Brake (on cmd1) and Throttle (on cmd2)
- implemented "Double tapping" on Brake pedal to engage Reverse driving
- implemented that Brake pedal stops the vehicle but does not go to Reverse, to prevend unintended Reverse driving
- implemented ADC Protection when GND and Vcc wire are disconnected. The functionality can be enabled/disabled via #define ADC_PROTECT_ENA
- updated error handling: in case of major error the motors will be disabled for improved safety

Minor:
- fixed bug on low-pass filter for not reaching exact "0" value
- calibrated the ADC Battery voltage reading
- other minor visual updates
2019-12-31 13:35:01 +01:00
EmanuelFeru 31d42b4a17 Major improvements
- reduced FOC computational complexity by up to 20%, from 85% (old) to 65% (new)
- updated Field Weakening by allowing more freedom set-up: field weakening blended in the input fully, partially blended, or fully outside the input range
- major improvemets on current and speed limitations. It allows seemless limitation protection -> very happy with the result
2019-12-12 23:44:33 +01:00
EmanuelFeru 5d195696a2 Implemented reliable Serial Rx/Tx
► Reliable Serial Communication implemented featuring:
- start frame
- checksum
- out-of-sync handling
- timeout and disconnected line detection
► Arduino example code added
► Fixed ConsoleLog Item #5
2019-11-29 17:31:53 +01:00
EmanuelFeru 1376793710 Improvements and Issues implementation
Major:
- Issue #3: added raw ADC1, ADC2 values to the setScopeChannel
- Issue #4: added functionality for joystick control. Middle resting potis are now supported (by default it is enabled)
- Issue #6: implemented that board does not power-off after a software reset due to flashing
- added Rate constraints for Input target for smoother response

Minor:
- added 2 beep sound when motors get enabled
- minor bugfixes
2019-10-27 18:21:04 +01:00
EmanuelFeru 1cc8b3475f Visual updates 2019-10-22 21:45:47 +02:00
EmanuelFeru 8771742558 Floating-point converted to fixed-point
The follwing were converted to fixed-point
- battery voltage
- board temperature
- filters for steer and speed
- mixer calculation

Starting from this moment, the firmware is floating point free, meaning it runs more efficiently.
2019-10-20 13:31:47 +02:00
EmanuelFeru f6fc825e5f DC Link converted to fixed-point 2019-10-12 19:51:31 +02:00
EmanuelFeru 5b0b6fecf2 Initial commit 2019-10-06 15:09:15 +02:00