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

Electric Motors and Controllers
User avatar
jbalat   10 kW

10 kW
Posts: 588
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Sep 16 2018 6:33am

In Victoria, Australia there is no off-road mode.
If you do over 25 km/hr then you better be on private property Or else you cop it.

I just stick with the other non powered riders that way they would look a bit silly booking you and not the others.
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

fi7ippo   10 mW

10 mW
Posts: 24
Joined: Aug 26 2018 2:29am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by fi7ippo » Sep 16 2018 6:37am

EndlessCadence wrote:
Sep 15 2018 12:23pm
I've updated the hex files (see links below) with minor improvements. Offroad mode enabled on system startup is now working. The power limiting isn't working yet but the speed limiting is.

I've succesfully tested a combination of two speed limits. E.g. a 35 km/h speed limit when in offroad mode using the speed limit setting which is in menu 0 and a second speed limit of 25 km/h from the offroad configuration menu when offroad mode is not active.
EndlessCadence wrote:
Sep 13 2018 4:11pm
KT_LCD3_Flexible_OpenSource_firmware-v0.11_offroad_beta.hex
TSDZ2_Flexible_OpenSource_firmware-v0.11_offroad_beta.hex

Configuration:
Use configuration menu 7
0. Offroad functionality -> enable/disable, default disabled
1. Offroad mode active (unlimited speed) on system startup -> enable/disable, default disabled
2. Speed limit when offroad mode not active but enabled (setting 0) -> km/h, default 25 km/h
3. Power limit -> enable/disable, default disabled
4. Power limit -> watts, default 250W

Using (only applicable if setting 0 above is enabled):
1. Offroad mode is shown by the motor assist symbol (directly above the assist level)
  • No blinking -> offroad mode inactive
  • Blinking -> offroad mode active
2. Button on/off + button up (together and both just a short press) -> offroad mode active
3. Button on/off + button down (together and both just a short press) -> offroad mode inactive

Keep in mind that the other speed limit can still be used, so for instance it's possible to have two limits e.g. 25 km/h and 35 km/h.
Hi EndlessCadence I flashed the beta off-road but how there are 9 submenu in configuration menu.. Need help please, Is there an update wiki for configure them??? Some submenu has more option than the v0.11 wiki
Also before for configure maximum power I used assist+ and power, but with off-road fw, how can I configure maximum power?
Also I confirm that finally light power on and also off !! But still no assist with light on... Also for me with light disconnected assist works also with lcd backlight on
Will be an idea If you like to use that enable / disable off-road mode with double fast press of assist + and assist - at same time.

Thanks You, have a good day!

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 16 2018 7:36am

fi7ippo wrote:
Sep 16 2018 6:37am
EndlessCadence wrote:
Sep 15 2018 12:23pm
I've updated the hex files (see links below) with minor improvements. Offroad mode enabled on system startup is now working. The power limiting isn't working yet but the speed limiting is.

I've succesfully tested a combination of two speed limits. E.g. a 35 km/h speed limit when in offroad mode using the speed limit setting which is in menu 0 and a second speed limit of 25 km/h from the offroad configuration menu when offroad mode is not active.
EndlessCadence wrote:
Sep 13 2018 4:11pm
KT_LCD3_Flexible_OpenSource_firmware-v0.11_offroad_beta.hex
TSDZ2_Flexible_OpenSource_firmware-v0.11_offroad_beta.hex

Configuration:
Use configuration menu 7
0. Offroad functionality -> enable/disable, default disabled
1. Offroad mode active (unlimited speed) on system startup -> enable/disable, default disabled
2. Speed limit when offroad mode not active but enabled (setting 0) -> km/h, default 25 km/h
3. Power limit -> enable/disable, default disabled
4. Power limit -> watts, default 250W

Using (only applicable if setting 0 above is enabled):
1. Offroad mode is shown by the motor assist symbol (directly above the assist level)
  • No blinking -> offroad mode inactive
  • Blinking -> offroad mode active
2. Button on/off + button up (together and both just a short press) -> offroad mode active
3. Button on/off + button down (together and both just a short press) -> offroad mode inactive

Keep in mind that the other speed limit can still be used, so for instance it's possible to have two limits e.g. 25 km/h and 35 km/h.
Hi EndlessCadence I flashed the beta off-road but how there are 9 submenu in configuration menu.. Need help please, Is there an update wiki for configure them??? Some submenu has more option than the v0.11 wiki
Also before for configure maximum power I used assist+ and power, but with off-road fw, how can I configure maximum power?
Also I confirm that finally light power on and also off !! But still no assist with light on... Also for me with light disconnected assist works also with lcd backlight on
Will be an idea If you like to use that enable / disable off-road mode with double fast press of assist + and assist - at same time.

Thanks You, have a good day!
Let me first remind you that this is beta firmware which requires a little experimenting. If you don't want that please stick with the latest release 0.11 and just wait until this beta firmware is officially released.

But if you want to try it, go ahead! Menu 7 (offroad configuration) is a new menu, I've explained how this menu works. I've also explained menu 1 in a few posts earlier. I do not know about the other menu's. We should have entries in the wiki for each firmware version. Every user should decide whether he/she want to upgrade or not and still have the configuration information available about their older version. This way we also can add information about beta/testing versions. I hope to find the time today to update the wiki.

Regarding the maximum power: it's hard to deal with the very limited amount of buttons we have... So the maximum power setting with button ON/OFF and UP doesn't work when you have offroad mode configured. Disable offroad mode in that case. For me personally I don't know why the maximum power should be so easily accessible? Can't this be among the other configuration options?

See the Github issue list for open issues, it's very clear that the lights issue is not resolved yet, yup that's a bugger for me too :)

Thanks for your ideas with new button combinations! Will think about that and try, thanks again!!

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 16 2018 7:40am

jbalat wrote:
Sep 16 2018 6:33am
In Victoria, Australia there is no off-road mode.
If you do over 25 km/hr then you better be on private property Or else you cop it.

I just stick with the other non powered riders that way they would look a bit silly booking you and not the others.
I think this applies to many countries. Maybe offroad isn't the correct name for the feature, let's call it private property only mode then :)

But this offroad feature isn't a way to get more power. At this moment speed can be limited but power can't. For many users this renders the motor illegal. Offroad mode also is a way to limit even further, also the power. This makes the motor fully road legal. The different configuration options are there for users to tailor the configuration to the laws of their country.

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 16 2018 8:57am

I've added a new page to the wiki which should be correct for the beta firmware (upcoming 0.12 firmware), see: https://github.com/OpenSource-EBike-fir ... rsion-0.12

If you're using the official 0.11 firmware at the moment you don't need this information.

If you have any questions or comments, please let me know.

Dirkro   10 W

10 W
Posts: 82
Joined: Jun 30 2018 8:18am
Location: Bochum Germay

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by Dirkro » Sep 16 2018 10:02am

EndlessCadence wrote:
Sep 16 2018 8:57am
I've added a new page to the wiki which should be correct for the beta firmware (upcoming 0.12 firmware), see: https://github.com/OpenSource-EBike-fir ... rsion-0.12

If you're using the official 0.11 firmware at the moment you don't need this information.

If you have any questions or comments, please let me know.
Just added a liitle bit in the WIKI about Cardence and 250 w Rule in EU!
I am very curious about it !
Oh darling, this is not a new bike.. :roll:

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 16 2018 10:04am

Dirkro wrote:
Sep 16 2018 10:02am
EndlessCadence wrote:
Sep 16 2018 8:57am
I've added a new page to the wiki which should be correct for the beta firmware (upcoming 0.12 firmware), see: https://github.com/OpenSource-EBike-fir ... rsion-0.12

If you're using the official 0.11 firmware at the moment you don't need this information.

If you have any questions or comments, please let me know.
Just added a liitle bit in the WIKI about Cardence and 250 w Rule in EU!
I am very curious about it !
Please use the wiki DEVELOPMENT version, I already put the link here before. I improved thatpage before.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 16 2018 10:43am

Dirkro wrote:
Sep 16 2018 10:02am
Just added a liitle bit in the WIKI about Cardence and 250 w Rule in EU!
I am very curious about it !
Thanks. Maybe you can improve the text a little? I know I'm far from perfect because english isn't my native language too but this could be unreadable for some? :wink:

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 16 2018 10:44am

casainho wrote:
Sep 16 2018 10:04am
Dirkro wrote:
Sep 16 2018 10:02am
EndlessCadence wrote:
Sep 16 2018 8:57am
I've added a new page to the wiki which should be correct for the beta firmware (upcoming 0.12 firmware), see: https://github.com/OpenSource-EBike-fir ... rsion-0.12

If you're using the official 0.11 firmware at the moment you don't need this information.

If you have any questions or comments, please let me know.
Just added a liitle bit in the WIKI about Cardence and 250 w Rule in EU!
I am very curious about it !
Please use the wiki DEVELOPMENT version, I already put the link here before. I improved thatpage before.
I don't know what you mean exactly? The development page is about development tools etc. I think we could add wiki pages for all versions of the software. Now users are confused easily and users who keep using older version find that configuration information is lost and replaced by the new version. That's why I've created a new page. I also tried to document your new features like LCD backlight configuration etc.

So my idea is that we create a new page for each new firmware release. Before releasing we create the page and improve it together. This way we leave the existing pages untouched. Maybe we should create a changelog or release notes as well.

Btw, have you seen the PR's?

Edit: I found the DEVELOPMENT page, it wasn't in the navigation menu. It's not really up to date is it?

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 16 2018 3:35pm

EndlessCadence wrote:
Sep 16 2018 10:44am
So my idea is that we create a new page for each new firmware release. Before releasing we create the page and improve it together. This way we leave the existing pages untouched. Maybe we should create a changelog or release notes as well.

Btw, have you seen the PR's?

Edit: I found the DEVELOPMENT page, it wasn't in the navigation menu. It's not really up to date is it?
Good idea to create a specific page for each version!! And I am happy that now more people is helping :-)

Please look at that development page and see if something must be copied to that page you created.

I will start by looking at the changes you did for the new feature.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 16 2018 3:44pm

casainho wrote:
Sep 16 2018 3:35pm
Good idea to create a specific page for each version!! And I am happy that now more people is helping :-)

Please look at that development page and see if something must be copied to that page you created.

I will start by looking at the changes you did for the new feature.
Glad that you're happy with the work I've done! I will look at the DEV wiki page tomorrow and make sure that the new 0.12 beta page is complete. Maybe you can fill in the blanks or unknown configuration options afterwards.

If you have any questions about the offroad mode and the pull request I've created for that feature, please let me know.

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 17 2018 5:07am

A new release of firmware (V0.12) with the new developed features -- thanks to the collaboration on development of EndlessCadence and the tests and feedback of other users!! Also wiki improvements thanks to the same users/developers.

New on V0.12:

1. Off road mode: Added offroad mode with some configurations, where on street legal mode the speed and/or motor max power can be configured.

2. Battery voltage to reset SOC counter: Added configuration menu for the voltage value to automatically reset the counter of battery SOC (battery state of charge) when battery is fully charged.

3. TSDZ2 + LCD3 automatic power off: Added configuration menu for TSDZ2 + LCD3 automatic power off timing (from 1 minute up to 255 minutes).

4. LCD backlight configuration: configuration of backlight values for on and off lights states (we can have have always enabled backlight, or always disabled, or different backlight values on each state).

5. LCD reset configurations: added configuration menu to reset the configurations to defaults.

6. Reducing battery voltage fluctuation for battery SOC bars indicator: Added a configuration for battery pack resistance value that is used to calculate the battery voltage fluctuation due to motor current usage and then filter out the fluctuations on LCD3 battery SOC bars indicator.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 17 2018 5:12am

I am developing the ODOMETER and using development branch for that. Please be aware of this.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

User avatar
jbalat   10 kW

10 kW
Posts: 588
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Sep 17 2018 5:58am

Well done guys ;)

Are there any known bugs in this release ?
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 17 2018 6:35am

casainho wrote:
Sep 17 2018 5:07am
A new release of firmware (V0.12) with the new developed features
Nice! I would like to add that we have a new wiki page for this version and we'll keep the previous configuration information intact. This is relevant for users who like to stick with previous versions of the firmware.
https://github.com/OpenSource-EBike-fir ... rsion-0.12
casainho wrote:
Sep 17 2018 5:12am
I am developing the ODOMETER and using development branch for that. Please be aware of this.
Good to know! I'm very interested in that feature for maintenance etc. I've added a little input to https://github.com/OpenSource-EBike-fir ... /issues/11

I'm pleased that we have development branch for the motor controller now. I'll use that branch too.
jbalat wrote:
Sep 17 2018 5:58am
Well done guys ;)

Are there any known bugs in this release ?
Yes, there is one I know of. Turning lights on stops motor assistance, at least for me and a few others. This wasn't introduced with this new firmware version. Casainho and I are working on this together and I hope we'll fix this soon. https://github.com/OpenSource-EBike-fir ... /issues/35

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by EndlessCadence » Sep 17 2018 5:53pm

EndlessCadence wrote:
Sep 17 2018 6:35am
Yes, there is one I know of. Turning lights on stops motor assistance, at least for me and a few others. This wasn't introduced with this new firmware version. Casainho and I are working on this together and I hope we'll fix this soon. https://github.com/OpenSource-EBike-fir ... /issues/35
While trying to fix this issue and experimenting with dimming the DC-DC buck converter for the lights I have destroyed that converter 😢
I have ordered a new IC and a spare controller. When this has arrived I plan to switch a relay and an external high power buck converter with the light output instead of directly driving the lights.

User avatar
jbalat   10 kW

10 kW
Posts: 588
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Sep 17 2018 6:51pm

i was going to say that if you dont have lights then the lcd backlight works and causes no issues but if you do have lights then you lose assist. So obviously you are drawing too much power from the system with the lights plugged in...

What kind of lights are you using.. Check out the approved lights at psw power and make sure you are not exceeding the amps.,
http://www.pswpower.com/ven.php?cargo.2017-cm-k872
looks like 1W max ?
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 17 2018 11:11pm

EndlessCadence wrote:
Sep 17 2018 5:53pm
EndlessCadence wrote:
Sep 17 2018 6:35am
Yes, there is one I know of. Turning lights on stops motor assistance, at least for me and a few others. This wasn't introduced with this new firmware version. Casainho and I are working on this together and I hope we'll fix this soon. https://github.com/OpenSource-EBike-fir ... /issues/35
While trying to fix this issue and experimenting with dimming the DC-DC buck converter for the lights I have destroyed that converter 😢
I have ordered a new IC and a spare controller. When this has arrived I plan to switch a relay and an external high power buck converter with the light output instead of directly driving the lights.
So, your lights works well with the original firmware??

Because the DC-DC IC has the protection for over temperature and short-circuit so I think should be hard to destroy. Are you sure that was not the lamp that got destroyed instead?

Our luck is that we can access/buy spare parts (and even cheap!!), The motor controller is cheap, comparing to what would be for other brand of motors.

I have no clue about what is wrong.....
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

wheex   1 mW

1 mW
Posts: 12
Joined: Apr 13 2018 3:41am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by wheex » Sep 18 2018 1:40am

Yesterday a tested the 0.12 version and my lights working, I can switch it off and on. The motor assist is working when my lights is on.

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 18 2018 1:49am

wheex wrote:
Sep 18 2018 1:40am
Yesterday a tested the 0.12 version and my lights working, I can switch it off and on. The motor assist is working when my lights is on.
Thanks for the feedback. Can you please give a link to your lights? What is the model, where do you bought them?
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

wheex   1 mW

1 mW
Posts: 12
Joined: Apr 13 2018 3:41am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by wheex » Sep 18 2018 2:45am

casainho wrote:
Sep 18 2018 1:49am
Thanks for the feedback. Can you please give a link to your lights? What is the model, where do you bought them?
I'am using Busch + Müller IQ-X E bought from here https://www.rosebikes.com/b-m-lumotec-i ... ht-2658822 I'am using an Omron G5V-2-H1 6VDC relay to switch it. I'am put the relay inside the motor housing and connected directly to the battery so only one extra wire goes out from the motor and my bike frame has internal cable routing so its not seen at all.
My rear light is Axa BlueLine Steady LED Rear Light bought from here https://www.bike-discount.de/en/buy/axa ... ght-550297 it has very small consumption so it driven with the y cable splitter http://www.pswpower.com/ven.php?cargo.2017-cm-jnqg

kortina   10 mW

10 mW
Posts: 34
Joined: Feb 19 2017 9:24pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by kortina » Sep 18 2018 3:12am

I had an interesting thought for the lights...

If you have TWO rear lights (one to be seen, one to indicate braking or lack of power).
Rear Light 1: Operating voltage 3v-7v (This is the light to be seen)
Rear Light 2: Operating voltage 6v-7v (This is the brake light)
Headlight: Operating voltage 3v-7v

When the rider stops pedaling, or uses the brakes (when the brake sensor is fitted), raise the voltage for the light circuit to 7v. While the user is pedaling ensure that the voltage on the light circuit is 5.5v

So I am not sure if it is possible to change the voltage on the 'lighting' circuit. But this would be useful when a headlight is also active.

I guess that you would possibly need to build your own rear 'brake' light with the right number of LED's to ensure that it would not turn on when the circuit was 'low'.

Thoughts?

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 18 2018 3:15am

kortina wrote:
Sep 18 2018 3:12am
I had an interesting thought for the lights...

If you have TWO rear lights (one to be seen, one to indicate braking or lack of power).
Rear Light 1: Operating voltage 3v-7v (This is the light to be seen)
Rear Light 2: Operating voltage 6v-7v (This is the brake light)
Headlight: Operating voltage 3v-7v

When the rider stops pedaling, or uses the brakes (when the brake sensor is fitted), raise the voltage for the light circuit to 7v. While the user is pedaling ensure that the voltage on the light circuit is 5.5v

So I am not sure if it is possible to change the voltage on the 'lighting' circuit. But this would be useful when a headlight is also active.

I guess that you would possibly need to build your own rear 'brake' light with the right number of LED's to ensure that it would not turn on when the circuit was 'low'.

Thoughts?
Can you please clarify what do you want to have as an user and why? -- then we can discuss technically. I must say I didn't understand well and I would like to.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

kortina   10 mW

10 mW
Posts: 34
Joined: Feb 19 2017 9:24pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by kortina » Sep 18 2018 3:37am

Hi Casainho,

First of all thanks for all of your work, I am keen to try the firmware. (Parts arriving soon!).

As a rider, I have front and rear lights (6v). The rear is currently just to be seen.The front light needs to be bright all the time so I can get home.

Turning the entire lighting circuit on when the brake is applied is not very useful, as it will then kill my front lights when I am pedaling.

My thought was to have TWO rear lights and change the voltage on the circuit.

If you string a few red LED's together, then apply 5.5v they will not turn on. If you raise the voltage to 7v then they will light up.

My thought is by changing the voltage on the circuit, you can change the behavior.

EG:
5.5v on the Circuit
Front light is on (because it is enough to turn on the relay for big front lights)
Rear 'be seen' light is on (because it will operate anywhere up to 7v)
Rear 'brake' light will be off (because there is not enough voltage to make the LEDs turn on)

7v on the Circuit (when braking on NO power)
Front light is on(because the relay will still accept the 7v)
Rear 'be seen' light is on (because it doesnt mind a little extra voltage)
Rear 'brake' light is on (because the voltage has just tipped over the point where it will activate the series of red LEDs)

Does that make sense?

casainho   10 GW

10 GW
Posts: 4458
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 18 2018 3:58am

kortina wrote:
Sep 18 2018 3:37am
Hi Casainho,

First of all thanks for all of your work, I am keen to try the firmware. (Parts arriving soon!).

As a rider, I have front and rear lights (6v). The rear is currently just to be seen.The front light needs to be bright all the time so I can get home.

Turning the entire lighting circuit on when the brake is applied is not very useful, as it will then kill my front lights when I am pedaling.

My thought was to have TWO rear lights and change the voltage on the circuit.

If you string a few red LED's together, then apply 5.5v they will not turn on. If you raise the voltage to 7v then they will light up.

My thought is by changing the voltage on the circuit, you can change the behavior.

EG:
5.5v on the Circuit
Front light is on (because it is enough to turn on the relay for big front lights)
Rear 'be seen' light is on (because it will operate anywhere up to 7v)
Rear 'brake' light will be off (because there is not enough voltage to make the LEDs turn on)

7v on the Circuit (when braking on NO power)
Front light is on(because the relay will still accept the 7v)
Rear 'be seen' light is on (because it doesnt mind a little extra voltage)
Rear 'brake' light is on (because the voltage has just tipped over the point where it will activate the series of red LEDs)

Does that make sense?
So you need:
1. -- 1 front light that is enabled when you enable lights on LCD
2. -- 1 rear light that is enabled when you enable lights on LCD
2.1 -- (OR always on?? I think scooters, at least in Portugal, should run always with lights on...)
3. -- 1 rear STRONG light that is enabled when you brake
3.1 -- (AND enable lights on LCD??)

Seems that 1 and 2 could be connected to both control signals (or may need to be different if 2.1 and 3.1).

For 3, seems we need a different control signal, that is activated when you brake. As alternative, if your rear light can be STRONG when you put an higher voltage/current, maybe the control signal/circuit could be driver by PWM and we could put higher voltage to the rear light when braking, other wise put a lower voltage.

Can you guys please explain how the original firmware and lights behave?
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless Ebike boar ANT+ and Bluetooth, Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation to help my developments: paypal.me/jorgecasa

Post Reply