It's send as controler temperatue, motor temperature is empty.is it sent over the CAN in a different format ?
It's send as controler temperatue, motor temperature is empty.is it sent over the CAN in a different format ?
Correct. Power throttling is based on controller temperature here.Maybe the M820 has no NTC on the motor at all?
In some ways thats a pity as knowing what the motor itself is doing is fairly essential in my view.Correct. Power throttling is based on controller temperature here.
Testing #5.1OK, thank you for the feedback! Are the power drops solved with this value
Yes, looking at your logs, the new calibration value has not fixed the issue, U_d is still much too high.The motor still loses power at high cadence

We still have slightly different controllers. Maybe if I burn out my FC 3.0, I'll have to install a controller from the M560 or FC 2.0It's not easy to debug, as my motor behaves different obviously.
Hm, there is a bug in the logic, indeed. The rotor position is calculated from the timer2 value times the angle increment for one encoder step in normal motor operation. If the z-pulse is fired, the timer2 is reset to the value that was found in the calibration procedure for the z-pulse position.I have to review the algorithm.
OK, the effect of the different way of setting the calibration value is, that I have 180 deg offset now, so the motor is turning in the other direction.I have to test the new logic on Monday

I had the same thing when I first loaded EBiCS onto a motor calibrated with the original firmwarethat I have 180 deg offset now, so the motor is turning in the other direction
Here is a video of the calibration process, the calibration value (encoder offset) is shown in the field "Calories". During the open loop calibration, there is no display communication, therefor the display shows an error. The error disappears when the closed loop part of the calibration starts.I'll attach the bin file with the latest improvements later!


I'll do the calibration, but the field test might have to wait until tomorrow. Yesterday was an epic pig-ride in the mud, and I won't have time to get the bike ready for firmware testing today.@Avatarkhorn: I'm really curious to see if your logs look similar now
Hm, your system has a negative Z-position. I have to check, if my calculation fails for negative valuesI got a rather disappointing result:
It took me over 10 calibrations to get stable readings in the 63-65 range. The starting value was 124, then 140+, then 90+, and then gradually decreased to the stable values described above.
Hm, I have no idea why your offset readings are that random. With the new logic (without the hardcoded 60 offset) the initial value should be about -180 deg, but your video shows about -128 deg. ((65243-2^16)*0,439)1) The motor was calibrated multiple times using EBiCS. Calibration debug values are 63-65.
2) The motor still loses power at high cadence, but to a lesser extent. Up to 600-700W. This is probably the maximum positive result for a calibration with a +60 offset.

There is no stator temperature sensor in Bafang M820 motorMaybe the M820 has no NTC on the motor at all?
The imprints on the PCB are completely different from the M510. And one connector is not populated at all...
View attachment 386544
Can someone provide a flash dump of the Bootloader 38 for the M510? I tried a modified file from the hubmotor controller, but my mod doesn't work.We still have slightly different controllers.
Of course, I can do it again. But I've calibrated at least five times with the same result. It's just that the video only shows the very first one.Can you repeat the calibration a few times, to see if you get the same (bad) result always?
Hm, I've checked the bin file (for bootloader 3) and it works as expected for me.But first I will check, if something went wrong with merging the code for compiling it on my other computer.
So I really wonder, what's going wrong with your motorBut I've calibrated at least five times with the same result.
My motor is fine. FC 3.0 works almost perfectly. There are just a couple of minor issues due to the proprietary firmware. And that annoying fact of it being proprietarySo I really wonder, what's going wrong with your motor
Maybe, this solves the problem, if the calibration value is negative, it is shifted by one electrical revolution (820 encoder steps) into the positive range. Just one line of codethe results are stable, the same as above.
It looks like you did everything correctly! Of course, I'm getting a different value than you. The engine sound and current consumption at idle are adequate.Would be glad, if you could test it!
Great!It looks like you did everything correctly!
Testing #6Would be glad, if you could test it!
I hope @mdi will disable the value check in the Canable tool, I don't want to have an extra tool.CANable Pro algorithms interfere with adjusting the Torque Sensor filter.
Hm, of course I can reduce the output. As I don't know, how much torque one amp of motor current produces, I can't really calculate the mechanical power. I would simply reduce it by factor four, then you have a bigger number range for fine tuning.The adequate range of assistance levels on my motor is quite small.
We can add any gimmick we want, but we have to prioritise: is it more helpful to make other motors like the M820 work, or to add more functions to the M510?All other comments concern features that haven't been implemented yet;
We had the statement, that in the M560 exactly the same controller is used as in the M510 from @Avatarkhorn. But we got a report about melted battery contacts on the M560 also.I could also test but at the moment I only own a m560 so it's not helping right ?
Of course, I'd love to get functional firmware for my motor faster. But more motors = more testers. And there aren't that many popular models: M510, M560, M820.is it more helpful to make other motors like the M820 work, or to add more functions to the M510?
I didn't say thatWe had the statement, that in the M560 exactly the same controller is used as in the M510 from @Avatarkhorn.