stancecoke
1 MW
qrisonline said:The only thing is that I can't get the motor to run.
So as every time: please tell us your setup, Battery Voltage, Config.h content, Control state at running.
regards
stancecoke
qrisonline said:The only thing is that I can't get the motor to run.
stancecoke said:haiyi911 said:the number changed when i opened the throttle.please look at the pictures.
So you get control state 145 this means PAS, Throttle override and Phase current limitation. What is your recent setting for phase current limit?
![]()
regards
stancecoke
haiyi911 said:now i connect pas. phase current max:300 ------- control state:17
but the motor still donnot run.
stancecoke said:haiyi911 said:now i connect pas. phase current max:300 ------- control state:17
but the motor still donnot run.
Seems that there's something wrong with your hardware, dutycyle goes to high values, current stays at zero.
Last try: edit the line 630 from pwm.c from TIM1_CtrlPWMOutputs(DISABLE); to TIM1_CtrlPWMOutputs(ENABLE);
And let print out uint_PWM_Enable in the printf line in the main.c
regards
stancecoke
stancecoke said:qrisonline said:The only thing is that I can't get the motor to run.
So as every time: please tell us your setup, Battery Voltage, Config.h content, Control state at running.
regards
stancecoke
#define NUMBER_OF_PAS_MAGS 12
#define limit 25
#define timeout 3125
#define wheel_circumference 2230L
#define limit_without_pas 6
#define ADC_THROTTLE_MIN_VALUE 43
#define ADC_THROTTLE_MAX_VALUE 182
#define BATTERY_VOLTAGE_MIN_VALUE 111
#define BATTERY_CURRENT_MAX_VALUE 150L
#define PHASE_CURRENT_MAX_VALUE 300L
#define REGEN_CURRENT_MAX_VALUE 50L
#define MOTOR_ROTOR_DELTA_PHASE_ANGLE_RIGHT 213
#define current_cal_a 10
#define TEMP_CAL_A 1.6
#define TEMP_CAL_B -110.4
#define LEVEL_1 12
#define LEVEL_2 21
#define LEVEL_3 30
#define LEVEL_4 59
#define LEVEL_5 100
#define MORSE_TIME_1 50
#define MORSE_TIME_2 50
#define MORSE_TIME_3 50
#define RAMP_END 1500
#define P_FACTOR 0.5
#define I_FACTOR 0.2
#define GEAR_RATIO 44L
#define BATTERY_LI_ION_CELLS_NUMBER 10
#define PAS_THRESHOLD 1.9
#define RAMP_START 64000
#define limit_with_throttle_override 25
#define CORRECTION_AT_ANGLE 86
#define PWM_CYCLES_SECOND 20833L
#define SPEEDSENSOR_INTERNAL
#define ANGLE_4_0 1
#define ANGLE_6_60 43
#define ANGLE_2_120 86
#define ANGLE_3_180 128
#define BLUOSEC
#define ANGLE_1_240 171
#define ANGLE_5_300 213
#define TQS_CALIB 0.0
#define ACA 4766
#define EEPROM_INIT_MAGIC_BYTE 107 // makes sure (chance of fail 1/255) eeprom is invalidated after flashing new config
#define ADC_BATTERY_VOLTAGE_K 70
haiyi911 said:stancecoke said:haiyi911 said:now i connect pas. phase current max:300 ------- control state:17
but the motor still donnot run.
Seems that there's something wrong with your hardware, dutycyle goes to high values, current stays at zero.
Last try: edit the line 630 from pwm.c from TIM1_CtrlPWMOutputs(DISABLE); to TIM1_CtrlPWMOutputs(ENABLE);
And let print out uint_PWM_Enable in the printf line in the main.c
regards
stancecoke
Last try: edit the line 630 from pwm.c from TIM1_CtrlPWMOutputs(DISABLE); to TIM1_CtrlPWMOutputs(ENABLE);
thanks,Stancecoke
the motor is runing,but not continuously. when i change the throttle ,the speed maybe change anything.
LM317 IS hot。
casainho said:Color LCD:Kunteng KT LCD8H VS Bafang 850C
I got the Kunteng KT LCD8H color LCD and here are a picture of the main board:
![]()
And a picture of ¨Bafang 850C¨ (http://www.aptdevelop.com) color LCD main board:
![]()
The KT LCD is cheaper but also lacks some piece of hardware that is relevant to me: 1. RTC real time clock (although seems the board was development for it, components were not assembled); 2. USB charger. Also, Bafang LCD has 512kb flash memory while Kunteng LCD has half, 256kb.
![]()
![]()
I can´t understand how a so powerful microcontroller 32 bits 72MHz with 256kb flash memory has a so poor interface, it just replicate LCD3 interface :-( -- seems this companies are just putting fast undeveloped products to market, in this case color LCDs just because seems popular to have a color LCD!!
As for development, the programming/flash/debug header is available the the microcontroller is the same as on Bafang 850C LCD. This are very popular microcontrollers!! very good for development. The big issue is equal to both LCDs, no documentation for which LCD driver is used so until we find out what version is, firmware can simple be developed.
If I had to choose, I would go with Bafang 850C because it has RTC. Also with double of memory, we would be able to implement advanced features for sure.
More pictures and info:
- Bafang 850C: https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/Bafang-850C
- Kunteng KT-LCD8H: https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/Kunteng-KT-LCD8H
Xnyle said:GEAR_RATIO Is only for correct speed calculation, an incorrect setting doesn't stop the motor from spinning up.
It might cause the motor to immediately spin down cause the controller thinks the motor is spinning to fast.
So that was certainly not the problem if it didn't turn
Furthermore, why do you "use some config you found somewhere". Those configs are probably totally outdated.
There is a Wiki that explains every setting. If you want to use this firmware, you really should read it and make sure you understand it before flashing anything. Otherwise you're just fishing in murky waters.
Xnyle said:Again, what is the state (what does the state variable tell) when running at 28kph?
If you had problems understanding the explanations:
Now that you have understood them, please edit/extend them in the wiki in a way so that you would have understood them the first time you read them.
Xnyle said:I'm not sure why this is on in the first place, did you uncheck the "clear eeprom" checkbox?
qrisonline said:Okay sorry for being slow. My state was 537
See my message as an opportunity to work together. If you do not intend to work in an OpenSource way, then we can not collaborate.Xnyle said:I already explained it, but ok then I'll explain it again:
It is intended to be kind of open source, but it's also my wish that nobody makes money out of it.
GPL v3 would make it impossible to not open source a fork. But this is only the theory.
In practice If it's public I can't ensure that nobody makes money out of it.
There is no such license and even if, I couldn't enforce it.
So I've decided to only hand it out to developers who present a reasonable claim.