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

andrea_104kg said:
I would first like to say that mine is a personal opinion. This is so that no one is offended, my opinion counts very little.
I like riding bikes more than setting engines and it doesn't matter if the display isn't colored.
I also have a turbo levo and I can make direct comparisons. With tsdz2 I can do more or less the same things and this in itself is exceptional. I don't care how easy it is to set up because I make the adjustment and then I don't change it anymore for months. For me, therefore, switching to the 850c display is not essential, unless there are really substantial advantages that go beyond aesthetics. I repeat it is a personal opinion.

Very much my view too. I use the 850c on my BBSHD and of the two displays I actually prefer LCD 3. The bells and whistles of the 850c in reality are not an improvement in use, the viewing angles are poorer and it is not as easy to read. The basic black and white display of LCD 3 which is actually good quality is also much easier to read than any mobile phone display in sunlight too. Also it is cheap as chips and extremely easy for the average person to mod for TSDZ2 use. I am pretty much of the view if it ain't broke don't fix it.
 
First of all, I continue to thank everyone for the precious time dedicated to this project and this community.
:thumb:
I agree with casainho, I believe that the less things there are, the less they can break (cit. Ing Ford)
Looking back on the development on LCD3, instead, I think it's not a waste of time because now it has mounted so many people and the most useful thing for everyone is surely the fact that the FW and the new functionalities are tested in the field and brings as many feedback as possible on the good functioning.
In the end, the most difficult thing is to understand and define the logics to implement.
The code is easily portable nowdays.
My 2 cents
 
About tuning the controller, if I change the capacitors is 75v the maximum voltage that the controller can support? I read some info about the components but for sure I make this question.
Another thing: I like to learn the concept of erps. Example in this gif, if the rotor makes a complete rotatation in a second, the erps is 4?
bldc-working.gif
 
casainho said:
Advantages of 850C LCD:
- has a lot of memory and so we are not limited as on KT-LCD3
- the big display let us show big numbers for the ones that have difficult to see tiny
- 4 numeric fields and 1 graph
- easy to understand configuration menu
- time!!
- USB charger

The SW102:
- tiny for the ones that prefer a small LCD
- more memory than LCD3 and way less than 850C
- tiny numbers, hard to see
- can't show much information on LCD because it is tiny
- Bluetooth
- no time but maybe we will be able to implement something more or less reliable
- no USB charger

I think both of this are way better than LCD3.

In my oppinion, the displays are means for the purpose. They shall be as simpel as possible (also for configuration). So I think, the 850C might be one of the best (for me).
The LCD3 has a perfect contrast in sunlight but as well the main config as the daily use is not very comfortable. When I want to check the trip milage, the average speed, or the total milage, I do not always succeed (I use 0.18 but I'm looking forward to 0.20 :D ).

I hope, the graphics will be done like bafang does. Human power and assistance power is interesting but not mandantory (perhaps it can be switched in a menu)
 
troebi said:
In my oppinion, the displays are means for the purpose.

I agree. I prefer to have no display at all. I live in a flat area, with a torquesensor based sytem, there even is no need to change the assist level :D

Setting up the system with a display and just three buttons to edit the parameters?! :shock: No solution for me. I prefer a laptop with a normal keyboard and a clear overview of relevant parameters on the laptop screen and the possibility to save and reload setups . Be honest: how often do you change parameters? Normally I need 4 or 5 attemps to find a satisfying setup for a new bike...

regards
stancecoke
 
stancecoke said:
troebi said:
In my oppinion, the displays are means for the purpose.

I agree. I prefer to have no display at all. I live in a flat area, with a torquesensor based sytem, there even is no need to change the assist level :D

Setting up the system with a display and just three buttons to edit the parameters?! :shock: No solution for me. I prefer a laptop with a normal keyboard and a clear overview of relevant parameters on the laptop screen and the possibility to save and reload setups . Be honest: how often do you change parameters? Normally I need 4 or 5 attemps to find a satisfying setup for a new bike...
That is why you developed the option on the OpenSource firmware for KT motor controllers to work like that :) -- do you want to do the same for TSDZ2 (that could help users like you)??

I have only one bicycle and I use it on the city and also on mountains. For me is very important things like manage the battery range when I am on the mountains, where I will not take my computer with me (although my computer is very portable because has a 7'' only display).
 
e3s said:
About tuning the controller, if I change the capacitors is 75v the maximum voltage that the controller can support? I read some info about the components but for sure I make this question.
Another thing: I like to learn the concept of erps. Example in this gif, if the rotor makes a complete rotatation in a second, the erps is 4?
bldc-working.gif
Yes.
 
I got working the quick selection of variables to show on the graph: on the main screen, we need to click + long click on ON/OFF button and the graph title blinks, then we can select another variable by using UP and DOWN buttons. Then we leave this mode by long click on ON/OFF button.
Other than the regular variables like pedal human power, pedal cadence, battery voltage, motor power, etc, we can also select ones that are tecnhical like motor angle FOC (maybe in future this can be disabled in configurations).

I took a ride and let me show the graphs (graph shows an interval of 15 minutes) and let's learn a bit how the motor works.

On this ride I was able to go up to 47.6 kms/h:




My cadence was max of about 90 RPMS:





The human power max was about 150 watts:




And the motor current max was:




And the battery voltage, as we can see it dropped with the current peaks. (Some 0 values on the graph, must be some issue).




And the motor power, was max of 704 watts (see that for I get up to the 47.6 kms/h on a light descend, I had to do 154 watts on the pedals while the motor pulled 704 watts from the battery -- assist level factor of about 4.6):




The motor temperature did increase a bit after this short current peaks:




Motor PWM duty-cycle (possible max value is 255):




Motor ERPS (electric rotations per second), where max permitted value is 525 but with high cadence mode this value can be higher:




And the FOC algorithm angle, it increases with both motor ERPS and current, this is what makes the motor to run most efficient possible, having the most torque possible for the same battery usage power and be most silent possible:




And finally, the battery SOC based on Coulomb counting which has good accuracy:
 
stancecoke said:
troebi said:
In my oppinion, the displays are means for the purpose.

I agree. I prefer to have no display at all. I live in a flat area, with a torquesensor based sytem, there even is no need to change the assist level :D

Setting up the system with a display and just three buttons to edit the parameters?! :shock: No solution for me. I prefer a laptop with a normal keyboard and a clear overview of relevant parameters on the laptop screen and the possibility to save and reload setups . Be honest: how often do you change parameters? Normally I need 4 or 5 attemps to find a satisfying setup for a new bike...

regards
stancecoke
fully agree!
My dream is to get the SW102, so i have a small display for the daily usage and an APP (mobile or notebook) for configurations via BLE.

I also thought about an ESP32 Controller, with a small OLED Display. So we can have BLE and WiFi together. First E-Bike with an own WebInterface :lol:
 
casainho said:


Or 8? I'm bit confused. In the meantime well done for the huge work of coding. I'm not an expert but I'm a little good at electronics. I'll try to make some tuning starting from the controller.
 
Where can I find a 8 pin display extension cable for a TDSZ2? Or do I have to use a 6 pin extension cable and do with out the other 2 leads?

THANKS Rick.
 
casainho said:
I got working the quick selection of variables to show on the graph: on the main screen, we need to click + long click on ON/OFF button and the graph title blinks, then we can select another variable by using UP and DOWN buttons. Then we leave this mode by long click on ON/OFF button.
Other than the regular variables like pedal human power, pedal cadence, battery voltage, motor power, etc, we can also select ones that are tecnhical like motor angle FOC (maybe in future this can be disabled in configurations).

Great ! :thumb:
It would be also interesting to see how the total power is distributed among human and motor power in a single graph just by using different colors.

Sky is the limit with colorful LCD..
 
elfnino said:
Great ! :thumb:
It would be also interesting to see how the total power is distributed among human and motor power in a single graph just by using different colors.
I understand what you mean and I already though on that. The issue is that will bring even more possibilities and more configuration options, which will make even much more confuse. Maybe later, for now I would like to work on stable version first.
 
Buba, see this:

wpenner said:
casainho said:
wpenner said:
My motor cooked itself 2500km+ Blue gear still good. Not sure if overheated or controller cooked it. Noticed small break in yellow wire housing, maybe that shorted to the case.
It was suddenly? Or was something slow? Maybe you need to install the temperature sensor...
It was all of a sudden, when changing gears I felt some resistance for 10 seconds and then stopped. I did have my motor apart a few rides ago to add the temperature sensor(was not configured yet). It seems only the wires connected to the yellow phase wire are burned near the entry. Rest or motor wires are not black, so I guess likely controller short or maybe yellow wire touched the case where housing was damaged. If was over temperature I think all wires would be black instead of just on one corner of the motor.

I think we need to improve the motor code to avoid this. Basically, the motor must have some min ERPS value if there is power/current on it. I did this kind of protection but on upper layer and it is slow to react -- I guess we need to make it on lower layer so it is faster to react. I think the issue is if there is some bug and coils get current while the motor is stopped.

We need to re-enable the watch dog timer on PWM cycle code so if something fails, the system reboots and not stay halt with current on coils. And also that motor must have ERPS if there is current on coils.

I think this kind of issues are way important than the advanced features. It is preferable to cut any advanced feature over having a rock solid motor working.

I am waiting for the new version and then we can carefully see how we will handle this.
 
casainho said:
I think we need to improve the motor code to avoid this. Basically, the motor must have some min ERPS value if there is power/current on it. I did this kind of protection but on upper layer and it is slow to react -- I guess we need to make it on lower layer so it is faster to react. I think the issue is if there is some bug and coils get current while the motor is stopped.

We need to re-enable the watch dog timer on PWM cycle code so if something fails, the system reboots and not stay halt with current on coils. And also that motor must have ERPS if there is current on coils.

I think this kind of issues are way important than the advanced features. It is preferable to cut any advanced feature over having a rock solid motor working.

I am waiting for the new version and then we can carefully see how we will handle this.

Definitely! This is why I removed the startup-assistance-without-pedal-rotation! I burned a phase wire and destroyed a motor this way during testing. Now on the 0.20.0 I only enable motor if the motor shaft rotates at least 4 revolutions per second so it is never enabled when stand still!

I have pictures of my burned phase wires. If there is any value in seeing how the wire insulation and isolation disc melted I can upload pictures!

NOTE: I have improved everything else so the startup is basically instant even though we do not have startup-assistance-without-pedal-rotation! It will still startup much, much faster than before so I hope no one feels the removal is bad. It is just that much safer as you can rest your feet on the pedals and when you want to go it is instant! If you use the double cadence it will startup perfectly and the standard cadence is also really fast!



casainho said:
We need to re-enable the watch dog timer on PWM cycle code so if something fails, the system reboots and not stay halt with current on coils. And also that motor must have ERPS if there is current on coils.

Very good solution to have that check.



wpenner said:
casainho said:
wpenner said:
My motor cooked itself 2500km+ Blue gear still good. Not sure if overheated or controller cooked it. Noticed small break in yellow wire housing, maybe that shorted to the case.
It was suddenly? Or was something slow? Maybe you need to install the temperature sensor...
It was all of a sudden, when changing gears I felt some resistance for 10 seconds and then stopped. I did have my motor apart a few rides ago to add the temperature sensor(was not configured yet). It seems only the wires connected to the yellow phase wire are burned near the entry. Rest or motor wires are not black, so I guess likely controller short or maybe yellow wire touched the case where housing was damaged. If was over temperature I think all wires would be black instead of just on one corner of the motor.

wpenner, I know it is difficult to remember but:

1. What speed where you riding at when this happened?
2. Were you rotating the pedals quickly when you felt the resistance or was it barely any rotation?
3. Do you have the Coaster Brake version?
4. Did you experience any rain before this?
5. Did the motor stop before you changed gears or did you change gears during rotation?
6. Do you think the motor rotated and was there excess power going to the motor at the moment of resistance?
7. Do you have version 0.19.0 installed?
8. Do you think the root cause was the yellow phase wire that shorted to the case?

Sorry for the questions but the more we know the better code we can write to solve this. This will also help us find ultra rare bugs. If you do not want or do not know how to answer some questions it is totally fine! Just want to check!

Thank you for the reporting and sorry to hear that happened! This is one of many things I hope are improved on the 0.20.0 and we can even do more just as Casainho suggested!
 
Sorry for being offline the last couple of days! Have focused on finalizing my work so we can have a beta out this week. I hope everyone understands.

But was reading every single post and I got to say it was really NICE to see the discussions! It is great to see the community share their opinions and feelings! When it is time to discuss the 0.20.0 I can only hope that as many join and give feedback! We could even have polls where the entire community is given an opportunity to vote!

As for the first beta: I have been extremely limited with time this week but still managed to develop every single day. Have just recently added so we can have great motor control from very low current levels without motor jitter. So when starting against a hill or in a high gear it will be a smooth experience that assists you up to speed. I think Bosch brags about assist startup on hills and what not... :wink:

The deadline remains and everything should be finished this week and the last changes submitted. Then I will try to explain important points and start a discussion about the 0.20.0 and answer all questions.

I have implemented all the great user suggestions as well. If for any reason you do not see your particular suggestion in the coming beta, please let me know and we will sort it out. :) Most likely I just missed it due to the amount of changes made!
 
I just wanted to share an Issue I had today, and will follow up later once I have examined the motor, but I noticed on the morning ride to work my motor suddenly stopped all assistance and I could see on the screen my temperature was at floating around 140 Deg C! and flashing.

Well it was hot but not that hot so I guessed that I have an issue with either the temperature sensor or more likely a restrictive short on the pins to the sensor /cable.
It was not at a fixed value either jumping around a few degrees up and down and a tap to the motor would drop it 10 degrees or more, all suggesting a cable issue with changing resistance.

I did rinse down the bike yesterday after a muddy ride and left it to dry well in this heat we are having, but its possible that some water got wicked into the cable, and more than a coincidence I think.

I was confident my motor was not about to go into meltdown, so disabled the temperature protection ( Menu 7 > 4 > set to 0) which somehow I remembered the location of :D so its all running again for now and I can get home tonight.

With you talking about motor protection it made me think maybe it may be good to detect a very high or indeed low temperature readings as a more general fault and could suggest a cable , sensor or moisture issue worth investigation. Maybe hard to do anything different on the LCD3 screen but on the text capable screens a more written warning could be given " Temperature sensor Fault" and the option to disable over temperature protection but keep the warning until the reading is within a logical range.

I will update once I find the actual issue.
 
perryscope said:
I just wanted to share an Issue I had today, and will follow up later once I have examined the motor, but I noticed on the morning ride to work my motor suddenly stopped all assistance and I could see on the screen my temperature was at floating around 140 Deg C! and flashing.

Well it was hot but not that hot so I guessed that I have an issue with either the temperature sensor or more likely a restrictive short on the pins to the sensor /cable.
It was not at a fixed value either jumping around a few degrees up and down and a tap to the motor would drop it 10 degrees or more, all suggesting a cable issue with changing resistance.

I did rinse down the bike yesterday after a muddy ride and left it to dry well in this heat we are having, but its possible that some water got wicked into the cable, and more than a coincidence I think.

I was confident my motor was not about to go into meltdown, so disabled the temperature protection ( Menu 7 > 4 > set to 0) which somehow I remembered the location of :D so its all running again for now and I can get home tonight.

With you talking about motor protection it made me think maybe it may be good to detect a very high or indeed low temperature readings as a more general fault and could suggest a cable , sensor or moisture issue worth investigation. Maybe hard to do anything different on the LCD3 screen but on the text capable screens a more written warning could be given " Temperature sensor Fault" and the option to disable over temperature protection but keep the warning until the reading is within a logical range.

I will update once I find the actual issue.

Can confirm I had the exact issue! Turned out I had water inside the case. Can also confirm I was hitting the temperature limiting when that happened and was generally shown abnormal motor temperature values.

Good suggestion! We should also advice the user to dry out/clean inside the case and check the wires if something like that happens. We just need to be able to properly define a non-working sensor situation and be confident it will not cause a problem. Worst case scenario is that have a real over-temperature situation and set an error for sensor fault. Thus disabling the motor temperature protection. But that is very unlikely if properly implemented.

Anyway, it is at least safe to say that a value of 140 degrees Celsius should point to sensor fault.

Will remember this and when time allows maybe the community can start a discussion of how we might implement such an error flag and what parameters are safe to use. Also what the effect of the error should be.
 
buba said:
Definitely! This is why I removed the startup-assistance-without-pedal-rotation! I burned a phase wire and destroyed a motor this way during testing. Now on the 0.20.0 I only enable motor if the motor shaft rotates at least 4 revolutions per second so it is never enabled when stand still!

NOTE: I have improved everything else so the startup is basically instant even though we do not have startup-assistance-without-pedal-rotation! It will still startup much, much faster than before so I hope no one feels the removal is bad. It is just that much safer as you can rest your feet on the pedals and when you want to go it is instant! If you use the double cadence it will startup perfectly and the standard cadence is also really fast!
Startup-assistance-without-pedal-rotation is a feature I did implement and I use daily. Please put it back or I will have to do it.

There is no problem to have motor starting if we don't rotate the pedals, the throttle works just like that.

What others asked is an offset and I was thinking in having a configurable offset in kgs, where the user could see on advanced tecnhical data the value in kgs of weight done on the pedals (as we will have this to calibrate the torque sensor). I am looking at the calibration of the torque sensor and looking at the torque sensor ADC values, I can see that the weight of my leg resting on the pedal is near 10 kgs. I could setup a value of like 15 kgs or 5 kgs, depending in what I prefer. For me, could be the 5 kgs because I like to get immediate assistance as soon I release the brakes.

By the way, 10 kgs is +14 ADC 8 bits units on my recent bought torque sensor, which I think is plenty to be safe as an offset to avoid unwanted startups.

The torque sensor needs more love from us: we need to add calibration and also show to user the force on it in kgs. This my torque sensor, as we use it now, can only measure (wrongly!) up to about 120 watts of human power at my natural cadence while it should be able to measure up to 500 watts of human power (because it can only measure up to 25 kgs but calibrate will measure up to 110 kgs).
 
Hi,
First I wanted to say that this project is great, I've been using the software and overall I enjoy it!
However I've noticed that the assist levels seem to hit a wall pretty quickly, at least for me. I'm actually finding that compared to the stock software I'm around 10% slower at max speed and that anything over around 2x assist doesn't really affect the output of the motor. Looking through the thread I think a couple other people also mentioned this issue with assist scaling. On my installation I can't seem to get over around 400w sustained output from the motor, even if I set assist at 3x or 4x. Although I've seen short spikes up to 800w. For example, if I have assist at 3x with 200w human power I'm still seeing 400w max. The human power I'm getting from the odometer subfield.
I've scoured this thread and the settings for any solutions but I haven't really found anything.
My current setup is 0.19.x with a 48v 14.5Ah battery
http://www.uppbattery.com/ship-from...msung-29e-29et-cells-li-ion-battery-p0839.htm.
My config is:
Assist Levels - 6 levels at 0.5, 1, 1.5, 2, 2.5 and 3
Max current - 18 Amps
Speed Limit - 50 mph
Low voltage cutoff - 38 v
Motor Voltage type - 48v
Motor Power Limit - 0
Temperature Limit or Throttle - 0
Boost - 0
Street Mode - 0

Would anyone have any ideas on what could be the issue, or is this actually normal behavior for the software? Any help would be great!
Thanks!
 
hydrinium.h2 said:
Would anyone have any ideas on what could be the issue, or is this actually normal behavior for the software? Any help would be great!
When you feel you are hitting the limit, go to advanced technical data menu and see the value of the motor ERPS and PWM duty-cycle, then share with us here.

Here an example of my values but that I was not a max of the motor:

2019-07-24-10-22-31.jpg


2019-07-24-10-22-12.jpg
 
From a quick test I got:
PWM duty cycle : 254
ERPs : Fluctuated between 390-400
Also, current seems to max out around 8 Amps seated, I can get it to jump to around 12 if I start pedaling standing.
 
hydrinium.h2 said:
From a quick test I got:
PWM duty cycle : 254
ERPs : Fluctuated between 390-400
Also, current seems to max out around 8 Amps seated, I can get it to jump to around 12 if I start pedaling standing.
PWM duty cycle at 254 is the max value possible. And what is your pedal cadence on this situation?
 
Back
Top