Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

eyebysickle are you planning on selling your units? I am in the UK and keen to try this out and would prefer to test with a unit known to have a high chance of working without opening up the unit.
 
perryscope said:
geeksville said:
So,

Thanks to eyebysickle talking to the mfg and getting us some key data we've now made changes that have a pretty good shot of allowing 'solderless/no need to even open the SW102' bluetooth initial installation. However, in making these changes I've now changed the device eyebysickle gifted me with that I can no longer test a 'from scratch' installation. I think it has a very good chance of 'just working' on a virgin device from their factory, but I can't promise it.

So. If any of ya'll are interested in using a SW102 and you are comfortable with using our existing instructions (i.e. open the unit and use an ST-LINK for the initial load) but haven't yet tried it: We are looking for someone willing to try our new wireless update instructions instead. Note: It is possible this update won't work and at that point you would need to open the unit and install the conventional way (thus the possibility that you still might need to open the unit if this approach fails).

It might be that all SW102s support this wireless update? but we know for sure that the semi-custom units made for eyebysickle & eggrider do have this feature. So if you have been wanting to buy one, you might want to buy it from either of them.

If you are willing to be a trailblazer and try this, the basic instructions are here. But I'm happy to chat with anyone who wants to try this for us: https://github.com/OpenSource-EBike-firmware/SW102_LCD_Bluetooth/issues/35#issuecomment-525492910

Sure happy to try this once I receive my next device in the next few days.

Edit:

I have received a unit today! :) so will try this later and let you guys know how I get on.
PS this is the Ali Express seller I ordered my unit from. https://www.aliexpress.com/item/4000054464868.html?spm=a2g0s.9042311.0.0.4f9c4c4drTZe5H about 10 days delivery to the UK.

I have a spare one still in the box which i can use for testing. At this moment somebody has my bike with him on a holiday. When it is back and still needed I can test it. Or can i also test the procedure without being connected to the tsdz2 motor by only power the sw102 lcd?
 
bart1006 said:
I have a spare one still in the box which i can use for testing. At this moment somebody has my bike with him on a holiday. When it is back and still needed I can test it. Or can i also test the procedure without being connected to the tsdz2 motor by only power the sw102 lcd?

You can flash the sw102 with just the screen powered from another power source, I have flashed all my screens like this.
However I would hold off for the time being as eyebyesickle has found an issue with this method... please see..

https://endless-sphere.com/forums/viewtopic.php?f=30&t=93818&p=1492482#p1492480
 
geeksville said:
So,

Thanks to eyebysickle talking to the mfg and getting us some key data we've now made changes that have a pretty good shot of allowing 'solderless/no need to even open the SW102' bluetooth initial installation. However, in making these changes I've now changed the device eyebysickle gifted me with that I can no longer test a 'from scratch' installation. I think it has a very good chance of 'just working' on a virgin device from their factory, but I can't promise it.

So. If any of ya'll are interested in using a SW102 and you are comfortable with using our existing instructions (i.e. open the unit and use an ST-LINK for the initial load) but haven't yet tried it: We are looking for someone willing to try our new wireless update instructions instead. Note: It is possible this update won't work and at that point you would need to open the unit and install the conventional way (thus the possibility that you still might need to open the unit if this approach fails).

It might be that all SW102s support this wireless update? but we know for sure that the semi-custom units made for eyebysickle & eggrider do have this feature. So if you have been wanting to buy one, you might want to buy it from either of them.

If you are willing to be a trailblazer and try this, the basic instructions are here. But I'm happy to chat with anyone who wants to try this for us: https://github.com/OpenSource-EBike-firmware/SW102_LCD_Bluetooth/issues/35#issuecomment-525492910

This looks super promising indeed. When you mean a "virgin device", you mean a sw102 with bafang firmware ? Because I have a unit here that came with a lishui controller. Looks a bit different.

There is also a KT version of the display that showed up on aliexpress, though it looks more like a cheap copy without OLED than an actual new version: https://ae01.alicdn.com/kf/HTB1eAx7VXzqK1RjSZFvq6AB7VXaH/ebike-24V-36V-48V-intelligent-KT-LCD-LCD4-ktlcd4-Control-Panel-Display-Electric-Bicycle-bike-Parts.jpg

ebike-24V-36V-48V-intelligent-KT-LCD-LCD4-ktlcd4-Control-Panel-Display-Electric-Bicycle-bike-Parts.jpg
 
qwerkus said:
This looks super promising indeed. When you mean a "virgin device", you mean a sw102 with bafang firmware ? Because I have a unit here that came with a lishui controller. Looks a bit different.

There is also a KT version of the display that showed up on aliexpress, though it looks more like a cheap copy without OLED than an actual new version: https://ae01.alicdn.com/kf/HTB1eAx7VXzqK1RjSZFvq6AB7VXaH/ebike-24V-36V-48V-intelligent-KT-LCD-LCD4-ktlcd4-Control-Panel-Display-Electric-Bicycle-bike-Parts.jpg

ebike-24V-36V-48V-intelligent-KT-LCD-LCD4-ktlcd4-Control-Panel-Display-Electric-Bicycle-bike-Parts.jpg

re: wireless update of a virgin device without ever having to open it
yes, that's the goal. Alas, our last experiment shows we are "close but still not working". I think our current status on this idea is on hold for a few weeks. We have some other things we want to push out for the SW102 and 850C before going back to this idea. So in a few weeks, after those things are finished I'll probably order another virgin device. But on that device I'll be more careful and run a tedious tool that uses JTAG to sneakily copy out the entire firmware from the device. Which will then allow me to debug and find the remaining problem and test solutions with the ability for me to "revirginmotize it" repeatedly while testing.

re: that cheap copy
Looks super amusing. Do you know of a link to purchase it? I might buy one to play with (as long as the LCD is not segmented, but rather pixels).
 
geeksville said:
qwerkus said:
This looks super promising indeed. When you mean a "virgin device", you mean a sw102 with bafang firmware ? Because I have a unit here that came with a lishui controller. Looks a bit different.

There is also a KT version of the display that showed up on aliexpress, though it looks more like a cheap copy without OLED than an actual new version: https://ae01.alicdn.com/kf/HTB1eAx7VXzqK1RjSZFvq6AB7VXaH/ebike-24V-36V-48V-intelligent-KT-LCD-LCD4-ktlcd4-Control-Panel-Display-Electric-Bicycle-bike-Parts.jpg

ebike-24V-36V-48V-intelligent-KT-LCD-LCD4-ktlcd4-Control-Panel-Display-Electric-Bicycle-bike-Parts.jpg
re: that cheap copy
Looks super amusing. Do you know of a link to purchase it? I might buy one to play with (as long as the LCD is not segmented, but rather pixels).
Is the KT-LCD4 and it is almost for sure segment. Get it here: https://www.aliexpress.com/item/33016875338.html

PSWPower sells SW102 for $35 while that segmented KT-LCD4 costs $30.
 
heh:

> PSWPower sells SW102 for $35 while that segmented KT-LCD4 costs $30.

I guess that settles that. also: segments suck. ;)

(Though I do wish the otherwise amazing SW102 they had opted for a transflective LCD - it seems the oled though sexy is a bit hard to read in direct sun)
 
My SW102 finally arrived. I will leave it in it's "virgin" state for now and wait for further instructions to try the method to flash the device without opening it. Geeksville, I am happy to volunteer my device for any new experimental methods to try flashing. Thanks for all the work you have done so far!
 
sidmodi said:
My SW102 finally arrived. I will leave it in it's "virgin" state for now and wait for further instructions to try the method to flash the device without opening it. Geeksville, I am happy to volunteer my device for any new experimental methods to try flashing. Thanks for all the work you have done so far!

Hi,

Alas - I think the next step is for me to carefully image a virgin device myself (which I'm happy to do, but I'll need to buy a device). So I think I'm going to spend a few weeks finishing the rest of the items we need for 1.0 first (https://github.com/OpenSource-EBike-firmware/Color_LCD/blob/sw102-merge/firmware/TODO.md). So I bet your wait for wireless install will be about a 4-6 wks. If that is a problem, you should probably just use an ST-LINK and open up the device.
 
From a bit of time I'm thinking to integrate the mid drive with arduino, adding some sensors. Practically riding with two screens, one with all info about the motor. Now I haven't so much time to begin the project but I was thinking if you are interested to connect arduino with sw102 lcd. There are "endless" :) possibility. One of them is to have more buttons to activate a precise function, it's a far far far away possibility because it's not released neither a stable version.
 
(...) delete.
 
I like the original controller but if there's a better alternative...
 
I would like to make a standalone Bluetooth terrain inclination sensor, so the SW102 could automatically increase/decrease the assistant level based on the terrain inclination -- more assist on hills and less on descends.

There is a 5 euro board on eBay that includes a NRF51822 (the same inside SW102) and an IMU -- see bellow.

The idea was to add a battery, a USB battery charger and a power switch, so the system could be placed on some fixed part of the ebike.

 
e3s said:
From a bit of time I'm thinking to integrate the mid drive with arduino, adding some sensors. Practically riding with two screens, one with all info about the motor. Now I haven't so much time to begin the project but I was thinking if you are interested to connect arduino with sw102 lcd. There are "endless" :) possibility. One of them is to have more buttons to activate a precise function, it's a far far far away possibility because it's not released neither a stable version.

I like this idea, but rather than arduino, I'd recommend one of the arduino like boards that already have nice built in BT LE support. That would allow an easy transport to the SW102 without soldering (and there is only one free UART on the SW102 and we already use that to talk to the motor).
 
If someone wants to do an openhw version of xshifter I think that would be awesome. A suitable linear servo attached to the board casainho just pointed to would do everything you want. And the SW102 could be the UI. Forking into a new thread here: https://endless-sphere.com/forums/viewtopic.php?f=30&t=102236
 
Open source e-shifter is not a problem, I saw many times ago some projects with arduino.
 
e3s said:
Open source e-shifter is not a problem, I saw many times ago some projects with arduino.

ooh thanks for your pointer adding a link to this: https://www.instructables.com/id/DIY-Electronic-Derailleur/
 
Why not write a wiki page with the idea and the links for the other projects?
 
casainho said:
I would like to make a standalone Bluetooth terrain inclination sensor, so the SW102 could automatically increase/decrease the assistant level based on the terrain inclination -- more assist on hills and less on descends.



inclination sensor in a front suspended bike and worse in a full suspended is so so, in a road bike you can put it everywhere. Prons is a fast response, cons is sensible in a rough terrain. A road with a 10% gradient has only 6 degrees of inclination, 5% 3 degrees. Barometer is less sensitive in this condition but it requires more resources because it needs the variable of the speed
 
can I just check should the battery icon change when the battery is full or is it just static empty icon at the moment?

I understand if this has not been coded yet just was not sure if its a bug or just not yet implemented.
 
perryscope said:
can I just check should the battery icon change when the battery is full or is it just static empty icon at the moment?

I understand if this has not been coded yet just was not sure if its a bug or just not yet implemented.
Battery icon works. Make sure to select correct mount of battery cells on configurations.
 
Quick side question: is it possible to use another openocd compatible flashing tool? I have a flyswatter2, ft2232h, and an olimex usb-tiny-h at my disposal.
 
casainho said:
perryscope said:
can I just check should the battery icon change when the battery is full or is it just static empty icon at the moment?

I understand if this has not been coded yet just was not sure if its a bug or just not yet implemented.
Battery icon works. Make sure to select correct mount of battery cells on configurations.
Yes selected 13 cells for a 48V battery, it is moving but I feels like its on the low side, for example at 46.5v you would think the battery was empty looking at the symbol, when in reality that's closer to half full. in comparison the KT-LCD3 would show two out of 4 segments or half full. Not a big issue but due to the small font its difficult to read the voltage amount on the move and a quick glance at the battery symbol is more important.

The other issue I have seen is that even when you select mph in the menu the speed is still shown in kph.
 

Attachments

  • battery-sw102.JPG
    battery-sw102.JPG
    24.2 KB · Views: 2,941
Back
Top