TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

casainho said:
hefest said:
Another thing, motor is resisting pushing the bike back (when unpowered).
So I would say there is a short circuit on the motor coils or on the 3 motor phase wires. Disconnect the phase wires from the motor controller and test again. The motor will resist to turn by hand while it is in short circuit.

Tested restistance between all 3 motor terminals, it's 0.8ohm between each of the 3. When testing for continuity I'm getting audio signal and 0.001.

Resistance between controller power terminals when motor is disconnected is 0.5ohm. When testing for continuity I'm getting audio signal and 0.001.
Resistance between motor terminals and motor casing is infinite.

I'm not sure what kind of resistance should I expect on motor 3 phase terminals?
 
I'm not sure what is the winding resistance but if you have the same 0.8 ohm it is probably ok. You should disconnect windings from the controller and check if you still have short circuit on the battery input. Your 0.5 ohms on the controller outputs look suspicious to me. You can check the resistance switching polarity of the multimeter. If you have both ways 0.5 ohm then most prolbably your controller is dead. I guess not to pollute this thread it's better to create a separate thread on your motor troubleshooting.
 
casainho said:
Jonesm32 said:
Does anyone know if it is possible to display imperial units for distance (miles, MPH etc) whilst also displaying temperature in degrees C. These are the preferred units here in UK. I cant get my head around the Fahrenheit scale any more. Thanks
No.
You could subtract 30 and then divide by 2. So 87 Fahrenheit becomes 28 centigrade. Decent approximation especially given the circumstances.
 
James Broadhurst said:
casainho said:
Jonesm32 said:
Does anyone know if it is possible to display imperial units for distance (miles, MPH etc) whilst also displaying temperature in degrees C. These are the preferred units here in UK. I cant get my head around the Fahrenheit scale any more. Thanks
No.
You could subtract 30 and then divide by 2. So 87 Fahrenheit becomes 28 centigrade. Decent approximation especially given the circumstances.
Make a pull request and let´s discuss there the details of the implementation. I will accept the pull request as long it follows current logic of the firmware, I mean it can not be a quick hack but instead a structured implementation.
 
Could someone please give me the info about higher cadence software? I read it once but can't find it anymore.
And what's the reason to stop motor power at 90rpm? That's too low for my finding. If you do a fast downhill you can pedal much faster, and same goes for very slow uphill in lowest gear.
Is it a controller limitation or a personal deciscion do it that way?
Thanks
 
izeman said:
Could someone please give me the info about higher cadence software? I read it once but can't find it anymore.
And what's the reason to stop motor power at 90rpm? That's too low for my finding. If you do a fast downhill you can pedal much faster, and same goes for very slow uphill in lowest gear.
Is it a controller limitation or a personal deciscion do it that way?
Thanks
I need to write about this. I consider the firmware is mostly finished by now and so it is a good time to write about all this.

cadence 90 RPM = 512 motor ERPS / 4000 RPM (motor RPM nominal value)

1. the motor itself, should achieve the 512 motor ERPS (cadence 90 RPM) at 48V battery voltage but without providing torque... motor torque is max at startup and 0 at the 512 ERPS, considering a battery voltage equal to motor voltage.
Does not provide torque at 512ERPS because the motor generates 48V at his terminals and so there are no current flow and hence no power, between the battery 48V terminals and motor 48V terminal @512ERPS -- note the at near zero speed ERPS, the voltage at motor terminal is near 0 so the motor torque / current flow is max.

2. motor controller has a limit on how fast can generate the voltage signals on the motor phases, and on TSDZ2 motor controller, it is at the 512 ERPS, so at the same limit of the motor voltage <--> battery voltage

Increasing battery voltage over 48V will increase the motor max ERPS/RPM, the the 14S/52V battery BUT the TSDZ2 motor controller still has the limit of 512 ERPS!!

TSDZ2 motor controller limit is due 2 things:
1. hardware that limits the PWM switch frequency
2. microprocessor slow speed to control PWM switch frequency at higher speeds

1. I guess can handle +20% (at expense of less efficiency and controller temperature increase) , I think we need to test to find out. (90 cadence +20% would then be 108)
2. I think we can maybe get the +20% doing careful optimizations and testing on the firmware

After 1. and 2. solved, we can even try to do the Flux weakening to get even a bit more motor speed even when the battery voltage drops with regular discharge... but this maybe will need processing power that will not be available after implementing 2.
 
AZUR said:
Hi,

Error brakes.jpg

I can´t solve "Error Brakes" in the start up.

Any ideas?

Regards
Is this a new installation or after a firmware update?
 
casainho said:
AZUR said:
Hi,

Error brakes.jpg

I can´t solve "Error Brakes" in the start up.

Any ideas?

Regards
Is this a new installation or after a firmware update?

thanks Casainho.

It´s an firmware update.

And last time I use the bike the battery went down to the empty state. No motor power on. And after this, with the battery full, I think the display did not communicate with the motor because after power up the screen stayed in the same screen I sent today. There was no error message because was 0.6.5 release.
 
casainho said:
I need to write about this. I consider the firmware is mostly finished by now and so it is a good time to write about all this.

cadence 90 RPM = 512 motor ERPS / 4000 RPM (motor RPM nominal value)

1. the motor itself, should achieve the 512 motor ERPS (cadence 90 RPM) at 48V battery voltage but without providing torque... motor torque is max at startup and 0 at the 512 ERPS, considering a battery voltage equal to motor voltage.
Thanks for elaborating the topic in this depth.
I hope you like to discuss this further. I have some years experience from "standard square" wave controllers to sine wave with field-weaking that we have nowadays.
And sure, the higher the battery voltage the higher the motor would finally turn at full speed or "nominal" speed - in case FET switching is fast enough for the desired voltage. As you said, at nominal speed torque goes down to zero, so it makes no sense.
To circumvent this problem FOC with field weakening was "introduced". I have this feature enabled with my Lebowski controller. You can raise RPM to almost endless numbers, which are (basically) only limited by hardware (magnets flying away 8) and CPU power.
I assume, and you wrote it, CPU seems limited with this controller, but I think field wakening is the only way to go to get support at higher cadence. 90 is a good rpm for long time pedaling, but as mentioned it can be much higher for shorter periods. The other advantage is, that you can gear the bike lower, being able to climb higher mountains, and still get higher top speed if you pedal faster.
Did I sum it up correctly?
 
And last time I use the bike the battery went down to the empty state. No motor power on. And after this, with the battery full, I think the display did not communicate with the motor because after power up the screen stayed in the same screen I sent today. There was no error message because was 0.6.5 release.
Brakes error means there is no communication from the TSDZ2 controller to display, can be for various reasons but once installation is done and ok, the problem is mostly probably because brakes are pressed at startup.

Seems you are out of luck but at least with this latest firmware version you have the feedback that motor controller is not communicating. You should at least check the motor TX wire. Also is the display that enables the motor controller power/voltage, make sure that wire has the needed power, you can measure with a multimeter, should be the battery voltage when the display is on.

Did you pull for some reason the cable from display to the motor controller?? That can be the reason... Or any connector on this cable...
 
Hi,
Thanks Casainho.

The problem is with controller. The same display on the other bike works. With other display the controller doesn´t work also.

Maybe the problem, I had last time with this bike, was the controller. Also it was not easy to download, this time, the firmware in the controller.
I thought the problem was the battery became empty and the motor shut down. But maybe it was not the case. It was the first time I use the battery. It was a new one.

Casainho, did you have any controller failure during a ride? Its very strange.

Thanks
 
AZUR said:
The problem is with controller. The same display on the other bike works. With other display the controller doesn´t work also.

Maybe the problem, I had last time with this bike, was the controller. Also it was not easy to download, this time, the firmware in the controller.
I thought the problem was the battery became empty and the motor shut down. But maybe it was not the case. It was the first time I use the battery. It was a new one.

Casainho, did you have any controller failure during a ride? Its very strange.
No controller failures!! Only during development.
Well, once I had one not working but flashing was working correctly -- in the end I found the issue was somewhere in the connector to the display and I had exchanged for a new one, both male and female.

One thing, grounding can make communications fail more (flash firmware or communications to display). I mean, a bad wiring on the negative/ground of the controller to battery. Make sure the negative to the motor controller has a good connection.
 
izeman said:
I assume, and you wrote it, CPU seems limited with this controller, but I think field wakening is the only way to go to get support at higher cadence. 90 is a good rpm for long time pedaling, but as mentioned it can be much higher for shorter periods. The other advantage is, that you can gear the bike lower, being able to climb higher mountains, and still get higher top speed if you pedal faster.
Did I sum it up correctly?
Yes and what now? what is needed is developers to implement the step 1., 2. and 3. Because I think we can divide the problem in this 3 steps and get value even if is possible only the first or second steps.
 
casainho said:
izeman said:
I assume, and you wrote it, CPU seems limited with this controller, but I think field wakening is the only way to go to get support at higher cadence. 90 is a good rpm for long time pedaling, but as mentioned it can be much higher for shorter periods. The other advantage is, that you can gear the bike lower, being able to climb higher mountains, and still get higher top speed if you pedal faster.
Did I sum it up correctly?
Yes and what now? what is needed is developers to implement the step 1., 2. and 3. Because I think we can divide the problem in this 3 steps and get value even if is possible only the first or second steps.
Just wanted to be sure to understand the issue and sum it up correctly ;) I always can handle a situation much better if i know the underlying reasons. That's all ...
 
Hello,

I installed a new torque sensor. I calibrated it but if I set it around 110, the standby value is increasing steady in use until it reaches max torque sensor value or the range is max 30 units. In this case the motor no longer engages.

I managed to make the value stable but the value on standby is 35.
The good part is that the torque range/resolution is huge (240 units).
The not so good part is that the software only supports values above 100 on standby and I get ERROR.

I tried to understand how the torque sensor soft operates and I manged to fix the error by modifying the offset from 100.
Code:
volatile uint16_t ui16_adc_pedal_torque_offset = 25;
The error is no longer present and I am able to get 700w+ on hard pedal press. The problem now is that I am getting very little assistance between 35-100 units. In can no longer use high cadence because the torque value is too low and motor is almost not engaged. After 100 it works excellent.

Does the software has some limitation on values lower of torque? Any idea what can I do to fix this?
 
izeman said:
Just wanted to be sure to understand the issue and sum it up correctly ;) I always can handle a situation much better if i know the underlying reasons. That's all ...
Ok I understand. So that is why I want to explain this on the wiki and that is why was important for me to implement the visualization on the graph of the technical variables like motor ERPS speed, PWM value, battery current, motor current, motor FOC angle, etc and also the threshold values that changes the graph color gradient from regular blue to yellow and finally to red.

I wish users can learn more about electric motors e ebikes, this is strategic as electric micromobility including exoskeletons / electric legs have this kind of motors!! It is something the new future will be made of.
 
maximusdm said:
Hello,

I installed a new torque sensor. I calibrated it but if I set it around 110, the standby value is increasing steady in use until it reaches max torque sensor value or the range is max 30 units. In this case the motor no longer engages.

I managed to make the value stable but the value on standby is 35.
The good part is that the torque range/resolution is huge (240 units).
The not so good part is that the software only supports values above 100 on standby and I get ERROR.
You need to do a better work on explaining other way you are not helping.

What ERROR?? the firmware is ready to accept 1 unit so any value equal or over 1 should work.

maximusdm said:
I tried to understand how the torque sensor soft operates and I manged to fix the error by modifying the offset from 100.
Code:
volatile uint16_t ui16_adc_pedal_torque_offset = 25;
The error is no longer present and I am able to get 700w+ on hard pedal press. The problem now is that I am getting very little assistance between 35-100 units. In can no longer use high cadence because the torque value is too low and motor is almost not engaged. After 100 it works excellent.

Does the software has some limitation on values lower of torque? Any idea what can I do to fix this?
Seems you did an ugly hack, that you are doing things without really understand them, why do you expect them to work??

In sum, you need to give way more details of any issue you found so it can help me to understand and together we can workout a solution.
 
casainho said:
In sum, you need to give way more details of any issue you found so it can help me to understand and together we can workout a solution.
I will rephrase. Let me know if you require more info.
Torque sensor read idle is 35 units. With the unmodified software I get 2- torque sensor error and the motor is not operating.
In the calibration guide you made, you say that the idle value must be around 110. This was not possible in my case. As you know, 2 sensors are never the same or can be calibrated in same manner.

What can I do to make it work in this case?
 
casainho said:
I need to write about this. I consider the firmware is mostly finished by now and so it is a good time to write about all this.

cadence 90 RPM = 512 motor ERPS / 4000 RPM (motor RPM nominal value) ...

Could you also explain what the "experimental high cadence mode" in current firmware does regarding the cadence limit?
 
maximusdm said:
casainho said:
In sum, you need to give way more details of any issue you found so it can help me to understand and together we can workout a solution.
I will rephrase. Let me know if you require more info.
Torque sensor read idle is 35 units. With the unmodified software I get 2- torque sensor error and the motor is not operating.
In the calibration guide you made, you say that the idle value must be around 110. This was not possible in my case. As you know, 2 sensors are never the same or can be calibrated in same manner.

What can I do to make it work in this case?
I know that you should install our OpenSource firmware and discuss here only the issues with it. For other firmwares, use their specific threads or create a specific one.
 
ilu said:
casainho said:
I need to write about this. I consider the firmware is mostly finished by now and so it is a good time to write about all this.

cadence 90 RPM = 512 motor ERPS / 4000 RPM (motor RPM nominal value) ...

Could you also explain what the "experimental high cadence mode" in current firmware does regarding the cadence limit?
That mode is kind of a hack to make 1. and 2., as also kind of 3., by not making the motor phase voltage signals with the minimum quality recommended (so probably using some more energy) and also keep the motor always working with less torque but higher speed and so less optimized in efficiency.
 
Hello ! is it possible to make the option of changing the assist stop? currently at 0.6.9 it is such that when we stop pedaling the engine is spinning for one second. I do not want to use brake sensors, I prefer the engine to stop abruptly. In 0.19 and 0.20 this problem was gone. Regards:)
 
Back
Top