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

casainho said:
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??
Sorry I don't have oscilloscope, but I measured with multi-meter and when the backlight is on on the LCD it's 6V on the green wire and 0V when it's off. I marked the connection on the controller.
controller_light_pin.png

PSWpower sell lights for tsdz2 Front Rear but I 'am using this wired directly to the battery and switched with a relay, and for the rear I use this connected to the tsdz2 with the speed sensor Y splitter cable
 
Hi casainho, nice work on v0.7, but I've some question for You...
In v0.7 I can adjust the boost startup power on selection 4 of configuration menu, with steps of 50W (really great), but today I've flashed v0.8 and I don't understand how the startup power configuration works! Now (with v0.8) in the configuration menu the range is from 0 to 25.5 that is not the power, right?? Also the same value on different assist level give a different power on startup, why? The configuration option on v0.7 was more user friendly for me!
Also another question, why is so hard to push back the bike with controller powered on? Maybe something related to kinetic energy recover (alias regenerative braking), that is possible to use only on hub motors, right???
Thank You casainho, you are doing a wonderfull job!
 
Hi,
today the first longer trip with the 0.7. It was working well! Driving was smooth

But the battery meter made me crasy.
Even I have still 3.8 V without load, it drops down to I one field in the battery even I use 120 W only.
So I was afraid to come home,
I got one Idea:
Cant we correct the ohnic resistance of the system on the Battery field?
U corr = U batt + (I Motor * R system)
A rough estimate for R system 5 amps => 0.2 V 0.04 Ohm

Regards

Dirk
 
Did a release of V0.9 where as far as I could test, lights are now working.

fi7ippo said:
Hi casainho, nice work on v0.7, but I've some question for You...
In v0.7 I can adjust the boost startup power on selection 4 of configuration menu, with steps of 50W (really great), but today I've flashed v0.8 and I don't understand how the startup power configuration works! Now (with v0.8) in the configuration menu the range is from 0 to 25.5 that is not the power, right?? Also the same value on different assist level give a different power on startup, why? The configuration option on v0.7 was more user friendly for me!
You have control of a factor that multiplies to torque sensor signal on BOOST mode (includes also the fade out). After BOOST time, you will be on regular mode where you have other factor that multiplies to human power (torque sensor * cadence).
So, you can control that 2 different factors including the time of BOOST and fade out. Also you can enable the BOOST current to be limited to max configured power or not.

fi7ippo said:
Also another question, why is so hard to push back the bike with controller powered on? Maybe something related to kinetic energy recover (alias regenerative braking), that is possible to use only on hub motors, right???
Yes, because the motor wingdings are always enabled -- maybe I should improve this later.

Dirkro said:
But the battery meter made me crasy.
Even I have still 3.8 V without load, it drops down to I one field in the battery even I use 120 W only.
So I was afraid to come home,
I got one Idea:
Cant we correct the ohnic resistance of the system on the Battery field?
U corr = U batt + (I Motor * R system)
A rough estimate for R system 5 amps => 0.2 V 0.04 Ohm
You should write this idea and info on issue list so they are not lost.
Alternatively, I thought in control the battery meter using the watts hour meter.
 
Good evening casainho,
I've tested v0.9 and...
well, after understanding the boost factor, I saw that at 0.1 factor the startup is around 60-70W and 130-150 with 0.2 factor, thats good!
Also I try to enable the "motor assistance startup without pedal rotation" and wow!!! the feeling with the motor assistance now is incredible!
What about light, I think there were something to fix because not work properly:
Light power on is ok, but I cannot power of lights. I must power off then on the controller for reset;
but... when you power on the light, no assistance anymore;
also the first time I try to power on light before enter configuration, and my setup was not saved. Setup save change properly if don't activate light before;
Finally I realized that with controller power on, light are always lightly lit also, and this is so strange, if I power off the front led light with his integrated switch! Maybe the integrated switch cut only 1 wire, so I want to investigate and test other lights
Thanks for your work!
 
casainho said:
......

Dirkro said:
But the battery meter made me crasy.
Even I have still 3.8 V without load, it drops down to I one field in the battery even I use 120 W only.
So I was afraid to come home,
I got one Idea:
Cant we correct the ohnic resistance of the system on the Battery field?
U corr = U batt + (I Motor * R system)
A rough estimate for R system 5 amps => 0.2 V 0.04 Ohm
You should write this idea and info on issue list so they are not lost.
Alternatively, I thought in control the battery meter using the watts hour meter.

Hi,
After getting a Git Hub Account, I have set up the issue!

Frankly spoken, I did not fully understand
- how to imlement the Watt Meter correctly-
- and how to reset after full charge.
- Is it the same value which will displayed in temperature field (which I can switch on in the configuration)?
 
Dirkro said:
After getting a Git Hub Account, I have set up the Issue!
Frankly spoken, I did not fully understand how to imlement the Watt Meter correctly and how to reset after full charge.
Is it the same value which will displayed in teperature field (if switched on)?
Thanks!!

About the watt meter, you can read on configurations wiki page: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares
Code:
2: battery state of charge in watts/hour
 0: enable/disable show of battery state of charge in percentage
 1: battery state of charge increment or decrement
 2: battery pack total power in watts/hour: this value is used to calculate battery state of charge based on discharged watts/hour.
 3: set current watts/hour
Yes, I understand it needs more detail and possible examples. But I focus my time now more on the development and users like you could help write on the wiki (you just need to logon with your github account to be able to edit).

So:
0: you must change to 1 to enable.
1: I like to keep this value at 1.
2: you must setup the correct value of your battery pack. I once fully discharged my battery pack and LCD3 counted 500Wh (still it is a 13S5P, 2.5A * 5 * 48V = 600Wh, so I don't know what is wrong but anyway it is a cheap battery so the 500Wh may be correct).
3: is the counted value by LCD3, so the remain capacity is :2 - :3. You can change this value here, if you prefer to reset the counter. The counter automatically resets when you fully charge your battery.
 
casainho said:
So:
0: you must change to 1 to enable.
1: I like to keep this value at 1.
2: you must setup the correct value of your battery pack. I once fully discharged my battery pack and LCD3 counted 500Wh (still it is a 13S5P, 2.5A * 5 * 48V = 600Wh, so I don't know what is wrong but anyway it is a cheap battery so the 500Wh may be correct).
3: is the counted value by LCD3, so the remain capacity is :2 - :3. You can change this value here, if you prefer to reset the counter. The counter automatically resets when you fully charge your battery.

This helps a lot!
I will put in my exampels into the Wiki,
but what is 1 will it count backwards ?
Where is the 0 point?



BTW, the most common Samsung Cells, you can discharge single cells to 2.75 V
With a use in a set , there are some deviations of the cells, so if you discharge (just guessing) maybe 2400 mah you may end up between 2.85 V 2.95 V in the different cells.
So putting 3V as a lowest discharge level, you wont get your capacity.
I set mine to 2.9 per cell to get more range!
The balancer in the Battery should equalize it when charging.
 
Dirkro said:
casainho said:
So:
0: you must change to 1 to enable.
1: I like to keep this value at 1.
2: you must setup the correct value of your battery pack. I once fully discharged my battery pack and LCD3 counted 500Wh (still it is a 13S5P, 2.5A * 5 * 48V = 600Wh, so I don't know what is wrong but anyway it is a cheap battery so the 500Wh may be correct).
3: is the counted value by LCD3, so the remain capacity is :2 - :3. You can change this value here, if you prefer to reset the counter. The counter automatically resets when you fully charge your battery.
but what is 1 will it count backwards ?
Where is the 0 point?
1 is for starting at 0% and increasing.
0 is for starting in 100% and decreasing.
 
I had trouble yesterday to get the 09 runnung.
I tried to compile it myself, but it seems that the LCD fork was on 0.8 and the motor fork on 0.9.

right?
 
Dirkro said:
I had trouble yesterday to get the 09 runnung.
Please post the errors you got when compiling so we can figure out what is the issue.
 
casainho said:
Dirkro said:
I had trouble yesterday to get the 09 runnung.
Please post the errors you got when compiling so we can figure out what is the issue.

Hi,
The following happend:

when I compiled the latest version from the Github for Kun Ten LCD 03 and Tonsheng Motor Firmware with some changes of he Batterie Voltage, The LCD started to iinitialize , but did not come to start.

Then I flashed both 0.9 HEX Files to Controller and LCD,
I got an error when verifiing Programm Data on the LCD.

But finaly I got it working. But somehow I lost my data 3 times before it was OK
And did not find the right way to confirgure "Boost" ( there was a factor now, no Watts)
Setting the Boost Time to 0 ends in no support at start
 
Update:

I am back to 0.8 now, flash worked without a error.
- I am still unsure how boost is adjusted what is the meaning of 5 ? The standard settings are pushing me from the bike when I want to get on uphill! Now I am down to setting 0.4-0.9.
- When I stop pedaling and start again then there is a delay of 1.5-2 seconds until the motor starts again. Did I choose a wrong parameter? I cannot remember this delay on former versions?

- I am not able to configure the "Watts", it is always counting upwards.

- Do I have a hardware defect? I always have to set my configuration at least twice, maybe 3 times after a new flash and the first ride (s)
After this it remains stable . Anyone same experiance?

Regards

Dirk
 
Dirkro, you should avoid to build the firmware as it seems it may even get more troubles to you as it is very technical.

The default configurations should work reasonably well, you should try to start with them and change from there at small steps up to your needs.

I need to implement the "reset to defaults" option, so you should execute it every time you flash the firmware and so you start with working configurations.
 
Hi Casainho
the issues are showing up at the precompiled 09 Hex files!

For me, the standard needs several adjustments, because of different setup and user profile:
- 36V Motor and Batterie
- the standard support levels are much to high because I like to give significant input to get 70 km range
- the bost levels does not make sense imho ( can you maybe tell me, what this input means? It is different to the WIKI , then I change the Wiki)
- My Battery has a lower voltage level, it is cuting of too early
Does your Watt display work well? (Percentage as well as the ODO field)?

Regards

Dirk
 
Dirkro said:
For me, the standard needs several adjustments, because of different setup and user profile:
1. - 36V Motor and Batterie
2. - the standard support levels are much to high because I like to give significant input to get 70 km range
3. - the bost levels does not make sense imho ( can you maybe tell me, what this input means? It is different to the WIKI , then I change the Wiki)
4. - My Battery has a lower voltage level, it is cuting of too early
5. Does your Watt display work well? (Percentage as well as the ODO field)?
I saw you edited the wiki, thanks. Yes, I am in the middle to implement the motor temperature control which probably I should not until release next version.

1. You must select on LCD.
2. You must adjust on LCD.
3. You must select on LCD. Boost levels are just a factor, you should play until you get a value that is ok for you.
4. You must adjust on LCD.
5. Yes, watts works well. But I am in the middle of to implement the motor temperature control and I will test again in the end.
 
casainho said:
Dirkro said:
For me, the standard needs several adjustments, because of different setup and user profile:
1. - 36V Motor and Batterie
2. - the standard support levels are much to high because I like to give significant input to get 70 km range
3. - the bost levels does not make sense imho ( can you maybe tell me, what this input means? It is different to the WIKI , then I change the Wiki)
4. - My Battery has a lower voltage level, it is cuting of too early
5. Does your Watt display work well? (Percentage as well as the ODO field)?
I saw you edited the wiki, thanks. Yes, I am in the middle to implement the motor temperature control which probably I should not until release next version.

1. You must select on LCD.
2. You must adjust on LCD.
I am just wondering if assistant factors from 1-5 are useful . My Yamnaha offers 0.4-3.0

casainho said:
3. You must select on LCD. Boost levels are just a factor, you should play until you get a value that is ok for you.
I am not sure what the parameter e.g 2.0 means maybe factor of max power?

casainho said:
4. You must adjust on LCD.
5. Yes, watts works well. But I am in the middle of to implement the motor temperature control and I will test again in the end.

Yes I know,
but if you need to do this several times in a row, because of problems it is quite boring. So I was asking myself to make a personal version with the standard parameters suitable for me.
I am a little familiar with the 3D printer Firmware configuration.
So editin a config.h, main.h, ebike.h was something natural for me.
Anyway, I am so happy with this software.

Regards Dirk
 
Dirkro said:
I am a little familiar with the 3D printer Firmware configuration.
So editin a config.h, main.h, ebike.h was something natural for me.
Maybe on LCD3 firmware we should use config.h file so users can save their defaults values. But it is to early as I am still developing....
 
casainho said:
I saw you edited the wiki, thanks. Yes, I am in the middle to implement the motor temperature control which probably I should not until release next version.

this is nothing ! would like to do more!
some things I like your opinion to put it into the Wiki:
- now the boost level is a assist factor for 0 to 6 km/h
- to switch off boost, but get assist from start, put assist level and boost level on same value; right?
- it is essential to flash the LCD Firmware matching to the Motor software
- is it possible to swich off the delay of assistance when starting padeling after 0 cardence?
 
I developed the new feature "motor temperature protection" and did the firmware release V0.10 that includes this new feature.

It works as expected and I am using min and max temperature values of 75 and 85 degrees Celsius.

I also started to improve the wiki page with the description of each feature and configurations, here is the "motor temperature protection" -- see more here: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares

 
Dirkro said:
this is nothing ! would like to do more!
some things I like your opinion to put it into the Wiki:
1.- now the boost level is a assist factor for 0 to 6 km/h
2.- to switch off boost, but get assist from start, put assist level and boost level on same value; right?
3.- it is essential to flash the LCD Firmware matching to the Motor software
4.- is it possible to swich off the delay of assistance when starting padeling after 0 cardence?
Please number your questions so is easier for me to answer.

1. No, BOOST has a configured duration! Also there is the fade/transition from BOOST to regular mode.
2. No, you must do like this "2: boost time: 0 to disable startup power boost feature." but maybe is more explicit if I put the very first option to enable/disable this feature.
3. TRUE!! would be nice to have this information on the wiki.
4. ???

Can you please edit the wiki page to add a table for each submenu options as I did for the motor temperature protection??? -- you need to add the formatting of the table for each submenu options and keep the same description for now. After, we can improve each description.

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares
 
casainho said:
Dirkro said:
4.- is it possible to swich off the delay of assistance when starting padeling after 0 cardence?
4. ???
Dirkro, do you mean this setting? :
"motor assistance startup without pedal rotation"

See the configuration wiki: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares
 
EndlessCadence said:
casainho said:
Dirkro said:
4.- is it possible to swich off the delay of assistance when starting padeling after 0 cardence?
4. ???
Dirkro, do you mean this setting? :
"motor assistance startup without pedal rotation"

See the configuration wiki: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares

Not realy sure!
Please let me describe:
When I am riding and I have to decrease speed (to give way etc...) , I stop pedaling for a moment, When I start pedaling again,(I did not stop stillover 6 km/h ) I have this delay before the motor is starting again, maybe two rounds , 1.5 s
Better description?

Personaly I am not sure about consequences of parameters 4.0 and 6.1
 
Dirkro said:
EndlessCadence said:
casainho said:
Dirkro said:
4.- is it possible to swich off the delay of assistance when starting padeling after 0 cardence?
4. ???
Dirkro, do you mean this setting? :
"motor assistance startup without pedal rotation"

See the configuration wiki: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares

Not realy sure!
Please let me describe:
When I am riding and I have to decrease speed (to give way etc...) , I stop pedaling for a moment, When I start pedaling again,(I did not stop stillover 6 km/h ) I have this delay before the motor is starting again, maybe two rounds , 1.5 s
Better description?
I am also getting that recently, but not always. Maybe was something I changed but I didn't want to change this part of the code. Maybe is when pedal cadence get to zero??
 
Back
Top