Commit Graph

77 Commits

Author SHA1 Message Date
EmanuelFeru 925008467b Minor updates RC
- moved all the RC inputs (PPM, PWM, iBUS) to Right cable
- updated timing to enter torque and speed update from 300ms to 1000ms
2020-11-19 21:51:15 +01:00
EmanuelFeru 44cf0c8f1f update Auto-calibration
- implemented forced potentiometer type
- extended the INPUTx_TYPE to 0:Disabled, 1:Normal Pot, 2:Middle Resting Pot, 3:Auto-detect
2020-11-19 17:49:14 +01:00
EmanuelFeru 44befc480a Input Auto-calibration
- mainly rearangement of function
- updated initialization in the auto-calibration function
- added beep for confirmation of Input protection
2020-11-18 19:16:56 +01:00
Candas1 75082c8333 Merge branch 'master' of https://github.com/Candas1/hoverboard-firmware-hack-FOC 2020-11-15 20:04:47 +01:00
Candas1 962f57a85f Improve PPM 2020-11-15 20:04:40 +01:00
EmanuelFeru 419ef454f3
Merge branch 'master' into master 2020-11-15 18:53:55 +01:00
Candas1 1ab75e5ff9 Fix auto calibration 2020-11-15 18:09:30 +01:00
Candas1 f962d16cd6 Test print log 2020-11-14 19:30:38 +01:00
Candas1 11ab848103 Current and speed setting for all variants 2020-11-13 22:31:49 +01:00
EmanuelFeru c2647ed686 Improved Standstill Hold functionality
- Standstill Hold should now engage sooner if Brake pedal is pressed to prevent continuous rolling in a Downhill situation.
2020-11-12 22:41:29 +01:00
Candas1 4cc02fddc1 Improved auto-calibration 2020-11-11 21:36:40 +01:00
Candas1 b1169c02b7 Fixes 2020-10-31 21:14:15 +01:00
Candas1 95c912d757
Update config.h 2020-10-29 00:10:52 +01:00
Candas1 5dc88b7e02
Update util.h 2020-10-28 23:43:19 +01:00
Candas1 4ba8a8d82a
Add new parameter to adddeadband function 2020-10-27 20:23:35 +01:00
Candas1 df37f6dcc3
Add parameter for ADC deadband 2020-10-27 19:41:47 +01:00
Candas1 76a27b086c
Add function for MAP 2020-10-27 19:22:23 +01:00
EmanuelFeru 4fbf2549c9 Cruise Control update
- added support for Cruise Control in HOVERCAR variant
- updated the shortBeep function, didn't like the beeping sound :)
2020-10-20 19:54:38 +02:00
EmanuelFeru 4991a15a5e Fixed bug
PI controller integrator is now working correctly.
2020-10-20 17:49:40 +02:00
EmanuelFeru 8369e4d47d Increased delay for CC
In Cruise Control (CC), the button can bounce. The beep delay is increased from 100ms to 200ms to prevent button bouncing and continuous activation/deactivation of CC.
2020-10-13 10:38:43 +02: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 290ed30765 Fixes Skateboard Variant
- fixed to RIGHT cable
- fixed braking relative to the direction of motion
- adjusted the braking amount to -400
2020-07-20 21:06:39 +02:00
EmanuelFeru 733fd80362 created SKATEBOARD variant 2020-07-20 20:33:42 +02:00
EmanuelFeru dcdac4f6db Updated PWM variant
- fixed the setScopeChannel for PWM, to calibrate properly the limits
- improved the scaling
2020-07-20 19:36:24 +02:00
EmanuelFeru f2d86f3b30 Added functionality: Electric Brake, Standstill hold
- For TORQUE mode, by enabling `ELECTRIC_BRAKE_ENABLE` in `config.h`, the freewheeling amount can be adjusted using the `ELECTRIC_BRAKE_MAX` parameter.
- For VOLTAGE and TORQUE mode, the standstill hold functionality can be forced by enabling `STANDSTILL_HOLD_ENABLE` in `config.h`.

Known (minor) issue: There is a small "tick" noise when Stanstill is engaged/disengaged, due to the switching to SPEED mode. To be solved by an improved mode switching strategy in the future.
2020-07-19 11:24:37 +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 d8b529e063 Added default Debug selection for PPM, PWM 2020-06-26 11:23:48 +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 5f2eb196af Improved UART error recovery
- In case of an Rx error instead of stopping the complete UART, only the Rx DMA is aborted and restarted.
2020-06-23 19:58:36 +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 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 558759b2c5
Merge pull request #57 from benjaf/master
PWM Steering fixed
2020-06-02 14:46:07 +02:00
EmanuelFeru 22411e1851 update PWM timeout
- updated the `pwm_timeout` and uncommented `pwm_captured_ch1_value` as discussed with @benjaf
2020-06-02 14:42:14 +02:00
Benjamin 21a8f757d0 PWM Steering fixed 2020-06-02 11:53:59 +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
juodumas 0125bf0dc0 Update config.h current limiting comments 2020-05-03 16:29:40 +03:00
EmanuelFeru 38574153f0 Added deadband for PPM signal
Issue #29
2020-03-24 20:36:19 +01:00
EmanuelFeru 39e4fdc869 Variant_PWM implemented 2020-03-24 19:57:08 +01:00
EmanuelFeru c099bec824 RC pwm signal read fixes
Re-work on the RC pwm input signal timeout
2020-03-23 21:09:17 +01:00
EmanuelFeru 7d80e564f0 First commit pwm
- buttons not yet support
2020-03-21 19:24:29 +01:00
EmanuelFeru 9d6cec8889 Hovercar minor update
- put by default TORQUE mode. Hovercar works best in Torque mode
- made the brake pedal more aggressive. Gives a better braking feel.
2020-03-17 15:38:35 +01: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 2d178a399c Improved Serial Timeout
- added condition to avoid restarting DMA repeatedly if no data is received
- enabled DEBUG_SERIAL_ASCII for all Variants except VARIANT_TRANSPOTTER
2020-02-06 21:53:38 +01:00
EmanuelFeru a57b600230 Minor changes for PR #18
- updated sligtly the order of defines and corrected defines for some variants in config.h
- fixed checksum data type in Arduino example (Issue #19)
2020-01-29 21:20:04 +01:00
kai 8098a31457 prettified config.h 2020-01-18 02:14:42 +01:00
kai 2c1572d844 prettified config.h 2020-01-18 02:10:40 +01:00
kai 05e56eefd7 prettified config.h typo fix 2020-01-18 02:04:36 +01:00
kai 1ddcee2a5d prettified config.h 2020-01-18 02:00:48 +01:00
kai e1aa42bad0 space removal 2020-01-18 01:15:45 +01:00