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

casainho said:
Things like, the assist level should represent the real assist level on the motor controller, and, on the remote, currently, even if the motor controller is off, the assist level keep changing on the wireless board and I see it changing on the Edge.
there are two options as I see it:

OPTION1:
Motor off: Remote display a brief red flash when pressing assist. No commands to change assist are sent to the motor when it is off.
Motor on: Remote displays a brief green flash when pressing assist. Commands are sent to the motor.

OPTION2: (what we have now)
Motor off: Remote display a brief red flash when pressing assist. Commands to change assist are sent to the motor when it is off.
Motor on: Remote displays a brief green flash when pressing assist. Commands are sent to the motor.
Option 2 allows the motor to start up with a desired assist level when the motor is turned on.

Option1 is probably the simpler option, the user only changes assist when the motor is on. However, maybe the RED flash is unnecessary if no assist commands are being sent. Maybe only flash green when motor is on for OPTION 1?
What do you think?

casainho said:
There is a delay to see the assist level value on the Edge and on mobile, which is real but still not assist level button pressed should miss, which seems to me it is happening.
As we discussed previously, although the assist level change is immediately acted upon by the motor, ANT polling from the motor leads to some delay send the new assist level to ANT LEV displays like the garmin edge. (The remote is also acting like a ANT LEV display without the display) I have not observed missing commands to the motor, I will see if I can reproduce the problem
casainho said:
Can be hard to implement but I think the remote could have a queue of the buttons pressed and store like the last 5 buttons presses and ignore after 5 buttons presses - the queue would need to be a bit more smart like if user press up and then down and then up and up, the ones down and up would be removed. This queue would need to make sure it send one assist level change and have a ok from the other side. This can be complex... but at least the idea is to let user make very quick clicks and never miss anyone.
let me confirm that we are indeed missing commands first. If true perhaps a solution like this will be needed.

casainho said:
I think the colors could be red for when no assist level is ready and green when the assist level is ready and changed. I like the blink on the limits. I think the blink is to short for assist level change, maybe could be twice the time, even because it takes a bit of time for assist level change / feel the motor.
I will make the change
casainho said:
I think the focus for the remote should be only to power on/off the motor, change the assist level and change display page. Things like battery SOC are nice but a bit confuse to me in the reality. And I did not had time to understand the blink of long press other then turn on / off the motor.
The optional features of the remote are just that, optional.
I think some users may thank us for the ability to see the SOC, assist level etc.
As long as the user does not see confusing information in normal use, it should be fine toi keep the SOC.
For example, I could remove the SOC display during turn on/off of the motor and keep it for only the ENTER button click.


casainho said:
I tried to change the Edge page but did not worked, I guess I need to read more carefully the instructions of the remote to see how to enable it.
long press PLUS- page up, long press MINUS- PAGE DOWN

casainho said:
I added to the code a timeout to turn off the remote when there are no ANT communications for 30 seconds. Strange that when I debug it takes about the 30 seconds but with power on the board and not debugging, it takes much more time...
Careful about this - I have code to restart a search if ANT communication to the motor or EDGE display is lost in order to ensure that the motor reconnects quickly if communication is somehow temporarily lost. This could be a safety issue if you turn off ANT and it does not reconnect.
I will look at what you implemented.
 
rananna said:
casainho said:
Things like, the assist level should represent the real assist level on the motor controller, and, on the remote, currently, even if the motor controller is off, the assist level keep changing on the wireless board and I see it changing on the Edge.
there are two options as I see it:

OPTION1:
Motor off: Remote display a brief red flash when pressing assist. No commands to change assist are sent to the motor when it is off.
Motor on: Remote displays a brief green flash when pressing assist. Commands are sent to the motor.

OPTION2: (what we have now)
Motor off: Remote display a brief red flash when pressing assist. Commands to change assist are sent to the motor when it is off.
Motor on: Remote displays a brief green flash when pressing assist. Commands are sent to the motor.
Option 2 allows the motor to start up with a desired assist level when the motor is turned on.

Option1 is probably the simpler option, the user only changes assist when the motor is on. However, maybe the RED flash is unnecessary if no assist commands are being sent. Maybe only flash green when motor is on for OPTION 1?
What do you think?
Yes, assist level is for the motor and so it must be working to change it. So option 1.

I think that when pressing a button we should have a signal, meaning the remote is currently working. So we have 3 buttons for:
- power for long press to turn on
- up or down to change assist level

I think when user click this buttons and motor is off, both should blink red, meaning motor is off. After motor is on, changing assist level can blink instead to green when the assist level will change up or down.
Maybe this logic could be applied to brakes also, red light for motor off and green for when motor on.
Or should we change for: red for motor on and blue for motor off? not green when motor is off...

I also think the buttons should be divided for the most important features:
- up and down for assist level
- power for turn motor on /off
- enter for display change page

- up and down long press may be used as for displays, lights and walk assist
- power click maybe to see battery SOC
- enter long press for display change page backwards or instead other function like the virtual throttle

The remote specific configurations should be hard to enter, so they are not entered by mistake on regular usage. Maybe enable the various configurations while no ANT connections, so, every time the wireless board is turned off. Or maybe just is very long press like 10 seconds or more - anyway, configurations should be almost never changed anyway, right?

This is my current thinking after my limited real usage of a ride with 2 hours.
 
casainho said:
I am very happy and now much more motivated as I am using it :)

I will keep testing the new changes, like the firmware motor controller.

Nice :thumb: - I hope to go out tomorrow, have been missing my ebike whilst i've been debugging. Need to make a 2nd board!

I had a quick ride up and down the street today testing the fw with my changes - and all seems good. I've not timed it but it seems the time between motor on/yellow and going green seems longer.. Remembering the trace there's no reason for a comms point of view for this - unless the delay is waiting for something else to settle down I think we can reduce it -what do you think?

Speed data shown on app seems to update more smoothly too which is good.

I also tested comms at 57600 just for kicks - seems fine on my test setup - so if we need more processing time for other stuff there seems to be scope to increase baud rate...
 
beemac said:
casainho said:
I am very happy and now much more motivated as I am using it :)

I will keep testing the new changes, like the firmware motor controller.

Nice :thumb: - I hope to go out tomorrow, have been missing my ebike whilst i've been debugging. Need to make a 2nd board!

I had a quick ride up and down the street today testing the fw with my changes - and all seems good. I've not timed it but it seems the time between motor on/yellow and going green seems longer.. Remembering the trace there's no reason for a comms point of view for this - unless the delay is waiting for something else to settle down I think we can reduce it -what do you think?

Speed data shown on app seems to update more smoothly too which is good.

I also tested comms at 57600 just for kicks - seems fine on my test setup - so if we need more processing time for other stuff there seems to be scope to increase baud rate...
There is a delay of 6 seconds on motor controller, see the adc.c file.

For now I think we can keep the firmware as it is now, maybe release v1.1.1 as this was a bug solve. This way will keep working on the displays.
 
casainho said:
There is a delay of 6 seconds on motor controller, see the adc.c file.

For now I think we can keep the firmware as it is now, maybe release v1.1.1 as this was a bug solve. This way will keep working on the displays.

Have you tried the fw with my change? It might just be because I'm expecting it not to connect - like a watched kettle never boils - but it seems to take longer now.. even before the delay seemed like a long time when you come out of a shop or similar and turn on - especially if you forget to put the pedals in the correct position and have to reboot...

I will try to help with the wireless code - but it's less my cup of tea than the 8bit fun i've been having with the stm8. :)
 
I found a very good deal for the original Garmin Turbo Levo Specialized eBike Remote Control. If they keep this price, I would like to try it, as there is almost no price difference. I remember that the whole project started around Garmin and compatibility with Garmin accessories. However with all the protocol customization that you implemented on the wireless remote, I am not sure if the original remote can be still used?
 
plpetrov said:
I found a very good deal for the original Garmin Turbo Levo Specialized eBike Remote Control. If they keep this price, I would like to try it, as there is almost no price difference. I remember that the whole project started around Garmin and compatibility with Garmin accessories. However with all the protocol customization that you implemented on the wireless remote, I am not sure if the original remote can be still used?
If this remote is the garmin one (https://www.bikeinn.com/bike/garmin-turbo-levo-specialized-ebike-remote-control/137583713/p) or another that is using the ANT LEV standard it will work with the motor controller.
 
rananna said:
plpetrov said:
I found a very good deal for the original Garmin Turbo Levo Specialized eBike Remote Control. If they keep this price, I would like to try it, as there is almost no price difference. I remember that the whole project started around Garmin and compatibility with Garmin accessories. However with all the protocol customization that you implemented on the wireless remote, I am not sure if the original remote can be still used?
If this remote is the garmin one (https://www.bikeinn.com/bike/garmin-turbo-levo-specialized-ebike-remote-control/137583713/p) or another that is using the ANT LEV standard it will work with the motor controller.
This is the same website I found earlier today. What will be the buttons assignment? The same as the one you are implementing or different?
 
plpetrov said:
rananna said:
plpetrov said:
I found a very good deal for the original Garmin Turbo Levo Specialized eBike Remote Control. If they keep this price, I would like to try it, as there is almost no price difference. I remember that the whole project started around Garmin and compatibility with Garmin accessories. However with all the protocol customization that you implemented on the wireless remote, I am not sure if the original remote can be still used?
If this remote is the garmin one (https://www.bikeinn.com/bike/garmin-turbo-levo-specialized-ebike-remote-control/137583713/p) or another that is using the ANT LEV standard it will work with the motor controller.
This is the same website I found earlier today. What will be the buttons assignment? The same as the one you are implementing or different?
The remote we are designing is 100% compatible with the garmin remote.
The garmin remote allows for assist level changes up and down, and page changes on a garmin edge.
We implement the same capability.
Of course, the opensource remote has additional features like ant configuration id options, power control of the motor, battery soc display, device firmware updating, and enhanced power saving modes that are not available on the garmin remote.
However, the garmin remote is perfectly adequate for basic assist control and changing pages on a garmin edge bike computer.
 
beemac said:
rananna said:
Beli said:
mallesepp said:
I have problems flashing the bootloader under Windows. Can you please make the description for a layperson! Thanks in advance.
I just went through that.

In short:
- You need ST-Link stick wired to the nRF, connecting stick to USB (Windows drivers needed for ST-Link)
- Download Openocd for Windows and TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex
- Run Openocd: openocd.exe -f stlink.cfg -f nrf52.cfg
- Open a second command shell and run: telnet localhost 4444
- At telnet: program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify
First draft Instructions are located here:
https://opensourceebike.github.io/build_tsdz2_board.html
Let me know if the instructions work for you.

Windows doesn't have telnet client installed by default - appending -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" does it all in one line and means you don't need to install it.

e.g. openocd.exe -f stlink.cfg -f nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Thank you, that worked! 2 pieces of NRF52840-Dongle have the new bootloader. Now I will go on.
 
mallesepp said:
beemac said:
rananna said:
Beli said:
I just went through that.

In short:
- You need ST-Link stick wired to the nRF, connecting stick to USB (Windows drivers needed for ST-Link)
- Download Openocd for Windows and TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex
- Run Openocd: openocd.exe -f stlink.cfg -f nrf52.cfg
- Open a second command shell and run: telnet localhost 4444
- At telnet: program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify
First draft Instructions are located here:
https://opensourceebike.github.io/build_tsdz2_board.html
Let me know if the instructions work for you.

Windows doesn't have telnet client installed by default - appending -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" does it all in one line and means you don't need to install it.

e.g. openocd.exe -f stlink.cfg -f nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Thank you, that worked! 2 pieces of NRF52840-Dongle have the new bootloader. Now I will go on.
Great!! Instructions for remote must be updated as you need to cut a small trace and solder other
 
casainho said:
mallesepp said:
beemac said:
rananna said:
First draft Instructions are located here:
https://opensourceebike.github.io/build_tsdz2_board.html
Let me know if the instructions work for you.

Windows doesn't have telnet client installed by default - appending -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" does it all in one line and means you don't need to install it.

e.g. openocd.exe -f stlink.cfg -f nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Thank you, that worked! 2 pieces of NRF52840-Dongle have the new bootloader. Now I will go on.
Great!! Instructions for remote must be updated as you need to cut a small trace and solder other
I forgot to add this to the simplified instructions located at
https://opensourceebike.github.io
I will update ASAP.
In the meantime as @casainho said do this:
https://github.com/OpenSourceEBike/TSDZ2_wireless/blob/master/EBike_wireless_remote/documentation/external_power.png
 
casainho said:
[
The remote specific configurations should be hard to enter, so they are not entered by mistake on regular usage. Maybe enable the various configurations while no ANT connections, so, every time the wireless board is turned off. Or maybe just is very long press like 10 seconds or more - anyway, configurations should be almost never changed anyway, right?

You are right, the configuration options are seldom set and should never interfere or confuse normal operation.
I will rework to simplify and remove potential confusion.
Should have something to look at in a few days.
 
I'm sorry, but I can't find the file for the OTA update. See attachement
 

Attachments

  • TSDZ2_OTA_Update.JPG
    TSDZ2_OTA_Update.JPG
    14.7 KB · Views: 575
mallesepp said:
I'm sorry, but I can't find the file for the OTA update. See attachement
What do you mean? in which step are you from the Getting started? https://opensourceebike.github.io/
 
casainho said:
mallesepp said:
I'm sorry, but I can't find the file for the OTA update. See attachement
What do you mean? in which step are you from the Getting started? https://opensourceebike.github.io/
I am by this Step
See: How to Flash the Wireless Remote and Motor Controller Firmware.

Do I have to install anything on the wireless motor controller or do I just need the mobile phone app
 
mallesepp said:
casainho said:
mallesepp said:
I'm sorry, but I can't find the file for the OTA update. See attachement
What do you mean? in which step are you from the Getting started? https://opensourceebike.github.io/
I am by this Step
See: How to Flash the Wireless Remote and Motor Controller Firmware.

Do I have to install anything on the wireless motor controller or do I just need the mobile phone app
After you did install the bootloader, you need to install the firmware by wireless: TSDZ2_wireless_ota_update-xxx.zip
 
casainho said:
mallesepp said:
casainho said:
mallesepp said:
I'm sorry, but I can't find the file for the OTA update. See attachement
What do you mean? in which step are you from the Getting started? https://opensourceebike.github.io/
I am by this Step
See: How to Flash the Wireless Remote and Motor Controller Firmware.

Do I have to install anything on the wireless motor controller or do I just need the mobile phone app
After you did install the bootloader, you need to install the firmware by wireless: TSDZ2_wireless_ota_update-xxx.zip
Thank you. But this is my problem. I don't found this file.
 
mallesepp said:
casainho said:
mallesepp said:
casainho said:
What do you mean? in which step are you from the Getting started? https://opensourceebike.github.io/
I am by this Step
See: How to Flash the Wireless Remote and Motor Controller Firmware.

Do I have to install anything on the wireless motor controller or do I just need the mobile phone app
After you did install the bootloader, you need to install the firmware by wireless: TSDZ2_wireless_ota_update-xxx.zip
Thank you. But this is my problem. I don't found this file.
Can you find it on v0.3.0 under the assets?
 
casainho said:
mallesepp said:
casainho said:
mallesepp said:
I am by this Step
See: How to Flash the Wireless Remote and Motor Controller Firmware.

Do I have to install anything on the wireless motor controller or do I just need the mobile phone app
After you did install the bootloader, you need to install the firmware by wireless: TSDZ2_wireless_ota_update-xxx.zip
Thank you. But this is my problem. I don't found this file.
Can you find it on v0.3.0 under the assets?
Thanks now I have found the file and flazed it on 2 dongles with nrfconnect. But now I'm hanging again. Both dongles seem dead. Shouldn't I see some LED light up?
 
mallesepp said:
Thanks now I have found the file and flazed it on 2 dongles with nrfconnect. But now I'm hanging again. Both dongles seem dead. Shouldn't I see some LED light up?
The remote, after power up and if not connected to the TSDZ2 wireless board (you just need to not power it) will keep continuous blinking red and after some time like 30 or 60 seconds will stop that blinking. Does it happen to your board? Make sure you flashed the bootloader and then the firmware by Bluetooth.
 
STLinkV2 different versions: some don´t work for flashing TSDZ2 motor controller firmware

You can buy STLinkV2 on EBay or Aliexpress for very cheap price like 2€ (shipping included) but unfortunately there are different versions of them and some simple do not work well (at least for flashing the TSDZ2 motor firmware).

More information here: https://opensourceebike.github.io/stlinkv2.html

See two version side by side:
stlinkv2_versions.jpg
 
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.
 
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?

Did you cut the trace and solder the other?
 
casainho said:
STLinkV2 different versions: some don´t work for flashing TSDZ2 motor controller firmware

You can buy STLinkV2 on EBay or Aliexpress for very cheap price like 2€ (shipping included) but unfortunately there are different versions of them and some simple do not work well (at least for flashing the TSDZ2 motor firmware).

More information here: https://opensourceebike.github.io/stlinkv2.html

See two version side by side:
stlinkv2_versions.jpg

I what way doesn't it work, what are the symptoms? One on the right looks like it's been fried and/or soldered by me :)

Edit - you can also update the firmware with the downloads from the STM site see if that makes a difference - I updated my cheap clone to the latest fw. https://www.st.com/content/st_com/e...ent-tools/stm32-programmers/stsw-link007.html
 
Back
Top