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

casainho said:
I agree with the idea of keep supporting the 850C/860C and SW102 displays, connected or not to the wireless board. The thing is that it makes the project more complex to achieve on a first version and put more pressure on me, more stress and I hate it, so, I will not do it in a first step.

yes, no problem. i just wanted this to be added to the "roadmap" so it is kept in mind when designing and deciding stuff (like reserving the 2nd UART for this).

my plan is now:
1. finish bluetooth discovery/connection stuff and connection status display (currently WIP)
2. read and display data from the BT speed and cadence profile and battery profile
3. as soon as you have added the JSON configuration interface to the dongle, add it to the app so configuration is working.

if you have questions about JSON and my configuration structure, let me know.

so now, less talk, more code :)
 
Hello, I am trying to fully understand the vision of this project by reading the thread. Please correct me if I'm wrong, is the goal to set up a system (hardware + software) that can connect wirelessly with the motor to display and set the parameters without the need of the supported display (860/850, SW102)?

And the system can be a mobile phone or smart watch app, correct?
 
thineight said:
Hello, I am trying to fully understand the vision of this project by reading the thread. Please correct me if I'm wrong, is the goal to set up a system (hardware + software) that can connect wirelessly with the motor to display and set the parameters without the need of the supported display (860/850, SW102)?

And the system can be a mobile phone or smart watch app, correct?

yes.
1. there will be a dongle (small box) that can be attached to the motor instead of the display. the dongle has a bluetooth interface to configure all the motor settings currently supported by the flexible open source firmware 1.x.x. which will be used by the android/ios app. the dongle will also implement some standard bluetooth (cycling speed, cadence, power, battery status) and ANT+ (LEV) profiles so it can be used with already existing fitness trackers, smartphone fitness apps and bike computers.
2. the android/ios app will also get a status display and options to switch the assist level so it becomes similar to the 860c display feature-wise.
3. at a later point, it will be optionally possible to connect a display to the dongle for value displaying / assist level switching.
 
raw said:
thineight said:
Hello, I am trying to fully understand the vision of this project by reading the thread. Please correct me if I'm wrong, is the goal to set up a system (hardware + software) that can connect wirelessly with the motor to display and set the parameters without the need of the supported display (860/850, SW102)?

And the system can be a mobile phone or smart watch app, correct?

yes.
1. there will be a dongle (small box) that can be attached to the motor instead of the display. the dongle has a bluetooth interface to configure all the motor settings currently supported by the flexible open source firmware 1.x.x. which will be used by the android/ios app. the dongle will also implement some standard bluetooth (cycling speed, cadence, power, battery status) and ANT+ (LEV) profiles so it can be used with already existing fitness trackers, smartphone fitness apps and bike computers.
2. the android/ios app will also get a status display and options to switch the assist level so it becomes similar to the 860c display feature-wise.
3. at a later point, it will be optionally possible to connect a display to the dongle for value displaying / assist level switching.

that makes looking forward to it!
 
raw said:
thineight said:
Hello, I am trying to fully understand the vision of this project by reading the thread. Please correct me if I'm wrong, is the goal to set up a system (hardware + software) that can connect wirelessly with the motor to display and set the parameters without the need of the supported display (860/850, SW102)?

And the system can be a mobile phone or smart watch app, correct?

yes.
1. there will be a dongle (small box) that can be attached to the motor instead of the display. the dongle has a bluetooth interface to configure all the motor settings currently supported by the flexible open source firmware 1.x.x. which will be used by the android/ios app. the dongle will also implement some standard bluetooth (cycling speed, cadence, power, battery status) and ANT+ (LEV) profiles so it can be used with already existing fitness trackers, smartphone fitness apps and bike computers.
2. the android/ios app will also get a status display and options to switch the assist level so it becomes similar to the 860c display feature-wise.
3. at a later point, it will be optionally possible to connect a display to the dongle for value displaying / assist level switching.

Sounds really interesting, in the way not to have the need for a display and obtain integration with our existing devices.
A smartphone or a Garmin watch/cycle computer can be used, in case, instead.
My humble opinion is to keep the physical (wired to the motor) 3 or 4 button pad, in order to do the basic things like level assist change, switching on, etc even without the display.
In such way we won't have the hassle of another battery to take care of...

Is this something already frozen or still to be decided?
 
thineight said:
Sounds really interesting, in the way not to have the need for a display and obtain integration with our existing devices.
A smartphone or a Garmin watch/cycle computer can be used, in case, instead.
My humble opinion is to keep the physical (wired to the motor) 3 or 4 button pad, in order to do the basic things like level assist change, switching on, etc even without the display.
In such way we won't have the hassle of another battery to take care of...

Is this something already frozen or still to be decided?
There are a few different brands of cycling computers that will work, like Wahoo, Garmin and others.

There are wireless remote ebike buttons from brands like Garmin and the battery should work for at least 1 year - also the battery state of charge can be seen by the user.
Going wireless means a more robust system (no fail and short circuits in the case of a fall) and much clean and easier installation.

There is nothing frozen but what is working now / was tested:
1. wireless board runs ok powered from 60V, using the power board
2. Nordik SDK sample firmware that implements Bluetooth and ANT+ heart rate sensor profiles
 
casainho said:
thineight said:
Sounds really interesting, in the way not to have the need for a display and obtain integration with our existing devices.
A smartphone or a Garmin watch/cycle computer can be used, in case, instead.
My humble opinion is to keep the physical (wired to the motor) 3 or 4 button pad, in order to do the basic things like level assist change, switching on, etc even without the display.
In such way we won't have the hassle of another battery to take care of...

Is this something already frozen or still to be decided?
There are a few different brands of cycling computers that will work, like Wahoo, Garmin and others.

There are wireless remote ebike buttons from brands like Garmin and the battery should work for at least 1 year - also the battery state of charge can be seen by the user.
Going wireless means a more robust system (no fail and short circuits in the case of a fall) and much clean and easier installation.

There is nothing frozen but what is working now / was tested:
1. wireless board runs ok powered from 60V, using the power board
2. Nordik SDK sample firmware that implements Bluetooth and ANT+ heart rate sensor profiles

Casainho,

I hope it works with a 63V battery.

I invested a lot in 2 battery and 2 charger with 63V (15S).

Thanks

Thanks
 
AZUR said:
Casainho,

I hope it works with a 63V battery.

I invested a lot in 2 battery and 2 charger with 63V (15S).

Thanks

Thanks

sure, as long as you get a proper step-down converter that is able to handle 63v as input and output 2 - 5,5v.
 
casainho said:
There are wireless remote ebike buttons from brands like Garmin and the battery should work for at least 1 year - also the battery state of charge can be seen by the user.
Going wireless means a more robust system (no fail and short circuits in the case of a fall) and much clean and easier installation.

The basic idea behind was to have a robust wired inexpensive keypad, that perhaps many of us have already from vlcd5 or other displays. In my experience wired systems are always more robust than wireless ones. Moreover I don't think the small cable is much more exposed than the others running along the downtube.
Maybe the wireless keypad can be the smartphone or the Garmin device, if the user doesn't want to install the wired keypad?
Just my opinion of course, you guys do a PROS-CONS evaluation to select the most promising method.
 
Been looking for a side project and this looks like something I can get my teeth into. Will need a while to get to grips with the nrf sdk, nrf52840 chipset and ANT+ LEV but happy to help out if I can be of use. Also happy to have a play around with flutter if you need a hand or a tester :)
 
bobreece20 said:
Been looking for a side project and this looks like something I can get my teeth into. Will need a while to get to grips with the nrf sdk, nrf52840 chipset and ANT+ LEV but happy to help out if I can be of use. Also happy to have a play around with flutter if you need a hand or a tester :)
One thing you can look is at nrf52840, on the ANT+ HRM TX example and understand how ANT+ HRM profile is implemented and them figure out how we can implement the LEV profile - I want to do that but having other developer doing the same would be great because I will have difficulties for sure.

For now I have the debug working on Code Studio but I am starting the OpenOCD manually - I want to have everything done inside this IDE and then I will create a wiki page to document the needed configuration for flash and debug the firmware:

image.png
 
@usernameescapesme wrote good notes on the project pages, the hardware is fully documented now:

https://github.com/OpenSource-EBike-firmware/TSDZ2_wireless

image.png



And I was able to build, flash and debug using Code Studio and I started the documentation for it, I will improve it later, for now here it is: https://github.com/OpenSource-EBike-firmware/TSDZ2_wireless/blob/master/documentation/development-flash_and_debug_firmware.md

image.png
 
The documentation for Configure Code Studio IDE for firmware development, flash and debug is now final - if you are on Linux, it is very easy and fast to build, flash and debug the firmware for the wireless board with NRF52840!! - I wish I did this for the TSDZ2 motor controller STM8S105 and the displays 850C/860C STM32F103 and SW102 NRF51822.

And today I found I could install an extension to preview the markdown documentation files while editing on Code Studio, this is great and makes me much more productive to both develop and write the documentation for github:

image.png
 
Nice docs! Might want to add a quick note about adding yourself to the linux dialout group and rebooting as I assume that is required to talk to the STLink (Haven't tried that myself yet, still experimenting with the usb bootloader which does require the dialout group)
 
bobreece20 said:
Nice docs! Might want to add a quick note about adding yourself to the linux dialout group and rebooting as I assume that is required to talk to the STLink (Haven't tried that myself yet, still experimenting with the usb bootloader which does require the dialout group)
Well, when you follow the process and find issues, please submit a pull request to the documentation. I hope it will be easy for you to get it working.
 
I started to commit the very first code for ANT+ LEV and it is not hard. I hope to have it working on next weekend, in a state that my Garmin Edge will detect the board and will connect to it (the values sent from the board to the Edge will be hard coded).
 
Look forward to being able to use the TSDZ2 in this manner, sorry I'm not able to code like you guys, but its going to be pretty cool if you can get the Garmin to work with the motor in the way planned.

Thanks for your time.
 
ANT+ LEV is working - my GPS cycling computer now detects and connects to the TSDZ2 wireless board!!

Very first testing firmware that works: the wireless board nRF52840 is implementing the ANT+ LEV Ebike profile and the Garmin Edge cycling computer is detecting and connection to the EBike wireless board. Also, when starting an EBike activity, there is available a screen specifically to see EBike data and, is possible to select the assist level.

[youtube]YYaG6Zjt1xo[/youtube]

I did follow the Nordic structure for other example codes of ANT+ sensors like the HR sensor. Next step is to add merge this code with the 860C and SW102

And here is the a break point while debugging:

Screenshot-from-2020-07-05-03-13-54.png
 
You are far too quick for me, I'm still messing about with examples xD. My phone appears to support ANT+ but does anyone know any app that is compatible with ANT+ LEV profile (or an app to see raw ANT packets?) or will I need to hack one together? Want to test out the code but it's difficult when you don't have anything to test comms with. Going to have a play with the code to see if I can't make it put out the same information via Bluetooth along with ANT+.

On a side note I managed to flash the hex file fine on the dongle using nRFConnect over USB but it didn't like the combined softdevice hex for some reason so had to flash the two separately.
 
bobreece20 said:
You are far too quick for me, I'm still messing about with examples xD. My phone appears to support ANT+ but does anyone know any app that is compatible with ANT+ LEV profile (or an app to see raw ANT packets?) or will I need to hack one together? Want to test out the code but it's difficult when you don't have anything to test comms with. Going to have a play with the code to see if I can't make it put out the same information via Bluetooth along with ANT+.

On a side note I managed to flash the hex file fine on the dongle using nRFConnect over USB but it didn't like the combined softdevice hex for some reason so had to flash the two separately.
I shared here before a python tool that could reads and show ANT+, but for PC with ANT USB stick.

But, on current state of firmware, you don't need anymore to develop much on ANT+, as it is mostly done - what is missing is receiving the page 16 with the data from the display and change the vars like assist level.
I did follow the example code from Nordic and created the LEV profile. I also did follow the LEV profile documentation from ANT. What is seen on the video, was the only and very first code!! So it just worked.

Go with the STLinkV2 for flash and debug, it is very easy to solder and configure the code studio.
 
casainho said:
What is seen on the video, was the only and very first code!!

It looks great and the Garmin seems really flexible in displaying the data you want. Just out of curiosity, is it possible to display actual speed, rather than GPS calculated speed, in eBike mode?

casainho said:
So it just worked.

It's nice to have good tools at your disposal, but don't be too modest! Hope the stress levels stay down and the satisfaction rides high.
 
casainho said:
ANT+ LEV is working - my GPS cycling computer now detects and connects to the TSDZ2 wireless board!!

Very first testing firmware that works: the wireless board nRF52840 is implementing the ANT+ LEV Ebike profile and the Garmin Edge cycling computer is detecting and connection to the EBike wireless board. Also, when starting an EBike activity, there is available a screen specifically to see EBike data and, is possible to select the assist level.

Hello Casainho,
which connect-iq App from Garmin ist installed on your Garmin Device? Or is this programmed by you?
I can't wait to control the TSDZ2 with my Garmin Edge 1000! You are the greatest! Thanks in advance!
 
Headless said:
casainho said:
What is seen on the video, was the only and very first code!!

It looks great and the Garmin seems really flexible in displaying the data you want. Just out of curiosity, is it possible to display actual speed, rather than GPS calculated speed, in eBike mode?
Yes, I see the ebike speed and not the GPS speed while ebike is connected. But I hope is possible to select instead the GPS speed, that way I would not need to install the TSDZ2, so, even more simple and robust ebike.

mallesepp said:
which connect-iq App from Garmin ist installed on your Garmin Device? Or is this programmed by you?
I can't wait to control the TSDZ2 with my Garmin Edge 1000! You are the greatest! Thanks in advance!
What you see on the video is Garmin only because it supports the standard wireless ANT+ LEV. Other displays the same, as long they support that standard.

But a developed Garmin app developed by us could mean the device to fully configure the TSDZ2 and see all the data.
 
Very nice work @casainho !!

casainho said:
But a developed Garmin app developed by us could mean the device to fully configure the TSDZ2 and see all the data.

I plan to buy a Garmin watch soon. And I'm interested in developing a Garmin app. Do you already know if we could have full control on the TSDZ2 (seeing data and configure it) directly from a Garmin device (watch or GPS display like yours)?
I'm not really aware of the capability of ANT + protocol and Garmin Connect IQ SDK.
 
Benoit said:
Very nice work @casainho !!

casainho said:
But a developed Garmin app developed by us could mean the device to fully configure the TSDZ2 and see all the data.

I plan to buy a Garmin watch soon. And I'm interested in developing a Garmin app. Do you already know if we could have full control on the TSDZ2 (seeing data and configure it) directly from a Garmin device (watch or GPS display like yours)?
I'm not really aware of the capability of ANT + protocol and Garmin Connect IQ SDK.
You need to be careful when decide the watch to buy because the most cheap ones like Forerunner 45 (the same for most cheap GPS like Edge 130 plus), do not support custom apps but only custom data fields - and seems a guy developed a data field to communicate with ebike by ANT+ and that works at least on Edge 130 plus. So, buy a watch that supports the apps and also have the latest connect IQ version.

For a specific version for TSDZ2, I would use the BLE, and UART over BLE that I guess is for sure possible on CIQ.
 
Back
Top