New "TSDZ2 Torque Sensor Central Motor"

Huguenot said:
Greetings all.
My wife's cargo trike is still at OSF 6.3. It's buggy, but we have learned to live with it. Usually works fine, sometimes we have to restart 5-6 times to avoid a whine/growl. Once we get it running quietly it will behave all day.
Recently it has added the annoying habit of the odometer resetting to 188.1 miles. It had been over 500 before. The trip meter works, and the odo increases in step with it, but when we power off and on again the trip resets like it should but the odo always returns to 188.1.
Anyone have any ideas?
Yes, I know -it's past time to upgrade to 1.0/1.1. I have the cables but no PC (we are Mac based) and am way more of a machinist/fabricator than a software guy anyway.
Is there someone the Palo Alto-San Jose California area willing to upgrade this thing for me? Beer, cash, machine work, whatever.
Thanks -Paul

Thanks a lot for this great peace of software.

The only problem is the Odometer Value. It is been resetted every new start of the display to the value 1646.6 km. I've installed v 1.0.0 with a 860c display.

How can i avoid this behavior?

Thanks a lot!

Maximilian
 
I would like to share my latest new experience using my TSDZ2 EBike and how special it is.

First, today I rode for the very first time in a group of road cyclists, I wanted to do that since 5 months ago with a new road bicycle but I simple could not buy it due to the limitations of supply happening worldwide.

There was pieces of road that I had to sustain pedaling at 58km/h (a lot of adrenaline) or I would be left back - this was with my mountain bike, full suspension, 2.25 inches tires!! So this is very special, having an EBike motor that is unlocked and can keep assisting me up to 60km/h, including being able to be installed on a frame that have space for a big 52T chain wheel.



And about special technology, I talked with a colleague that had a bicycle with electric shifting gears. And the gears have a small battery inside the frame, that works for about 6 months. And amazing that is all wireless, he can see the gear number on his GPS Garmin display, including the battery charge state of the gears.
This bicycle also have integrated buttons on the handle bar for page change of the GPS Garmin display.

Another very special topic me controlling my blood sugar while riding. Since I have pre-diabetes, I am using a sensor on my arm that gives me real time blood glucose value, which I need to control to avoid "crashing" / go to low, which can happening during sports.

Usually I see the real time value on my phone or on my sports watch, which is not a good solution while riding:



But I just had to install with 2 clicks a software that shows me the real time blood glucose value on the bicycle GPS display, along with all the other data like TSDZ2 battery charging state, assist level and my heart rate:



This is as special the technology got. I now can see in real time my blood glucose on the bicycle GPS display, and find if when I should eat some carbs, and extrapolate the amount I need for my current sports intensity!!

And in the end, I can even look at a graph of the variation while the ride:


And even more personalized will be when we can develop the piece of software to show on the GPS display the amount of human power I am doing on the pedals, reading the TSDZ2 torque and cadence sensors.

Due to the diabetes, I am on a almost no carbs diet. I did wake up, eat a piece on butter (only fat!) and then I rode for the next 4 hours while eating nothing, just drinking water with salts - so I did follow the diet, to burn only fat. It was ONLY possible to do this because of TSDZ2 motor help, as you can see I were always on the 3 and 4 heart rate zone, never on the maximum.

I woke up with glucose value of 95, which is more near a diabetic value, then during the ride my body did increase it up to 120 but after resting 1.5h after the ride, I went to value of 80 which is from a healthy person - this are very good results, the impact of sports on my health.

So yes, my EBike with TSDZ2, running our OpenSource firmware and with the TSDZ2 wireless controller, is a very special fitness and health machine :D

And the display on the EBike should not be only about the motor and the battery, there are today much more important personalized data to show!
 
feketehegyi said:
I've put my HC-05 bt module into the 8 pin connector. The good with this terminal is that it has +5v as well so can give power to the module directly.
[youtube]vYf6pw17Wno[/youtube]
Interesting idea to use that 5V line and avoid to use a DC-DC converter, but yes, a limitation to 8 pins version only.

I did not yet understand how do you control TSDZ2, is all on the mobile app? What if the communication fails temporary on the phone?
 
casainho said:
feketehegyi said:
I've put my HC-05 bt module into the 8 pin connector. The good with this terminal is that it has +5v as well so can give power to the module directly.
[youtube]vYf6pw17Wno[/youtube]
Interesting idea to use that 5V line and avoid to use a DC-DC converter, but yes, a limitation to 8 pins version only.

I did not yet understand how do you control TSDZ2, is all on the mobile app? What if the communication fails temporary on the phone?

It works also without the phone. You know factory default firmware has basic settings which becomes active if there's no display connected. So, this happens to when it loses communication falls just back to state when there's no display.
I've actually changed some of these default values too. eg. max speed, wheel dia, assist level:
https://github.com/wptm/tsdz2_maxspeed_wheelsize_assistlevel
Here's the complete patched firmware:
https://github.com/wptm/voamca
And the app:
http://www.wptm.hu/ebmdisplay/
 
casainho said:
There was pieces of road that I had to sustain pedaling at 58km/h (a lot of adrenaline) or I would be left back - this was with my mountain bike, full suspension, 2.25 inches tires!! So this is very special, having an EBike motor that is unlocked and can keep assisting me up to 60km/h, including being able to be installed on a frame that have space for a big 52T chain wheel.

Hi Casainho,
I've really enjoyed your summary again. 58km/h is really high. And yes, when I try to keep up with hard cyclist I need to go really above 40km/h. Actually they can beat me on flat surface without wind. But if it goes upwards or there's wind I can keep with them with my TSDZ2. :)
 
feketehegyi said:
It works also without the phone. You know factory default firmware has basic settings which becomes active if there's no display connected. So, this happens to when it loses communication falls just back to state when there's no display.
I've actually changed some of these default values too. eg. max speed, wheel dia, assist level:
https://github.com/wptm/tsdz2_maxspeed_wheelsize_assistlevel
Here's the complete patched firmware:
https://github.com/wptm/voamca
And the app:
http://www.wptm.hu/ebmdisplay/
Oh I see. The motor controller is always on. That is probably the most cheap and minimalist way to have control on TSDZ2.
 
Hi Casainho

Thank you for developing the open source firmware for the tsdz2. It rocks!

Recently I wanted to change out my rim brakes to hydraulic brakes with the Magura mt5e, which has a built in connector for brake sensors. What I didn’t realise is that there are two versions. A normally closed and a normally open version. This indicates what state the brake is in electrically for the motor to understand if it’s been pulled.

I unfortunately got the brake lever type that always makes the firmware think that it is braking. I can start the motor if I pull the brakes, but not when I have it released.

Is it possible to make a minor adjustment in the firmware to do the opposite, so that my normally closed brake sensors will be a normally open by software instead? A UI option would be nice, so that that there isn’t a fragmentation of versions for the firmware.

If you don’t have time, I will need to possibly try my hand at building the firmware on my windows pc. But I hope this request isn’t too big and it’s a trivial fix.

Many thanks
 
Dimball said:
Hi Casainho

Thank you for developing the open source firmware for the tsdz2. It rocks!

Recently I wanted to change out my rim brakes to hydraulic brakes with the Magura mt5e, which has a built in connector for brake sensors. What I didn’t realise is that there are two versions. A normally closed and a normally open version. This indicates what state the brake is in electrically for the motor to understand if it’s been pulled.

I unfortunately got the brake lever type that always makes the firmware think that it is braking. I can start the motor if I pull the brakes, but not when I have it released.

Is it possible to make a minor adjustment in the firmware to do the opposite, so that my normally closed brake sensors will be a normally open by software instead? A UI option would be nice, so that that there isn’t a fragmentation of versions for the firmware.

If you don’t have time, I will need to possibly try my hand at building the firmware on my windows pc. But I hope this request isn’t too big and it’s a trivial fix.

Many thanks
Sorry, I am very busy. And that seems a specific need of you, so I think you should do it. Should be easy for you to invert the logic on the firmware.
 
Ok, I am trying to follow the steps for setting up the tool chain in windows now. There are some weirdness, but probably my setup. I will dig in and see where I get to.

Thanks
 
Ok, I have stumbled on some toolchain blocks. I seem to need the stm8 gdb tools, but i cannot install it properly. I get errors running make and make install. Any ideas
 
Right, bit further along. I got it creating a release. But the file is only 64kb. I am using the source code that was found at https://github.com/OpenSourceEBike/TSDZ2-Smart-EBike

Is this file correct? Maybe there is some optimisation going on in the sdcc version i am using? But first look, on the size, it looks wrong to me.

SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.8.0 #10562 (Linux)
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
i am building the stm8 bin utils from source using stm8-binutils-gdb-sources-2020-03-22.tar.gz <-- is this the version you are using?

is this allright? If not which version should I have?
I also get this in my build:

error.png

there is the unreachable code part there. Not sure if it is relevant or not, but I have not done anything to the source code. Is it supposed to be that? edit: It is supposed to be like that. It never goes out of the while loop, which is as expected.

Can you do another build from the current source code, and see if you get the same size as i am? My hex file is 64kb.

It does output a hex file, but I am not sure to flash the firmware and then find out that it is broken. I suppose I could always flash it back to the 1.1.1 hex file (but I am not sure if it would totally die or not, but you are better to answer that Casainho).

btw the wiki did not mention anything about the stm8 bin utils or even GCC which needed to be installed, so maybe something to add in the WIKI?


EDIT:
Good news is that I have managed to successfully flash the motor firmware and it seems to be working fine, so my toolchain is correct at least! Yay!

Bad news is that the logic for inverting the brake signal for normally closed brake circuits is only fine if you have one brake lever. Having two in normally closed will not work as they are both connected to the same GPIO pin, and thus even when I managed to invert the value, I would have to pull both levers to get it to send the correct brake signal.

My only option then is to hack into the Magura brake lever and then physically alter the momentary switch to be placed in the normally open position which is outlined in a youtube video actually. So this is possible. Obviously I could shell out more money to get a new lever that is normally open, but that is no fun, and learning how to hack into the electronics of a lever is always more satisfying (when it works obviously, when put back together again).
 
Incredible resources here. I have just finished installation of my first tsdz2 750w with 48v battery. Mine came with vlcd6 so it appears I’m limited to what I can change. I have removed the 25kph setting but I can’t quite work out what I should change re the tyre size to enable further increase in speed? Do I suggest I have a smaller tyre than I really do (I have 700c on bike)
Thanks for any help
Dan
 
Dan:

You are probably better off getting more gears on the TSDZ2. I got a triple chainring, so that I can use 34, 44 to 52 tooth chainrings on a 11-25 cassette on the back. Max speed on this config using a 26 inch wheel is about 35 mph, with the same motor and battery configuration as you have.
 
Dimball said:
Dan:

You are probably better off getting more gears on the TSDZ2. I got a triple chainring, so that I can use 34, 44 to 52 tooth chainrings on a 11-25 cassette on the back. Max speed on this config using a 26 inch wheel is about 35 mph, with the same motor and battery configuration as you have.

Thanks for this, I’ll certainly look at getting a bigger front ring as the standard 42 does seem pretty small ratio wise. Are the ring fittings standard(?) assume so
 
Tefoonez said:
Dimball said:
Dan:

You are probably better off getting more gears on the TSDZ2. I got a triple chainring, so that I can use 34, 44 to 52 tooth chainrings on a 11-25 cassette on the back. Max speed on this config using a 26 inch wheel is about 35 mph, with the same motor and battery configuration as you have.

Thanks for this, I’ll certainly look at getting a bigger front ring as the standard 42 does seem pretty small ratio wise. Are the ring fittings standard(?) assume so

There are a few different chainrings you can buy that are specific to the motor, or there is also an adapter so you can use standard chainrings.

You need to be aware that:
  • The bike chainstay may interfere with bigger chainrings, depending on your bike frame geometry. You can buy a bottom bracket spacer to move the motor outwards. But..:
  • Chainline: I'd avoid having the chain be too much crossed (especially when on the biggest gear at the back). Bottom bracket spacer, chainring bigger than 44t forcing the motor to be further out (bigger sizes are not dished inwards IIRC), multiple chainrings, all make this worse. ]

IMO this motor is designed with 25kph speed restriction in mind, hence the included chainring size (which is perfect for 25kph), so if you want to go faster, it's a bit of fiddling and tradeoffs.
 
Thanks. I cycle a lot so am aware of putting too much stress on chain by having cross alignment but appreciate the point.
 
Hello,

Yesterday I gone to my first "long" ride (about 50kms) and at about half the ride, suddenly, the bike become very hard to use. Even when I go down hill it's look like you use your brakes. While it work well with assistance, without it became a real pain to use. The engine only ride about 180kms.

Today I put the bike on a support, remove the chain, and turn the crank with my hand. It's hard and I can ear some gear noise. Does anyone have advice to solve this problem ? Blue gear ? More grease ?

Thank you,
Manu
 
Dimball said:
Bad news is that the logic for inverting the brake signal for normally closed brake circuits is only fine if you have one brake lever. Having two in normally closed will not work as they are both connected to the same GPIO pin, and thus even when I managed to invert the value, I would have to pull both levers to get it to send the correct brake signal.

My only option then is to hack into the Magura brake lever and then physically alter the momentary switch to be placed in the normally open position which is outlined in a youtube video actually. So this is possible. Obviously I could shell out more money to get a new lever that is normally open, but that is no fun, and learning how to hack into the electronics of a lever is always more satisfying (when it works obviously, when put back together again).

... Or you connect the 2 brake levers in series instead of in parallel.
 
lafuente said:
Hello,

Yesterday I gone to my first "long" ride (about 50kms) and at about half the ride, suddenly, the bike become very hard to use. Even when I go down hill it's look like you use your brakes. While it work well with assistance, without it became a real pain to use. The engine only ride about 180kms.

Today I put the bike on a support, remove the chain, and turn the crank with my hand. It's hard and I can ear some gear noise. Does anyone have advice to solve this problem ? Blue gear ? More grease ?

Thank you,
Manu

I found : too many thermal paste in the motor. It melt with the grease on the gears and make it hard to turn. Cleaning it and apply new grease solved the problem.
 
Hey all,

This is going to be a real 'noob' post - so apologies in advance.
I just brought a TSDZ2 kit to convert my Nihola family cargo trike to an e-bike, it's a 36v, 250w motor with a backbreak and the usage is just for driving around city streets, not terribly fast but with some extra support to save my knees when going up hill.
I've read all the articles I could find online about converting the nihola's and the TSDZ2.
My question is, for reasons, I'd prefer to not have the display, the break or other controllers on the handlebars, what I'd ideally like is just to fit the battery and the motor and that's it, let the Torque sensor handle the decisions of how much support to give. Really as simple as possible.
I found a deleted thread here : https://webcache.googleusercontent....-works-great.41288/+&cd=1&hl=en&ct=clnk&gl=de that suggests I would need to bridge pin 2 and 3 on the cable - but this guy seems to have a cable with 8 pins rather than what I've got which has only 6 pins
TSDZ2_wireless-schematic.png

Has anyone heard of this before? Does it sound totally insane? I thought I'd check before I potentially brick the motor.
 
Hello Casainho and all Community,

Open source firmware for the tsdz2 is great and I am happy using it for few months.
Sometimes I just got sth wrong on the display (850c) showing speed grater then 100 or 200 and then motor doesn't work. Did You have such a problems?
And here is my bike:
https://photos.app.goo.gl/iRGdRK4SsfTsLF5K7
 
istasz said:
... speed grater then 100 or 200 and then motor doesn't work....
Probably a bouncing speedsensor, which could happen if the spoke magnet is to close to the sensor. Try to keep a bit more distance between sensor and magnet (~10mm}
 
Dimball said:
Hi Casainho

Thank you for developing the open source firmware for the tsdz2. It rocks!

Recently I wanted to change out my rim brakes to hydraulic brakes with the Magura mt5e, which has a built in connector for brake sensors. What I didn’t realise is that there are two versions. A normally closed and a normally open version. This indicates what state the brake is in electrically for the motor to understand if it’s been pulled.

I unfortunately got the brake lever type that always makes the firmware think that it is braking. I can start the motor if I pull the brakes, but not when I have it released.

Is it possible to make a minor adjustment in the firmware to do the opposite, so that my normally closed brake sensors will be a normally open by software instead? A UI option would be nice, so that that there isn’t a fragmentation of versions for the firmware.

If you don’t have time, I will need to possibly try my hand at building the firmware on my windows pc. But I hope this request isn’t too big and it’s a trivial fix.

Many thanks

I have both versions the normally closed and normally opened version. They are equal. If you disassemble the Magura lever until you see pcb, you can turn the pcb 180 degrees and you will have a normally opened or closed contact. Probably you will just have to resolder the cable
 
Yeah, just did that following a YouTube tutorial, and now it works as expected! At least I now know how it all works and can fix stuff if needed:)

Thanks
 
Back
Top