• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

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

The small oled display arrived and I quick adapted the enclosure to hold it. Soon I will started the firmware.





 
Almost there to have our screens working. The display fully works:

Firmware: https://github.com/OpenSourceEBike/ev_display_bluetooth_ant

 
So the display and buttons do work well. This version of display uses I2C communications which is slower than the display version on SW102 that uses SPI, and so I see a noticeable delay when changing the page as full screen is redraw - maybe I will test later with display version with SPI.

I am using a display that has the same pixel resolution than SW102 but it is smaller. The battery SOC letter are to much tiny to be readable while riding so later I need to increase that size and probable change the layout.

I am still thinking this is the TSDZ2 wireless controller with wired remote and a display. I hope it will also work without the display and the buttons, using just the same firmware as TSDZ2 wireless controller:

 
Here is a video of the display working on my EBike with TSDZ2 motor - it was quick, thanks to the usage as the same hardware as the wireless controller and the SW102 firmware.
I started the firmware using the wireless controller firmware and only after I added the display firmware, so this display works with th mobile app as also ANT+ LEV ebike and the ANT remote:
[youtube]viimR74NPZk[/youtube]

I did the 3D printing enclosure in a way it fix to the handlebar in a similar way of the Garmin GPS displays, using the elastic, so should be easy to fix on any handlebar position.
On the bottom there are 4 small screws on the corners, to easily open in the case of needed repair:


 
It seems as if an updated version of the sw102 display exists on the market for a few weeks now with improved stability and a better oled display.

https://www.star-union.net/upgraded-mini-size-1-3-inch-oled-display-ds103-sw101-product/
 
Peacepirate said:
It seems as if an updated version of the sw102 display exists on the market for a few weeks now with improved stability and a better oled display.

https://www.star-union.net/upgraded-mini-size-1-3-inch-oled-display-ds103-sw101-product/
Maybe that is the one I trashed while opening to flash the bootloader firmware. I really like SW102 for his size... this DIY display is much bigger, there is no way to make something so compact in a DIY way. On the other side, the buttons on the SW102 are bad, lack of tactile feedback and the buttons are to small, here our display has much better buttons. And most importantly, it can be repaired and adapted for different systems, like adding CANBUS communication instead of UART or any other thing, like for Xiaomi scooters is a different UART type, only 1 wire UART - SW102 would never work.

Also this display still integrates with the Garmin displays or others, using the ANT+ LEV Ebike wireless profile. And I hope all this work in a way that user can simple no connect the 4 wires display and have the regular wireless controller.

Now I need to find a way to make the display water prof. The main issue is on the OLED glass. On SW103 there is a thick transparent plastic alike if is a glass. I do not know how to get that kind of plastic sheet for DIY and how to apply on this design.
 
So after trying to use the TSDZ2 fully wireless remote, I found some issues that are not possible to solve:
- moderate effort to check if the motor is on and ready: it needs a click on the buttons at least, as there is no always on LED to conserve the battery power
- very hard to see what is the battery SOC: counting the blink pulses of the LED to see the SOC is very limited, I feel a frustration

I really missed a small display as SW102, where I can quickly see if the motor is on and ready. It is crucial for me to check the battery SOC as also double check the battery voltage. Then I also miss to see the motor power, to understand how fast I am using the battery and if am using the motor at 50% of his capacity or such.

So I decided to buy a SW102 to install on my shared cargo bike with my wife. Then I did destroy it because they changed the hardware and so finally I decided to build my own display, based on the TSDZ2 wireless controller with wired remote and added an extra OLED that needs only more 4 wires connected.

I started to prototype using an OLED display of 0.96 inches (smaller than SW102 display) but I ended with OLED display 1.3 inches, just the same size as SW102 display:

I already installed 2 of this displays and they are working well. I am in the process to solved some small issues and make a stable release, maybe in next 1 or 2 weeks. So I decided to stop working on the TSDZ2 wireless and the natural continuation is this display, that includes TSDZ2 wireless + wired remote + OLED display. I did not removed the Bluetooth or ANT code but I simple disabled it as I would need to update them and the mobile app, which is something is not a priority for me as I decided to keep the configurations on the display.
I will update the project page, kind of archiving the TSDZ2 wireless but giving the focus to this display. If there are developers whiling to keep improving the Bluetooth or the ANT, I will be happy to help get that working.









 
Hi, very cool project!

I am considering migrating to your platform and contributing to its development.

I have been developing something similar on the ESP32, DA14856 and NRF24AP2.

I am also using DI2 for gearshifting and wonder if the nrf52840 can act as client and server to read the currently selected gear broadcaster by the DI2 on ANT ?

Attached is my controller and 3d printed shifter.
 

Attachments

  • 20211124_112424.jpg
    20211124_112424.jpg
    723.9 KB · Views: 1,562
skyng22003 said:
Hi, very cool project!

I am considering migrating to your platform and contributing to its development.

I have been developing something similar on the ESP32, DA14856 and NRF24AP2.

I am also using DI2 for gearshifting and wonder if the nrf52840 can act as client and server to read the currently selected gear broadcaster by the DI2 on ANT ?

Attached is my controller and 3d printed shifter.
Sorry, I don't known an answer to your questions. I also did not fully understand all the things as they are nee to me.
 
My understanding of your current setup is that there are 2 ANT channels being used on the nrf52840 (physically connected to the TSDZ2), one for the LEV+ ANT for the buttons and the other for sending data via ANT to the Garmin?

I guess it should be possible to add a third channel to receive (slave) ANT broadcast data from the Di2 shifter system?

I have done this successfully on the NRF24AP2, receiving data from the Di2, just wondering how difficult/possible it would be to implement an additional channel.

Thanks!

casainho said:
skyng22003 said:
Hi, very cool project!

I am considering migrating to your platform and contributing to its development.

I have been developing something similar on the ESP32, DA14856 and NRF24AP2.

I am also using DI2 for gearshifting and wonder if the nrf52840 can act as client and server to read the currently selected gear broadcaster by the DI2 on ANT ?

Attached is my controller and 3d printed shifter.
Sorry, I don't known an answer to your questions. I also did not fully understand all the things as they are nee to me.
 
skyng22003 said:
My understanding of your current setup is that there are 2 ANT channels being used on the nrf52840 (physically connected to the TSDZ2), one for the LEV+ ANT for the buttons and the other for sending data via ANT to the Garmin?

I guess it should be possible to add a third channel to receive (slave) ANT broadcast data from the Di2 shifter system?

I have done this successfully on the NRF24AP2, receiving data from the Di2, just wondering how difficult/possible it would be to implement an additional channel.

Thanks!
Where can I find the source code of your project? Any github link?
 
See below, just made one
https://github.com/skyng22003/ebike_mcu_r1/

It's on the ESP32 Arduino platform.

Other things I'm working on are GPS/GPRS module for bike tracking and phone lock/unlocking using RSA keys.


casainho said:
skyng22003 said:
My understanding of your current setup is that there are 2 ANT channels being used on the nrf52840 (physically connected to the TSDZ2), one for the LEV+ ANT for the buttons and the other for sending data via ANT to the Garmin?

I guess it should be possible to add a third channel to receive (slave) ANT broadcast data from the Di2 shifter system?

I have done this successfully on the NRF24AP2, receiving data from the Di2, just wondering how difficult/possible it would be to implement an additional channel.

Thanks!
Where can I find the source code of your project? Any github link?
 
Hi casainho

Got the NRF52840 dongles working and have been looking at the ANT+ lev profile.

Is there a reason to use the gear_state variable to send motor status?

If I were to move the motor status to the system_state would you see any issues?

So I can actually use the gear_state to indicate currently selected gear for the Di2 shifter system.

Thanks,
Sky
 
skyng22003 said:
Hi casainho

Got the NRF52840 dongles working and have been looking at the ANT+ lev profile.

Is there a reason to use the gear_state variable to send motor status?

If I were to move the motor status to the system_state would you see any issues?

So I can actually use the gear_state to indicate currently selected gear for the Di2 shifter system.

Thanks,
Sky
Sorry, I am not remembering about ANT+ LEV. Donas you want, I am only using the new display and I will start to using the ANT+ Controls for the Garmin Edge page change. Later I wish to have the ANT+ Lev also working, but maybe just after 6 months from now. My time is very short.
 
Hi casainho,

Was wondering if you're willing to share the source code ebike for the android app so I don't have to start from scratch?

Thanks,
Sky
 
skyng22003 said:
Hi casainho,

Was wondering if you're willing to share the source code ebike for the android app so I don't have to start from scratch?

Thanks,
Sky
Sure, it is here: https://github.com/OpenSourceEBike/TSDZ2-Android/commits/master

But you can look at original fork, the original developer probably did improved it more.
 
woojak said:
agphil said:
woojak said:
agphil said:
I have the same problem, and with 3 different nRF boards. I can connect to NRF connect after installing the bootloader, not with the app installed. LED is always OFF.
I have a similar problem [emoji3] 2 devices do not respond completely (after many attempts to upload the software) 3rd device can be seen in dfu but the software does not run on it. Unfortunately, I gave up, I had a lot of potential in this project, but unfortunately I still have to wait. so far the board is waiting for "better times" :D
I have uploaded another soft and I am racing on it :)

IMG_20210604_162903.jpg
IMG_20210606_153726.jpg
IMG_20210606_153801.jpg
IMG_20210606_153812.jpg
IMG_20210606_170406.jpg
IMG_20210606_170419.jpg


Sent from my MAX1 using Tapatalka
Are you programming the bootloader on Linux or Windows?
I am a Windows 10 user: D

Sent from my MAX1 using Tapatalka

Hi, did you solve the issue in any way? I have exactely the same issue on 2 boards, bootloader programmed and flash process successful but unfortunately I can not see the TSDZ2 on the bluetooth device list..
Any help please?

Silvio
 
I think I had a simular problem when installing bootloader for the 'OpenSource EV display'.
The nrf52 dongle i got from digi-key had version 2.0.2 on it. When flashing the firmware i got a succes but after alot of issues connecting my phone i found out that program the size on nrf52 was faulty compared to what was programmed.

> verify_image /home/pi/bootloader.hex
verified 265104 bytes in 0.898853s (288.023 KiB/s)

So I ended up doing the step 'Revert to production bootloader' to version 1.1ish from https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial using this guide https://www.rototron.info/circuitpython-nrf52840-dongle-openocd-pi-tutorial/

I'm not sure if I was drunk or retarded the first try I flashed the bootloader, but after I grounded up, down & power for the 'OpenSource EV display' before connecting nrf52 to power it stopped constantly red led2 and I was able to connect my phone.
 
skyng22003 said:
Hi, very cool project!

I am considering migrating to your platform and contributing to its development.

I have been developing something similar on the ESP32, DA14856 and NRF24AP2.

I am also using DI2 for gearshifting and wonder if the nrf52840 can act as client and server to read the currently selected gear broadcaster by the DI2 on ANT ?

Attached is my controller and 3d printed shifter.
Is it OpenSource your project? If so, can you share the link?
 
Finally I was able to finish the assembly, connect my Garmin Edge 530 and make a testride.

I found some Issues and Features to be finalized:

1- Speed and Distance values are trasmitted with a factor 0.1 (instead of 20km/h I read 2km/h on the Garmin)
2 - Human power is not transmitted over ANT+ (that was one of the main reasons to move to this project)
3 - The info button does not allow to switch pages on the garmin

I would like to contribute on the development and try to fix at least some of those points, can you point me to a short guide to set up the development environment for nrf52?

Thank you
Silvio
 
silvocross said:
Finally I was able to finish the assembly, connect my Garmin Edge 530 and make a testride.

I found some Issues and Features to be finalized:

1- Speed and Distance values are trasmitted with a factor 0.1 (instead of 20km/h I read 2km/h on the Garmin)
2 - Human power is not transmitted over ANT+ (that was one of the main reasons to move to this project)
3 - The info button does not allow to switch pages on the garmin

I would like to contribute on the development and try to fix at least some of those points, can you point me to a short guide to set up the development environment for nrf52?

Thank you
Silvio
Hi Silvio.

This project moved and is now the same + a very small display, see here: https://opensourceebike.github.io/

Source code: https://github.com/OpenSourceEBike/ev_display_bluetooth_ant

1: that is strange, I am almost sure that should not happen
2: yes, developers did not had any power meter
3: I want to implement it, tomorrow I will ride the full day 12 hours and I wish I had this implemented already!!!

I can guide you on development, main.c is here: https://github.com/OpenSourceEBike/EV_Display_Bluetooth_Ant/blob/main/firmware/display/main.c

Maybe we could create a Telegram channel to discuss and help each other on developemnt??
 
silvocross said:
woojak said:
agphil said:
woojak said:
I have a similar problem [emoji3] 2 devices do not respond completely (after many attempts to upload the software) 3rd device can be seen in dfu but the software does not run on it. Unfortunately, I gave up, I had a lot of potential in this project, but unfortunately I still have to wait. so far the board is waiting for "better times" :D
I have uploaded another soft and I am racing on it :)

IMG_20210604_162903.jpg
IMG_20210606_153726.jpg
IMG_20210606_153801.jpg
IMG_20210606_153812.jpg
IMG_20210606_170406.jpg
IMG_20210606_170419.jpg


Sent from my MAX1 using Tapatalka
Are you programming the bootloader on Linux or Windows?
I am a Windows 10 user: D

Sent from my MAX1 using Tapatalka

Hi, did you solve the issue in any way? I have exactely the same issue on 2 boards, bootloader programmed and flash process successful but unfortunately I can not see the TSDZ2 on the bluetooth device list..
Any help please?

Silvio
unfortunately I wasn't looking for a solution to my problem. it is very possible that it is my computer's fault or a fake from aliexpress: /

Sent from my MAX1 using Tapatalka

 
casainho said:
Here is a video of the display working on my EBike with TSDZ2 motor - it was quick, thanks to the usage as the same hardware as the wireless controller and the SW102 firmware.
I started the firmware using the wireless controller firmware and only after I added the display firmware, so this display works with th mobile app as also ANT+ LEV ebike and the ANT remote:
[youtube]viimR74NPZk[/youtube]

I did the 3D printing enclosure in a way it fix to the handlebar in a similar way of the Garmin GPS displays, using the elastic, so should be easy to fix on any handlebar position.
On the bottom there are 4 small screws on the corners, to easily open in the case of needed repair:


I can see the project going forward. nice job, it looks clean and nice! :)

Sent from my MAX1 using Tapatalka

 
Back
Top