New TSDZ2 Open Source firmware with Bluetooth interface

mspider65 said:
vass said:
if in the future the source code for the app is also available i can try to code something.
All the source code is available on Github.
From the project main page https://github.com/TSDZ2-ESP32 you could browse all the repositories.


Nice, as soon has i have some time i will play with it, do you have "something" that can emulate the motor and the bluetooth connection to the App so one can code without the need for the real thing?
 
Since there seems to be quite few people interested in the pcb. I decided to also order 3 pcbs. If there is anyone interested in Germany or Europe, let me know.
 
PandaYeti said:
Since there seems to be quite few people interested in the pcb. I decided to also order 3 pcbs. If there is anyone interested in Germany or Europe, let me know.

I can have one (I live in Portugal) :thumb:
 
Field weakening implementation is almost completed.

I have done many code optimizations and now the PWM control loop code takes only 30us and i was able to rise the PWM frequency from about 15.6KHz to 20KHz. This means that now it is possible to feed the motor with a correct sine wave signal up to a cadence of 120rpm.

Before releasing, I still prefer to do a couple more test rides to double check everything is okay.
In the meantime, I share some screenshots with the results of some tests.

The tests was done with a half charged battery (37.9V was the reading from my voltmeter) and with a fully charged battery the results should be better.
As you can see at a cadence of 110 rpm the motor absorbs about 300W and 250W at 120rpm.
In practice, the power gap at around 90rpm is no longer felt and the motor continues to push up to 110-120 rpm.

Power-110rpm.png
Power-120rpm.jpg
FWAngle-110rpm.png
 
vass said:
Nice, as soon has i have some time i will play with it, do you have "something" that can emulate the motor and the bluetooth connection to the App so one can code without the need for the real thing?

To test i used two simulators running on the PC (LCD and Controller simulator) and an ESP32 DevKit board connected to the PC with a couple of FTDI adapters.
The simulators are the following.
https://github.com/mspider65/OSFControllerSimulator
https://github.com/mspider65/VLCD5Simulator
 
Wimpy747 said:
bart594 said:
sp1n4d0 said:
I was able to build using this "how to" https://makerdiary.com/blogs/news/how-to-use-nrf5-sdk-with-arm-gcc
and TSDZ2 Wiki https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Development
After building i run the script "release-SW102_ota" it successfully build an sw102-otaupdate.zip file to flash the display but when i try to flash this zip it gives me an error, i have no idea what´s wrong.

(click this image to view full log)

Motor firmware, bart594 have another repo with it: https://github.com/bart594/TSDZ2-Smart-EBike

i think you need to open it up and flash the "hard" way
https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/Initial-SW102-firmware-install
i don't think that unlocked bootloader makes the difference here
Or have you already flashed casainho's official 1.0.0 version ?

here you will find compiled firmware files (lcd and controller) with compatible android app
https://github.com/bart594/Color_LCD/releases/tag/20.1.15
Very anxious to use these, the main.hex is to flash the motor?
However the .apk file fails to install on any device I have, I'm running android 9 and 10.
Any idea what the problem can be?


If you want to discuss about the bart594 project fork, please open a new discussion.

I would like to keep this discussion clean, otherwise the reader does not understand what we are talking about.
 
Also removed my posts, I do love the project but would like to be able to use it with the sw102 display, because i actually like this display and also pefer the .20 firmware as the osf 1.0.0 is way to 'big' for me, do not need 20 assist levels for example.

In the first post you were refering to this in the future, so I guess I will have to wait.
Will order the board in the meantime, thanks for the nice work
 
Hi guys,

I fiddeled around a bit with the PCB and have the following Problem, which I don't know how to solve:
When I connect to the PCB via bluetooth, without connecting an antenna to the IPEX port, it works perfectly. As soon as I connect the antenna and try to connect, it does not work. Connecting the antenna while beeing connected via bluetooth, works. I checked the antenna physically according to 2,4 Ghz spec, and it seemss correct. Does anyone have an idea what could be the problem?
 
Wimpy747 said:
Also removed my posts, I do love the project but would like to be able to use it with the sw102 display, because i actually like this display and also pefer the .20 firmware as the osf 1.0.0 is way to 'big' for me, do not need 20 assist levels for example.

In the first post you were refering to this in the future, so I guess I will have to wait.
Will order the board in the meantime, thanks for the nice work

A user reported that the SW102 display sold by EcoCycles, works fine with the current release

pgwguk said:
As well as testing the VLCD5 which worked great, I also tested the SW102 from EcoCycles.
This mini display has TSDZ2 compatible firmware pre-loaded, so my hope was it'd be compatible with the ESP32 setup.
The great news is, it does! All the functionality of the SW102 appears active, power level and power mode selection also works!
 
PandaYeti said:
Hi guys,

I fiddeled around a bit with the PCB and have the following Problem, which I don't know how to solve:
When I connect to the PCB via bluetooth, without connecting an antenna to the IPEX port, it works perfectly. As soon as I connect the antenna and try to connect, it does not work. Connecting the antenna while beeing connected via bluetooth, works. I checked the antenna physically according to 2,4 Ghz spec, and it seemss correct. Does anyone have an idea what could be the problem?

It's strange behavior, do you have another antenna to try?
Check if the ground and antenna wire are not shorted
 
mspider65 said:
Wimpy747 said:
Also removed my posts, I do love the project but would like to be able to use it with the sw102 display, because i actually like this display and also pefer the .20 firmware as the osf 1.0.0 is way to 'big' for me, do not need 20 assist levels for example.

In the first post you were refering to this in the future, so I guess I will have to wait.
Will order the board in the meantime, thanks for the nice work

A user reported that the SW102 display sold by EcoCycles, works fine with the current release

pgwguk said:
As well as testing the VLCD5 which worked great, I also tested the SW102 from EcoCycles.
This mini display has TSDZ2 compatible firmware pre-loaded, so my hope was it'd be compatible with the ESP32 setup.
The great news is, it does! All the functionality of the SW102 appears active, power level and power mode selection also works!
I guess if I don't want to open the motor I can also place the board in the cable in a waterproof box, think this does not affect the behavior and functioning of the board?
 
mspider65 said:
PandaYeti said:
Hi guys,

I fiddeled around a bit with the PCB and have the following Problem, which I don't know how to solve:
When I connect to the PCB via bluetooth, without connecting an antenna to the IPEX port, it works perfectly. As soon as I connect the antenna and try to connect, it does not work. Connecting the antenna while beeing connected via bluetooth, works. I checked the antenna physically according to 2,4 Ghz spec, and it seemss correct. Does anyone have an idea what could be the problem?

It's strange behavior, do you have another antenna to try?
Check if the ground and antenna wire are not shorted

I tried another antenna which lead to the same behavior. Then I connected it to another 3,3V power source and everything worked as expected, so I guess something is not quite right with my FTDI. Very strange.
Thanks for the hints, and for the update, btw! Can't wait to connect the PCB to the motor and take if for a spin!
 
PandaYeti said:
I tried another antenna which lead to the same behavior. Then I connected it to another 3,3V power source and everything worked as expected, so I guess something is not quite right with my FTDI. Very strange.
Thanks for the hints, and for the update, btw! Can't wait to connect the PCB to the motor and take if for a spin!

Probably your FTDI adapter is not able to source enough current during the comnection transient.
 
mspider65 said:
Wimpy747 said:
I guess if I don't want to open the motor I can also place the board in the cable in a waterproof box, think this does not affect the behavior and functioning of the board?
Yes you can do it in this way too.

Thanks I will go for this, so I will have to order the sw102 from eco bikes , or try to figger out what kind of firmware they put on this perticular sw102.
Nice work man!
 
Hi,
so I connected the pcb and tested it with ne new firmware for a couple of days. I love the instant response when starting to peddle and the overall agility! Also the field weakening works great (48v motor here) Best firmware I tried so far!
I also have a couple of issues:
- I feel like the motor is getting way hotter and it drains the battery faster than for example mebrusa's firmware, even if I do not use the high cadence boost. Might field weakening have anything to do with this anyway?
- my torque sensor seems to have a very bad stock calibration. It shows 20, without any weight on the pedals. Any way to calibrate it with this firmware?
- the above point and the quick response when starting to pedal results in the motor starting to assist, although it is not necessary, for example when I just turn the pedals in order to shift down.
- is there any way to switch street mode using the android app? I tried setting the respective entry in the config, but it did not work. I liked the way it was implemented in mebrusa's firmware, being able to easily switch to off-road when powering up the display, but by default just going into street mode.

Thanks in advance!
 
PandaYeti said:
Hi,
so I connected the pcb and tested it with ne new firmware for a couple of days. I love the instant response when starting to peddle and the overall agility! Also the field weakening works great (48v motor here) Best firmware I tried so far!
I also have a couple of issues:
- I feel like the motor is getting way hotter and it drains the battery faster than for example mebrusa's firmware, even if I do not use the high cadence boost. Might field weakening have anything to do with this anyway?
It's really difficult to compare power consumption between two different firmware, there are really many parameters that affects the comparison. I have a 36V motor and my feeling is different and compared to the official 0.20beta i have detected a slightly lower consumption (about 5% less)
You could try to reduce the default motor inductance parameter in the android app (e.g. from 142 to 120 or 110), maybe with the current setup the FOC angle calculation for the 48V motor is too "aggressive".
Field weakening starts only above 85 rpm and only if you are using a high assistance factor. You could check if field weakening was active looking in the Graph view and selecting the "field weakening angle" parameter.
I am just working now on motor optimization (better rotor position estimation) and I hope to publish soon a new release that will provide a small further improvement.
- my torque sensor seems to have a very bad stock calibration. It shows 20, without any weight on the pedals. Any way to calibrate it with this firmware?
Yes, in the Android app you could set the torque offset parameter. Enable the checkbox and put the value you read on the "ADC torque" dashboard field when the your feets are not on pedals.
For some reason the torque sensor takes a long time to stabilize the signal and often the offset calculated at the startup is lower than the correct value.
- is there any way to switch street mode using the android app? I tried setting the respective entry in the config, but it did not work. I liked the way it was implemented in mebrusa's firmware, being able to easily switch to off-road when powering up the display, but by default just going into street mode.
Actually the only way is changing the setup on the OEM display. But I think it would also be useful to have the option to change it from the Android app. I will take this into account for the next release.
 
Hi guys
I am interested in this pcb too but I have just found this post after searching for months. Probably others couldn't find this post too and will be better to add these kind of pages(optimisation for tsdz2) to github.
I have a idea to improve this pcb and that is by adding gps and sim function to it so that the bike could be traceable. Anyone has any idea how to make it?
Also, it would be nice if someone could sell me 1/2 pcb in a reasonable price in EU :D
 
E-bike lover said:
Hi guys
I am interested in this pcb too but I have just found this post after searching for months. Probably others couldn't find this post too and will be better to add these kind of pages(optimisation for tsdz2) to github.
I have a idea to improve this pcb and that is by adding gps and sim function to it so that the bike could be traceable. Anyone has any idea how to make it?
Also, it would be nice if someone could sell me 1/2 pcb in a reasonable price in EU :D

hello, VelOtto has 2 pcbs, i was going to buy 2 but you can take one of them (PM him).
 
Back
Top