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

casainho said:
beemac said:
@casainho, @rananna - having a nightmare with this PR for some reason. I could not resolve a conflict I had in pins.c - despite my change just being to add 4 lines that weren't there before. So I just made a fresh branch - and added my changes to it by copying the changed files in from my original branch. That's what the current PR contains - and finally with no merge conflicts.

*but* I was reviewing the PR and it looks like it will back out some changes about ANT page 16 in main.c that I didn't make - not sure how that occurred.

I assume another PR was accepted in the short time between me pulling a fresh branch - and overwriting the files I'd changed...?

https://github.com/OpenSourceEBike/TSDZ2_wireless/pull/63/files
You need to improve as you "deleted" code that was working, like the code for brakes I did recently and I tested as working as is part of the latest release. And there are changes like to the SDC config file!! You need to review your PR, I did some notes on the PR, you should get notifications.

Hey - i'm doing my best - the previous post was to alert you to the fact that something unexpected happened. I'm not a professional developer and working in a distributed source code environment is new to me.

Changes to the SDK config file are needed to enable features in the NRF SDK i believe - I took them from rananna's remote codebase.

I done another PR - taking your comments into consideration. Hopefully i'm getting there...
 
beemac said:
Hey - i'm doing my best - the previous post was to alert you to the fact that something unexpected happened. I'm not a professional developer and working in a distributed source code environment is new to me.

Changes to the SDK config file are needed to enable features in the NRF SDK i believe - I took them from rananna's remote codebase.

I done another PR - taking your comments into consideration. Hopefully i'm getting there...
Ok, I understand but please also understand that the code was working and makes no sense to break it when adding the new feature. Seems this PR will take time, I just added feedback. I hope is possible for you to make a new commit for the the corrections.
 
casainho said:
beemac said:
Hey - i'm doing my best - the previous post was to alert you to the fact that something unexpected happened. I'm not a professional developer and working in a distributed source code environment is new to me.

Changes to the SDK config file are needed to enable features in the NRF SDK i believe - I took them from rananna's remote codebase.

I done another PR - taking your comments into consideration. Hopefully i'm getting there...
Ok, I understand but please also understand that the code was working and makes no sense to break it when adding the new feature. Seems this PR will take time, I just added feedback. I hope is possible for you to make a new commit for the the corrections.
Of course - and I really don't want to break things. I realise now I should have pulled the PR as soon as I noticed something amiss - however I also wanted to understand why it happened to learn - hence why I posted here to ask.

Anyway :) I want to get this PR successfully done as I've spent far too much time today with it when I could be doing something more productive like adding LED support to the controller! I don't see any more comments on the PR though?

https://github.com/OpenSourceEBike/TSDZ2_wireless/pull/64
 
Hi,

A question regarding the wireless remote controller.

We have built two of these following the instructions given and OTA flashed them with the 0.6.0 firmware. This all went as expected. However neither seems to make any sense when it is powered on. They do not behave as described in the user notes and do not connect to the TSDZ2 module. (The TSDZ2 module works OK when connected to the app, it just doesn't see the wireless remote.)

When I power on or reset the wireless remote controller the blue LED flashes slowly for 20 seconds followed by the red led flashing slowly for 15 seconds. I can't find any reference to this in the instructions. What does this mean?

I appreciate that the project is still under development and the documentation is probably not up to date.

Any pointers would be appreciated.

Thanks
Colin.
 
g4eml said:
Hi,

A question regarding the wireless remote controller.

We have built two of these following the instructions given and OTA flashed them with the 0.6.0 firmware. This all went as expected. However neither seems to make any sense when it is powered on. They do not behave as described in the user notes and do not connect to the TSDZ2 module. (The TSDZ2 module works OK when connected to the app, it just doesn't see the wireless remote.)

When I power on or reset the wireless remote controller the blue LED flashes slowly for 20 seconds followed by the red led flashing slowly for 15 seconds. I can't find any reference to this in the instructions. What does this mean?

I appreciate that the project is still under development and the documentation is probably not up to date.

Any pointers would be appreciated.

Thanks
Colin.
Please refer to the instructions located here:
https://opensourceebike.github.io/operation.html
As noted, the blue led indicates that you have placed the remote in configuration mode by an extra long (5 secs or more) press of the enter key.
Please exit this mode by pressing the key again for 5 seconds or longer.
The red flashing is the remote trying to find the motor.
If it times out after 15s then it did not pair with the motor. Are you sure the other board is connected and powered?
 
rananna said:
g4eml said:
Hi,

A question regarding the wireless remote controller.

We have built two of these following the instructions given and OTA flashed them with the 0.6.0 firmware. This all went as expected. However neither seems to make any sense when it is powered on. They do not behave as described in the user notes and do not connect to the TSDZ2 module. (The TSDZ2 module works OK when connected to the app, it just doesn't see the wireless remote.)

When I power on or reset the wireless remote controller the blue LED flashes slowly for 20 seconds followed by the red led flashing slowly for 15 seconds. I can't find any reference to this in the instructions. What does this mean?

I appreciate that the project is still under development and the documentation is probably not up to date.

Any pointers would be appreciated.

Thanks
Colin.
Please refer to the instructions located here:
https://opensourceebike.github.io/operation.html
As noted, the blue led indicates that you have placed the remote in configuration mode by an extra long (5 secs or more) press of the enter key.
Please exit this mode by pressing the key again for 5 seconds or longer.
The red flashing is the remote trying to find the motor.
If it times out after 15s then it did not pair with the motor. Are you sure the other board is connected and powered?
@g4eml, did it work?
 
I added pictures of build TSDZ2 wireless board: https://opensourceebike.github.io/build_tsdz2_board.html

 
casainho said:
I added pictures of build TSDZ2 wireless board: https://opensourceebike.github.io/build_tsdz2_board.html

If any users have pictures using the correct board and transistors, please pass them on for use in the documentation.
 
I have read the instructions many times! They are very confusing.
Nowhere does it mention the blue LED flashing for 20 seconds.

I tried pressing the enter key for 7 seconds. When I release it the blue led again flashes for 20 seconds followed by the red led for 10 seconds. It does this every time.

If I hold the enter key for a very long time (about 10 Seconds) the LED flashes blue 2 times then red once then green once then solid red. However even after this it still reverts to the same pattern on power cycle or reset.

So if your diagnosis is correct then it looks like it will not exit from configuration mode.

Is there a configuration setting that needs to be made on a fresh board? I would have thought that updating the firmware would have reset any settings but maybe something remains from a previous version.

Colin.


Colin.
 
casainho said:
mallesepp said:
casainho said:
mallesepp said:
I saw "Verfy OK" after installing the bootloader. The firmware update with nrf-Connect ran as I saw in the video. But if I start nrf-Connect now I can no longer see the dongles! Also, no LED lights up on me.
Let's focus on the remote only for now.

How are you powering the remote? Where are you connecting the power wires to the board?
CR2032 Plus to Pin2, Minus to Pin3 (View at front rightside). No other connected!

Did you cut the trace and solder the other?
YES
Can you please test again? With this new release, you have all the needed files here: https://github.com/OpenSourceEBike/TSDZ2_wireless/releases/tag/v0.6.0

And follow the instructions on: https://opensourceebike.github.io/

Flashed 0.60 on wireless remote. First reaction.
Red LED flashes a few times after I press the reset button.
 
g4eml said:
I have read the instructions many times! They are very confusing.
Would be great if you could give feedback so we can try improve.

I think the Remote operation page instructions are also confuse. I think that maybe they could list each feature and then the buttons and LED, like:

- if remote is not connected to the TSDZ2 wireless board, LED will continuous blink red

- any button click while motor is power off, LED will blink red

| Power on || long press power button || LED will blink yellow for about 8 seconds

| Power off || long press power button || LED will blink red for about 2 seconds

| Increase / decrease assist level || click up / down button || LED will blink green if motor is power on. Will double blink if there is no more asssist level to increase / decrease.
 
casainho said:
g4eml said:
I have read the instructions many times! They are very confusing.
Would be great if you could give feedback so we can try improve.

I think the Remote operation page instructions are also confuse. I think that maybe they could list each feature and then the buttons and LED, like:

- if remote is not connected to the TSDZ2 wireless board, LED will continuous blink red

- any button click while motor is power off, LED will blink red

| Power on || long press power button || LED will blink yellow for about 8 seconds

| Power off || long press power button || LED will blink red for about 2 seconds

| Increase / decrease assist level || click up / down button || LED will blink green if motor is power on. Will double blink if there is no more asssist level to increase / decrease.
Ok, I will merge the led signalling info with the button operation in the docs.
 
mallesepp said:
casainho said:
mallesepp said:
casainho said:
Let's focus on the remote only for now.

How are you powering the remote? Where are you connecting the power wires to the board?
CR2032 Plus to Pin2, Minus to Pin3 (View at front rightside). No other connected!

Did you cut the trace and solder the other?
YES
Can you please test again? With this new release, you have all the needed files here: https://github.com/OpenSourceEBike/TSDZ2_wireless/releases/tag/v0.6.0

And follow the instructions on: https://opensourceebike.github.io/

Flashed 0.60 on wireless remote. First reaction.
Red LED flashes a few times after I press the reset button.
 
g4eml said:
I have read the instructions many times! They are very confusing.
Nowhere does it mention the blue LED flashing for 20 seconds.

I tried pressing the enter key for 7 seconds. When I release it the blue led again flashes for 20 seconds followed by the red led for 10 seconds. It does this every time.

If I hold the enter key for a very long time (about 10 Seconds) the LED flashes blue 2 times then red once then green once then solid red. However even after this it still reverts to the same pattern on power cycle or reset.

So if your diagnosis is correct then it looks like it will not exit from configuration mode.

Is there a configuration setting that needs to be made on a fresh board? I would have thought that updating the firmware would have reset any settings but maybe something remains from a previous version.

Colin.


Colin.
Maybe an incorrect firmware
version was put in the build.
I will test with that version today to see if I see similar issues and get back to you.
 
rananna said:
Ok, I will merge the led signalling info with the button operation in the docs.
As a user, I had to read that page when I built my remote and wanted to test and after use it. First I wanted to understand if the remote is alive and working and just after I wanted to test / use the most important features in this order: turn on/off the motor, change assist level, test brake sensors, use walk assist and turn on/off lights -- for this I need to know what are the buttons combinations and the feedback from the LED. I think this should be the logic of the structure of that page.
 
casainho said:
rananna said:
Ok, I will merge the led signalling info with the button operation in the docs.
As a user, I had to read that page when I built my remote and wanted to test and after use it. First I wanted to understand if the remote is alive and working and just after I wanted to test / use the most important features in this order: turn on/off the motor, change assist level, test brake sensors, use walk assist and turn on/off lights -- for this I need to know what are the buttons combinations and the feedback from the LED. I think this should be the logic of the structure of that page.
Thanks! I will rewrite the instructions this weekend with that in mind.
 
casainho said:
I added pictures of build TSDZ2 wireless board: https://opensourceebike.github.io/build_tsdz2_board.html


Hello Casainho, sorry, I don't know my way around anymore? Why are there photos of the black dongle version in the manual? I thought the blue dongle is only being used?
 
mallesepp said:
casainho said:
I added pictures of build TSDZ2 wireless board: https://opensourceebike.github.io/build_tsdz2_board.html


Hello Casainho, sorry, I don't know my way around anymore? Why are there photos of the black dongle version in the manual? I thought the blue dongle is only being used?
Because no one shared good photos of that board build with the blue dongle.
 
rananna said:
g4eml said:
I have read the instructions many times! They are very confusing.
Nowhere does it mention the blue LED flashing for 20 seconds.

I tried pressing the enter key for 7 seconds. When I release it the blue led again flashes for 20 seconds followed by the red led for 10 seconds. It does this every time.

If I hold the enter key for a very long time (about 10 Seconds) the LED flashes blue 2 times then red once then green once then solid red. However even after this it still reverts to the same pattern on power cycle or reset.

So if your diagnosis is correct then it looks like it will not exit from configuration mode.

Is there a configuration setting that needs to be made on a fresh board? I would have thought that updating the firmware would have reset any settings but maybe something remains from a previous version.

Colin.


Colin.
Maybe an incorrect firmware
version was put in the build.
I will test with that version today to see if I see similar issues and get back to you.
Well, @g4eml, you will be pleased to know that you set everything up correctly!
I downloaded and installed the OTA wireless remote 0.6.0 update and I am seeing exactly the same strange behavior as you saw!
So, somehow we put the wrong firmware on the 0.6.0 release.
I made a number of changes to the remote around the time @casinho released 0.60, and clearly a bug crept in the release version.
The good news is that everything is still working fine in the development version.
@casainho, I will be giving you a pull request soon for a new release of the remote firmware.
However, I want to thoroughly test it this weekend to be sure everything works properly before we release it for general use.
I will also include the simplified and updated user instructions with the PR.

edit - BTW what I think is happening is that you have inadvertently turned on the support for garmin bike computers, which is why the red led is flashing. if you have a bike computer, simply turn it on and it will probably stop the red led.
 
OK.

Thanks for investigating this, I will wait until the updated firmware is available.

Thanks
Colin.
 
rananna said:
@casainho, I will be giving you a pull request soon for a new release of the remote firmware.
However, I want to thoroughly test it this weekend to be sure everything works properly before we release it for general use.
I will also include the simplified and updated user instructions with the PR.
Testing the main features like turn on/off the motor, brakes and assist level is quick - why not release quick and react quick to any issue and quick release again? g4eml seems available to test, I am also.

And there is the issue Remote unresponsive #65 that is urgent to solve: https://github.com/OpenSourceEBike/TSDZ2_wireless/issues/65
 
casainho said:
rananna said:
@casainho, I will be giving you a pull request soon for a new release of the remote firmware.
However, I want to thoroughly test it this weekend to be sure everything works properly before we release it for general use.
I will also include the simplified and updated user instructions with the PR.
Testing the main features like turn on/off the motor, brakes and assist level is quick - why not release quick and react quick to any issue and quick release again? g4eml seems available to test, I am also.

And there is the issue Remote unresponsive #65 that is urgent to solve: https://github.com/OpenSourceEBike/TSDZ2_wireless/issues/65
OK, but we don't want to introduce more bugs by rushing out a fix before thoroughly testing.
I will do my best to get something to look at today.
 
For @g4eml and others,
@rananna did a commit to solve the bug of the remote, here is the new version: TSDZ2_wireless_remote_ota_update-v0.6.1.zip

https://github.com/OpenSourceEBike/TSDZ2_wireless/releases/tag/v0.6.0
 
As many of you may know, the ANT LEV standard supports a number of data fields that the current generation of bike computers do not support 'out of the box' such as battery voltage, light control, battery range, motor temperature and instantaneous power consumption. It would be nice to be able to access this data from the motor controller and display it on the bike computer

Fortunately Garmin offers the capability to program what are called CONNECTIQ apps for their line of fitness devices including bike computers and watches.

I found a really good opensource (hence customizable) ANT LEV CONNECT IQ data field for garmin bike computers here:
https://github.com/maca88/E-Bike-Edge-MultiField
I have compiled it and ran it on my edge computer after making the necessary mods in our firmware.
here is a screenshot:

This is a great data companion field for the bike computer.
@casainho, could you please put a fork of this into the main repo?
I have compiled it with Eclipse for windows, and it works fine
We could perhaps develop a more sophisticated CONNECTIQ app in the future to display other info including graphs!
Unfortunately, although Garmin claims to support Ubuntu, I could not get the toolchain working. Maybe you will have more luck.
 

Attachments

  • IMG_20210205_085944.jpg
    IMG_20210205_085944.jpg
    160.7 KB · Views: 222
rananna said:
As many of you may know, the ANT LEV standard supports a number of data fields that the current generation of bike computers do not support 'out of the box' such as battery voltage, light control, battery range, motor temperature and instantaneous power consumption. It would be nice to be able to access this data from the motor controller and display it on the bike computer

Fortunately Garmin offers the capability to program what are called CONNECTIQ apps for their line of fitness devices including bike computers and watches.

I found a really good opensource (hence customizable) ANT LEV CONNECT IQ data field for garmin bike computers here:
https://github.com/maca88/E-Bike-Edge-MultiField
I have compiled it and ran it on my edge computer after making the necessary mods in our firmware.
here is a screenshot:

This is a great data companion field for the bike computer.
@casainho, could you please put a fork of this into the main repo?
I have compiled it with Eclipse for windows, and it works fine
We could perhaps develop a more sophisticated CONNECTIQ app in the future to display other info including graphs!
Unfortunately, although Garmin claims to support Ubuntu, I could not get the toolchain working. Maybe you will have more luck.
We know that ANT+ LEV does not send much of TSDZ2 specific motor data that we need, like motor power, motor current, pedal human power, etc BUT the Garmin also supports Bluetooth and we already send all the data using Bluetooth to the mobile app - and here is also a simple OpenSource code for a Garmin CIQ data field that uses Bluetooth, so, the best bet is to use Bluetooth as all the tools are available, it just needs some work. Still we can try to implement all data from ANT+ LEV from our side.

Here the source code for a simple Garmin data field that writes to a Bluetooth characteristic: https://github.com/fabiobaltieri/ciq-nrf-blinky

See how simple it is: bleDevice.setLed(1); and bleDevice.setLed(0);

We need the inverse, to read a characteristic but this source code seems a very good starting point!!
 
Back
Top