Am I right? You suggest that in the procedure for calculating the motor current using the "throttle override" procedure, we substitute the filtered value of the ADC of the torque sensor instead of the filtered value of the ADC of the throttle?
I don't get your point. In throttle override I read the recent throttle value directly from the ADC array without filtering.Am I right?
uint16_mapped_throttle = map(adcData[1], THROTTLE_OFFSET, THROTTLE_MAX, 0,PH_CURRENT_MAX); //throttle override, no torque override in this version actually
uint16_mapped_throttle = map(adcData[6], TORQUE_OFFSET, TORQUE_MAX, 0,PH_CURRENT_MAX);
For me it's two pedal turns.For me it's completely OK, if the motor starts smoothly whithin the first quarter of the first pedal revolution.
But I didn't find such a line in the code.adcData[6] contents the value of the "AD1" input that is used by the torquesensor.
C:uint16_mapped_throttle = map(adcData[6], TORQUE_OFFSET, TORQUE_MAX, 0,PH_CURRENT_MAX);
Is it possible to get the speed for the speedometer and limits from an external sensor on the wheel, and the speed for current calculations from the Hall sensors in the motor?Of course for the motor power calculation, you can use the speed from the hall sensors always, as you don't need the speed information at standstill.... This would be much faster than the external speed sensor, as you get much more pulses per wheel Revolution.
?! See the link.But I didn't find such a line in the code.
For this, you can misuse the function "throttle override".
Sure. But the wheel speed is not in the iq setpoint calculation recently, as written before. Do you want to add it?!speed for current calculations from the Hall sensors in the motor?
Yes, if the legal flag in the main.h is activated and the pedals are not turning.Question - does the 6 km/h limit work in this situation?
See the Wiki:I expected the autodetect procedure to start turning the wheel but nothing happens
So you have to set the display to DISPLAY_TYPE_DEBUG. The display will show a communication error then, but this doesn't matter. Just let the autodetect finish, then you can flash with the right display setting again.you can start the autodetect routine by activating the autodetect and debug option
It's the same as in the Kunteng project, just the BAUD rate has to be set to 56000:Which device do I use for that and how do I connect it?
Thank you, that was the problem. I got the serial debugger connected, too.So you have to set the display to DISPLAY_TYPE_DEBUG. The display will show a communication error then, but this doesn't matter. Just let the autodetect finish, then you can flash with the right display setting again.
#if (DISPLAY_TYPE == DISPLAY_TYPE_DEBUG)
printf_("phase current offsets: %d, %d, %d \n ", ui16_ph1_offset, ui16_ph2_offset, ui16_ph3_offset);
printf_("internal temperature raw reading: %d, \n ", adcData[7]);
#endif
#if (AUTODETECT == 1)
#if (DISPLAY_TYPE != DISPLAY_TYPE_DEBUG)
#error "To use autodetect, set DISPLAY_TYPE to DISPLAY_TYPE_DEBUG, too."
#else
if(adcData[0]>VOLTAGE_MIN) autodetect();
else printf_("Battery voltage too low!: %d,\n ",adcData[0]);
#endif
No, the motor must start, if a movement of the pedals is detected and the torquesensor mode and is not activated. Try with the direction detection disabled first.The motor does not start, though. Is my misunderstanding that the wheel has to be turned, too, in addition to a PAS signal?
Direction detection is disabled. I uncommented the LED toggle at line 742 in the section "SPEED signal processing" and added a toggle at line 710 in "PAS signal processing" (and put the LED toggle in lines 1020 and 1021 in a comment). LED toggles once I turn the wheel and every time I pass a magnet along the PAS – signal input works.No, the motor must start, if a movement of the pedals is detected and the torquesensor mode and is not activated. Try with the direction detection disabled first.
That worked – once. The wheel turned quite slowly, seemed rather sneaky than walk-ly. Also, it did not stop after I let go off the button for two or three revolutions of the wheel.with the display connected, try the walk mode.
Is this plausible?You can cross check, if there are plausible hall angles printed at startup in debug mode.
regular reset
phase current offsets: 2017, 1981, 2001
internal temperature raw reading: 1743,
Hall_Order: -1
Hall_45: 32
Hall_45: 393674752
Hall_51: 96
Hall_51: 1157234688
Hall_13: 154
Hall_13: 1849163776
Hall_32: -148
Hall_32: 2541158400
Hall_26: -86
Hall_26: 3280863232
Hall_64: -25
Hall_64: 4008574976
KV: 560
Lishui FOC v1.0
Yes.Is this plausible?
You can check adcData[0] also, that's the battery voltage.I'll check later
OK, that's a bug, that no one reported until now.Since THROTTLE_OVERRIDE was not set (I have no throttle), line 895 is never executed and temp_current_target remains at 0.
With iq we set the motor torque. If there is no load, even very little torque will spin the wheel very fast.I am a bit surprised that the wheel starts turning rather powerful.
Not the power, but the torque. So the power will increase with the speed.Is it correct that motor power is simply calculated using cadence times support level, line 852?
What kind of display are you using? This is the big advantage of the 5s protocol, you can set the percentage of the each level individually in the display (if the display firmware has the option to do so). Individual modes are an option for torque sensor mode only.Even in level 1 (of 5) the bike keeps getting faster and faster without me using any force.

Have you committed your settings to your GitHub repo? Can you post a link to your config.h? Or post it here directly?How to do this?
Which branch are you using? In the master I have switched to read in the offset of the torquesignal at startup, instead of using a fixed offset, defined in the config.hAny ideas?