Commit Graph

22 Commits

Author SHA1 Message Date
EmanuelFeru 4646fb4a94 add pic 2020-12-22 23:23:57 +01:00
EmanuelFeru f507e7c098 pics restructuring 2020-12-22 22:10:24 +01:00
EmanuelFeru c86d9c4f43 Improvements and clean-up
- clean-up printfs
- removed consoleLog function with respective files
- removed Delay when using printf
- renamed speedL, speedR to cmdL, cmdR
- corrected Arduino baud rate
- updated FLASH write pointer cast int16_t to uint16_t
2020-12-10 19:35:13 +01:00
EmanuelFeru 72a4f6f9f4 Update ReadMe 2020-11-25 19:48:02 +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 2890745fbb Moved Matlab files to a new repo
Moved all the Matlab related files for the FOC motor control to a new repository:
bldc-motor-control-FOC
2020-09-01 18:10:02 +02:00
EmanuelFeru 17e127a8b7 PWM/PPM Left/Right, UART update
- created possiblity to use PWM, PPM input also on both LEFT and RIGHT cable (RIGHT cable is 5V tolerant)
- updated UART: disabled the Rx errors to avoid DMA stop and additional need to manage the UART error handler
- added Button support LEFT/RIGHT
2020-06-25 20:17:55 +02:00
EmanuelFeru e46dff590f Major UART communication improvement
- the UART communication is improved based on UART Idle line detection interrupt
- an Rx ring buffer is used to manage the UART incoming data
- both Tx and Rx are efficiently handled using DMA

#45 #64 #65

Other:
- minor visual improvements
2020-06-21 23:14:46 +02:00
EmanuelFeru 34c6e4d610 Improved UART Timeout
Apparently, the UART data Rx/Tx is quite unreliable (especially under motor load) leading to very often out-of-sync issues. This change allows to reset the DMA more often, leading to a faster re-sync of the UART transmission and thus avoiding UART timeout.
2020-06-01 20:08:47 +02:00
EmanuelFeru 083088724e Updated mainboard picture 2020-05-26 22:49:12 +02:00
EmanuelFeru 736f2b9419 Minor updates
- updated ReadMe: added higher resolution mainboard picture, added links with projects, online compiler, Telegram link
- setup.c : fixed the Charger GPIO pin to PULLUP, otherwise the Charger won't be recognized when connected
- config.h : increased the default ADC protection Timeout from 30 to 100 for more robustness.
2020-05-26 22:17:40 +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 2cddbf5ed0 Added mcu unlocking pictures 2020-02-07 17:29:09 +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 6c8b7f001d Added Sinusoidal Control Type
Sinusoidal Control Type is now available is this branch. To select it go in config.h and change CTRL_TYP_SEL to 1. By default FOC control type is selcted.
Note: SPEED and TORQUE modes are not available for Sinusoidal control type.
2019-11-30 11:30:12 +01:00
EmanuelFeru 9a9eed7d10 Updated current limit
The firmware allows now to set higher currents than 15 A/motor.
NOTE: You can change this limit at your own risk. I do not take any responsability if your boards gets damaged.
2019-11-03 12:45:13 +01:00
EmanuelFeru 62873aad57 PI controller update and fixes
Major:
• all PI controllers with Back-calculation replaced with PI controllers with Clamping to reduce the number of parameters and simplify calculations

Minor:
• fixed the ADC calibration for potetiometer input when ADCx_MIN > 0
• fixed bug: small shock at initialization when current limit I_MOT_MAX is set very small e.g. 1 A
2019-10-31 22:07:52 +01:00
EmanuelFeru 070d7d73df Updated figure 2019-10-21 20:08:10 +02:00
EmanuelFeru af14b3c4b1 Improved Field Weakening
The performance of the Field Weakening is improved by reducing noise at higher speeds.
2019-10-21 17:51:09 +02:00
EmanuelFeru 5b0b6fecf2 Initial commit 2019-10-06 15:09:15 +02:00