TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Discussions related to motors other than hub motors.
This includes R/C motors, botttom bracket, roller and geared drives.
casainho   100 GW

100 GW
Posts: 5143
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by casainho » Mar 28 2021 8:28am

beemac wrote:
Mar 28 2021 8:20am
rananna wrote:
Mar 28 2021 7:58am
beemac wrote:
Mar 28 2021 7:42am
@casainho/@rananna - I'm trying the wireless update finally - how do you set the ANT_ID to 0x99? Documentation is very brief on the subject - do I need a Garmin device to do that?
Short answer: using the Nordic app to modify the Bluetooth characteristic.
Longer answer: you only need 0x99 for setting the ANT ID to something other than 0 ( 0 pairs with any motor)
For all other options I simpified the operation of the wireless remote to avoid the need to use the Nordic app for configuration.
Full instructions here:
https://opensourceebike.github.io/operation.html
See configuration mode.
However, usually no configuration is necessary, it should work out if the box if you are not using a Garmin.
What are you trying to change?
Thanks i'm trying to flash the wireless controller fw on my test bike - because I've wrapped it in tape I wanted to update OTA. Never actually managed to get OTA working - I always flash using the STLINK...

In nrf connect - i don't see ANT ID as a parameter for the motor controller as shown in your video - just a generic unknown service in addition to the 0x1800/0x1801 name fields - it does have a single updateable parameter - currently set to 0x3. If I change this to 0x99 -the wireless controller reboots - but does not go into DFU mode...

I've disconnected the debugger just in case...

Any other handy hints :)
If the mobile app works, then the change to DFU works, at lest for me. See on the firmware the UUID for the endpoint that you should use to write the 99.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 8:47am

casainho wrote:
Mar 28 2021 8:28am
beemac wrote:
Mar 28 2021 8:20am
rananna wrote:
Mar 28 2021 7:58am
beemac wrote:
Mar 28 2021 7:42am
@casainho/@rananna - I'm trying the wireless update finally - how do you set the ANT_ID to 0x99? Documentation is very brief on the subject - do I need a Garmin device to do that?
Short answer: using the Nordic app to modify the Bluetooth characteristic.
Longer answer: you only need 0x99 for setting the ANT ID to something other than 0 ( 0 pairs with any motor)
For all other options I simpified the operation of the wireless remote to avoid the need to use the Nordic app for configuration.
Full instructions here:
https://opensourceebike.github.io/operation.html
See configuration mode.
However, usually no configuration is necessary, it should work out if the box if you are not using a Garmin.
What are you trying to change?
Thanks i'm trying to flash the wireless controller fw on my test bike - because I've wrapped it in tape I wanted to update OTA. Never actually managed to get OTA working - I always flash using the STLINK...

In nrf connect - i don't see ANT ID as a parameter for the motor controller as shown in your video - just a generic unknown service in addition to the 0x1800/0x1801 name fields - it does have a single updateable parameter - currently set to 0x3. If I change this to 0x99 -the wireless controller reboots - but does not go into DFU mode...

I've disconnected the debugger just in case...

Any other handy hints :)
If the mobile app works, then the change to DFU works, at lest for me. See on the firmware the UUID for the endpoint that you should use to write the 99.
Ok - checking the UUIDs in code I am changing the value under the ANT UUID - but the controller still just reboots after a second or so... does not go into DFU mode... i see the power on led sequence - so I know it's not going into bootloader..

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 9:01am

beemac wrote:
Mar 28 2021 8:47am
casainho wrote:
Mar 28 2021 8:28am
beemac wrote:
Mar 28 2021 8:20am
rananna wrote:
Mar 28 2021 7:58am

Short answer: using the Nordic app to modify the Bluetooth characteristic.
Longer answer: you only need 0x99 for setting the ANT ID to something other than 0 ( 0 pairs with any motor)
For all other options I simpified the operation of the wireless remote to avoid the need to use the Nordic app for configuration.
Full instructions here:
https://opensourceebike.github.io/operation.html
See configuration mode.
However, usually no configuration is necessary, it should work out if the box if you are not using a Garmin.
What are you trying to change?
Thanks i'm trying to flash the wireless controller fw on my test bike - because I've wrapped it in tape I wanted to update OTA. Never actually managed to get OTA working - I always flash using the STLINK...

In nrf connect - i don't see ANT ID as a parameter for the motor controller as shown in your video - just a generic unknown service in addition to the 0x1800/0x1801 name fields - it does have a single updateable parameter - currently set to 0x3. If I change this to 0x99 -the wireless controller reboots - but does not go into DFU mode...

I've disconnected the debugger just in case...

Any other handy hints :)
If the mobile app works, then the change to DFU works, at lest for me. See on the firmware the UUID for the endpoint that you should use to write the 99.
Ok - checking the UUIDs in code I am changing the value under the ANT UUID - but the controller still just reboots after a second or so... does not go into DFU mode... i see the power on led sequence - so I know it's not going into bootloader..
OK - seems I am doing it right - but for whatever reason the reset into bootloader isn't working... i added one line to show the LED blue when it was about to go into bootloader - and I see that LED.

if (mp_ui_vars->ui8_enter_bootloader) //check to see if reboot into the bootloader is needed
{
mp_ui_vars->ui8_enter_bootloader = 0;
nrf_power_gpregret_set(BOOTLOADER_DFU_START); //set the dfu register
bsp_board_led_on(LED_B__PIN); // Indicate about to enter bootloader
nrf_delay_ms(1000); //wait for write to complete
eeprom_write_variables();
nrf_delay_ms(3000); //wait for write to complete
NVIC_SystemReset(); //reboot into bootloader
}

Ah maybe I don't have a bootloader? If I've always flashed using stlink....?

theflyingjaguar   1 µW

1 µW
Posts: 2
Joined: Mar 28 2021 8:59am

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by theflyingjaguar » Mar 28 2021 9:14am

Hello there !

This project seems excellent ! I intend to order a TSDZ2, and would be interresting to control it with my smartphone.

Am I correctly understanding that it is posible to control the bike only with a smartphone ? including controlling the lights ? ( i won't have money to buy a bike gps yet)

Should I order a display allong with the motor, or would the wireless connection be enough ? Is it possible to cumulate a small cheap display and the wireless connectivity, in order to use the standard wired display as backup ?

Thank you all, especially Casainho

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 9:31am

beemac wrote:
Mar 28 2021 9:01am
beemac wrote:
Mar 28 2021 8:47am
casainho wrote:
Mar 28 2021 8:28am
beemac wrote:
Mar 28 2021 8:20am


Thanks i'm trying to flash the wireless controller fw on my test bike - because I've wrapped it in tape I wanted to update OTA. Never actually managed to get OTA working - I always flash using the STLINK...

In nrf connect - i don't see ANT ID as a parameter for the motor controller as shown in your video - just a generic unknown service in addition to the 0x1800/0x1801 name fields - it does have a single updateable parameter - currently set to 0x3. If I change this to 0x99 -the wireless controller reboots - but does not go into DFU mode...

I've disconnected the debugger just in case...

Any other handy hints :)
If the mobile app works, then the change to DFU works, at lest for me. See on the firmware the UUID for the endpoint that you should use to write the 99.
Ok - checking the UUIDs in code I am changing the value under the ANT UUID - but the controller still just reboots after a second or so... does not go into DFU mode... i see the power on led sequence - so I know it's not going into bootloader..
OK - seems I am doing it right - but for whatever reason the reset into bootloader isn't working... i added one line to show the LED blue when it was about to go into bootloader - and I see that LED.

if (mp_ui_vars->ui8_enter_bootloader) //check to see if reboot into the bootloader is needed
{
mp_ui_vars->ui8_enter_bootloader = 0;
nrf_power_gpregret_set(BOOTLOADER_DFU_START); //set the dfu register
bsp_board_led_on(LED_B__PIN); // Indicate about to enter bootloader
nrf_delay_ms(1000); //wait for write to complete
eeprom_write_variables();
nrf_delay_ms(3000); //wait for write to complete
NVIC_SystemReset(); //reboot into bootloader
}

Ah maybe I don't have a bootloader? If I've always flashed using stlink....?
Hmmm... what a pita - cannot get the bootloader to work from source - even if I flash the bootloader only - I can't get into DFU..

I'll try the posted binaries - might be something odd with my make/link files..

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 9:35am

theflyingjaguar wrote:
Mar 28 2021 9:14am
Hello there !

This project seems excellent ! I intend to order a TSDZ2, and would be interresting to control it with my smartphone.

Am I correctly understanding that it is posible to control the bike only with a smartphone ? including controlling the lights ? ( i won't have money to buy a bike gps yet)

Should I order a display allong with the motor, or would the wireless connection be enough ? Is it possible to cumulate a small cheap display and the wireless connectivity, in order to use the standard wired display as backup ?

Thank you all, especially Casainho
You will need to build at least one board based on the nrf52840 - see the documentation https://opensourceebike.github.io/

There will be documentation put up for the wired remote option soon - where the buttons/brakes are wired directly to the controller as an alternative to the bluetooth remote.

theflyingjaguar   1 µW

1 µW
Posts: 2
Joined: Mar 28 2021 8:59am

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by theflyingjaguar » Mar 28 2021 10:03am

beemac wrote:
Mar 28 2021 9:35am
You will need to build at least one board based on the nrf52840 - see the documentation https://opensourceebike.github.io/

There will be documentation put up for the wired remote option soon - where the buttons/brakes are wired directly to the controller as an alternative to the bluetooth remote.
Yes I understand that I have to build the wireless board. I just want to make sure it is the only thing I need for now.

Also I'm not sure to understand where I would plug the break sensor, I thought there were plug onto the display (at least on VCLD5)

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 10:20am

beemac wrote:
Mar 28 2021 9:31am
beemac wrote:
Mar 28 2021 9:01am
beemac wrote:
Mar 28 2021 8:47am
casainho wrote:
Mar 28 2021 8:28am

If the mobile app works, then the change to DFU works, at lest for me. See on the firmware the UUID for the endpoint that you should use to write the 99.
Ok - checking the UUIDs in code I am changing the value under the ANT UUID - but the controller still just reboots after a second or so... does not go into DFU mode... i see the power on led sequence - so I know it's not going into bootloader..
OK - seems I am doing it right - but for whatever reason the reset into bootloader isn't working... i added one line to show the LED blue when it was about to go into bootloader - and I see that LED.

if (mp_ui_vars->ui8_enter_bootloader) //check to see if reboot into the bootloader is needed
{
mp_ui_vars->ui8_enter_bootloader = 0;
nrf_power_gpregret_set(BOOTLOADER_DFU_START); //set the dfu register
bsp_board_led_on(LED_B__PIN); // Indicate about to enter bootloader
nrf_delay_ms(1000); //wait for write to complete
eeprom_write_variables();
nrf_delay_ms(3000); //wait for write to complete
NVIC_SystemReset(); //reboot into bootloader
}

Ah maybe I don't have a bootloader? If I've always flashed using stlink....?
Hmmm... what a pita - cannot get the bootloader to work from source - even if I flash the bootloader only - I can't get into DFU..

I'll try the posted binaries - might be something odd with my make/link files..
Ok - so going back to the published 0.9.0 bootloader binary (it's not that easy to find since it's not included in the latest releases) - and things work as expected - plus once I flash the fw - I can write 0x99 and it boots into _DFU mode as expected...

Wonder why my built bootloader binaries don't work...

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 10:43am

beemac wrote:
Mar 28 2021 10:20am
beemac wrote:
Mar 28 2021 9:31am
beemac wrote:
Mar 28 2021 9:01am
beemac wrote:
Mar 28 2021 8:47am


Ok - checking the UUIDs in code I am changing the value under the ANT UUID - but the controller still just reboots after a second or so... does not go into DFU mode... i see the power on led sequence - so I know it's not going into bootloader..
OK - seems I am doing it right - but for whatever reason the reset into bootloader isn't working... i added one line to show the LED blue when it was about to go into bootloader - and I see that LED.

if (mp_ui_vars->ui8_enter_bootloader) //check to see if reboot into the bootloader is needed
{
mp_ui_vars->ui8_enter_bootloader = 0;
nrf_power_gpregret_set(BOOTLOADER_DFU_START); //set the dfu register
bsp_board_led_on(LED_B__PIN); // Indicate about to enter bootloader
nrf_delay_ms(1000); //wait for write to complete
eeprom_write_variables();
nrf_delay_ms(3000); //wait for write to complete
NVIC_SystemReset(); //reboot into bootloader
}

Ah maybe I don't have a bootloader? If I've always flashed using stlink....?
Hmmm... what a pita - cannot get the bootloader to work from source - even if I flash the bootloader only - I can't get into DFU..

I'll try the posted binaries - might be something odd with my make/link files..
Ok - so going back to the published 0.9.0 bootloader binary (it's not that easy to find since it's not included in the latest releases) - and things work as expected - plus once I flash the fw - I can write 0x99 and it boots into _DFU mode as expected...

Wonder why my built bootloader binaries don't work...
@casainho - which source for the bootloader should I be using? Think I should be using the 2nd one - might be my problem...

https://github.com/OpenSourceEBike/TSDZ ... bootloader

or

https://github.com/OpenSourceEBike/TSDZ ... bootloader

edit: Ok doesn't matter - both compile and build to identical binaries... but it still doesn't work... binaries don't match the published 0.9.0 binary. That is the same up until about the final quarter - 0EB000 onwards...

Any ideas why the published binary differs to what gets built from source...? Am using the standard makefile - runs cleanly on Windows.

casainho   100 GW

100 GW
Posts: 5143
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by casainho » Mar 28 2021 11:01am

theflyingjaguar wrote:
Mar 28 2021 10:03am
Yes I understand that I have to build the wireless board. I just want to make sure it is the only thing I need for now.

Also I'm not sure to understand where I would plug the break sensor, I thought there were plug onto the display (at least on VCLD5)
The wireless board and all the components as in seen on the documentation on how to buid it + a remote like the VLCD5 remote.

There is the wireless remote option but I think I am the only one using it yet and I am having some issues, the regular remote will be easier much easier for build and at anytime you can build the wireless remote if you prefer.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 11:45am

theflyingjaguar wrote:
Mar 28 2021 10:03am
beemac wrote:
Mar 28 2021 9:35am
You will need to build at least one board based on the nrf52840 - see the documentation https://opensourceebike.github.io/

There will be documentation put up for the wired remote option soon - where the buttons/brakes are wired directly to the controller as an alternative to the bluetooth remote.
Yes I understand that I have to build the wireless board. I just want to make sure it is the only thing I need for now.

Also I'm not sure to understand where I would plug the break sensor, I thought there were plug onto the display (at least on VCLD5)
Draft info here that explains the differences in configurations - and where brakes connect - pending merge into main docs:

https://github.com/4var1/OpenSourceEBik ... 2_board.md

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 28 2021 12:29pm

casainho wrote:
Mar 28 2021 11:01am
theflyingjaguar wrote:
Mar 28 2021 10:03am
Yes I understand that I have to build the wireless board. I just want to make sure it is the only thing I need for now.

Also I'm not sure to understand where I would plug the break sensor, I thought there were plug onto the display (at least on VCLD5)
The wireless board and all the components as in seen on the documentation on how to buid it + a remote like the VLCD5 remote.

There is the wireless remote option but I think I am the only one using it yet and I am having some issues, the regular remote will be easier much easier for build and at anytime you can build the wireless remote if you prefer.
Ok - PR submitted for wired remote docs + to add brake LED signal to wired remote.

I've given up on OTA updates again - can't see why my compiled bootloader differs from the published - driving me crazy...

casainho   100 GW

100 GW
Posts: 5143
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by casainho » Mar 29 2021 6:04am

beemac wrote:
Mar 28 2021 12:29pm
I've given up on OTA updates again - can't see why my compiled bootloader differs from the published - driving me crazy...
We have a repository for the bootloader and I think it is the only one used by the others, when building the code for debug.

For instance, the SDK, is on the common firmware folder that we should use on all the firmwares although there is some issues that the SDK on the common firmware folder makes the wireless remote not working for some unknown reason and it is used a copy of SDK on this firmware... so, I am not sure about the bootloader, this kind of strange things can happen - this means there is a LOT of work to do :-)
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

User avatar
rananna   1 kW

1 kW
Posts: 347
Joined: Jul 07 2018 4:31am

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by rananna » Mar 29 2021 6:52am

casainho wrote:
Mar 29 2021 6:04am
beemac wrote:
Mar 28 2021 12:29pm
I've given up on OTA updates again - can't see why my compiled bootloader differs from the published - driving me crazy...
We have a repository for the bootloader and I think it is the only one used by the others, when building the code for debug.

For instance, the SDK, is on the common firmware folder that we should use on all the firmwares although there is some issues that the SDK on the common firmware folder makes the wireless remote not working for some unknown reason and it is used a copy of SDK on this firmware... so, I am not sure about the bootloader, this kind of strange things can happen - this means there is a LOT of work to do :-)
Yes, we are all using the same compiled bootloader image when building the firmware.

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 29 2021 11:51am

casainho wrote:
Mar 29 2021 6:04am
beemac wrote:
Mar 28 2021 12:29pm
I've given up on OTA updates again - can't see why my compiled bootloader differs from the published - driving me crazy...
We have a repository for the bootloader and I think it is the only one used by the others, when building the code for debug.

For instance, the SDK, is on the common firmware folder that we should use on all the firmwares although there is some issues that the SDK on the common firmware folder makes the wireless remote not working for some unknown reason and it is used a copy of SDK on this firmware... so, I am not sure about the bootloader, this kind of strange things can happen - this means there is a LOT of work to do :-)
I'm really scratching my head today with this issue with the motor with the dodgy torque sensor. I replaced the motor controller and the sensor seems to be working - is giving sensible numbers - 150ish unloaded rising to 300 or so with 105kg on it - so all good.

However I cannot get the assist back properly. I copied the program/data/options from my non-test bike which is still running code from about three weeks ago. Now I can get assist to work briefly - but then cuts out...

Walk assist still works fine...

One thing on the Android app - that I've seen before but doesn't do it all the time - but now I can't stop it doing it - is when saving config parameters it prompts for street mode power limit - that's always 0 in the settings so the config won't save as it needs to be between 25-2500. Saving a value never sticks - so the next time you go into config - it's zero again and you get an error saving...

Going to call it a day - time for a beer in the sun...

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 29 2021 1:13pm

beemac wrote:
Mar 29 2021 11:51am
casainho wrote:
Mar 29 2021 6:04am
beemac wrote:
Mar 28 2021 12:29pm
I've given up on OTA updates again - can't see why my compiled bootloader differs from the published - driving me crazy...
We have a repository for the bootloader and I think it is the only one used by the others, when building the code for debug.

For instance, the SDK, is on the common firmware folder that we should use on all the firmwares although there is some issues that the SDK on the common firmware folder makes the wireless remote not working for some unknown reason and it is used a copy of SDK on this firmware... so, I am not sure about the bootloader, this kind of strange things can happen - this means there is a LOT of work to do :-)
I'm really scratching my head today with this issue with the motor with the dodgy torque sensor. I replaced the motor controller and the sensor seems to be working - is giving sensible numbers - 150ish unloaded rising to 300 or so with 105kg on it - so all good.

However I cannot get the assist back properly. I copied the program/data/options from my non-test bike which is still running code from about three weeks ago. Now I can get assist to work briefly - but then cuts out...

Walk assist still works fine...

One thing on the Android app - that I've seen before but doesn't do it all the time - but now I can't stop it doing it - is when saving config parameters it prompts for street mode power limit - that's always 0 in the settings so the config won't save as it needs to be between 25-2500. Saving a value never sticks - so the next time you go into config - it's zero again and you get an error saving...

Going to call it a day - time for a beer in the sun...
Quick update as I found out a couple of things.

I noticed that the PR before last that I submitted still had street mode enabled from when I was testing - it's not present in the last PR. But wondered if that might be the cause of your assist issues casainho? Sorry if it was!

Also - the Android app only shows the issue when saving parameters if street mode is enabled. So that's why I don't see it all the time.

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 30 2021 11:12am

beemac wrote:
Mar 29 2021 1:13pm
beemac wrote:
Mar 29 2021 11:51am
casainho wrote:
Mar 29 2021 6:04am
beemac wrote:
Mar 28 2021 12:29pm
I've given up on OTA updates again - can't see why my compiled bootloader differs from the published - driving me crazy...
We have a repository for the bootloader and I think it is the only one used by the others, when building the code for debug.

For instance, the SDK, is on the common firmware folder that we should use on all the firmwares although there is some issues that the SDK on the common firmware folder makes the wireless remote not working for some unknown reason and it is used a copy of SDK on this firmware... so, I am not sure about the bootloader, this kind of strange things can happen - this means there is a LOT of work to do :-)
I'm really scratching my head today with this issue with the motor with the dodgy torque sensor. I replaced the motor controller and the sensor seems to be working - is giving sensible numbers - 150ish unloaded rising to 300 or so with 105kg on it - so all good.

However I cannot get the assist back properly. I copied the program/data/options from my non-test bike which is still running code from about three weeks ago. Now I can get assist to work briefly - but then cuts out...

Walk assist still works fine...

One thing on the Android app - that I've seen before but doesn't do it all the time - but now I can't stop it doing it - is when saving config parameters it prompts for street mode power limit - that's always 0 in the settings so the config won't save as it needs to be between 25-2500. Saving a value never sticks - so the next time you go into config - it's zero again and you get an error saving...

Going to call it a day - time for a beer in the sun...
Quick update as I found out a couple of things.

I noticed that the PR before last that I submitted still had street mode enabled from when I was testing - it's not present in the last PR. But wondered if that might be the cause of your assist issues casainho? Sorry if it was!

Also - the Android app only shows the issue when saving parameters if street mode is enabled. So that's why I don't see it all the time.
Happy days... maybe I'll get to ride my new fsr this week after all :)

Seems the reason why assist wasn't working despite the torque sensor working fine the PAS sensor wasn't reading anything - looks like a dodgy connection.

I had to get the old serial tap out to see what was going on - but as is so often the way - then found this which describes my issue perfectly.

https://github.com/OpenSourceEBike/TSDZ ... ensor_fail

casainho   100 GW

100 GW
Posts: 5143
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by casainho » Mar 30 2021 1:38pm

beemac wrote:
Mar 30 2021 11:12am
Happy days... maybe I'll get to ride my new fsr this week after all :)

Seems the reason why assist wasn't working despite the torque sensor working fine the PAS sensor wasn't reading anything - looks like a dodgy connection.

I had to get the old serial tap out to see what was going on - but as is so often the way - then found this which describes my issue perfectly.

https://github.com/OpenSourceEBike/TSDZ ... ensor_fail
I wrote that page. Tha this why I wish to have a configuration to disable each sensor, like PAS sensor or the brake, for instance.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 30 2021 2:01pm

casainho wrote:
Mar 30 2021 1:38pm
beemac wrote:
Mar 30 2021 11:12am
Happy days... maybe I'll get to ride my new fsr this week after all :)

Seems the reason why assist wasn't working despite the torque sensor working fine the PAS sensor wasn't reading anything - looks like a dodgy connection.

I had to get the old serial tap out to see what was going on - but as is so often the way - then found this which describes my issue perfectly.

https://github.com/OpenSourceEBike/TSDZ ... ensor_fail
I wrote that page. Tha this why I wish to have a configuration to disable each sensor, like PAS sensor or the brake, for instance.
Thanks it was useful - up until today I assumed the black lump on the end of the motor controller was just to align things mechanically - didn't realise it was another sensor!

Yea agreed - we need to put together a list of new configuration parameters so we can work on the new configuration packet format. I've got quite a list!

Would be hard to run without a PAS sensor though unless we put vthrottle back. I can sort of see how you'd be able to infer cadence from the torque sensor only but might have some odd results!

qq - is the latest source for the android app up on github? Last time I looked it was only the v30 source not v31...

sidmodi   1 mW

1 mW
Posts: 14
Joined: Oct 28 2018 12:57am

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by sidmodi » Mar 31 2021 11:34am

Hello everyone!

Thank you to all the developers for taking on this amazing project to make the TSDZ2 wireless! I am very excited about this project.

Just last night, I ordered all the parts listed on the new Wiki page to build the wireless controller for the motor and for the remote. I am wondering if anyone in the community has made a PCB for it and has gerber files that I can send to a PCB vendor. If not, I will simply use a protoboard as the Wiki says. Also, are there any STL files available for the motor controller enclosure? And the STL files for the remote are the latest ones on the Wiki?

Looking forward to receiving my parts and getting rid of the wires on my bike!

Will update the thread once I have the parts built!

Thank you!

casainho   100 GW

100 GW
Posts: 5143
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by casainho » Mar 31 2021 11:42am

sidmodi wrote:
Mar 31 2021 11:34am
Just last night, I ordered all the parts listed on the new Wiki page to build the wireless controller for the motor and for the remote. I am wondering if anyone in the community has made a PCB for it and has gerber files that I can send to a PCB vendor. If not, I will simply use a protoboard as the Wiki says. Also, are there any STL files available for the motor controller enclosure? And the STL files for the remote are the latest ones on the Wiki?
If you bought the parts listed on the wiki then is best to build the DIY version as the PCB version seems to use some different parts. No one did document the PCB version yet, you need to search on this thread.

Yes, the STL files are the last ones for the wireless remote but if you want you can try to go with the wired remote as will be much easy to build.

Yes, please share. If you take good photos from a clean build, they may be used on the documentation - would be your contribution.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Mar 31 2021 11:56am

sidmodi wrote:
Mar 31 2021 11:34am
Hello everyone!

Thank you to all the developers for taking on this amazing project to make the TSDZ2 wireless! I am very excited about this project.

Just last night, I ordered all the parts listed on the new Wiki page to build the wireless controller for the motor and for the remote. I am wondering if anyone in the community has made a PCB for it and has gerber files that I can send to a PCB vendor. If not, I will simply use a protoboard as the Wiki says. Also, are there any STL files available for the motor controller enclosure? And the STL files for the remote are the latest ones on the Wiki?

Looking forward to receiving my parts and getting rid of the wires on my bike!

Will update the thread once I have the parts built!

Thank you!
Great - this post has photos of one of my wired remote boards - photos aren't great but might be useful to help you lay things out.

viewtopic.php?f=28&t=106346&start=1325#p1626311

If you go the wired route - I recommend putting the controller on the handlebars. I've just completed a 2nd build and this time put the controller on the bars - much better for being able to see what's going on. See pics I posted on the other thread:

viewtopic.php?f=28&t=79788&start=8400#p1628875

casainho   100 GW

100 GW
Posts: 5143
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by casainho » Mar 31 2021 11:59am

beemac wrote:
Mar 31 2021 11:56am
If you go the wired route - I recommend putting the controller on the handlebars. I've just completed a 2nd build and this time put the controller on the bars - much better for being able to see what's going on. See pics I posted on the other thread:

viewtopic.php?f=28&t=79788&start=8400#p1628875
I think this would be better:

Why don't you 3D print the wireless remote enclosure and use it? you would not use the coin battery and install the DC-DC converter near the TSDZ2 display connector.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

sidmodi   1 mW

1 mW
Posts: 14
Joined: Oct 28 2018 12:57am

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by sidmodi » Apr 01 2021 1:05am

casainho wrote:
Mar 31 2021 11:42am
sidmodi wrote:
Mar 31 2021 11:34am
Just last night, I ordered all the parts listed on the new Wiki page to build the wireless controller for the motor and for the remote. I am wondering if anyone in the community has made a PCB for it and has gerber files that I can send to a PCB vendor. If not, I will simply use a protoboard as the Wiki says. Also, are there any STL files available for the motor controller enclosure? And the STL files for the remote are the latest ones on the Wiki?
If you bought the parts listed on the wiki then is best to build the DIY version as the PCB version seems to use some different parts. No one did document the PCB version yet, you need to search on this thread.

Yes, the STL files are the last ones for the wireless remote but if you want you can try to go with the wired remote as will be much easy to build.

Yes, please share. If you take good photos from a clean build, they may be used on the documentation - would be your contribution.
I was hoping to make the wireless remote and make an almost completely wireless bike (except for the brake cable). I am curious about why you and beemac are both recommending a wired remote setup. Is it just because of the difficulty to build the system? Or is it because it is not quite ready to be tested? If it is just about the difficulty to build it, I don't really mind - I have access to a 3D printer so I can print the remote case as well as the box for the wireless motor controller. Here is the list of the parts that I ordered:

NRF52840-DONGLE x 2
TEC 2-4811WI
BSP296N
ITS4140N

beemac   100 W

100 W
Posts: 272
Joined: Dec 05 2020 11:08am
Location: Bristol, UK

Re: TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Post by beemac » Apr 01 2021 3:05am

sidmodi wrote:
Apr 01 2021 1:05am
casainho wrote:
Mar 31 2021 11:42am
sidmodi wrote:
Mar 31 2021 11:34am
Just last night, I ordered all the parts listed on the new Wiki page to build the wireless controller for the motor and for the remote. I am wondering if anyone in the community has made a PCB for it and has gerber files that I can send to a PCB vendor. If not, I will simply use a protoboard as the Wiki says. Also, are there any STL files available for the motor controller enclosure? And the STL files for the remote are the latest ones on the Wiki?
If you bought the parts listed on the wiki then is best to build the DIY version as the PCB version seems to use some different parts. No one did document the PCB version yet, you need to search on this thread.

Yes, the STL files are the last ones for the wireless remote but if you want you can try to go with the wired remote as will be much easy to build.

Yes, please share. If you take good photos from a clean build, they may be used on the documentation - would be your contribution.
I was hoping to make the wireless remote and make an almost completely wireless bike (except for the brake cable). I am curious about why you and beemac are both recommending a wired remote setup. Is it just because of the difficulty to build the system? Or is it because it is not quite ready to be tested? If it is just about the difficulty to build it, I don't really mind - I have access to a 3D printer so I can print the remote case as well as the box for the wireless motor controller. Here is the list of the parts that I ordered:

NRF52840-DONGLE x 2
TEC 2-4811WI
BSP296N
ITS4140N
I wasn't suggesting you go either route - only that if you went wired I recommend putting the box on the handlebar rather than near the motor. I haven't built or tested the wireless solution so not sure what it's like in real world use - any issues though should be fixable so if you want to go wireless you should be ok.

Post Reply