TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

jbalat said:
maximusdm said:
@ Cas
I run today 0.15 with current ramp for lag. In my opinion the fix is solid even when starting in 8th gear. Previously the lag was 2s +.

The power delivery is solid gold, bike is very responsive. I can hit 45km/h with 0.4 assist using 220w.

Max,
I couldnt find where to make the change so I just set the inverse ramp again down to 20 which works well for me...
I looked in motor.c and motor.h but couldnt find where to set the current ramp ?
Yeh I think the new assist levels work well, just need a bit of tweaking as they are too powerful for me :)
I think I did mention the current ramp configuration value is on config.h.

I wounder if the rate of 5 amps/second is fast enough. What would be the value for the guys that prefer torque/force? And for the others that prefer to save the gears?
 
Hi Casainho I will have another look for it, but I have to say I really love the assist levels based on human power. It feels like you get rewarded when you peddle harder, I don’t know why but I also used less battery than normal.
Good Work :thumb:

Oh my speed sensor connection is really dodgy, I’m a bit scared to flash again... but I really need to fix the problem with leaning on the peddles and motor cutting out :(
I’m thinking about soldering the motor wires to the sensor cable but leave another connector which I can use just for flashing, do you think you can still flash while the sensor is connected ?

I wounder if the rate of 5 amps/second is fast enough. What would be the value for the guys that prefer torque/force? And for the others that prefer to save the gears?
It would be so cool if we could set this value in one of the config menus !!!
 
jbalat said:
Max,
I couldnt find where to make the change so I just set the inverse ramp again down to 20 which works well for me...
I looked in motor.c and motor.h but couldnt find where to set the current ramp ?
Yeh I think the new assist levels work well, just need a bit of tweaking as they are too powerful for me :)

I used the already created branch(https://github.com/OpenSource-EBike...-EBike/tree/49-Implement_battery_current_ramp) and made a manual release from it.

Yes, it works to flash with the speed sensor connected. Initially I made connections directly on the motor wires since my stlink did not work.
 
maximusdm said:
jbalat said:
Max,

I couldnt find where to make the change so I just set the inverse ramp again down to 20 which works well for me...
I looked in motor.c and motor.h but couldnt find where to set the current ramp ?
Yeh I think the new assist levels work well, just need a bit of tweaking as they are too powerful for me :)

@jbalat i am not sure if you mean what is also my impression: you can get "carried away" and reach power assist values that you actually would have wanted to avoid.

that is why i imagine that introducing configurable upper limits per assist level individually would help in this matter. because there may be siutations where you need or want 500 W assistance, so you can assign these or no limit at all to e.g just level 4 or 5, and e.g. limit all the others to 300.

in my specific case i have a rather long hill to climb up to get home. i need as much assistance as possible then. but in most of the other situations i would not mind/prefer to set an upper limit.
 
gaber said:
How have you guys wired in your brake wires? I understand how to do it schematically (thanks to the wiki), but am curious where you’ve spliced them in and with what connectors. Looking to capitalize on the group think instead of reinventing the wheel.

sorry, i just read this now.

my original display's cable (XS18?) in integrated in the upper tube of the bike. I did not want to remove it, so therefore i cut the old display's cable shortly after the top. I added the brake sensor and i soldered everything together. I did not make any connectors here, but it would not be a problem to add that if needed, obviously.WhatsApp Image 2018-11-13 at 14.10.12(2).jpegView attachment 1
 
Sorry to ask but what is stalled wheel protection ?
and what is exactly the problem reported by EndlessCadence regarding this functionality.

I'm about to flash 0.15.0 but if this problem ist fixed in 0.15.1 i may just wait a few days :D

Thank you,
 
andyme said:
my original display's cable (XS18?) in integrated in the upper tube of the bike. I did not want to remove it, so therefore i cut the old display's cable shortly after the top. I added the brake sensor and i soldered everything together. I did not make any connectors here, but it would not be a problem to add that if needed, obviously.


No worries - thanks Andy! I'm going down a very similar path. VLCD5 display cable cut around the same spot. Planning on running a couple of pigtail wires (for GND and Brake wires) out of the solder bundle and add connectors to those and the end of the wires coming from the brake lever. Will hopefully be a clean and modular solution.

Just to double check, I only need to wire into Brake and GND on the motor side, correct? Nothing needs to be wired into the LCD3 side for brakes to work?
 
andyme said:
gaber said:
Just to double check, I only need to wire into Brake and GND on the motor side, correct? Nothing needs to be wired into the LCD3 side for brakes to work?

Yes!

Sweet, thanks man! I'll see if I can't help clarify some of the wiki documentation when I get this finished up.
 
jbalat said:
Oh my speed sensor connection is really dodgy, I’m a bit scared to flash again... but I really need to fix the problem with leaning on the peddles and motor cutting out :(
I’m thinking about soldering the motor wires to the sensor cable but leave another connector which I can use just for flashing, do you think you can still flash while the sensor is connected ?
I ordered some waterproof cables with connectors from aliexpress. They are quite cheap and should arrive fast to Australia.
https://www.aliexpress.com/item/40c...006.html?spm=a2g0s.9042311.0.0.19124c4dWWsO6C.
You can make the connection from motor to speed sensor with them and still write firmware.

Hope it help :)
 
jbalat said:
Oh my speed sensor connection is really dodgy, I’m a bit scared to flash again... but I really need to fix the problem with leaning on the peddles and motor cutting out :(
I’m thinking about soldering the motor wires to the sensor cable but leave another connector which I can use just for flashing, do you think you can still flash while the sensor is connected ?
That sucks mate! Yes, it should work fine.
 
:!:

I've released two new versions. Thanks casainho!

0.15.1 which fixes the stall protection issue (blinking 1 on display).
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.15.1

0.16.0 which also includes the new battery current ramp feature:
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.16.0

This way you can decide which one you want. I didn't try 0.16.0 myself yet.
It isn't necessary to reset your configuration to factory defaults or flash the display again if you were using version 0.15.0 already.

Enjoy! :D
 
[/quote]

Hi,

I had similar problems when I tried to flash the open source firmware to my bike. :wink:

First of all, I have to say that the imaging in the wiki is partly incomplete and that you have to look at the plug layout carefully from several videos and sources together to get all the connections working - and maybe this is your problem as well. I do not know how complete your information is. Then it was a problem that the v2 clone was not working well. After I bought another one and tried another dealer too, I've got a different clon, that is different with the swim/gnd pin assignment. Maybe the pin assignment printing from the first clone is wrong - I've not checked it so far - just some cheap chinese scrap to throw it into trash..

I hope this helps you any further.
[/quote]


Thank you! This was helpful. I have what appears to be an identical STLink V2 clone as the one pictured by Casainho on the Github page. I put on my reading glasses and looked closely on the housing and sure enough the SWIM and GND pins are opposite on my STLink. I swapped the two wires and was able to flash the LCD3 without any issues. Apologies for taking up bandwidth for such an obvious mistake!
 
vailbiker said:
Hi,

I had similar problems when I tried to flash the open source firmware to my bike. :wink:

First of all, I have to say that the imaging in the wiki is partly incomplete and that you have to look at the plug layout carefully from several videos and sources together to get all the connections working - and maybe this is your problem as well. I do not know how complete your information is. Then it was a problem that the v2 clone was not working well. After I bought another one and tried another dealer too, I've got a different clon, that is different with the swim/gnd pin assignment. Maybe the pin assignment printing from the first clone is wrong - I've not checked it so far - just some cheap chinese scrap to throw it into trash..

I hope this helps you any further.

In an effort to clarify some things - here are the portion of my raw prep notes pertaining to creation of the ST link cable, as well as the soldering of the female side of the speed sensor extension cable directly to the LCD3 pins to make for easier flashing.

*Create ST Link flash cable by cutting ST Link ribbon cable (fairly short) and soldering appropriate wires to (fairly short) female connector from speed ext cable
* Whole thing should be ~10cm
* Stagger wire cuts so solder points don’t stack up, will be good practice for display to motor connection
* Drill hole in back of LCD 3 and solder female speed extension cable directly to LCD3 pins for easy programming
* LCD 3 J7 pins (left to right looking at display front) > ST Link pin connections
* LCD3 pin1: (display cable brown) connect to (grey ST cable) STLinkV2 5V pin
* LCD3 pin2: (display cable black) connect to (black ST cable) STLinkV2 SWIM pin
* LCD3 pin3: (display cable orange) connect to (white ST cable) STLinkV2 GND pin
* LCD4 pin4: (display cable purple) connect to (purple ST cable) STLinkV2 RST pin

Does that make sense to other people? If it does, I would be happy to it clean up, add some photos and submit to the wiki.
 
Oh what a cadence of releases :D
I just flashed the 0.15 version this afternoon and already a new version.

Feels great on 0.15 but :
I also noticed buttons being unresponsive in Config when pressed too long.
I started to play with off-road mode, and couldn’t figure out how to activate power limit with power and up keys, and enable soc display in temperature field when off-road mode feature is enabled. Because this combinations are used to enable and disable off-road mode. I had to disable off-road mode function to use on-off and down to show SOC in temperature field, and after re enable it.

Could you help me ?

And what precisely does the new ramp code ? I hesitate between flashing 0.15.1 and 0.16.

Not having to flash the display again is her great thing.

Thank you all for your wonderful work.
 
gaber said:
vailbiker said:
Hi,

I had similar problems when I tried to flash the open source firmware to my bike. :wink:

First of all, I have to say that the imaging in the wiki is partly incomplete and that you have to look at the plug layout carefully from several videos and sources together to get all the connections working - and maybe this is your problem as well. I do not know how complete your information is. Then it was a problem that the v2 clone was not working well. After I bought another one and tried another dealer too, I've got a different clon, that is different with the swim/gnd pin assignment. Maybe the pin assignment printing from the first clone is wrong - I've not checked it so far - just some cheap chinese scrap to throw it into trash..

I hope this helps you any further.

In an effort to clarify some things - here are the portion of my raw prep notes pertaining to creation of the ST link cable, as well as the soldering of the female side of the speed sensor extension cable directly to the LCD3 pins to make for easier flashing.

*Create ST Link flash cable by cutting ST Link ribbon cable (fairly short) and soldering appropriate wires to (fairly short) female connector from speed ext cable
* Whole thing should be ~10cm
* Stagger wire cuts so solder points don’t stack up, will be good practice for display to motor connection
* Drill hole in back of LCD 3 and solder female speed extension cable directly to LCD3 pins for easy programming
* LCD 3 J7 pins (left to right looking at display front) > ST Link pin connections
* LCD3 pin1: (display cable brown) connect to (grey ST cable) STLinkV2 5V pin
* LCD3 pin2: (display cable black) connect to (black ST cable) STLinkV2 SWIM pin
* LCD3 pin3: (display cable orange) connect to (white ST cable) STLinkV2 GND pin
* LCD4 pin4: (display cable purple) connect to (purple ST cable) STLinkV2 RST pin

Does that make sense to other people? If it does, I would be happy to it clean up, add some photos and submit to the wiki.

I just want to say that the colors of STLink cables are arbitrary...it can be about anything depending on the maker.

And why would you solder the speed sensor cable to the pins? (edit: oh, so you can use the cable from the motor flash...i did as on the pic attached and i have one dedicated st-link for the motor and one for the display
 
Sorry, my english it's bad, i do not undestand the difference betwine throttle version and no throttle version. The fist it's ONLY for throttle or work also whith torque sensor?
A motor whithout throttle works whith throttle version?
 
andrea_104kg said:
Sorry, my english it's bad, i do not undestand the difference betwine throttle version and no throttle version. The fist it's ONLY for throttle or work also whith torque sensor?
A motor whithout throttle works whith throttle version?

Hi, you know what throttle is, yes? it is thumb gaz switch, so you can ride the bike like a motorcycle.

so: if you have this version, you use the throttle file, if you do not have it, you use the other one.
 
andyme said:
I just want to say that the colors of STLink cables are arbitrary...it can be about anything depending on the maker

They’re not important in general, but i wanted my prep to be very prescriptive and thought out so i just had to execute when soldering time came. That said, great point that those specifics vary and should be removed before posting to wiki.

andyme said:
And why would you solder the speed sensor cable to the pins? i did as on the pic attachedWhatsApp Image 2018-11-13 at 23.08.08.jpeg

To match up with the male end of the speed sensor > STLink cable i made to flash the motor. This isn’t necessary, but is an option and (IMHO) provides the cleanest and easiest method for future flashing of both the motor and LCD. Some photos would be worth all the above words, I’ll work on getting some.
 
andyme said:
andrea_104kg said:
Sorry, my english it's bad, i do not undestand the difference betwine throttle version and no throttle version. The fist it's ONLY for throttle or work also whith torque sensor?
A motor whithout throttle works whith throttle version?

Hi, you know what throttle is, yes? it is thumb gaz switch, so you can ride the bike like a motorcycle.

so: if you have this version, you use the throttle file, if you do not have it, you use the other one.

but if i have throtte version and do not use throtte, it works?
Actually no problem i have a 36v no throttle, but i will buy a 48v for another bike, and i planned to buy throttle version. But only for rare use of throttle.
 
nbdriver said:
And what precisely does the new ramp code ?

This is something I also really would like to know.

Maybe someone from those who know could be so kind to explain what it does and how that improves the behavior.

I am sure everyone here does his best to follow up but we simply do not all have the same knowledge...

Thanks...
 
Back
Top