New TSDZ2 Open Source firmware with Bluetooth interface

kensender said:
endlessolli said:
Update: After a couple of reboots of the phone and various BT option toggles - it suddenly worked!
Amazing stuff, @mspider65!

(So far, the ESP32 (development board) is running standalone, as I am still waiting on the ESP board I am planning to use for the bike. Will update

Hi, same problem here. Can discover and connect via bluetooth to de ESP32 with the Android but no matter how many times I reboot the phone or toggle Bluetooth on and off I can´t manage to discover the device in the app :S
Any ideas?

Finally I solved the issue, an activity band app was the culprit :evil:
 
mspider65 said:
I don't have an android 12 device to test, please report back if everything is ok.
It crashes on my Samsung S10+ when trying to make the BT connection. Version 2.1.12 works for me with Android 12.
 
Beli said:
mspider65 said:
I don't have an android 12 device to test, please report back if everything is ok.
It crashes on my Samsung S10+ when trying to make the BT connection. Version 2.1.12 works for me with Android 12.

Thank you Beli, despite user washichi reporting, so the old version works fine on Android 12 as expected.

Regarding the new version i will do some test as soon i have an Android 12 device.
This is almost certainly a permissions issue, maybe installing from scratch will fix it.
 
Hi,
I´m facing a strange issue connecting the PCB to the controller. The power connection of the board is working OK, I flashed it with 2.1.12 version and can be detected from the app 2.1.12 version
LCD connection works ok too cos "lcd communication error" dissapears but no matter how I connect the controller cables (switching positions) I still get "Controller communication error".
Every time I connect controller´s side cables to the PCB connector I get an E03 error on the LCD.
Prior to opening the motor and start cutting cables the motor was working properly.
Any help would be appreciated.
 
Hi,

Does the pcb also has a mosfet which acts like a switch (free gpio pin) to turn on/off the motor/controller (BAT+ <-> +LCD) ?
I would like to keep my bike (bmx) as clean as possible, without a fixed display and a minimum set of cables. Instead i would like to use this tiny 'cheap' android phone as my remote display to change pedal assist levels/modes/etc. and also use it for gps navigation
See: https://www.unihertz.com/en-nl/products/jelly-pro

If not, is someone interested to implement this feature in the pcb design and extend the existing android app (poweron the motor when BLE connection is established and power-off when disconnected)?

I would make a small donation for the effort.

Best regards,
Ray
 
rayholland said:
I would like to keep my bike (bmx) as clean as possible, without a fixed display and a minimum set of cables. Instead i would like to use this tiny 'cheap' android phone as my remote display to change pedal assist levels/modes/etc. and also use it for gps navigation
See: https://www.unihertz.com/en-nl/products/jelly-pro
That
Display Size: 2.45 inch
Resolution: 240 × 432 pixels
is too small imo. Also with outdated Android version 8.1.
Little better is Unihertz Jelly 2E with 3.0 inch 480x854 display and Android 12 and Jelly 2 is with even better CPU, more memory and NFC: Jelly 2 vs Jelly 2E One plus for smaller Jelly Pro is removable battery

Just Install (small OLED) display like SW102 (4 pins for v2 info on back side: info) with integrated controls. Or maybe is possible some implementation of 850C/860C switch controller with TSDZ2-ESP32 board
Can I run a TSDZ2 without a throttle or a display? @reddit
Dump your Bafang display for stealth and better display options
 
v85 said:
Just Install (small OLED) display like SW102 (4 pins for v2 info on back side: info) with integrated controls. Or maybe is possible some implementation of 850C/860C switch controller with TSDZ2-ESP32 board
Can I run a TSDZ2 without a throttle or a display? @reddit
Dump your Bafang display for stealth and better display options

That is exactly what i don't want. I want a mobile , wireless, removable (battery operated) 'display' (small android phone) to control the e-bike.

I assume that the TSDZ2-ESP32 only acts as a 'man in the middle' between the controller and display and the only way to turn on/off the bike is to physically press the on/off switch on the display.
Shorten the BAT+ and LED+ is no solution, because then the bike will be 'always on' and will drain the battery. It has to be a 'programmable switch'. This can be done with a small mosfet. But i don't know if the TSDZ2-ESP32 pcb has a mosfet-switch to turn the bike on/off using the mobile app.

Casainho made a wireless solution which fits my needs using a nRF52840 chip, but i want to use a temp sensor AND use a throttle at the same time (with the TSDZ2-ESP32 this is possible).
See:
https://github.com/OpenSourceEBike/TSDZ2_wireless
https://github.com/TSDZ2-ESP32/TSDZ2-ESP32-Wiki/wiki/Optional-Temperature-sensor
 
rayholland said:
But i don't know if the TSDZ2-ESP32 pcb has a mosfet-switch to turn the bike on/off using the mobile app.

no, there is no switch.
For your scenario you would need a small external switch to turn on the ESP32 board and bike controller.
The ESP32 board will also consume power otherwise. (ESP32 consumes more current than the controller STM8 MCU)
So you should also modify the ESP32 firmware and also the android app to have a better UI for your use case.
 
mspider65 said:
no, there is no switch.
For your scenario you would need a small external switch to turn on the ESP32 board and bike controller.
The ESP32 board will also consume power otherwise. (ESP32 consumes more current than the controller STM8 MCU)
So you should also modify the ESP32 firmware and also the android app to have a better UI for your use case.

Thank you for the clarification mspider65.
I was not aware that the ESP32 would draw that much current (i know the ESP32 has several sleep modes).

But anyhow, a physical switch (small panel mount switch in the battery case housing) would be indeed the best approach.
Can i just put the on/off switch directly between LCD+ and BAT+ (see pic)? Should the switch be rated a certain amount of amp (or is this neglectable)?
switch.png
 
rayholland said:
Thank you for the clarification mspider65.
I was not aware that the ESP32 would draw that much current (i know the ESP32 has several sleep modes).

But anyhow, a physical switch (small panel mount switch in the battery case housing) would be indeed the best approach.
Can i just put the on/off switch directly between LCD+ and BAT+ (see pic)? Should the switch be rated a certain amount of amp (or is this neglectable)?
switch.png

If you want to turn on the system with a bluetooth connection, the ESP32 cannot stay in sleep mode since the radio interface must be active.

Yes the switch should be between +Batt and +LCD and should manage the battery voltage and at most 100/200 mA.
 
mspider65 said:
Yes the switch should be between +Batt and +LCD and should manage the battery voltage and at most 100/200 mA.

Thanks again for your answer mspider65

I made a little GUI mockup for what i have in mind:
Main-Status-small2.png

I think the Jelly 2E with a 3" display and higher resolution as v85 mentioned before would be a great fit :D

Addon: I really think this would be a very good functional replacement for a fixed display. 1 wireless device for everything (display motor data, speed, switch modes, control assist levels, control road/offroad, flash firmware, view logging, use other apps like gps navigation, 'dashcam' video recording, etc.). And it is easy removable when you park your bike (theft proof).

Maybe also have a setting for Battery Volt Warning, so when the voltage gets below the threshold the Battery Voltage value will start blinking.

https://www.youtube.com/watch?v=shTUABoOFVo

https://de.aliexpress.com/item/1005004272330906.html
https://de.aliexpress.com/item/1005004460456847.html
 
Anyone have a spare version 4 board for sale? If not, is there anyone interested in buying one if I order some?
 
Also looking for buying a spare version 4 (or version 3) PCB for my second e-bmx build
Thanks

BTW @SYOTR , i send you a PM

BR.
Ray
 
Last edited:
Hello, first many thanks to mspider65 for this great project!

I have now equipped my two bikes with the interface and so far everything works fine.

I would now also like to equip my wife's bike with it, but I'm not sure if this is reasonably possible.
The bike has a coaster brake and is equipped with the TSDZ2 version for coaster brake and so far flashed with the mbrusa firmware. In the mbrusa firmware there are parameters for the coaster brake ("Coaster brake" on the basic settings tab and "Coaster brake torque treshold" on the advances settings tab).
Are there similar settings in the mspider65 firmware? Does it make sense to use this interface and firmware with coaster brake?

Best regards
Rainer
 
I have ordered 5 complete boards. I will post again when they have arrived. I will keep 2 and offer the others at cost plus shipping. I am in the US.
 
I have received images from PCB Way. Can anyone confirm that this is correct before finalizing the production?
 

Attachments

  • IMG_20230313_192126_cr.jpg
    IMG_20230313_192126_cr.jpg
    1 MB · Views: 11
Back
Top