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

Quick update:

Need to improve the filtering on the display. This is the last thing I have to do before releasing the Alpha 4.

Alpha 4 will have the following improvements:

- More accurate watt-hour calculation
- More accurate motor temperature control
- More responsive throttle than Alpha 3 (I saw a way to make it even better, I do not have the throttle installed so user feedback appreciated)
- Tuned motor controller
- Other small changes and improvement throughout
- Perfect filtering (work in progress)
- New light configuration variable:


buba said:
Also added a little feature in a feature: when braking (and you have configured that it should flash when braking) it will flash a little faster. This signals that you are decelerating to your surroundings and makes them aware that something is happening. This is something I recommend seeing live.

Here are the modes:

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

(0) ON when lights enabled, OFF when lights disabled, (default)

(1) FLASHING when lights enabled, OFF when lights disabled,

(2) ON when lights enabled, OFF when lights disabled, BRAKE-FLASHING when lights enabled and braking

(3) FLASHING when lights enabled, OFF when lights disabled, ON when lights enabled and braking

(4) FLASHING when lights enabled, OFF when lights disabled, BRAKE-FLASHING when lights enabled and braking

(5) ON when lights enabled, OFF when lights disabled, ON always when braking regardless of lights enabled/disabled

(6) ON when lights enabled, OFF when lights disabled, BRAKE-FLASHING always when braking regardless of lights enabled/disabled
 
buba said:
Quick update:

Need to improve the filtering on the display. This is the last thing I have to do before releasing the Alpha 4.

Alpha 4 will have the following improvements:

- More accurate watt-hour calculation
- More accurate motor temperature control
- More responsive throttle than Alpha 3 (I saw a way to make it even better, I do not have the throttle installed so user feedback appreciated)
- Tuned motor controller
- Other small changes and improvement throughout
- Perfect filtering (work in progress)
- New light configuration variable:


Just put a quick 25 miles on A3 and I'm really impressed now that I have got it reasonably well fine tuned, even the throttle especially the throttle now works as it should :D .

The only mode I can't get to grips with is the cadence mode, but of course I'm spoiled by the BBSHD, I'm going to give that a miss for now. The eMTB mode is great for town as well as mountains not that we have any mountains around here just very steep hills. I think you have done a wonderful job with that one, any chance of being able to adjust the sensitivity on the fly?
 
With A3 on coaster brake we are noticing that if you go from pedaling to brake quickly, as in an urgent braking situation, then backward resistance is there. If you then release the brake and then reapply the backward resistance is gone. Alternatively, if you have time to pause/coast before applying the brake, there is no backward resistance. Not absolutely sure but the resistance seems higher if you are in a higher level of assistance.
 
Rafe said:
Just put a quick 25 miles on A3 and I'm really impressed now that I have got it reasonably well fine tuned, even the throttle now works as it should :D .

That is great! :D



Rafe said:
The only mode I can't get to grips with is the cadence mode, but of course I'm spoiled by the BBSHD, I'm going to give that a miss for now.

Yeah, sorry about that! Have several things going on and that one is a bit tricky to solve without a great deal of effort. But we can always improve it later when things have settled!



Rafe said:
The eMTB mode is great for town as well as mountains not that we have any mountains around here just very steep hills. I think you have done a wonderful job with that one, any chance of being able to adjust the sensitivity on the fly?

That is awesome to hear! Seems you are satisfied and that means a lot!

As for the sensitivity, anything is possible in one way or another! Try it out some more and see if you can settle with one sensitivity level. If you feel that you really need assistance that is somewhere between two sensitivity levels I could try to adjust the eMTB parameters. There is a possibility others feel the same as you so this is why I am throwing this out there!
 
Rydon said:
With A3 on coaster brake we are noticing that if you go from pedaling to brake quickly, as in an urgent braking situation, then backward resistance is there. If you then release the brake and then reapply the backward resistance is gone. Alternatively, if you have time to pause/coast before applying the brake, there is no backward resistance. Not absolutely sure but the resistance seems higher if you are in a higher level of assistance.

Good feedback and description! Will remember that and make some tests when I install the brake clutch! Did not expect I would be getting Coaster Brake feedback so soon so I do appreciate it as it prepares me for the different tests I need to do!

Thank you, Rydon!
 
Say hello to Alpha 4!

I have worked on several things on this release and tried to improve small things here and there. So this version should be better than Alpha 3 in several aspects. The filtering is the only thing I need more time to perfect so that is not finished. But I think it is good to have Alpha 4 out for testing so people can give longtime feedback.

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

Here is the wiki (work in progress):
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/0.20.0-(DEVELOPMENT)-%7C-KT-LCD3-%7C-TSDZ2-%7C-Manual

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

Here is my Google Drive folder with the Alpha 4:
https://drive.google.com/open?id=1CPGT-V1ZX7FCzfhgbrPMYfbYtY4_JH2R

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

Here is my branch where you can see the source code and latest changes:
https://github.com/leon927/TSDZ2-Smart-EBike/tree/testing-pwm-acc

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

Here is my official to-do list (will be automatically updated from user feedback, suggestions, etc):
* Improve the filtering on the display
* Install the brake clutch on my TSDZ2 Coaster Brake version and validate proper operation

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

Here are the changes from Alpha 3:
- Watt-hour calculation improved
- Motor temperature control improved
- Slightly more responsive throttle than Alpha 3 (Even though there is no bug in the Alpha 3 there was a way to make the throttle a little more responsive at higher speeds)
- Tuned motor controller slightly
- New symbols in the configuration menu (Can change to better ones but wanted to have the foundation there and had to pick something)
- Other small changes and improvement throughout motor controller and display
- Marginally better filtering
- New light configuration in the Advanced Setup :bolt: (try it out!)
 
Hi Buba, just updated from A3 to A4:

Update (programming) itself went smooth. Light modes didn't work as expected, but I had to use bike. Strangely there was no assist at all. Luckely the throttle control worked ;) and this even better than the A3 improved version.
Once back home, I checked all setting, all was OK, and suppringly the bike worked now well without changing any setting.

I tried walk assist (never used before) => didn't seem to work, I increased the levels => no improvement.

I tried a very very low throthle while standing next to the bike. The bike started at a very, very slow pace, there was "0" watt motor display, while throttle was already released. I could hold the bike, when stop holding the bike, it started to move slowly again. I did stop when appling the brakes.
Doing the same while sitting on the bike, the bike stopped (due to my weight I assume), but there is still a small amount of force still going to motor. I wouldn't have noticed it if I wasn't standing earlier next to the bike.

Lights: I tried all modes (0-6). I have never noticed any flash mode. Mode 0 to 4: just light on/off function. No impact of the brake handles. Mode 5-6: normal light on/off function as expected. With light off => lights went on when braking ;) , but when lights were already on => no effect when brakes were pulled.

It seems a lot of remarks, but I'll keep A4 on the bike, with light mode 5. It's more than perfect for me.
 
bwb said:
Hi Buba, just updated from A3 to A4:

Update (programming) itself went smooth. Light modes didn't work as expected, but I had to use bike. Strangely there was no assist at all. Luckely the throttle control worked ;) and this even better than the A3 improved version.
Once back home, I checked all setting, all was OK, and suppringly the bike worked now well without changing any setting.

I tried walk assist (never used before) => didn't seem to work, I increased the levels => no improvement.

I tried a very very low throthle while standing next to the bike. The bike started at a very, very slow pace, there was "0" watt motor display, while throttle was already released. I could hold the bike, when stop holding the bike, it started to move slowly again. I did stop when appling the brakes.
Doing the same while sitting on the bike, the bike stopped (due to my weight I assume), but there is still a small amount of force still going to motor. I wouldn't have noticed it if I wasn't standing earlier next to the bike.

I am terribly sorry! I have no throttle so I could not validate that everything works with that. But I know how to solve it and it is a very easy fix! If you turn off the throttle the bike will work as normal for now!

Again very sorry!



bwb said:
Lights: I tried all modes (0-6). I have never noticed any flash mode. Mode 0 to 4: just light on/off function. No impact of the brake handles. Mode 5-6: normal light on/off function as expected. With light off => lights went on when braking ;) , but when lights were already on => no effect when brakes were pulled.

It seems a lot of remarks, but I'll keep A4 on the bike, with light mode 5. It's more than perfect for me.

The lights were not turning ON and OFF automatically: flashing? Or they were but the frequency was slow?


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

EDIT: Have now solved the issue you reported of no assistance but am curious what you think of the lights! Should they flash faster? Are the brakes not enabling a faster flash in mode 2?

1. The lights should be solid in mode 2 and when you enable the brakes the lights should be flashing
2. The lights should be flashing in mode 3 and when you enable the brakes the lights should be solid

Could you confirm this or is there a bug? I can increase the frequency and adjust many other parameters just let me know what you think!

Alpha 5 coming as soon as we sort out the lights!
 
Phew

I'm glad you posted bwb I was just about to set off for a ride too. Same problem for me with the drive.

While quickly testing the modes ( stood by the bike and also using kick stand at times) after reading bwb's post but before disabling the throttle I did end up with a situation where the bike was trying to creep forwards with no input from me. I was in eMTB mode and even when I clicked down into PAS mode it was still creeping forward, I can't remember the exact sequence of the button pushes I did except I was playing around with the throttle walk assist and placing some pressure on the pedal by quickly kicking it down.



What I never tested yesterday on A3 was walk assist in eMTB mode so I don't know if it was working but it doesn't work on A4 in eMTB mode.
I only have a front light wired up so I didn't bother test that new flashing light mod.
 
Rafe said:
Phew

I'm glad you posted bwb I was just about to set off for a ride too. Same problem for me with the drive.

What I never tested yesterday on A3 was walk assist in eMTB mode so I don't know if it was working but it doesn't work on A4 in MTB mode. While quickly testing the modes ( stood by the bike and also using kick stand at times) after reading bwb's post but before disabling the throttle I did end up with a situation where the bike was trying to creep forwards I was in eMTB mode and even when I clicked down into PAS mode it was still creeping forward, I can't remember the exact sequence of the button pushes I did except I was playing around with the throttle walk assist and placing some pressure on the pedal by quickly kicking it down.


I do have a front light fitted but didn't bother test that new flashing light mod.

Sorry, Rafe! Have solved the problem now!

Walk Assist does not work in eMTB as you need to select Assist Level for Walk assist so that is by design. eMTB disables any riding mode that requires users to actively choose assist level.
 
Here all Ok.
New bike, new installation with Alpha 4, all seem to work well.

Number of motor power change less quickly than A3 but still too quickly for me.
Seem the motor is more smooth in acceleration than before.
The symbol in navigation menu was very useful.
:bigthumb:
Big thanks
 
buba said:

The lights were not turning ON and OFF automatically: flashing? Or they were but the frequency was slow?


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

EDIT: Have now solved the issue you reported of no assistance but am curious what you think of the lights! Should they flash faster? Are the brakes not enabling a faster flash in mode 2?

1. The lights should be solid in mode 2 and when you enable the brakes the lights should be flashing
2. The lights should be flashing in mode 3 and when you enable the brakes the lights should be solid

Could you confirm this or is there a bug? I can increase the frequency and adjust many other parameters just let me know what you think!

Alpha 5 coming as soon as we sort out the lights!

Notting, to sorry about! We all may be very happy with what all of the contributors are doing for rest. :bigthumb:
Sorry, from my side, I am not so handy with that quoting in posts :roll:

In mode 2 nor in other modes I see some flashing. I could perhaps eventually also be releated to the HW setup. My frontlight has a ultracap inside (front light remains on for +-15s when no longer power), so on this one I never expected to see flashing.
The rear light is different, there I have a small dc/dc convertor 6vdc in / 24vdc out since the tail light is a 24V light. I could be that this small dc/dc filters out some of the PWM/frequency. O stock software I had the impression that when lights were put off, it was more or less direct. with
 
Hi Buba,

Has Alpha 4 been pulled. Nothing showing up on your Google drive Link for me in the alpha 4 sub folder?
 
vadda said:
Here all Ok.
New bike, new installation with Alpha 4, all seem to work well.

Number of motor power change less quickly than A3 but still too quickly for me.
Seem the motor is more smooth in acceleration than before.
The symbol in navigation menu was very useful.
:bigthumb:
Big thanks

Thank you, Vadda! I promise it will get better! :) Thank you for noticing all the changes!
 
bwb said:
buba said:

The lights were not turning ON and OFF automatically: flashing? Or they were but the frequency was slow?


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

EDIT: Have now solved the issue you reported of no assistance but am curious what you think of the lights! Should they flash faster? Are the brakes not enabling a faster flash in mode 2?

1. The lights should be solid in mode 2 and when you enable the brakes the lights should be flashing
2. The lights should be flashing in mode 3 and when you enable the brakes the lights should be solid

Could you confirm this or is there a bug? I can increase the frequency and adjust many other parameters just let me know what you think!

Alpha 5 coming as soon as we sort out the lights!

Notting, to sorry about! We all may be very happy with what all of the contributors are doing for rest. :bigthumb:
Sorry, from my side, I am not so handy with that quoting in posts :roll:

In mode 2 nor in other modes I see some flashing. I could perhaps eventually also be releated to the HW setup. My frontlight has a ultracap inside (front light remains on for +-15s when no longer power), so on this one I never expected to see flashing.
The rear light is different, there I have a small dc/dc convertor 6vdc in / 24vdc out since the tail light is a 24V light. I could be that this small dc/dc filters out some of the PWM/frequency. O stock software I had the impression that when lights were put off, it was more or less direct. with

Thank you and you have nothing either to say sorry for! You are doing a great job and helping me a lot!

Yes, I think it is due to the capacitors you have! Both on the front (big one) and the rear (smaller one in the DC-DC converter).

Hmm... I think I then need to reduce the frequency... Only then would it work with your capacitors as they are holding a charge. I will think about it and try to come up with a solution!
 
perryscope said:
Hi Buba,

Has Alpha 4 been pulled. Nothing showing up on your Google drive Link for me in the alpha 4 sub folder?

Alpha 5 coming very, very, very soon! :wink:

Will add even better filtering, include the solved bugs for the improved throttle and add whatever I see is necessary without taking too long.

(Alpha 4 will also be uploaded once Alpha 5 is there. This is so I can test the different versions and maybe discover where a certain bug started appearing. Or simply how that version handled different situations, settings, etc.)
 
buba said:

The lights were not turning ON and OFF automatically: flashing? Or they were but the frequency was slow?


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

EDIT: Have now solved the issue you reported of no assistance but am curious what you think of the lights! Should they flash faster? Are the brakes not enabling a faster flash in mode 2?

1. The lights should be solid in mode 2 and when you enable the brakes the lights should be flashing
2. The lights should be flashing in mode 3 and when you enable the brakes the lights should be solid

Could you confirm this or is there a bug? I can increase the frequency and adjust many other parameters just let me know what you think!

Alpha 5 coming as soon as we sort out the lights!

Nothing to sorry about, we are all very happy with what all the contributors are doing for all of us :bigthumb:
Sorry from my side, I am not so handy with quoting :oops:

In mode2 nor in other modes, I didn't noticed any flashing or intensity changes in all different modes. I could perhaps also be related to the hw setup. I have frontlight with ultracap inside (lights remains another +-15s on after power cut), so there I didn't expected to see any flashing.
The rear light (24vdc) is powered via dc/dc convertor (6/24). It could be that this filters out the PWM/frequency. Wit original sw I had the impression that lights switched of more fast compared to A4. There when either powering of the lights or releasing the brake levers, it takes +-0.5s before lights go of.
Hereby a small video of the brake behaviour (time delay when putting lights off is identical)
https://vandenboschpatrick.be/images/fietsen/vuilbak/A4_lights_tsdz2.mp4

I think that it could also be related to the hw setup. Perhaps it would work better if I used a small solid state relay like https://www.amazon.com/dp/B00B888WVC/ref=cm_sw_r_cp_ep_dp_Mrz3AbYJ3BWMX?pldnSite=1

I don't think I will change currently my light circuit for the moment. I am already pleased with how mode 5 works for me for the moment.
I'll go up the attic this afternoon, I have there an osciliscoop that has been collecting dust for 25years. Hopefully, the caps aren't dried out and will the thing start up.

I keep you informed.
 
bwb said:
Nothing to sorry about, we are all very happy with what all the contributors are doing for all of us :bigthumb:
Sorry from my side, I am not so handy with quoting :oops:

In mode2 nor in other modes, I didn't noticed any flashing or intensity changes in all different modes. I could perhaps also be related to the hw setup. I have frontlight with ultracap inside (lights remains another +-15s on after power cut), so there I didn't expected to see any flashing.
The rear light (24vdc) is powered via dc/dc convertor (6/24). It could be that this filters out the PWM/frequency. Wit original sw I had the impression that lights switched of more fast compared to A4. There when either powering of the lights or releasing the brake levers, it takes +-0.5s before lights go of.
Hereby a small video of the brake behaviour (time delay when putting lights off is identical)
https://vandenboschpatrick.be/images/fietsen/vuilbak/A4_lights_tsdz2.mp4

I think that it could also be related to the hw setup. Perhaps it would work better if I used a small solid state relay like https://www.amazon.com/dp/B00B888WVC/ref=cm_sw_r_cp_ep_dp_Mrz3AbYJ3BWMX?pldnSite=1

I don't think I will change currently my light circuit for the moment. I am already pleased with how mode 5 works for me for the moment.
I'll go up the attic this afternoon, I have there an osciliscoop that has been collecting dust for 25years. Hopefully, the caps aren't dried out and will the thing start up.

I keep you informed.

You are doing a GREAT job! :bigthumb: Thank you!

Yes, I do believe your capacitors are filtering out the signal. :( And I do not want to force you to change the lighting circuit so I am glad that mode 5 is working to your satisfaction!

The signal is changing every 100 ms so it is very fast. Especially if there are big capacitors connected. That is why you feel the lights are reacting so slow.

Let me know what I can do to help!
 
buba said:
Yes, I do believe your capacitors are filtering out the signal. :( And I do not want to force you to change the lighting circuit so I am glad that mode 5 is working to your satisfaction!

The signal is changing every 100 ms so it is very fast. Especially if there are big capacitors connected. That is why you feel the lights are reacting so slow.

Let me know what I can do to help!

You are doing fine, keep up the good work. I am please with brake light as it works for me now 8) .
However in next buying order, there will be some small solid state relays in it.
 
Buba, this new feature of lights is not hard to implement on firmware side but seems it need a lot of tweaking. Why not leve this to a next version?
 
casainho said:
Buba, this new feature of lights is not hard to implement on firmware side but seems it need a lot of tweaking. Why not leve this to a next version?

Actually, I have not tweaked anything for the Alpha 5. I think it will work satisfying for all users as it is. But if there are capacitors on the users lights then this needs to be considered. It is up to anyone to choose whatever mode fits their hardware setup! :)

Tried to implement many options so users can pick a mode without breaking any local laws!

Will have the Alpha 5 out within one hour!

EDIT: I think we both feel that the light modes should be the last new feature/function for the 0.20.0 and that focus should be on releasing the stable 0.20.0.
 
Alpha 5 is here and solves the problems on Alpha 4!

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

Here is the wiki (work in progress):
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/0.20.0-(DEVELOPMENT)-%7C-KT-LCD3-%7C-TSDZ2-%7C-Manual

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

Here is my Google Drive folder with the Alpha 5:
https://drive.google.com/open?id=1CPGT-V1ZX7FCzfhgbrPMYfbYtY4_JH2R

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

Here is my branch where you can see the source code and latest changes:
https://github.com/leon927/TSDZ2-Smart-EBike/tree/testing-pwm-acc

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

Here is my official to-do list (will be automatically updated from user feedback, suggestions, etc):
* Improve the filtering on the display even more
* Install the brake clutch on my TSDZ2 Coaster Brake version and validate proper operation
 
Back
Top