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

bart1006 said:
casainho said:
EndlessCadence said:
Maybe I just go back to the previous version of the firmware, but programming the LCD3 again is a major pain :(
Leave the programming header connected on LCD3. Yes, try the version that was working until we figure out what is happening to you.

I just drilled a little hole in case of the lcd and soldered the programming cable to the lcd3.
It works pretty good.


IMG_8707.jpg
IMG_8708.jpg
IMG_8709.jpg
Good!!!

I am open a hole and keep soldered the pins directly to the board but it seems dangerous because it is easy to touch them and damage. You solution seems much better. Let's see if I have time to put on the wiki!!
 
Dirkro said:
casainho said:
You are not using the V0.7. I install the V0.7 hex file.

Sorry, can only see 0.6 in the master branch no 0.7
You were correct, my mistake. Go and get them there now!!
 
eyebyesickle said:
Hi,

What about with the original firmware, is there a setting I could change to always start in turbo mode? I like to wire a switch for the coaster brake models, and use it without a display or speed sensor, so there is only 1 wire to the battery for a real clean setup.

Without display it has the highest assist level. At least I feel so.
 
casainho said:
Dirkro said:
casainho said:
You are not using the V0.7. I install the V0.7 hex file.

Sorry, can only see 0.6 in the master branch no 0.7
You were correct, my mistake. Go and get them there now!!

Installed V 0.7 this evenig, after setting all parameters I got a full reset :(
Then I had to set all parameters again!
At the first short test ride, it was working very nice.
Is there any resaon why all parameters has ben set to standart ? Maybe I pressed the wrong botton?
Maybe a procedure I have to go through when changing the firmware?
Will keep on testing tororrow!
Thank you!

Dirk
 
feketehegyi said:
eyebyesickle said:
Hi,

What about with the original firmware, is there a setting I could change to always start in turbo mode? I like to wire a switch for the coaster brake models, and use it without a display or speed sensor, so there is only 1 wire to the battery for a real clean setup.

Without display it has the highest assist level. At least I feel so.

You know, for some reason it's in my head that it defaulted to a medium level, but I may be mistaken.

I'm using the coaster brake version for this application, and it is programmed weaker, but still... I'll have to look into it, I've messed around so much without proper notes, maybe I need to bring back out the wattmeter. Unless another person could reliably confirm? Or are you politely telling me you do indeed have this confirmed? :) Might be the weaker programming for the coaster brake model.
 
Dirkro said:
Installed V 0.7 this evenig, after setting all parameters I got a full reset :(
Then I had to set all parameters again!
At the first short test ride, it was working very nice.
Is there any resaon why all parameters has ben set to standart ? Maybe I pressed the wrong botton?
Maybe a procedure I have to go through when changing the firmware?
Will keep on testing tororrow!
Thank you!

Dirk

Dirk any other issues ?
I'm still running v0.3 but really happy with it.
I don't have an easy way to program the LCD yet so I have been holding off a bit but will have to make up a small waterproof extension soon
 
eyebyesickle said:
feketehegyi said:
eyebyesickle said:
Hi,

What about with the original firmware, is there a setting I could change to always start in turbo mode? I like to wire a switch for the coaster brake models, and use it without a display or speed sensor, so there is only 1 wire to the battery for a real clean setup.

Without display it has the highest assist level. At least I feel so.

You know, for some reason it's in my head that it defaulted to a medium level, but I may be mistaken.

I'm using the coaster brake version for this application, and it is programmed weaker, but still... I'll have to look into it, I've messed around so much without proper notes, maybe I need to bring back out the wattmeter. Unless another person could reliably confirm? Or are you politely telling me you do indeed have this confirmed? :) Might be the weaker programming for the coaster brake model.

Well, you've made me curious how can I confirm what I've felt is the highest assist - when used it without display. :roll:
Thanks (again) :) to casainho there's here an excel sheet with comments of the disassembled original firmware:
https://endless-sphere.com/forums/viewtopic.php?f=28&t=94351&hilit=TSDZ2#p1381810
Related part:
ld A, $1c "Check the assist level...
cp A, #$49 $1c lower than 73?
jrnc $a860 (offset=93)
btjt $85, #1, $a834 (offset=44) assist level 2
btjt $85, #2, $a84a (offset=61) assist level 3
btjt $85, #3, $a860 (offset=78) assist level 4
btjt $85, #6, $a876 (offset=95) assist level 1
btjt $85, #7, $a81e (offset=2) assist level 0.5???
jra $a860 (offset=66)

Without knowing too much of assembly, I see that the "otherwise value" (subroutine) is the same as for assist level 4. So it assures me what I've felt without display should be the highest assist level.
 
Dirkro said:
Installed V 0.7 this evenig, after setting all parameters I got a full reset :(
Then I had to set all parameters again!
Yes, because most time I am being chaging EEPROM address and/or data there, so it must restart fresh.
 
Can somebody please upload the original improved firmware for kt-lcd3 and for tsdz2 48V version, it's removed from GitHub, and I want to give it a try because the light control is working in it.
 
Hi Jablat
for me the 0.7 is a big step forward!
There are some small things which makes this version good!

The Boost levels are working so smart when you start with the bike and are saving the gear (mine are going from 50-250).
The adjustable assist levels are quite nice. (I used 6 values 0.3, 0.6, 1.2. 2.3, 4.0, 6.0 )
The Speed limiter is working as expected very well.

One little thing I am wondering about:
I tested the maximum cardence un a 12% hill at a low gear (set to 110 ) but as soon as I reach 99- 100 the motor stops somehow,
This is not a big issue for me, 70-85 is my "feel good" cardence

@ Casainho
So it is the best to start the new firmware, wait a second, swich on and off and on , then set new parameters?


Regards

Dirk
 
Dirkro said:
Hi Jablat
for me the 0.7 is a big step forward!
There are some small things which makes this version good!

The Boost levels are working so smart when you start with the bike and are saving the gear (mine are going from 50-250).
The adjustable assist levels are quite nice. (I used 6 values 0.3, 0.6, 1.2. 2.3, 4.0, 6.0 )
The Speed limiter is working as expected very well.

One little thing I am wondering about:
I tested the maximum cardence un a 12% hill at a low gear (set to 110 ) but as soon as I reach 99- 100 the motor stops somehow,
This is not a big issue for me, 70-85 is my "feel good" cardence

@ Casainho
So it is the best to start the new firmware, wait a second, swich on and off and on , then set new parameters?


Regards

Dirk
Thanks, I'm working on a small cable for the LCD3 to make it easier to flash. I will give it a go tomorrow. I am not having an issue with BOOST, I have been riding the new firmware for 3 weeks and I learn to press softly on the peddles when I start. It has become second nature to me now. I also like the stock Level 2 at version 0.3, it gives me the perfect amount of assist, I rarely use anything else. I am scared to try something new now I can't imagine that the firmware has become better :shock:

So cadence limit is controlled by a couple of variables.
For 36v the FOC advance which is set to 80 is too low and motor will not spin beyond 95 cadence. If you change this to 120 and also change the max ERPS overspeed to 700 then you can go much higher. However Casainho is working on ramping this FOC from 80 for low speed to 120 for high speed which will allow the motor to rev but also be efficient at lower rpm.
 
wheex said:
Can somebody please upload the original improved firmware for kt-lcd3 and for tsdz2 48V version, it's removed from GitHub, and I want to give it a try because the light control is working in it.
Yes, it's a pity that casainho has decided to remove it. I also see possibilities in that firmware, at least to try out once and learn from the code. But my ST-LINK V2 wants to not arrive...
 
jbalat said:
Thanks, I'm working on a small cable for the LCD3 to make it easier to flash. I will give it a go tomorrow. I am not having an issue with BOOST, I have been riding the new firmware for 3 weeks and I learn to press softly on the peddles when I start. It has become second nature to me now. I also like the stock Level 2 at version 0.3, it gives me the perfect amount of assist, I rarely use anything else. I am scared to try something new now I can't imagine that the firmware has become better :shock:

So cadence limit is controlled by a couple of variables.
For 36v the FOC advance which is set to 80 is too low and motor will not spin beyond 95 cadence. If you change this to 120 and also change the max ERPS overspeed to 700 then you can go much higher. However Casainho is working on ramping this FOC from 80 for low speed to 120 for high speed which will allow the motor to rev but also be efficient at lower rpm.

So I am back now for the first time in the woods. The system did what it should and was significant stronger on steep pathes.
I changed my support levels a bit (0.4, 0.8, 1.5, 2.5, 3.8, 5.5) now they are quite well.
On the boost I had a small problem when starting, I felt a short breakdown when going over 6km/h

For me, Boost is a funktion to save the gear. Quite usable when I geton the bike on steep hills, helping not loosing traction.
 
feketehegyi said:
wheex said:
Can somebody please upload the original improved firmware for kt-lcd3 and for tsdz2 48V version, it's removed from GitHub, and I want to give it a try because the light control is working in it.
Yes, it's a pity that casainho has decided to remove it. I also see possibilities in that firmware, at least to try out once and learn from the code. But my ST-LINK V2 wants to not arrive...
You guys can get any deleted file or change, from git history -- please use it.
 
Ok all done. I 3d printed a small part that I attach to the back of the lcd and use the rubber stopper from my vlcd5 to seal it off. Now i can flash away ;)
 

Attachments

  • IMG_20180903_49289.jpg
    IMG_20180903_49289.jpg
    42.2 KB · Views: 1,550
  • IMG_20180903_17929.jpg
    IMG_20180903_17929.jpg
    45.4 KB · Views: 1,550
fi7ippo said:
Also on every assist level, the initial boost whenever you start is very high till 6kmh near uncomfortable for me, LCD says more than 300-400w, is so high and dangerous for internal gears I think, especially if you are in an high gear!

Dirkro said:
The Boost levels are working so smart when you start with the bike and are saving the gear (mine are going from 50-250).
The adjustable assist levels are quite nice. (I used 6 values 0.3, 0.6, 1.2. 2.3, 4.0, 6.0 )

So, after the feedback of fi7ippo, I decided to implement the power boost. The thing is that before, before the 25 cadence, only the torque sensor signal was used and after that, the human power. As the human power is zero and very small at start --> cadence near zero, using the torque sensor signal sound a good approach to me. But now I can understand it can be to much power for some users...

So I decided to implement the boost that was a square step of constant power -- a blind step of power, that does not depend on the pressure the user put on pedals. My girlfriend didn't like and I had to change it for something that makes more sense.

New boost: 2 different factors, one for boost/startup stage and other for after. At boost, the factor multiplies to the torque sensor signal and this means user can now control using the pedals torque, unlike before it was always a constant "blind" value. Now my girlfriend likes it, she says it is like before.
About the implementation, luckily I reused almost all the code!!

Now I want to make a fade out from the power level at boost to the regular power level, so we feel a soft transition unlike currently happens when there is a big different between the power levels of the 2 modes. Let's see when I can finish this. And it is hard to start on other things like walk assist mode or lights while I am working on this one and it is not finished.
 
casainho said:
....


So I decided to implement the boost that was a square step of constant power -- a blind step of power, that does not depend on the pressure the user put on pedals. My girlfriend didn't like and I had to change it for something that makes more sense.

New boost: 2 different factors, one for boost/startup stage and other for after. At boost, the factor multiplies to the torque sensor signal and this means user can now control using the pedals torque, unlike before it was always a constant "blind" value. Now my girlfriend likes it, she says it is like before.

....


Good to have a grirlfriend as tester !

In my opinion, when you step on on a steep hill, I liked the limitation from the boost. , because the strong push from engine made it hard to stay on the bike. I set mine to 250 w maximum.
But this problem I have on my Haibike also .
 
I finally developed the BOOST at initial motor startup, by increasing pedal torque sensitivity at startup. Also now it fades out to the regular power (fades out to a lower or higher value). I am very happy with the result!!

This new development is included on the release V0.8: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki

Code:
4: startup power boost: boost the initial motor startup, by increasing pedal torque sensitivity at startup
 0: config: default value: 1. 0 to enable power boost only when startup and bicycle wheel = 0; 1 every time pedal cadence or torque sensor are zero.
 1: limit boost power to max battery power value: default value: 0. 1 to enable power boost limit to the Max battery power value.
 2: boost time: default value = 25 (2.5 seconds). 0 to disable startup power boost feature.
 3: boost fade out time: default value = 25 (2.5 seconds). Fade out from boost power to regular power.
 4: assist level boost power: this is the boost power (for assist level 1) in watts. Note that this value is not limited by the Max battery power screen value, it is although limited by the battery max current value.
 x: assist level boost power: this is the boost power for assist level x -- same as the previous and repeats for the next assist level.
 
I have a little problem :-( i have cut the speed sensor cable, but my speed sensor have only 2 wires :-( It's really difficult connect the programmer to motor :-(
 
Andrea_104kg, you need to strip the cable all the way back to the end of the connector so you can solder your own wires. Please see my installation video.

Guys please see my review of the firmware.. Enjoy
[youtube]IrWn6e8bIuQ[/youtube]
 
Hi Guys,

I am really keen to try the new firmware. I have the 52v motor and 52v battery (VLCD5) setup on a dual suspension bike.

I have traveled around 250km on it so far, mostly the 3km to and from work.

I have integrated some lights on the bike, and I love the VLCD5 button to turn on/off.
I used a KYOTTO S.S.R KF0602D relay to activate the new headlights
I also used a VERY cheap rear light it turns out that you can feed this light 6v without any issues. I also removed the on/off switch to the light and just used a blob of solder to ensure that it is always on!

So moving forward I would like to keep the lights on/off functionality.
I am also very keen to have the setup 'default' to the EN 15194 euro 250w standard. So if the bike is used by anyone else it is placid. When I turn it into 'offroad' mode it will unleash the full potential.
 
kortina said:
Hi Guys,

I am really keen to try the new firmware. I have the 52v motor and 52v battery (VLCD5) setup on a dual suspension bike.
...


So moving forward I would like to keep the lights on/off functionality.
I am also very keen to have the setup 'default' to the EN 15194 euro 250w standard. So if the bike is used by anyone else it is placid. When I turn it into 'offroad' mode it will unleash the full potential.

To be sure: You need the LCD 03 and nothing else ...


The 250 W is very unsharp in EN 15194, it is maximum continuous rated power of 0.25 kW, So the engine is alowed to give more in peak situation , and it is "rated"
So it is up to the builder to estimate with save assumtions how the output will be after 2 h at 40°C ... add a safty factor ...
Both Bosch and Yamaha have more than 550 W Peak (what I set as limit). Nobody cares as long as the speed limiter is working (more or less ) correct, Bosch and Yamaha are throtteling to 0 at about 27 km/h
 
I have purchased the KT-LCD3, and additional speed sensor (for the plug) and also the USB-STLink.

While ordering I also picked up the metal gear as I will likely kill the blue one at some stage.

Looking forward to testing the firmware. I will also likely solder the KT-LCD3 directly to the TSDZ2 and get rid of the connection and the excess cable.

I have set the stock firmware to 37km/h which is more in line with the US standard. I find that I can effortlessly cruise at 30km/h and with some moderate pushing hit 37. Seems to be the sweet spot between getting to work quickly and not looking like a maniac (subjective).

I might do a quick before and after for youtube.
The lights are very useful, so with any luck the extra features *might* be finished by the time the goods arrive in about 3 weeks.

Might be useful to have a setting to default the lights to 'ON' as many riders use it to be seen.
 
kortina said:
I have purchased the KT-LCD3, and additional speed sensor (for the plug) and also the USB-STLink.

While ordering I also picked up the metal gear as I will likely kill the blue one at some stage.

Looking forward to testing the firmware. I will also likely solder the KT-LCD3 directly to the TSDZ2 and get rid of the connection and the excess cable.

I have set the stock firmware to 37km/h which is more in line with the US standard. I find that I can effortlessly cruise at 30km/h and with some moderate pushing hit 37. Seems to be the sweet spot between getting to work quickly and not looking like a maniac (subjective).

I might do a quick before and after for youtube.
The lights are very useful, so with any luck the extra features *might* be finished by the time the goods arrive in about 3 weeks.

Might be useful to have a setting to default the lights to 'ON' as many riders use it to be seen.
About the lights, maybe they are controlled by PWM on PD4/TIM2_CH1. If this is true, this means we can have a good control of them, like maybe turn them at an higher, medium or zero value -- like at max value when we brake, medium for when lights are enabled, etc. I will be able to make configuration for the various options on LCD3.

Can someone please connect an oscilloscope to the lights wire and see if there is a square wave?? and if so, record the signal frequency and the duty_cycle?

Can someone please post pictures of the lights? I never saw them...

And, with the original LCD and firmware, does the lights have a max brightness when we brake??
 
Back
Top