New TSDZ2 Open Source firmware with Bluetooth interface

mspider65 said:
It will be also fine if the Android app could be used for your project.
You app is Android only? I am an Android user and I understand it is much more expensive to develop IOS. Did you though on IOS when you started this project??

I think I will need soon to use the app, I will need an app to show me the available devices for pairing on the wireless board, because I want to pair a Bluetooth remote to the wireless board... There are no buttons not display on the wireless board so I think the app is the only possibility to show a list and user choose from the list of available devices to pair.

By the way, would not be interesting for you to use a wireless remote, that also include the connection to the brake sensors?
 
casainho said:
You app is Android only? I am an Android user and I understand it is much more expensive to develop IOS. Did you though on IOS when you started this project??
No, i didn't. I don't have any knowledge about IOS.

I think I will need soon to use the app, I will need an app to show me the available devices for pairing on the wireless board, because I want to pair a Bluetooth remote to the wireless board... There are no buttons not display on the wireless board so I think the app is the only possibility to show a list and user choose from the list of available devices to pair.

By the way, would not be interesting for you to use a wireless remote, that also include the connection to the brake sensors?

This is a completely different scenario from the current one where the pairing is done between the Android Phone and the ESP32 board.
In the current setup i don't think a wireless remote would be useful since the Display cannot be removed. To remove the display the ESP32 firmware need to be changed and also some external hardware would be needed in order to be able at least to switch on/off the system.
 
mspider65 said:
This is a completely different scenario from the current one where the pairing is done between the Android Phone and the ESP32 board.
I see. The only difference with the board I am using is that my board supports also ANT. I guess you could, if you wanted, to connect Bluetooth devices to your board, like the remote.

mspider65 said:
In the current setup i don't think a wireless remote would be useful since the Display cannot be removed. To remove the display the ESP32 firmware need to be changed and also some external hardware would be needed in order to be able at least to switch on/off the system.
On my board and firmware, I already have the switch on/off the system working and controlled on the wireless display. My board firmware, I see it as a virtual display. If someday you want to try the on/off switch wireless in your board, go and grab the one we did and tested.

I see, the big difference on this project is that does not try to use an external wireless display, that may be done only using ANT - all other things are common between the projects. On my project, the wireless display should be optional and I think both project could just be really one.

So, the wireless display is optional and advanced users may want it because, it is a bit hard to describe but I will share some pictures and notes from my recent real experience - sorry for spam your thread:

Comparing a Specialized EBike with TSDZ2 EBike



On last days, me and my wife, we were far from home, on holidays. We had planned two full days riding our ebikes with TSDZ2. On first day my ebike TSDZ2 did fail and I had to rent an ebike and I had the luck to be able to have a nice Specialized EBike that I was happy to compare with TSDZ2 EBike.

Experiencing EBike wireless standard with the Specialized EBike

While I was riding I realized that this Specialized EBike is turned on in the battery and not on the display, like if the display is not really needed and quickly I figured out this model could implement the EBike wireless standard. See that I am in the middle of developing the same EBike wireless standard for TSDZ2.

I had my Garmin GPS unit on the handle bard already because I had our route planned and we were following it. I just had to go to wireless sensors configuration and click on discover new sensors and I got this ones from the Specialized EBike:



Note that the heart rate sensor is the one from my watch:


Then automatically the following main screens were added:



EBike main screen to control assist level, see battery status and light status:


At the end of our ride, on the Garmin app, we can see graphs of fitness and cycling metrics but also the pedal human power, speed and cadence were recorded:




And interesting is that there is a map showing the route but with color gradients that we can select for some variables and the pedal human power was available:



 
I got the very first firmware working for the wireless board and now I need an Android app... seems your is the best and I will simple fork your code -- many thanks for your work!! I could not develop such an app, structure it, etc but I fully understand your app and I can now develop it for my needs, thanks!!

I think we are looking for different approaches and so I do not expect to fork your code and make any pull request as it should not go ok with your objectives.

I want to go fully wireless, using standards:
- wireless display
- wireless remote
- wireless brake sensors

Where the system can still work without any of this. A mobile phone or a watch, are optional to the display or the remote, to change the assist level. But if user keep always the same assist level, then, nothing is needed, only the wireless board and the TSDZ2 motor.


I did a minimalist very first version that only changes the assist level - on the wireless firmware I setup the default settings for my ebike, like the wheel size, assist level factors, etc. Once I turn on the system, it is ready to work and I just need to change the assist level on the GPS display, using the touch screen or the wireless remote.

Here a picture of the wireless board connected to the TSDZ2 LCD connector:

image.png
 
sorry, don't want to be offensive, but please can you stop cross-posting? You always complain about guys posting off-topic into your thread but you cross-post every achievement in ALL tsdz2 related threads...
 
shaddi said:
sorry, don't want to be offensive, but please can you stop cross-posting? You always complain about guys posting off-topic into your thread but you cross-post every achievement in ALL tsdz2 related threads...
Yes I will. I would like to give some context. And I wish this could be only one project but now I guess it is not possible because of different objectives, but I hope to learn and reuse max possible from this project.
 
New Release:
Small update for only ESP32 board firmware and Android App.

As usual all the files could be downloaded from https://github.com/TSDZ2-ESP32/TSDZ2-ESP32-Wiki/tree/master/bin
https://github.com/TSDZ2-ESP32/TSDZ2-ESP32-Wiki/blob/master/bin/Android/TSDZ2_ESP32v2.1.5.apk
https://github.com/TSDZ2-ESP32/TSDZ2-ESP32-Wiki/blob/master/bin/ESP32/TSDZ2-ESP32-Mainv1.1.3.zip


The only new feature, is the possibility to change the Riding Mode from the Android App (long press the riding mode icon)
 
@mspider65, many thanks for this Android app -- I just go it working for my configurations, that was my priority because as soon I have all of them implemented, I will be able to finally install the wireless board on my TSDZ2 and remove the big 860C display :)

[youtube]RCztvzQ0O6A[/youtube]
 
casainho said:
@mspider65, many thanks for this Android app -- I just go it working for my configurations, that was my priority because as soon I have all of them implemented, I will be able to finally install the wireless board on my TSDZ2 and remove the big 860C display :)

Hi Casainho, glad to see that some parts of my Android app are useful for your project.
I saw that your project is going well.
 
mspider65 said:
casainho said:
@mspider65, many thanks for this Android app -- I just go it working for my configurations, that was my priority because as soon I have all of them implemented, I will be able to finally install the wireless board on my TSDZ2 and remove the big 860C display :)

Hy Casainho, glad to see that some parts of my Android app are useful for your project.
I saw that your project is going well.
If you are following the thread, you can see that are intentions to try defined a standard for mobile app so the various OpenSource firmwares, even for other motor controllers as KT and Lishui, will work with the same app. Maybe this can also be good in future for your project if that mobile app gets more developed than yours.

And theoricaly there is a big plus that is the same app working on IPhone but still seems none of the developers have experience with Iphone...
 
Hi.

I have a release of mobile app based on yours, MANY THANKS!!!!!

I implemented some new things that you may like and if so, just go and reuse the code in your app:
- variable customization: long press on each field to open a list and choose a variable (the configuration is saved in persistent memory)
- removed fab button and added action to options menu as also click on the Bluetooth icon on top left
- full screen
- added About page, where I link to project page as also I refer and link to your app as I reused you app

Note that I disabled graphs and the Debug fragment, because I need a quick app for now.

If you want you can download to test: https://github.com/OpenSourceEBike/TSDZ2-Android/releases/tag/v0.1.0

See that there is only one main screen but I added (this feature is not available on the ESP32 project) customization on the fields, a bit like on the 860C display:

[youtube]QU4JChGzGE4[/youtube]

Whats-App-Image-2020-12-07-at-20-43-45.jpg


Whats-App-Image-2020-12-07-at-20-48-58.jpg
 
casainho said:
Hi.

I have a release of mobile app based on yours, MANY THANKS!!!!!

I implemented some new things that you may like and if so, just go and reuse the code in your app:
- variable customization: long press on each field to open a list and choose a variable (the configuration is saved in persistent memory)
- removed fab button and added action to options menu as also click on the Bluetooth icon on top left
- full screen
- added About page, where I link to project page as also I refer and link to your app as I reused you app

Note that I disabled graphs and the Debug fragment, because I need a quick app for now.

If you want you can download to test: https://github.com/OpenSourceEBike/TSDZ2-Android/releases/tag/v0.1.0

See that there is only one main screen but I added (this feature is not available on the ESP32 project) customization on the fields, a bit like on the 860C display:

[youtube]QU4JChGzGE4[/youtube]

Whats-App-Image-2020-12-07-at-20-43-45.jpg


Whats-App-Image-2020-12-07-at-20-48-58.jpg
Just for info:
I tried the app on a sw102, as this has the same nrf. It does connect but freezes after about 30 secs.
But is probably because I run the bart 0.20 beta 1 software.
 
Hi all, i'm about to order some of the (ESP32-based) PCB's needed for this project at PCBWay (https://github.com/TSDZ2-ESP32).
Is there anyone interested in some as well? The boards will be assembled and delivered in the Netherlands, shipping to EU is possible.
If wanted I could make a full set with all the required cables, antenna, connectors included. Also pre-flashed would be an option.

Let me know if there is any interest to this.
 
This message is to show / give ideas to the ESP32-TSDZ2 users, that is possible to quick DIY and with very few components, a Bluetooth board for TSDZ2. Maybe this can be a help for the ones that can find difficult to get the PCB.

ESP32-TSDZ2 project went on the path to design a custom board, probably with more components that are needed, like the level shifters. I decided to go DIY and use the less possible components: a small board with the Bluetooth microcontroller (would need to be ESP32 board), a popular DC-DC board and no level shifters (as some displays do like the 860C and SW102). I think this can be a good alternative because all the items are easy to buy on Ebay or Aliexpress.

I put the wireless board under the DC-DC converter board. I used a perfboard to hold one board in one side and other on the other side and giving enough space to solder the only 2 extra components (mosfets).

DC-DC converter boar (60V battery -> 5V for the wireless board):
TSDZ2-wireless-board-01.jpg


Wireless board with all the needed wires soldered:
TSDZ2-wireless-board-04.jpg


The board is quite small, here the final cable to connect to TSDZ2 display connector:
TSDZ2-wireless-board-05.jpg


Finally I soldered the wires for STLinkV2 and connected to my PC, so I could flash the Bluetooth bootloader and finally the firmware using the bootloader:
TSDZ2-wireless-board-flashing-bootloader.jpg


And finally testing by connecting the mobile app as also the Garmin GPS display.
As you can see, my Android app is based on the ESP32-TSDZ2 Android app, thanks!!
[youtube]AklWXqSHkPU[/youtube]
 
fietstasss said:
Hi all, i'm about to order some of the (ESP32-based) PCB's needed for this project at PCBWay
Let me know if there is any interest to this.

I'm interested in 1 PCB, i live in NL
 
Today I finally managed to extensively test the new firmware which introduces a significant amount of improvements many of which I have already described in this thread https://endless-sphere.com/forums/viewtopic.php?f=30&t=110121.

The test ride, even if it wasn't very long (only about 25 km without big climbs), it was still enough to do a thorough test.

The first thing you notice is the extreme silence of the motor compared to before. The fact that I have just reassembled the motor after having replaced a bearing and done a good greasing also helped, but I must say that I had never heard it so quiet. Basically, I only heard the rolling sound of the wheels and the air hitting the helmet.

I tried all the assistance modes and the impression I got is that the delivery and modulation of the power was always very good and linear.

It is difficult to objectively assess the motor temperature and consumption without a direct comparison, but my impression is that there has been a tangible improvement.

Below are some images taken from the app.

Tour.png
The first image is of the moment when the motor reached its maximum temperature which was about 40 degrees which should be compared with an air temperature that was around 10 degrees. So, in practice the motor reached a maximum temperature difference of 30 degrees with respect to the air when it was around a constant 200/250 Watts.

The second shows how the motor power faithfully follows the pedal power measured with the torque sensor (at that time I was in power mode with 90% assistance).

The third image refers to when I tested the power that can be obtained at high cadences. Here too it seems to me that it is better than before. At 100 rpm you have about 300 Watts available which drop to 200W when you get close to 120 rpm which is the maximum limit that I have set beyond which the motor stops providing assistance.

I have therefore decided that it is time to release the new version that I will publish shortly.
 
Here is finally the new version.
Everything must be updated, Android App, ESP32 and Controller.

The files are always on Github: https://github.com/TSDZ2-ESP32/TSDZ2-ESP32-Wiki/tree/master/bin
  • TSDZ2_ESP32v2.1.7.apk
  • TSDZ2-ESP32-Mainv1.1.5.zip
  • TSDZ2-v10.zip

With this new version I invite everyone to perform the Hall sensor calibration.

Just do it once and it takes about a minute.

Since the motor must be able to rotate freely, the chain must be removed from the sprocket or at least kept the rear wheel raised during calibration.

HallCalibration.png

Once the calibration is done, I ask you if you can take a screenshot and share it indicating the type of motor (36V or 48V). I'm curious to see the result on other engines.

There is also a new configuration called Motor Tuning but for now it is better that you leave the values you find. It would be used to adjust the motor parameters in case you want to do a more fine motor setup.

The new version, in addition to having the part that deals with the motor control completely redone, also introduces other small improvements.

  • The levels of the "cadence" mode are now defined in Watts (for each level the power in Watts must be indicated)
  • It is signaled if there is no communication with LCD or Controller (useful during the PCB installation phase)
  • Increased the range of levels of the "Torque" mode (useful for those with a 'lazy' torque sensor with a limited range)

Good rides!
 
I tried flashing the new version - but it doesn't work at all.

I update the app, ESP32 and motor. There seems to be something wrong with the motor firmware. It shows version 0. Configuration is all zero and can't be changed and saved.
I also tried flashing the motor not OTA but with ST-Link without any difference. Also downloaded everything again and flashed again. It doesn't work. Back to the former versions it's working again.
 
Beli said:
I tried flashing the new version - but it doesn't work at all.

I update the app, ESP32 and motor. There seems to be something wrong with the motor firmware. It shows version 0. Configuration is all zero and can't be changed and saved.
I also tried flashing the motor not OTA but with ST-Link without any difference. Also downloaded everything again and flashed again. It doesn't work. Back to the former versions it's working again.

I just tested the upgrade using the files on Github and it works.
The old Android app is not able to read the configuration of the new ESP32 Firmware and shows only zeroes.
After the update of the ESP32 you must use the new Android app or, you should do the update with the following sequence:
1) Android app (v2.1.7)
2) ESP32 Firmware (v1.1.5)
3) Motor Firmware (v10)
 
I updated in exactly this order twice - Android app first - showing everywhere zero after updating all. Second time I even de-installed the old Android app first. Quite strange...
 
Sorry, obviously it was my fault. I thought I picked the latest ESP binary. But I had v1.1.3. After unzipping the file name doesn't show the version number so it's easy to get confused. Now zeros are gone.

So thank you for now. I will give it a trial tomorrow.
 
Beli said:
Sorry, obviously it was my fault. I thought I picked the latest ESP binary. But I had v1.1.3. After unzipping the file name doesn't show the version number so it's easy to get confused. Now zeros are gone.

So thank you for now. I will give it a trial tomorrow.

Great,
You can see the version on the Android app before to flash once you select the bin file for the update.
 
I really need to do this, you seem to have taken the tsdz2 to another level
 
Haven't made a test ride til now, but here are my calibration values (36V motor driven by 11s battery):

Hallsensor.jpg
 
Back
Top