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

casainho said:
updated configuration menus buttons (thanks to Jeroen Brosens j0bro)

Thanks for the update!
Does this configuration require a new wiki? I don't understand what was changed..

Let me add my impression regarding the cruise function present on beta5.
I set up the function that keeps the actual speed, it works but I noticed that the motor continues to switch on and off trying to mantain that speed.
Let me explain myself better: I understand that the motor gives power to reach the target speed (e.g. 160W), then after this speed is reached or maybe overcame the motor stops (down to 0W) not to increase the speed, then it switches on again because the speed drops.. off.. on.. off.. and so on.
Take it as a nice to have feature, not absolutely a must, but maybe it is beneficial to change the logic by iteratively search a wattage that allows to keep the target speed +/- 5%, instead of going from zero to maximum many times.
If you consider the suggestion applicable, I will open an issue on GitHub to keep it in mind for the future.

Thanks
 
thineight said:
casainho said:
New beta:

https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.19.0-beta6

corrected human power value shown on KT-LCD3 (thanks to Leon leon927)
updated configuration menus buttons (thanks to Jeroen Brosens j0bro)

Thanks for the update!
Does this configuration require a new wiki? I don't understand what was changed..

What has changed is the button logic. When you are in the setup menu you now use the UP and DOWN button to navigate. To enter you press the ON-OFF button. Really nice, j0bro!

I think it is really intuitive but I will update the wiki.

thineight said:
casainho said:
New beta:

https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.19.0-beta6

corrected human power value shown on KT-LCD3 (thanks to Leon leon927)
updated configuration menus buttons (thanks to Jeroen Brosens j0bro)
Let me add my impression regarding the cruise function present on beta5.
I set up the function that keeps the actual speed, it works but I noticed that the motor continues to switch on and off trying to mantain that speed.
Let me explain myself better: I understand that the motor gives power to reach the target speed (e.g. 160W), then after this speed is reached or maybe overcame the motor stops (down to 0W) not to increase the speed, then it switches on again because the speed drops.. off.. on.. off.. and so on.
Take it as a nice to have feature, not absolutely a must, but maybe it is beneficial to change the logic by iteratively search a wattage that allows to keep the target speed +/- 5%, instead of going from zero to maximum many times.
If you consider the suggestion applicable, I will open an issue on GitHub to keep it in mind for the future.

Thanks

It is supposed to adjust the wattage so it remains at the same speed/set speed. It should be very smooth and hold the speed +- 0.2 km/h with constant wattage. What you are experiencing is an under damped system. Will have to test and validate that it works as desired on my bike. I will come back to you in regard to this and thank you as always for giving feedback!

Hope you test the beta 6 that Casainho has released where the human power value is corrected.
 
buba said:
Hope you test the beta 6 that Casainho has released where the human power value is corrected.

Thanks as always.
Consider it done!
:thumb:
 
I just updated the wiki for the latest beta, 0.19.0 beta 6. The changes are the button logic in the configuration menu. See link below:

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Features-and-configurations-for-version-0.19.X-(BETA)

It is not necessary to update the motor controller firmware to 0.19.0 beta 6 for now. Especially if you have 0.19.0 beta 5 installed. The 0.19.0 beta 6 motor controller firmware will probably not work as I missed to change to the new variable names. Casainho quickly corrected this and the changes will be present in the next release.
 
Ok, so LCD3_beta6 firmware works with motor_beta5?
Or is it better to wait the updates from casainho?
 
thineight said:
Ok, so LCD3_beta6 firmware works with motor_beta5?

Yes :)


thineight said:
Or is it better to wait the updates from casainho?

If you have the time to update it is better to do so. If there are any more bugs they can be solved in the next release. Your choice!
 
torque72 said:
maximusdm said:
(...)
Power = the improvement is clear from the old experimental candence mode (199 - 700) and quite big from standard mode.
Temperature = depending on the type of ride the increase is around 5 - 10 C.
Battery consumption = it is almost the same. I did not notice any difference.

I tested the changes on 0.18.02. I recommend also other users to test it. If the feedback is good we should add it as new experimental mode for 48v in next release.

Hi, just for me to understand - do you mean 5..10°C of additional temperature increase or just 5-10°C above ambient?
Hi, 5-10 C additional. For example on flat city drive i get 35-40C.
 
buba said:
thineight said:
Ok, so LCD3_beta6 firmware works with motor_beta5?

Yes :)


thineight said:
Or is it better to wait the updates from casainho?

If you have the time to update it is better to do so. If there are any more bugs they can be solved in the next release. Your choice!

I just had a quick run with the motor beta5 and display beta6 as suggested.
I see the human power is now almost double than before, making fairly correct the motor power.
I do not know which is the correct one but.. nevermind.

Unfortunately I experienced some issues with the configuration menu (new logic). I couldn't configure because there is no possibility to go back to the previous menu, and also the + / - buttons do not work properly.
Maybe wrong upload from my side? Maybe a bug?
I reverted back to LCD beta5 to check my configuration..

Looking forward to hear your impression.
 
thineight said:
I just had a quick run with the motor beta5 and display beta6 as suggested.
I see the human power is now almost double than before, making fairly correct the motor power.
I do not know which is the correct one but.. nevermind.
...

Good feedback!

A word on somewhat accurate human power readings to the community: It is possible to define a complete system model. Starting with the torque sensor and measuring the output from known inputs in the complete defined operating range. The same is done on the rotation/cadence sensor. The two sensors define the system calculating the generated pedal power. If this is carefully calibrated and there is no large discrepancies between components in different units we have the foundation to a somewhat accurate power meter. Not saying anything about the level of accuracy. The hardest part is to create an algorithm that not only takes into account the lack of precision and resolution of the sensors but that also correctly models the power generated on a complete pedal revolution.

Another approach is the black box approach. We would have an accurate and known input (easier said than done) and measure the output of the complete system, meaning the two sensors combined. Thus defining the system response to different inputs. It would then be possible to map the sensor values to human pedal power values.

All in all really challenging and fun. But usually these things are solved in the pre study, even before someone asks the economy department for a favour :wink: As it is possible to calculate the theoretical maximum accuracy and then take a stance if it even is accurate enough to be useful as a human power meter.

thineight said:
...
Unfortunately I experienced some issues with the configuration menu (new logic). I couldn't configure because there is no possibility to go back to the previous menu, and also the + / - buttons do not work properly.
Maybe wrong upload from my side? Maybe a bug?
I reverted back to LCD beta5 to check my configuration..

Looking forward to hear your impression.

Have not had the time to test the new button logic from j0bro nor the Cruise function yet. Good reporting on the bug!
 
I run Beta 4, and in the offroad menu I can set the speed (for non-offroad use). However that speed will cut off also in offroad mode. Also in offroad menu, I can limit power (for non-offroad use), and I can set a power limit, which must be for offroad, correct?
I find it a bit confusing to set standards in the offroad menu, and even more confusing if the also function in offroad mode.
 
I installed beta 5 to motor and beta 6 to display . I couldn’t move on display menu at all. When I installed beta5 to display, it start working again.
 
Can I ask, when you first turn on the display/motor, the torque sensor appears to calibrates its 'Zero' value.
On a two wheel bike you usually turn on the display when no feet are on the pedals so this is not usually an issue and zero is set to no torque, However on a trike you tend to get feet on first then turn on the display. Unfortunately this makes it very easy to add significant pressure while tuning on and causing the zero value to be set at a high torque sensor value. so resulting in next to no assist when riding.

Would it be possible to disable this calibration? and manually run when needed?
Does the calibration need to be run regularly?

Alternatively could the calibration detect if the torque value is too high to be considered acceptable and either return an error or keep the old value

I have actually found on my own bike i have managed to add some pressure accidentally while switching on and off, setting the zero ADC value as a result, but to be fair it's not as easy as with the trike.
 
perryscope said:
Can I ask, when you first turn on the display/motor, the torque sensor appears to calibrates its 'Zero' value.
On a two wheel bike you usually turn on the display when no feet are on the pedals so this is not usually an issue and zero is set to no torque, However on a trike you tend to get feet on first then turn on the display. Unfortunately this makes it very easy to add significant pressure while tuning on and causing the zero value to be set at a high torque sensor value. so resulting in next to no assist when riding.

Would it be possible to disable this calibration? and manually run when needed?
Does the calibration need to be run regularly?

Alternatively could the calibration detect if the torque value is too high to be considered acceptable and either return an error or keep the old value

I have actually found on my own bike i have managed to add some pressure accidentally while switching on and off, setting the zero ADC value as a result, but to be fair it's not as easy as with the trike.
The way it works, works very well unless that happens as you say -- and that is how original firmware does, and there is a good reason for that. What is missing is maybe an alert to user to wait or alert if torque sensor value is to high (meaning this issue did happen). Unfortunately, we did keep adding new features to LCD3 and so now there is no free space available for this kind of things -- on SW102 and 850C LCD, we must reserve space and add this warnings to user.
 
I’m wondering ”blinking 1” problem. I used to drive before beta4 and the problem came up often. It is annoying when stopping traffic lights and ”blinking 1” comes on the screen and after that there is no assist at all. This happened quite often and sometimes helped when the display was restarted. Later, one reboot was not enough, it had to be done many times. Sometimes assist did come back wery weak and rebooting again it came normal.

The same started today with beta5. This never happen to me before beta4.

Is there something what I can do to stop this?
 
dameri said:
I’m wondering ”blinking 1” problem. I used to drive before beta4 and the problem came up often. It is annoying when stopping traffic lights and ”blinking 1” comes on the screen and after that there is no assist at all. This happened quite often and sometimes helped when the display was restarted. Later, one reboot was not enough, it had to be done many times. Sometimes assist did come back wery weak and rebooting again it came normal.

The same started today with beta5. This never happen to me before beta4.

Is there something what I can do to stop this?

Hi,
could it be that you stand on the pedal while waiting?
I think there is a timeout of 5s (10s at 19.6 ) leading to this.
 
why do we have different tabs for the maximum speed setting?
> in general setup, 3, we can set the maximum speed (to road leagal)
> in offroad mode, we can set the maximum speed (to road legal)
and
> in offroad mode, we can set Limit power,3 and 4, (for road legal)
why are road legal settings hidden in the offroad menu? Why have two menus for speed limit?
 
Dirkro said:
dameri said:
I’m wondering ”blinking 1” problem. I used to drive before beta4 and the problem came up often. It is annoying when stopping traffic lights and ”blinking 1” comes on the screen and after that there is no assist at all. This happened quite often and sometimes helped when the display was restarted. Later, one reboot was not enough, it had to be done many times. Sometimes assist did come back wery weak and rebooting again it came normal.

The same started today with beta5. This never happen to me before beta4.

Is there something what I can do to stop this?

Hi,
could it be that you stand on the pedal while waiting?
I think there is a timeout of 5s (10s at 19.6 ) leading to this.

I never stand on pedal when I power up display or stand on traffic lights etc. I always keep my both legs on the ground.
I don't understand what timeout means in this. Where is that timeout, can it be configured on KTLCD3 or something? And what is bolded 19.6.
 
dameri said:
Dirkro said:
dameri said:
I’m wondering ”blinking 1” problem. I used to drive before beta4 and the problem came up often. It is annoying when stopping traffic lights and ”blinking 1” comes on the screen and after that there is no assist at all. This happened quite often and sometimes helped when the display was restarted. Later, one reboot was not enough, it had to be done many times. Sometimes assist did come back wery weak and rebooting again it came normal.

The same started today with beta5. This never happen to me before beta4.

Is there something what I can do to stop this?

Hi,
could it be that you stand on the pedal while waiting?
I think there is a timeout of 5s (10s at 19.6 ) leading to this.

I never stand on pedal when I power up display or stand on traffic lights etc. I always keep my both legs on the ground.
I don't understand what timeout means in this. Where is that timeout, can it be configured on KTLCD3 or something? And what is bolded 19.6.
Hello dameri, the 19.6 means release v.0.19 beta6, released last week, which is bugged in my opinion (confirmed by others) in the configuration menu.

I do not fully understand either the timeout meaning (maybe something needed in coaster brake systems), but with beta5 I also experienced the blinking1 error, leading me to stop and restart 2-3 times during a steep climb.
 
Before I ask about this I totally understand this is quite a bespoke requirement and I very much doubt anyone else would be interested in this feature so I don't expect it to be discussed in reference to the main development path. However I just want to ask if an idea I have would in theory be possible or not. I would like to be able to work on a specific build for this myself if i can workout the build chain correctly under windows.

As you may know i have been working on a trike installation and having some issues that are specific to a rider who has a prosthetic leg. She applies about 80% force on her left leg and only 20% on her right, the right prosthetic leg also has a significantly shorter crank and so this results in a very uneven torque curve left to right. As a result on any incline the motor hunts as it detects force only on the left leg push, so you don't get a steady power applied, this is very annoying and stops the motor from giving its full penitential, and she struggles up any hill without using the throttle to override.

I have thought of two potential ways to maybe resolve this.

1. Somehow change the torque measurements to average over at least a full rotation so to help even out the hunting. However I worry that this may cause an issue when slowing down adding a delay to remove power? they do have ebrakes that will help. Also it may be difficult to add this into the code as its would need to keep a running average for many cycles of the main loop? I'm not an expert here?

2. Change the motor from being controlled by the toque sensor but instead use the cadence reading as the input to control the motor power. This would in effect turn it into a standard PAS mode found on standard wheel motor systems which she used to have on the trike and I know would work. I appreciate this is the last thing you would usually want to do but in this case would work better.

From a completely theoretical point of view do either of thease sound plausible? or a crazy idea? or indeed can anyone think of another way i could help with this admittedly unique issue.

I am happy to experiment with my own specific build and have basic coding skills but I have not yet managed to compile a successful hex file that's the size i am expecting using the src for a specific beta for example ( I am using the release.bat file to generate the files). I am always around 20KB smaller that i expect so i haven't yet tried uploading it to test. I am trying to use SDCC on windows maybe that makes the difference? Is anyone compiling under windows that can confirm the process in more detail?

If anyone isinterest in the trike build the latest write-up is here https://empoweredpeople.co.uk/2019/04/20/when-bob-met-delta-update-2/.
 
thineight said:
dameri said:
Dirkro said:
dameri said:
I’m wondering ”blinking 1” problem. I used to drive before beta4 and the problem came up often. It is annoying when stopping traffic lights and ”blinking 1” comes on the screen and after that there is no assist at all. This happened quite often and sometimes helped when the display was restarted. Later, one reboot was not enough, it had to be done many times. Sometimes assist did come back wery weak and rebooting again it came normal.

The same started today with beta5. This never happen to me before beta4.

Is there something what I can do to stop this?

Hi,
could it be that you stand on the pedal while waiting?
I think there is a timeout of 5s (10s at 19.6 ) leading to this.

I never stand on pedal when I power up display or stand on traffic lights etc. I always keep my both legs on the ground.
I don't understand what timeout means in this. Where is that timeout, can it be configured on KTLCD3 or something? And what is bolded 19.6.
Hello dameri, the 19.6 means release v.0.19 beta6, released last week, which is bugged in my opinion (confirmed by others) in the configuration menu.

I do not fully understand either the timeout meaning (maybe something needed in coaster brake systems), but with beta5 I also experienced the blinking1 error, leading me to stop and restart 2-3 times during a steep climb.

Ok, thanks thineight. I patiently wait next release. By the way I tried to reboot display while driving and sometimes system start to work very well to the next stop. Then blinking 1 again.
 
Hi!
I read that with the tsdz2 engine, if the maximum pedal cadence is low, a 36v system can be driven with a 48v battery. Can someone help you do exactly how to do this WITHOUT using vlcd5 and kt lcd3 displays, only with the help of (for example) st-link reprogramming? I haven't bought a kit yet. I'd love to reach 100 cadence with engine assistance.
Thanks!
 
perryscope said:
As you may know i have been working on a trike installation and having some issues that are specific to a rider who has a prosthetic leg. She applies about 80% force on her left leg and only 20% on her right, the right prosthetic leg also has a significantly shorter crank and so this results in a very uneven torque curve left to right. As a result on any incline the motor hunts as it detects force only on the left leg push, so you don't get a steady power applied, this is very annoying and stops the motor from giving its full penitential, and she struggles up any hill without using the throttle to override.
That is very cool and advanced thing to do, for a real need which I think is great!!

Can you please say if that issue happens with original firmware or our firmware? And at which cadence values??
 
dameri said:
thineight said:
dameri said:
Dirkro said:
Hi,
could it be that you stand on the pedal while waiting?
I think there is a timeout of 5s (10s at 19.6 ) leading to this.

I never stand on pedal when I power up display or stand on traffic lights etc. I always keep my both legs on the ground.
I don't understand what timeout means in this. Where is that timeout, can it be configured on KTLCD3 or something? And what is bolded 19.6.
Hello dameri, the 19.6 means release v.0.19 beta6, released last week, which is bugged in my opinion (confirmed by others) in the configuration menu.

I do not fully understand either the timeout meaning (maybe something needed in coaster brake systems), but with beta5 I also experienced the blinking1 error, leading me to stop and restart 2-3 times during a steep climb.
Sorry I was so wrong! I installed 18.02, (after having 10 or 11 for almost 8 Months) I also got "blinking 1 ", Maybe somebody of the developers can tell what is the reaon for this to run into this fault code? In my opinion it was something with Start / Stop?
Never had this with the old versions in Autumn 2018.

Regards

Dirk
 
I have been trying to contact electrifybike about buying one of their female 1 to 4 cables, but I'm not getting a reply from them.

Anyone know of any other places where I can buy the 1 to 4 female cable, as I would rather not cut the cable on the TSDZ2.

I'm thinking that I could also get a cable from somewhere and swap the male connector to a female connector, but it wouldn't look as nice as a finished cable.

What have you guys done for cables?
 
perryscope said:
Before I ask about this I totally understand this is quite a bespoke requirement and I very much doubt anyone else would be interested in this feature so I don't expect it to be discussed in reference to the main development path. However I just want to ask if an idea I have would in theory be possible or not. I would like to be able to work on a specific build for this myself if i can workout the build chain correctly under windows.

As you may know i have been working on a trike installation and having some issues that are specific to a rider who has a prosthetic leg. She applies about 80% force on her left leg and only 20% on her right, the right prosthetic leg also has a significantly shorter crank and so this results in a very uneven torque curve left to right. As a result on any incline the motor hunts as it detects force only on the left leg push, so you don't get a steady power applied, this is very annoying and stops the motor from giving its full penitential, and she struggles up any hill without using the throttle to override.

I am happy to experiment with my own specific build and have basic coding skills but I have not yet managed to compile a successful hex file that's the size i am expecting using the src for a specific beta for example ( I am using the release.bat file to generate the files). I am always around 20KB smaller that i expect so i haven't yet tried uploading it to test. I am trying to use SDCC on windows maybe that makes the difference? Is anyone compiling under windows that can confirm the process in more detail?

I understand and could definitely help develop a custom version that works for her. Also, if the solution adds value to others it might even end up in the official firmware with Casainho's approval.

-------------------------------------

If you or anyone else wishes to build the firmware on Windows the easiest way is to install SDCC and use a text editor with some add ons for programming. Make the changes in the files via the text editor and save. Then use the bat files (simply double click them) to either compile, clean or compile and flash.

The main.ihx created is the one you want. You can rename it and also convert it to a hex file with packihx:

https://sourceforge.net/p/sdcc/mailman/message/23870265/

The file you now have can be uploaded to the controller or display as usual.

-------------------------------------

Sorry for the absolutely lacking tutorial/explanation!


perryscope said:
I have thought of two potential ways to maybe resolve this.

1. Somehow change the torque measurements to average over at least a full rotation so to help even out the hunting. However I worry that this may cause an issue when slowing down adding a delay to remove power? they do have ebrakes that will help. Also it may be difficult to add this into the code as its would need to keep a running average for many cycles of the main loop? I'm not an expert here?

Would be possible but your worries are correct: it will always cause a greater delay. The delay can be minimized with more complex algorithms.


perryscope said:
2. Change the motor from being controlled by the toque sensor but instead use the cadence reading as the input to control the motor power. This would in effect turn it into a standard PAS mode found on standard wheel motor systems which she used to have on the trike and I know would work. I appreciate this is the last thing you would usually want to do but in this case would work better.

That is also possible. No major drawback except that the torque sensor is not used. This could benefit others as well. I have not heard of anyone having a torque sensor malfunction but if that is the case it would be beneficial to the whole community to be able to override the torque sensor and just use the PAS. This could be implemented in the soon to be released 0.19.0 version.

Question to the community: anyone ever experienced a malfunction on the torque sensor?


perryscope said:
If anyone isinterest in the trike build the latest write-up is here https://empoweredpeople.co.uk/2019/04/20/when-bob-met-delta-update-2/.

Cool!
 
Back
Top