New TSDZ2 Open Source firmware with Bluetooth interface

AZUR said:
Hi Mspider65,

I have one more question about the PCB-ESP32.

There are 2 types of fixed IPEX. IPEX1 and IPEX4 for the antenna.

IPX1.jpg

Which one fits the PCB?

Can you send me the aliexpress link where you bought it?

Was it on aliexpress or was it on another website?

Thanks

Azur

10pcs 2.4G wifi receiver antenna Bluetooth remote control model aircraft antenna built-in gold-plated silver plated ipx

https://a.aliexpress.com/_uGlK3B
 
mspider65 said:
AZUR said:
Hi Mspider65,

....

Was it on aliexpress or was it on another website?

Thanks

Azur

10pcs 2.4G wifi receiver antenna Bluetooth remote control model aircraft antenna built-in gold-plated silver plated ipx

https://a.aliexpress.com/_uGlK3B

Thanks Mspider.

According to the specification of the PCB plug, U.FL-R-SMT-1 (80),
It's IPEX1. With a diameter of 2.0mm in the male.

Plug mail Antenna U.FL-R-SMT-1(80).jpg

https://www.systemgear.net/products/detail/en?maker_id=611&products_id=22719

Azur
 
Hi Massimo,

Thank you for all the information you have given me

I will place the PCB on the outside of the motor between the motor housing and the display.

I am thinking of replacing the cable that comes out of the controller, to the display, with another cable with one more wire.

This cable goes to the box where I will put the PCB. Then a cable will come out of the PCB box to the display.

I made a diagram of the connections that is represented in the figure.

PCB wire.jpg

Can I do it like that?

Regards,

Azur
 
AZUR said:
Hi Massimo,

Thank you for all the information you have given me

I will place the PCB on the outside of the motor between the motor housing and the display.

I am thinking of replacing the cable that comes out of the controller, to the display, with another cable with one more wire.

This cable goes to the box where I will put the PCB. Then a cable will come out of the PCB box to the display.

I made a diagram of the connections that is represented in the figure.

PCB wire.jpg

Can I do it like that?

Regards,

Azur

No you can't.
The +batt green wire cannot be connected to the DS18B20 themperatiure sensor. It will be burned. +Batt is at battery voltage.
 
mspider65 said:
AZUR said:
Hi Massimo,

....

I made a diagram of the connections that is represented in the figure.

PCB wire.jpg

Can I do it like that?

Regards,

Azur

No you can't.
The +batt green wire cannot be connected to the DS18B20 themperatiure sensor. It will be burned. +Batt is at battery voltage.

Thanks.

So I have to put one more wire for the VDD.

Can I use Ground wire from the display cable?
 
I finally have my display with ESP32 working.
It's inside a sealed weather resistant ASA 3D print including anti-reflective glas, haptic feedback motor and a battery buffered real time clock and break connectors, display directly plugged at the motor. Dimensions only 74x45x16mm. Still more program coding to do, like Bluetooth connection to Smart BMS...
 

Attachments

  • Display1.jpg
    Display1.jpg
    82.4 KB · Views: 1,765
  • Display2.jpg
    Display2.jpg
    103 KB · Views: 1,765
  • Display3.jpg
    Display3.jpg
    182.8 KB · Views: 1,765
  • Display4.jpg
    Display4.jpg
    43.1 KB · Views: 1,764
  • Display5.jpg
    Display5.jpg
    47.5 KB · Views: 1,765
Beli said:
I finally have my display with ESP32 working.
It's inside a sealed weather resistant ASA 3D print including anti-reflective glas, haptic feedback motor and a battery buffered real time clock and break connectors, display directly plugged at the motor. Dimensions only 74x45x16mm. Still more program coding to do, like Bluetooth connection to Smart BMS...
Nice work.
Well done :thumb:
 
@mspider65

Thanks for your good work!

One part I want to ask: can you tell what the battery power filter with alpha calculates? Something like cos phi or eta for the motor? [Edit: no, just had a look again, it's only depending on former and new value]
And what I noticed now having the possibility to read pedal power directly on the display: without torque sensor calibration (and compensating non-linearity) the values are more random than real usable values.
 
Beli said:
I finally have my display with ESP32 working.
It's inside a sealed weather resistant ASA 3D print including anti-reflective glas, haptic feedback motor and a battery buffered real time clock and break connectors, display directly plugged at the motor. Dimensions only 74x45x16mm. Still more program coding to do, like Bluetooth connection to Smart BMS...
Beautiful build!!
 
fietstasss said:
Thanks for your reply!

Indeed, the hall-sensor cables have been repaired, as i also suspected them from being broken.
As this didn't help, i also took away the plastic potting around the pcb and did a proper continuity-test on those cables, that all seems ok.

But, after your reply i went to the next step and tried to measure the hall-sensor as described here:
https://endless-sphere.com/forums/viewtopic.php?f=3&t=105444&p=1543436&hilit=led+hall#p1543566

In short, i've placed 5v+ on the red wire, and GND on the black wire.
Then, through a 10K resisor, i applied the 5v also the my red measurement probe, and connected the black measurement-probe to GND.
I then measured the blue, green and yellow wire individually whilst rotating the motor axle.

Interpretation of the result is not very clear to me, it seems like the yellow one gives a bit of a strange result (only passing through 3.5v instead of 5v (can be seen from ~0.34s))

To enable you guys to check it, i've made movie of the results, what do you think?
To make it easier to speak about, order of measuring in video was Blue > Green > Yellow (both on connector and on motor)

[youtube]kB0rWImvquE[/youtube]

Anyone with an idea about these Hall-Sensors? Is the yellow-wired one broken?
 
Hello,
first of all a big thank you mspider and also other developers of tsdz2!
Ive ordered at pcbway and git a mail today.
Code:
Hi,
Please find picture attached,positions U6,U7 component we purhcased as per part number#M74VHC1GT126DF1G component is smaller than pads in your deisgn , but can be soldered. Shall we go ahead ?
Pls change land pattern as per component datasheet in future orders.

I think thats not a problem, but i want to make sure and answer the mail after i got a reply here. Also an information for future orders.
 

Attachments

  • T-B2W357345A.jpg
    T-B2W357345A.jpg
    135.5 KB · Views: 1,651
huan said:
Hello,
first of all a big thank you mspider and also other developers of tsdz2!
Ive ordered at pcbway and git a mail today.
Code:
Hi,
Please find picture attached,positions U6,U7 component we purhcased as per part number#M74VHC1GT126DF1G component is smaller than pads in your deisgn , but can be soldered. Shall we go ahead ?
Pls change land pattern as per component datasheet in future orders.

I think thats not a problem, but i want to make sure and answer the mail after i got a reply here. Also an information for future orders.

This the first time Pcbway give this warning. Since the component code is correct and all the previous orders went well, i think also it isn't a problem.
 
@ mspider65 are you interested in a new infinion controller for the tsdz2?

MFG Michael
 
Pooyan said:
pgwguk said:
I installed the board on an 8 pin controller, so slight difference on the colours referenced in the wiki - I can help to update this if needed.

I also have an 8 pin controller i.c.w. a VLCD5 display, do you have a schematic where i can see which colours you need for the connection BT PCB to controller?

Hi
My controller is also the 8pin version.
Could You post a schematic for it?
Or point me to the right direction...

Thanks
 
@mspider65

I noticed that updating the STM8S firmware didn't work with my built display. Obviously it takes too long to power up the ESP32 at the module I use - longer than the available one second to trigger the STM8S bootloader.

I found now a different way. I used the free ui8_rx_buffer[5] from message ID 1 to initialise the STM8S reset command WWDG_SWReset()
With that when starting the firmware update from Android app it runs straight through without the need of powering off and on.
Maybe it would be something to include in any future release by you too.
 
Beli said:
@mspider65

I noticed that updating the STM8S firmware didn't work with my built display. Obviously it takes too long to power up the ESP32 at the module I use - longer than the available one second to trigger the STM8S bootloader.

I found now a different way. I used the free ui8_rx_buffer[5] from message ID 1 to initialise the STM8S reset command WWDG_SWReset()
With that when starting the firmware update from Android app it runs straight through without the need of powering off and on.
Maybe it would be something to include in any future release by you too.

Good idea! I did not know that the bootloader could also be activated with a soft reset.
 
mspider65 said:
Good idea! I did not know that the bootloader could also be activated with a soft reset.
I was not sure about that too - just tried and it works.
 
The TSDZ2 motor controller V2 is a way more capable hardware to implement FOC (ARM 32bits 64MHz VS STM8 8bits 16 MHz, and with added 3 motor phase current sensors), which will mean more efficiency motor control and less noise. Also the microcontroller manufacturer provides a ready code for FOC witth an application note documenting, so should be very fast to get it working!!

With TSDZ2 motor controller V2, there will be no need to do hall sensors calibrations and we can have sure to get the best efficiency possible and lowest noise.

The cost of the motor controller V2 is the same 35€ as old motor controller. The only thing that changes is the programmer to flash the firmware, that is the J-Link but is also very cheap as it costs 4€ on Ebay.

This is a call for help, because, if more developers help, I am pretty sure we can have the very first working version of the firmware in 1 month or less!

I just started the very initially firmware, here the repository: https://github.com/OpenSourceEBike/TSDZ2_motor_controller_v2
We also have all the information about the hardware, like all datasheets and application notes of the new microcontrollers as also all other chips.

And building the very initial code:
Screenshot-from-2021-04-27-08-52-49.png
 
I can confirm that, the engine was significantly quieter with the new controller. the original software is nowhere near as good as the V12!

MFG Michael
 
New version released.
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
- Android: TSDZ2_ESP32v2.1.9.apk
- ESP32: TSDZ2-ESP32-Mainv1.1.7.zip
- STM8: TSDZ2-v13.zip

This version contains mainly some fix to the Motor Controller.
In particular:
- the annoyng problem of the "power glitch" which rarely occurred is solved.
- removed potential overrun error in ADC buffered values read
- PWM frequency reduced to 18KHz
- PWM "Dead Time" increased from 1us to 1.5us

Regarding the "Dead Time" increase, i found the OEM Firmware uses a vales of 3,1us but the original OSF firmware used a value of only 1us. Dead time is a very delicate parameter and its incorrect setting can cause higher consumption and in the worst case serious overheating of the controller.
I only did a test ride of a couple of hours and my impression is that this intervention has further reduced the power consumption. I await your feedback for confirmation.
 
Im wondering what the reasoning for the reduce to 18kHz PWM is? Is it timing given the extra instructions to read the ADC in the PWM interrupt?
 
Back
Top