TSDZ2 48v 2020 new firmware

Do we know the motor parameters for the TSDZ2? We need senseful values for making the motor run in sensorless mode with the DAVE FOC APP. This are the default settings in the APP:

motor parameters.JPG

regards
stancecoke
 
michih. said:
Here:
https://enerprof.de/motor-kits/display-ersatzteile/tongsheng/

MFG Michael
Can you please add this information to the repository, so people do not need ask again and again?
 
Edit: My purpose in posting this was to alert people to purchasing from Enerprof (as mentioned above) and in the UK the postage costs !!! Sorry for being off-topic.

My device has now arrived DHL. It has a scratched screen and has obviously seen use, been returned and resold to me!! Not a happy bunny. We shall see what Enerprof have to say :(


Just a warning after having purchased the new 560C display https://enerprof.de/en/motor-kits/display-parts/tongsheng/906/enerpower-tft-560c-color-display-uart-2-2-inch-tongsheng-compatible?c=234

edit: I thought the 560C was new!!! The "translation" said "This product will be released at 21 May 2021"
but now I've seen a post from Oct 01 2018 that mentions it - doh!!! Still it looks nice and small.

15 Euros postage to UK !!!! Didn't catch it as I wouldn't have bothered. :(

By the way great work all, it's a really interesting thread. I'm waiting to see what motor I will get from OKfeet on Aliexpress.
 
stancecoke said:
Do we know the motor parameters for the TSDZ2? We need senseful values for making the motor run in sensorless mode with the DAVE FOC APP. This are the default settings in the APP:

motor parameters.JPG

regards
stancecoke

I think it calculates and makes pretty good guesses from the inductance and resistance. Seems to be fairly insensitive. Just measure them and let it calculate the others...

LCR meter, VESC or... MESC can tell you if you plug in the debugger :wink:
 
stancecoke said:
Do we know the motor parameters for the TSDZ2? We need senseful values for making the motor run in sensorless mode with the DAVE FOC APP. This are the default settings in the APP:

file.php
Yes we have!! A developer, at very beginner of this developing our firmware to motor controller V1, did measure the resistance and inductance of the motor, using the tools at his work. We have the value of:
- motor voltage
- no load speed
- motor resistance
- motor inductance
- pole pair

We have everything :)
 
casainho said:
stancecoke said:
Do we know the motor parameters for the TSDZ2? We need senseful values for making the motor run in sensorless mode with the DAVE FOC APP. This are the default settings in the APP:

file.php
Yes we have!! A developer, at very beginner of this developing our firmware to motor controller V1, did measure the resistance and inductance of the motor, using the tools at his work. We have the value of:
- motor voltage
- no load speed
- motor resistance
- motor inductance
- pole pair

We have everything :)
I think @abrainer is testing to run the motor, I hope he can test using this data. I updated the repository with the technical characteristics of TSDZ2 electric motor:

 
casainho said:
I think @abrainer is testing to run the motor, I hope he can test using this data.

We tried a lot over the weekend, but the transition from open loop to FOC mode always fails. :(
Without understanding, how the code works and targeted monitoring of relevant variables at runtime we won't get anywhere at this point.

perhaps @mxlemming can give a code example, that worked on his controller.

regards
stancecoke
 
stancecoke said:
casainho said:
I think @abrainer is testing to run the motor, I hope he can test using this data.
We tried a lot over the weekend, but the transition from open loop to FOC mode always fails. :(
Without understanding, how the code works and targeted monitoring of relevant variables at runtime we won't get anywhere at this point.
And do you think it is possible to move forward?
 
casainho said:
it is possible to move forward
for me, without hardware, it's not possible.

@mxlemming had the same issue obviously, he solved it in the end:
https://www.infineonforums.com/archive/index.php/t-10770.html?s=268001e32bfdec80d8c733125fcafc7f

regards
stancecoke
 
stancecoke said:
casainho said:
it is possible to move forward
for me, without hardware, it's not possible.

@mxlemming had the same issue obviously, he solved it in the end:
https://www.infineonforums.com/archive/index.php/t-10770.html?s=268001e32bfdec80d8c733125fcafc7f
I have the hardware so I should try. Please tell me your suggestions on what I should do and take care. And I hope you did update the code so I can use it.

So looking at the link, seems he had and issue with an incorrect opamp but since our hardware is already tested, we should have no such issue.

About the hall sensors, is everything already setup to use them?
 
Hi all,

My issue with the transition was hardware related to crappy TI opamps that phase inverted just below the bias voltage. I replaced the opamps with on semi ones (no idea what part codes, not that it matters) and it immediately worked perfectly and was fairly insensitive to parameters - I had a massive alien outrunner 50kV 65uH running with the same settings as an 1100kV 2826 turnigy with 6uH...

If it's not making the transition, my guess is that your current readings are messed up. Perhaps you're not reading the right channels, they're inverted, swapped over, should be differential... Could be all sorts... And the xmc1300 series has some kind of funny gain settings.

I don't have the hardware to hand, so I'll be of limited use to you... I'll have a quick look through the thread for setup and writing info.

Edit: i just remembered i made a batch of dev boards for this xmc1300 and have them soldered up! So at the least I can join you all in compiling and looking through things. Might be able to shoe horn it into some power stage if I'm really enthusiastic...
 
Good news! :)

@abrainer managed to get the motor running in sensorless FOC mode, the error was just the wrong polarity for the half-bridge drivers....

I've updated the masterbranch with his settings already. The motor runs just with a hardcoded setpoint at the moment. There is no throttle input supported yet.

[youtube]9HIKruFkAw0[/youtube]

regards
stancecoke
 
stancecoke said:
Good news! :)

@abrainer managed to get the motor running in sensorless FOC mode, the error was just the wrong polarity for the half-bridge drivers....

I've updated the masterbranch with his settings already. The motor runs just with a hardcoded setpoint at the moment. There is no throttle input supported yet.

[youtube]9HIKruFkAw0[/youtube]

regards
stancecoke

Good news indeed! :)

I'm expecting a couple of the new controllers tomorrow - so time permitting will start to take a look at the non motor control side of things - I'm still learning about motor control so i'm probably better suited to bootloader work and general porting of existing code - but always happy to learn if I've got the time... :)
 
This is fantastic news. You're well on your way to having probably the best FOC controller going.

With this in mind, do you have any interest in me forking the MESC and replacing the stm32 with this mcu? It wouldn't take me much effort (few evenings to do the hardware) and then you could have this running on 16-20s and 80+ phase amps (I've tested up to 16s80A phase and 20s on the bench with 10A or so). which would get interesting for hub motors of moderate power :lol:

However, to make this worthwhile, we would need a setup routine that could calculate hall sensor positions, inductances, resistances... I've already done this on stm32, it's not hard though.

Now... Some advice from my Infineon experiences:
1) Infineon doesn't implement safety limits like over current, over voltage etc by default. It will readily let you burn your FETs. I've burnt more FETs on my Infineon board than all others I've ever made put together... That's 4 FETs.
2) it relies on external trap input. I messed up my comparator calcs when i made my board and so they never tripped... Someone with a board ought to reverse engineer what's been done to implement protection at hardware level

If there's no hardware shut down option, I'd advise trying to force a quick line of sanity check into the fast loop... Force a break state if you exceed current and voltage limits on a cycle by cycle basis. TBH, implementing this is likely very useful for porting to other hardware...

Edit:
PXL_20210504_195323442.jpg

I just found this i made ages ago! Dev board to just try out an infineon chip... By complete coincidence it's exactly the same mcu. Currently it's employed generating pulses for my hacked together spot welder.
 
stancecoke said:
Good news! :)

@abrainer managed to get the motor running in sensorless FOC mode, the error was just the wrong polarity for the half-bridge drivers....

I've updated the masterbranch with his settings already. The motor runs just with a hardcoded setpoint at the moment. There is no throttle input supported yet.
Congratulations, good work!!

I removed the "main" branch and merged to the "master" branch. I also renamed the NEW folder to DAVE_FOC_PROJECT.

Yes, adding throttle input to control the motor phase current, would be the best. And seems this controller as a free analog input pad so we can connect there the motor temperature sensor and keep the throttle - can anyone check this?
 
mxlemming said:
This is fantastic news. You're well on your way to having probably the best FOC controller going.

With this in mind, do you have any interest in me forking the MESC and replacing the stm32 with this mcu? It wouldn't take me much effort (few evenings to do the hardware) and then you could have this running on 16-20s and 80+ phase amps (I've tested up to 16s80A phase and 20s on the bench with 10A or so). which would get interesting for hub motors of moderate power :lol:
I think the good of this TSDZ2 motor is that there is not need to mess with hardware, to much. I think is hard to build a motor controller and anyway that would not be an advantage since TSDZ2 motor controller is very complete e very cheap costing 30€ only!!

I am not being following other threads about motor controllers but If I wanted to do one, I would then make a substitute to the KT motor controllers because they are really cheap, so users could swap one electronics for the other but keeping the same metal case and possible wiring and connectors, because at least the metal case is expensive and difficult for DIY.
 
beemac said:
I'm expecting a couple of the new controllers tomorrow - so time permitting will start to take a look at the non motor control side of things - I'm still learning about motor control so i'm probably better suited to bootloader work and general porting of existing code - but always happy to learn if I've got the time... :)
Yes, please port the existing code. The TSDZ2 EBike wireless controller is now working very well as also the wireless remote. And the displays would also work.

You have the development flash and debug configurations ready, just the same as on the TSDZ2 wireless project, should be very quick for you. The only different part is the programmer that is the cheap 4€ J-Link instead of ST-LinkV2. I will also be able to help but I need to setup the hardware as I did not yet this parts and it takes time and space :)
 
casainho said:
mxlemming said:
This is fantastic news. You're well on your way to having probably the best FOC controller going.

With this in mind, do you have any interest in me forking the MESC and replacing the stm32 with this mcu? It wouldn't take me much effort (few evenings to do the hardware) and then you could have this running on 16-20s and 80+ phase amps (I've tested up to 16s80A phase and 20s on the bench with 10A or so). which would get interesting for hub motors of moderate power :lol:
I think the good of this TSDZ2 motor is that there is not need to mess with hardware, to much. I think is hard to build a motor controller and anyway that would not be an advantage since TSDZ2 motor controller is very complete e very cheap costing 30€ only!!

I am not being following other threads about motor controllers but If I wanted to do one, I would then make a substitute to the KT motor controllers because they are really cheap, so users could swap one electronics for the other but keeping the same metal case and possible wiring and connectors, because at least the metal case is expensive and difficult for DIY.
MESC vs KT metal box.PNG
Of all the things you could possibly want to keep hold of, the enormous ugly metal box is surprising.

I will watch this with interest regardless, and if the results seem particularly good... I guess I shall have to make a fork ;) To be honest, the DIY EBike community kind of needs a good alternative to VESC, which is... not especially good motor control with a shiny interface. While we'd probably all be better of with Lebowski code, the assembly and dsPIC is remarkably off putting.
 
mxlemming said:
Of all the things you could possibly want to keep hold of, the enormous ugly metal box is surprising.

I will watch this with interest regardless, and if the results seem particularly good... I guess I shall have to make a fork ;) To be honest, the DIY EBike community kind of needs a good alternative to VESC, which is... not especially good motor control with a shiny interface. While we'd probably all be better of with Lebowski code, the assembly and dsPIC is remarkably off putting.
You are comparing the wrong KT motor controller case, as there are very small ones for the 250W motors. Since I know, that cases are kind of standard on the EBike motor controllers.

If you develop and EBike motor controller, then consider to integrate our EBike wireless, that works with Bluetooth phones and GPS cycling displays, all wireless.
 
casainho said:
mxlemming said:
Of all the things you could possibly want to keep hold of, the enormous ugly metal box is surprising.

I will watch this with interest regardless, and if the results seem particularly good... I guess I shall have to make a fork ;) To be honest, the DIY EBike community kind of needs a good alternative to VESC, which is... not especially good motor control with a shiny interface. While we'd probably all be better of with Lebowski code, the assembly and dsPIC is remarkably off putting.
You are comparing the wrong KT motor controller case, as there are very small ones for the 250W motors. Since I know, that cases are kind of standard on the EBike motor controllers.

If you develop and EBike motor controller, then consider to integrate our EBike wireless, that works with Bluetooth phones and GPS cycling displays, all wireless.

I'm not comparing the wrong one... The little MESC board in that pic can push many kW.... so I am comparing it to the 1.5kW KT case.

If I made a 250W board, it would be <half the size again.

Thanks for the tip on the wireless. One day!

I still contend that real first rate motor commutation is the primary goal, since it gives battery life, speed, reliability... features are secondary.
 
casainho said:
but keeping the same metal case and possible wiring and connectors

I would recomment to use the Hailong-case shape for a homebrewed universal controller, the battery case is very popular and you get a much more clean appearance at the bike, with no additional controller case...

https://www.ebay.com/itm/173619579472

regards
stancecoke

s-l1600.jpg

s-l1600.jpg
 
mxlemming said:
I'm not comparing the wrong one... The little MESC board in that pic can push many kW.... so I am comparing it to the 1.5kW KT case.

If I made a 250W board, it would be <half the size again.
Your board would need to have advantages over the others other way why bothering?, so, putting a more powerful controller inside the same case would be a big advantage. Also if this controller is for DIY, then I would use extra space to add pads for extra DIY circuit / inputs, like analog and digital inputs / outputs -- this would be another advantage and distinguish between the other commercial controllers. For TSDZ2 we use an extra analog input foe the motor temperature sensor. And users look for other outputs for control lights. KT motor controllers are nice because they also have some of this extra pads / connections.

And the wireless is characteristic of the most expensive EBikes but is cheap to add to the board and he already developed the firmware, so, would give even more value to this controler.
 
michih. said:
https://www.ebay.de/itm/174321114587

This are the right J-Link?

MFG Michael

Are these like... Not illegal clones? Chance of segger sending me letters if I use this?

I bought the segger j link edu since everything we do on this forum is basically for education, fun... Not for profit.

Unfortunately the edu is in short supply at the moment and therefore hard to get hold of.

stancecoke said:
casainho said:
but keeping the same metal case and possible wiring and connectors

I would recomment to use the Hailong-case shape for a homebrewed universal controller, the battery case is very popular and you get a much more clean appearance at the bike, with no additional controller case...

https://www.ebay.com/itm/173619579472

regards
stancecoke

This looks really really tidy! Unfortunately there's no chance atall of it fitting on my bike frame :(
 
michih. said:
https://www.ebay.de/itm/174321114587

is that the right j-link
Yes, I bought that one although I did not yet tested it. That is just the same concept as the cheap ST-LinkV2 we use to flash TSDZ2 motor controller firmware and the displays firmware.
 
Back
Top