From 19c44c7d53cf0fb580968c6a8035ad254874a2d0 Mon Sep 17 00:00:00 2001 From: JbLb Date: Thu, 26 Dec 2019 11:09:31 +0100 Subject: [PATCH] build not tracked - reformat comments in config file --- .gitignore | 1 - Inc/config.h | 34 +++++++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index eb48f10..a007fea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ build/* -!build/hover.hex diff --git a/Inc/config.h b/Inc/config.h index 319ae81..ff497b1 100644 --- a/Inc/config.h +++ b/Inc/config.h @@ -12,10 +12,22 @@ // ############################### GENERAL ############################### -// How to calibrate: connect GND and RX of a 3.3v uart-usb adapter to the right sensor board cable (be careful not to use the red wire of the cable. 15v will destroy everything.). if you are using nunchuck, disable it temporarily. enable DEBUG_SERIAL_USART3 and DEBUG_SERIAL_ASCII use asearial terminal. - -// Battery voltage calibration: connect power source. see . write value nr 5 to BAT_CALIB_ADC. make and flash firmware. then you can verify voltage on value 6 (devide it by 100.0 to get calibrated voltage). -#define BAT_CALIB_REAL_VOLTAGE 43.0 // input voltage measured by multimeter +// How to calibrate: +/* connect GND and RX of a 3.3v uart-usb adapter to the right sensor board cable + * (be careful not to use the red wire of the cable. 15v will destroy everything.) + * if you are using nunchuck, disable it temporarily. + * enable DEBUG_SERIAL_USART3 and DEBUG_SERIAL_ASCII use asearial terminal. + */ + +// Battery voltage calibration: +/* connect power source. + * see . + * write value nr 5 to BAT_CALIB_ADC. + * make and flash firmware. + * then you can verify voltage on value 6 (devide it by 100.0 to get calibrated voltage). + */ + +#define BAT_CALIB_REAL_VOLTAGE 43.0 // input voltage measured by multimeter #define BAT_CALIB_ADC 1704 // adc-value measured by mainboard (value nr 5 on UART debug output) #define BAT_NUMBER_OF_CELLS 10 // normal Hoverboard battery: 10s @@ -27,7 +39,19 @@ #define DC_CUR_LIMIT 15 // DC current limit in amps per motor. so 15 means it will draw 30A out of your battery. it does not disable motors, it is a soft current limit. -// Board overheat detection: the sensor is inside the STM/GD chip. it is very inaccurate without calibration (up to 45°C). so only enable this funcion after calibration! let your board cool down. see . get the real temp of the chip by thermo cam or another temp-sensor taped on top of the chip and write it to TEMP_CAL_LOW_DEG_C. write debug value 8 to TEMP_CAL_LOW_ADC. drive around to warm up the board. it should be at least 20°C warmer. repeat it for the HIGH-values. enable warning and/or poweroff and make and flash firmware. +// Board overheat detection: +/* the sensor is inside the STM/GD chip. + * it is very inaccurate without calibration (up to 45°C). + * so only enable this funcion after calibration! let your board cool down. + * see . + * get the real temp of the chip by thermo cam or another temp-sensor taped on top of the chip + * and write it to TEMP_CAL_LOW_DEG_C. + * write debug value 8 to TEMP_CAL_LOW_ADC. + * drive around to warm up the board. it should be at least 20°C warmer. + * repeat it for the HIGH-values. + * enable warning and/or poweroff and make and flash firmware. + */ + #define TEMP_CAL_LOW_ADC 1655 // temperature 1: ADC value #define TEMP_CAL_LOW_DEG_C 35.8 // temperature 1: measured temperature [°C] #define TEMP_CAL_HIGH_ADC 1588 // temperature 2: ADC value