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

anszom said:
As a bonus, it should be easy to port this to casainho's DIY display, as the electronics are quite similar.
Great work!!

I just got OLED SPI version work, that is the same as SW102, so closer / easier to port your firmware.

I am in the process to release a stable version of the OpenSource display firmware, so, I will not port or test your firmware right now.

Also I am starting on another different project, the Xiaomi M365 scooter motor controller and display firmware and so I need a stable version of the display.

I need a firmware that is easy to adapt for different project / device and the previous SW102 firmware was developed thinking on that, with the layout and fields, is quick to adapt a different design. You firmware seems, at least visually, very specific to TSDZ2 and I wounder if it follows the same ideas as previous firmware on the layout and fields.
 
I need a firmware that is easy to adapt for different project / device and the previous SW102 firmware was developed thinking on that, with the layout and fields, is quick to adapt a different design. You firmware seems, at least visually, very specific to TSDZ2 and I wounder if it follows the same ideas as previous firmware on the layout and fields.

Yes, that's mostly right. My idea was to design a nice UI for an ebike - it was easier to drop the "generality" of the layouts in the process. I don't think there's anything specific to the TSDZ2 in the UI code though (aside from the config tree).

If I was trying to "port" this to a scooter, I would perhaps reuse some of the "backend" code, but the UI - at least the main screen - would need to be redesigned for the new use-case (not that it's THAT much of work - the main screen code is about 300 lines total).
 
anszom said:
I need a firmware that is easy to adapt for different project / device and the previous SW102 firmware was developed thinking on that, with the layout and fields, is quick to adapt a different design. You firmware seems, at least visually, very specific to TSDZ2 and I wounder if it follows the same ideas as previous firmware on the layout and fields.

Yes, that's mostly right. My idea was to design a nice UI for an ebike - it was easier to drop the "generality" of the layouts in the process. I don't think there's anything specific to the TSDZ2 in the UI code though (aside from the config tree).

If I was trying to "port" this to a scooter, I would perhaps reuse some of the "backend" code, but the UI - at least the main screen - would need to be redesigned for the new use-case (not that it's THAT much of work - the main screen code is about 300 lines total).
Do you have experience with Garmin GPS Edge or any watch like Fenix? - because the SW102 firmware was to be like that, were user could have a few main screens, on each screen could choose some predefined layouts (like 1 big field or 2 small fiels, or 3 small fields or such) and then could choose each variable field (and even choose a graphic field or numeric field - like for 1 big field as you did, user could choose the graph field).

Does you firmware support customization of variable of each field? and are your fields only graph or could they also be numeric?

Other then a graph, I wish to have like a small horizontal bar graph to use the same space as current numeric fields, so user could like see if battery voltage is somewhere between 0 up to 100%.
 
Does you firmware support customization of variable of each field? and are your fields only graph or could they also be numeric?

Not really. I mean, you could customize all you want by changing the source code, but as a user you can't alter the layout.

I haven't seen the Garmin or Fenix devices but I think the xiaomi smartbands have a similar option for customizing the "face" of the watch. It's a nice idea - and now I understand the reason behind the complexity of your code :) . The only issue I see is that configuring the layouts on the SW102 device itself would be really impractical - you would need to use a smartphone for this.

I chose a different approach, to (quickly) make something that works well for me. I hope that it can also be useful to others. But it's not going to be anything close to "universal".
 
anszom said:
Does you firmware support customization of variable of each field? and are your fields only graph or could they also be numeric?

Not really. I mean, you could customize all you want by changing the source code, but as a user you can't alter the layout.

I haven't seen the Garmin or Fenix devices but I think the xiaomi smartbands have a similar option for customizing the "face" of the watch. It's a nice idea - and now I understand the reason behind the complexity of your code :) . The only issue I see is that configuring the layouts on the SW102 device itself would be really impractical - you would need to use a smartphone for this.

I chose a different approach, to (quickly) make something that works well for me. I hope that it can also be useful to others. But it's not going to be anything close to "universal".
The layouts on Garmin are predefined and user can select from a some like 10 or 16 different ones, starting showing only variable up to 10 variables. No mobile app to select the layout.
Even the idea was to have the display to be placed on vertical or horizontal, and have specific layouts for horizontal. Can you imagine your graph to scale up on X and scale down on Y?

That is not my code, that code was developed by other developer and I do not have knowledge to develop such structured / flexible code, still I did learn a lot with it - that developer then moved on and developed this incredible device - Meshtastic: Open Source hiking, pilot, skiing and secure GPS mesh communicator: https://meshtastic.org/

So knowing your firmware was not developed with this ideas, I will not use my time on the next weeks to try it. Still I am very curious and I want to look at it, to learn and maybe reuse at least the graphs.

If you want to port it to the OpenSource display, your are welcome and I can guide you in anything you may need.
 
Hi Guys,
Considering all similarities between the 850c and 750c displays I've found close to nothing regarding the OSF compatibility with the 750c (with or without bluetooth). Would it be possible to make TSDZ2 work with 750c using OSF?
I'd appreciate your thoughts on this.
 
Newbie to the SW102 displays, and I bought one before reading about the second PCB variant. It arrived in the mail this week and sure enough it was the second variant. But I did some fiddling and I think the second variant is actually preferred over the first one.

I did the chop around buttons method to open it up from the keypad side and as casainho has found there are no programming pads on the top PCB surface.
i.php


However, after some prying and then cutting the PCB mounts off with a flush cutter the PCB can be flipped over and the programming pads are on the back:
20211209163606-25c785db-xl.jpg


They are super close to the edge of the casing there, and effectively down in this lower corner of the case:
20211209163626-2f4242b1-xl.jpg


I think with some careful dremel or knife work it will be trivial to reveal the pads on the new SW102 v3.1.1 boards, and will actually be easier than the old method to seal back up. A bit of silicone or sikaflex on the underside will easily keep it waterproof and you are going nowhere near the buttons or the top surface.

Will attempt to program it later today and report back on that.
 
@ anszom
Vow, your display looks great. Thank you although i havn‘t used it yet because of testing mbrusas new software which doesn’t seem to be bad at the moment and quite popular, i believe. hopefully someone will adapt your display firmware for his controller firmware too one day.
 
takai said:
Newbie to the SW102 displays, and I bought one before reading about the second PCB variant. It arrived in the mail this week and sure enough it was the second variant. But I did some fiddling and I think the second variant is actually preferred over the first one.

I did the chop around buttons method to open it up from the keypad side and as casainho has found there are no programming pads on the top PCB surface.
i.php


However, after some prying and then cutting the PCB mounts off with a flush cutter the PCB can be flipped over and the programming pads are on the back:
20211209163606-25c785db-xl.jpg


They are super close to the edge of the casing there, and effectively down in this lower corner of the case:
20211209163626-2f4242b1-xl.jpg


I think with some careful dremel or knife work it will be trivial to reveal the pads on the new SW102 v3.1.1 boards, and will actually be easier than the old method to seal back up. A bit of silicone or sikaflex on the underside will easily keep it waterproof and you are going nowhere near the buttons or the top surface.

Will attempt to program it later today and report back on that.


Did the programming turn out alright?
Debating ordering the sw102 and will probably get the new version, would be nice to now if it works with OSF firmware.

Would love to build casainhos diy display but I am short on free time and lack easy access to a 3d printer.

And it seems like I could repurpose the sw102 display into an diy display if I manage to blow it up.

Also been trying to find cheap higo 8 pin connectors so I don't have to cut the vlcd5 display wire, but the connectors seems hard to find in Europe och China. Any general ideas for finding connectors?

Best regards
 

Debating ordering the sw102 and will probably get the new version, would be nice to now if it works with OSF firmware.


Best regards
[/quote]

i can confirm it works.
 
Peacepirate said:
i can confirm it works.

Great to hear, thanks for the info!

Regarding 8-pin cables it seems like 1t4 "extension cables" found on aliexpress have male and female 8-pin connectors if someone is searching for one. Will order and see if it fits.
 
Thanks for sharing that, it' s a huge help for me as i'm getting one later this month. It looks like you did a great job of cutting it open, any tips?
Also, is there any way of knowing which version you have before cutting it open?
 
andyb said:
Thanks for sharing that, it' s a huge help for me as i'm getting one later this month. It looks like you did a great job of cutting it open, any tips?
Also, is there any way of knowing which version you have before cutting it open?

it's easy to distinguish both versions of the SW102: The cover of the up and down-keypad (without 'M'-Key) measures 20mm on the old vs. 26mm on the new version. So the new version is slightly bigger.
 

Attachments

  • IMG_9465.JPG
    IMG_9465.JPG
    810.1 KB · Views: 1,685
Meanwhile I can also confirm that the new version of the SW102 seems to be fully compatible with the OSF.
 
Peacepirate said:
@ anszom
Vow, your display looks great. Thank you although i havn‘t used it yet because of testing mbrusas new software which doesn’t seem to be bad at the moment and quite popular, i believe. hopefully someone will adapt your display firmware for his controller firmware too one day.

I'd be interested to hear what are the advantages of the mbrusa version compared to casainho's.

Right now I'm using mbrusa's firmware on my wife's ebike (VLCD5), and casainho's motor firmware on my ebike (SW102).
 
anszom said:
Peacepirate said:
@ anszom
Vow, your display looks great. Thank you although i havn‘t used it yet because of testing mbrusas new software which doesn’t seem to be bad at the moment and quite popular, i believe. hopefully someone will adapt your display firmware for his controller firmware too one day.

I'd be interested to hear what are the advantages of the mbrusa version compared to casainho's.

Right now I'm using mbrusa's firmware on my wife's ebike (VLCD5), and casainho's motor firmware on my ebike (SW102).

Witam z kolonie.

Well, guess that then you already know the differences?
I don‘t claim to be a benchmark for good software implementation but i was never satisfied with casainho‘s „original“ firmware in terms of quick and appropriate motor response compared to the original tsdz2 firmware although i highly respect the efforts and the idea of this osf in general.
I was not very happy with mbrusas 20.C1 for sw102 too because of the same issue but his newest firmware (20.C3 ? or sth like that) seems to be be quiet improved after a few test rides. Motor responds more vividly and you don’t have to pedal once 360 degrees before feeling noticable motor responce. I am missing the menu point where you you can set motor ampereage (only battery amp can be set) thus the system is weaker than with r0nkos fork.
You can set different support modes( torque only/power/ emtb?/ cadence) and there will be other small improvements. I am not completly satisfied with mbrusas formware either and will probably never be unless i don’t install eclipse and try to implement and compile my own ideas but at least mbrusas firmware seems to be still under active development in contrast to casainhos firmware 1.1.0 and i would highly appreciate your modern display firmware being compatible with mbrus fork because the standard display firmware of sw102 looks really poor and could need some visual facelift.
 
corny said:
Meanwhile I can also confirm that the new version of the SW102 seems to be fully compatible with the OSF.

Can you please help me some more, is this correct for the sw102 (I added the last column in the table)
The VCC and Kp confused me slightly.

I think VCC is P+ and Kp is Vin/PL is that right?

The picture was from an online manual for the sw102. I added the last column in the table,


:warn: :warn: p4turned out the table was wrong please just use the guidance in the post below :warn: :warn:

Thanks (again).

leads sw102.jpg
 
andyb said:
corny said:
Meanwhile I can also confirm that the new version of the SW102 seems to be fully compatible with the OSF.

Can you please help me some more, is this correct for the sw102 (I added the last column in the table)
The VCC and Kp confused me slightly.

I think VCC is P+ and Kp is Vin/PL is that right?

The picture was from an online manual for the sw102. I added the last column in the table,

Thanks (again).

leads sw102.jpg

yes, it is correct. But I think the wire colors are not correct in the SW102 manual. I used this guide:

https://github.com/OpenSourceEBike/TSDZ2_wiki/wiki/Wire-SW102-to-TSDZ2

this worked in my case for the old and new version of the SW102.
 
and don't be confused by the last picture in the link. What counts is this table: https://github.com/OpenSourceEBike/TSDZ2_wiki/wiki/Wire-SW102-to-TSDZ2#summary-of-connections-between-sw102-and-tsdz2-motor-cable
 
Thanks again, I have already done a 860c which died after a month of not being used, and your advice about the table is spot on.
 
Kudos for all the hard work.

I’m new to ebiking, I’ve fitted a TSDZ2 to my MTB with a VLCD5 display running stock firmware.

I’d like to try the opensource firmware, I’ve bought a SW102 (new version) and have a ST-Link2 programmer. I’ve carefully removed the switches and PCB to access the programming connections.

Where I’m stuck is in finding the hex file for the bootloader, the links in the wiki are broken, and I’ve been unable to find the file in the github repo. I believe I’m looking for a file named sw102-full-1.1.0.hex ?

Could you point me to the file I need?
Thanks
 
I think this is what you need (zipped folder).

View attachment sw102-full-0.19.11.zip

I went through the same thing and in the end had to use the wayback machine to find the file here

https://web.archive.org/web/20201206230319/https://github.com/OpenSource-EBike-firmware/SW102_LCD_Bluetooth/releases/tag/0.19.11
 
andyb said:
I think this is what you need (zipped folder).

sw102-full-0.19.11.zip

I went through the same thing and in the end had to use the wayback machine to find the file here

https://web.archive.org/web/20201206230319/https://github.com/OpenSource-EBike-firmware/SW102_LCD_Bluetooth/releases/tag/0.19.11
Here you can download the 0.19.17 version:

https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/download/0.19.17/sw102-full-0.19.17.hex
 
Back
Top