BT Interface for TSDZ2 Open Source firmware - Work in progress

Electric Motors and Controllers
bart594   1 mW

1 mW
Posts: 11
Joined: Jan 14 2019 3:47pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by bart594 » Aug 03 2020 9:33am

Hi,

thanks for the great mobile app :thumb:
Do you maybe plan to add average values that could be shown by click/long click on the tile ? I think having average speed/pedal power values and so on it would be a nice enhancement

I have made SW102 compatible with 0.20 and of course your mobile app...
Now it's soo easy to change configuration values without going through all the menus on that tiny screen :D

https://github.com/bart594/Color_LCD

sp1n4d0   10 mW

10 mW
Posts: 30
Joined: Jun 13 2019 6:49pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by sp1n4d0 » Aug 04 2020 3:02am

edit: offtopic
Last edited by sp1n4d0 on Aug 17 2020 7:34am, edited 1 time in total.

mspider65   10 W

10 W
Posts: 70
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Aug 04 2020 9:38am

bart594 wrote:
Aug 03 2020 9:33am
Hi,

thanks for the great mobile app :thumb:
Do you maybe plan to add average values that could be shown by click/long click on the tile ? I think having average speed/pedal power values and so on it would be a nice enhancement

I have made SW102 compatible with 0.20 and of course your mobile app...
Now it's soo easy to change configuration values without going through all the menus on that tiny screen :D

https://github.com/bart594/Color_LCD
Hi,
nice work!

Actually i'm working on the TSDZ2 controller firmware. Next weeks i hope to release a new firmware version with field weakening feature and many other optimizations.
As soon i have some spare time i will also do some improvements to the Android app. I will take your suggestion into consideration.

mspider65   10 W

10 W
Posts: 70
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Aug 04 2020 9:46am

hefest wrote:
Jul 30 2020 1:26pm

Didn't you tell me when I was buying esp32 controller from you that you plan to upgrade to 1.0? I'm pretty sure because I asked.
No, I told you i have in plan to add field weakening.
And in any case, since it is an open source project i develop for free, i don't have any obligation.
The code is open source, and if you want upgrade to 1.0, you just have to do it.

bart594   1 mW

1 mW
Posts: 11
Joined: Jan 14 2019 3:47pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by bart594 » Aug 05 2020 11:14am

sp1n4d0 wrote:
Aug 04 2020 3:02am
@bart594
HI! Are you using SW102 Bluetooth to connect to the app, or do you have this
ESP32 PCB?
I have a SW102 with unlocked bootloader, what ota firmware file do I need to flash to make it compatible with 0.20 motor firmware?
Thank you!
Hi
sw102 only (without ESP32) with 0.20 firmware version (modified by me) Everything apart from the android app (for now) is on the github You need to build the firmware and flash it with NRF Toolbox

sp1n4d0   10 mW

10 mW
Posts: 30
Joined: Jun 13 2019 6:49pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by sp1n4d0 » Aug 05 2020 12:27pm

edit: offtopic
Last edited by sp1n4d0 on Aug 17 2020 7:33am, edited 1 time in total.

bart594   1 mW

1 mW
Posts: 11
Joined: Jan 14 2019 3:47pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by bart594 » Aug 05 2020 12:31pm

mspider65 wrote:
Aug 04 2020 9:38am


Hi,
nice work!

Actually i'm working on the TSDZ2 controller firmware. Next weeks i hope to release a new firmware version with field weakening feature and many other optimizations.
As soon i have some spare time i will also do some improvements to the Android app. I will take your suggestion into consideration.
i have actually implemented high cadence support, torque sensor calibration and field weakening
first two are working. About FW.. i don't know. I took casainho's code for FOC calculations and simply adding more current in the FW state but somehow don't know how to push the bike to enable this state. So i'm curious how you gonna solve this ;-)

in my modification i got rid of cadence mode and combined power and torque mode in one mode so now i have only 2 riding modes
i think we should follow commercial ebikes and make things simple. In the end it's all about riding and not constantly changing support levels or modes
now im working on different peak/max power and acceleration values for every support level like in levo ebikes and mission control app
https://www.emtbforums.com/community/th ... v2-0.4038/

sp1n4d0   10 mW

10 mW
Posts: 30
Joined: Jun 13 2019 6:49pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by sp1n4d0 » Aug 05 2020 7:19pm

edit: offtopic
Last edited by sp1n4d0 on Aug 17 2020 7:32am, edited 1 time in total.

E-bike lover   1 mW

1 mW
Posts: 17
Joined: Jul 27 2020 3:44pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by E-bike lover » Aug 08 2020 11:44pm

bart594 wrote:
Aug 05 2020 11:14am
sp1n4d0 wrote:
Aug 04 2020 3:02am
@bart594
HI! Are you using SW102 Bluetooth to connect to the app, or do you have this
ESP32 PCB?
I have a SW102 with unlocked bootloader, what ota firmware file do I need to flash to make it compatible with 0.20 motor firmware?
Thank you!
Hi
sw102 only (without ESP32) with 0.20 firmware version (modified by me) Everything apart from the android app (for now) is on the github You need to build the firmware and flash it with NRF Toolbox
Hi bart594
Thankyou for ur sharing!! I would like to use sw102 too. How to build 0.20 firmware by myself? Just follow this step "How to build on Linux"? https://github.com/bart594/Color_LCD/tr ... ware/SW102 And which corresponding motor firmware version are you using?
Also, are all of the functions in the apphttps://github.com/TSDZ2-ESP32/TSDZ2-ES ... in/Androidworks? (Especially the update motor firmware function.)
thanks in advance!

sp1n4d0   10 mW

10 mW
Posts: 30
Joined: Jun 13 2019 6:49pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by sp1n4d0 » Aug 09 2020 3:15pm

edit: offtopic
Last edited by sp1n4d0 on Aug 17 2020 7:32am, edited 1 time in total.

E-bike lover   1 mW

1 mW
Posts: 17
Joined: Jul 27 2020 3:44pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by E-bike lover » Aug 09 2020 7:05pm

You are flashing the display firmware via the app right? Maybe you have to flash it with a programmer first in order to use this 0.20 firmware? Maybe your version between motor and display doesn't match?
After flashing the 0.20 firmware and corresponding motor firmware version in both sw102 display and motor controller, is it able to use ESP32 apk?

sp1n4d0   10 mW

10 mW
Posts: 30
Joined: Jun 13 2019 6:49pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by sp1n4d0 » Aug 10 2020 2:34am

edit: offtopic
Last edited by sp1n4d0 on Aug 17 2020 7:32am, edited 1 time in total.

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by vass » Aug 10 2020 6:57am

mspider65 I already have the tsdz2 with the LCD5 with marcos FW and all the mods (thermal pads and temp sensor).
Can i use the temp sensor i already have or does your firmware disable it and i need to use the one on the Wiki?

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by vass » Aug 10 2020 8:01am

vass wrote:
Aug 10 2020 6:57am
mspider65 I already have the tsdz2 with the LCD5 with marcos FW and all the mods (thermal pads and temp sensor).
Can i use the temp sensor i already have or does your firmware disable it and i need to use the one on the Wiki?
I think i can answer myself after reading again the wiki :)

"For the temperature control, compared to version 0.20.0-beta1, if you have the DS18B20 Themperature sensor connected to the ESP32 board, you could select the value "ESP32". In this case the Controller Throttle ADC input is not used.
"

I can use the one i have or a install a new one :).

also anyone has a pcb for sale in Europe :) (mspider65 way of buying is damn nice but i dont need so many of them)

VelOtto   1 µW

1 µW
Posts: 1
Joined: Aug 10 2020 2:12pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by VelOtto » Aug 10 2020 3:32pm

Hi,

first of all, thank you mspider65 for kicking off my dream of getting an electric bike. ESP32 is the perfect combination for what I think e-bike should be cabable of and the man in the middle implementation is marvellous compared to just hacking the lcd. One step closer to open hardware e-bike. Great work so far and I'm looking forward to seeing how the project develops.

I'll wait for my kit and pcb to arrive before making any other commentary, but I have some vague ideas what I'd like to do with the esp32's capabilities. Maybe the bike could communicate with smart home (in my case Home Assistant) about battery status, service intervals etc. I'd like my home to remind me after driving in a bad weather to maybe do some basic maintenance or I could see battery status remotely. Maybe overlayed with a map to see how much range I've left on the charge. Or maybe some sort of payment system to rent the bike. Or on the next version of pcb there could be an accelometer to detect if someone moves the bike. For now simple wifi geofence might be sufficient.
vass wrote:
Aug 10 2020 8:01am
also anyone has a pcb for sale in Europe :) (mspider65 way of buying is damn nice but i dont need so many of them)
I've ordered 5 pcb's assembled from pcbway. (I'll sell the rest to recover the costs of ordering one :D) and they are in production. I only need the one so I'll send a message when they've arrived (build time 20-25 days and it's day 4) if you are still interested then.

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by vass » Aug 10 2020 4:28pm

VelOtto wrote:
Aug 10 2020 3:32pm
Hi,

first of all, thank you mspider65 for kicking off my dream of getting an electric bike. ESP32 is the perfect combination for what I think e-bike should be cabable of and the man in the middle implementation is marvellous compared to just hacking the lcd. One step closer to open hardware e-bike. Great work so far and I'm looking forward to seeing how the project develops.

I'll wait for my kit and pcb to arrive before making any other commentary, but I have some vague ideas what I'd like to do with the esp32's capabilities. Maybe the bike could communicate with smart home (in my case Home Assistant) about battery status, service intervals etc. I'd like my home to remind me after driving in a bad weather to maybe do some basic maintenance or I could see battery status remotely. Maybe overlayed with a map to see how much range I've left on the charge. Or maybe some sort of payment system to rent the bike. Or on the next version of pcb there could be an accelometer to detect if someone moves the bike. For now simple wifi geofence might be sufficient.
vass wrote:
Aug 10 2020 8:01am
also anyone has a pcb for sale in Europe :) (mspider65 way of buying is damn nice but i dont need so many of them)
I've ordered 5 pcb's assembled from pcbway. (I'll sell the rest to recover the costs of ordering one :D) and they are in production. I only need the one so I'll send a message when they've arrived (build time 20-25 days and it's day 4) if you are still interested then.
Yeah i will take one or two :) (send me a msg when you get them) , if in the future the source code for the app is also available i can try to code something (it as been some years since i code but my final course assignment was an Android app to detect falls in elderly people via sensors so i maybe if i refresh my coding skills i can be off some use for mspider65 )

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by vass » Aug 10 2020 5:03pm

Also because i have already the temperature probe installed i am thinking of doing all this wire connections outside the controller, maybe a sealed box to house the pcb and protected somewhere in the frame or near the lcd5, my soldering skills suck a little and the lcd cable is so long that i can expose a lot of the wire to help with soldering :)

sp1n4d0   10 mW

10 mW
Posts: 30
Joined: Jun 13 2019 6:49pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by sp1n4d0 » Aug 10 2020 6:05pm

VelOtto wrote:
Aug 10 2020 3:32pm

I've ordered 5 pcb's assembled from pcbway. (I'll sell the rest to recover the costs of ordering one :D) and they are in production. I only need the one so I'll send a message when they've arrived (build time 20-25 days and it's day 4) if you are still interested then.
I´m potentially interested too, please send me a PM when you receive the PCBs.

PandaYeti   1 mW

1 mW
Posts: 12
Joined: Feb 10 2020 2:32pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by PandaYeti » Aug 11 2020 2:00am

VelOtto wrote:
Aug 10 2020 3:32pm

I've ordered 5 pcb's assembled from pcbway. (I'll sell the rest to recover the costs of ordering one :D) and they are in production. I only need the one so I'll send a message when they've arrived (build time 20-25 days and it's day 4) if you are still interested then.
I'm also interested! Let me know if you got a spare one left.

E-bike lover   1 mW

1 mW
Posts: 17
Joined: Jul 27 2020 3:44pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by E-bike lover » Aug 11 2020 4:53am

I am also planning to buy the pcb board but i have seen that the production time in this website https://cart.jlcpcb.com/quote is much shorter. When i try to order it, i stuck at the ordering step. Anyone know how to order it?

mspider65   10 W

10 W
Posts: 70
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Aug 11 2020 6:28am

vass wrote:
Aug 10 2020 4:28pm
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.

mspider65   10 W

10 W
Posts: 70
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Aug 11 2020 6:32am

E-bike lover wrote:
Aug 11 2020 4:53am
I am also planning to buy the pcb board but i have seen that the production time in this website https://cart.jlcpcb.com/quote is much shorter. When i try to order it, i stuck at the ordering step. Anyone know how to order it?
At the beginning I also tried to use JLPCB but unfortunately many components are not available since you are forced to use only the components available in their components library.

E-bike lover   1 mW

1 mW
Posts: 17
Joined: Jul 27 2020 3:44pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by E-bike lover » Aug 11 2020 6:35pm

mspider65 wrote:
Aug 11 2020 6:32am
E-bike lover wrote:
Aug 11 2020 4:53am
I am also planning to buy the pcb board but i have seen that the production time in this website https://cart.jlcpcb.com/quote is much shorter. When i try to order it, i stuck at the ordering step. Anyone know how to order it?
At the beginning I also tried to use JLPCB but unfortunately many components are not available since you are forced to use only the components available in their components library.
Yeah exactly. Over half of the components can't be provided. So Pcbway is the only website which can be ordered..

E-bike lover   1 mW

1 mW
Posts: 17
Joined: Jul 27 2020 3:44pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by E-bike lover » Aug 12 2020 10:37am

PandaYeti wrote:
Aug 11 2020 2:00am
VelOtto wrote:
Aug 10 2020 3:32pm

I've ordered 5 pcb's assembled from pcbway. (I'll sell the rest to recover the costs of ordering one :D) and they are in production. I only need the one so I'll send a message when they've arrived (build time 20-25 days and it's day 4) if you are still interested then.
I'm also interested! Let me know if you got a spare one left.
I'm also interested!!! Let me know also.

bart594   1 mW

1 mW
Posts: 11
Joined: Jan 14 2019 3:47pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by bart594 » Aug 13 2020 12:55pm

sp1n4d0 wrote:
Aug 09 2020 3:15pm


I was able to build using this "how to" https://makerdiary.com/blogs/news/how-t ... th-arm-gcc
and TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... evelopment
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.
Image
(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-fir ... re-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/re ... ag/20.1.15

Post Reply