raw said:
i agree with you: adding optional connectivity to this project would be nice, as it allows a lot new features. even if no one would implement these on the first go, the level to do so would be lowered a lot if the hardware is already there. It can also make open source firmware more accessible.
my thoughts on this:
- I currently do not plan to use any ANT+ devices, but having the connectivity options is good, as it would attract more users.
I tough more about my usage. With the same ebike, I do both MTB on mountains and always different routes, once a month at least and I ride on the city almost every day.
- For city, I would use only the remote button with 3 buttons, 2 for assist level and other for ON/OFF -- this is a cheap and simple solution in the case anyone want to stole it. As alternative, I don't even need any remote button and I can use my Garmin watch.
- For MTB, on weekends, I can attach the GPS Garmin Edge that costs 300€ and have route map full navigation including TSDZ2 control (Garmin Edge would be like having 860C display + GPS navigation feature + high tech fitness like HR sensor, pedal power meters, VO2 max and other advanced fitness metrics).
I think the wireless TSDZ2 will have much more potential:
- for city ebikes, it can be cheaper, clean installation and so more secure
- for MTB ebikes, it can be high tech with map navigation, advanced fitness metrics and advanced wireless sensors like wireless gear shift, tires pressure sensors, suspension sensors, etc.
- or be something in between, the user chooses. For me, instead on buying a remote button, I could probably 3D print my remote button that include some LEDs to show the battery SOC.
raw said:
- i would go for an out-of-motor solution, so the SOC is a small box with an tsdz2 plug on one, a bafang plug on the other side. having it that way would make it simple plug-in-solution that does not require any soldering skills or motor disassembly. it would also avoid the need to build a custom motor to display cable.
I agree, would be the easiest solution and the one I would prefer for myself. Still, the ones that want to install inside the motor, could do it.
raw said:
- a no-solder-plug-in-solution would require some manufacturing and distribution infrastructure. the PCB could be made by a company like PCBway. what is left is adding the plugs and putting it in a waterproof case (or maybe just casting it in resin, it should be possible to flash it OTA right?). if this (sub)project becomes reality, i may be able to set something up.
The NRF52840 microcontroller is just like SW102, it supports easily Bluetooth bootloader firmware update. But, at the first time that bootloader needs to be installed using the STLinkV2.
For waterproof, can be something even more DIY, just a lot of black tape - my battery packs are like that and I ride with rain and clean with water and I have no issues at all.
Are you able to design the PCB? because I lack that knowledge although if you use KiCAD I can at least open the projects files and do small corrections or such.
If you want to do the PCB, then, let's create a specific thread for this new project.
raw said:
- having this thing could make the display optional, so smartphone configuration would be nice. using a smartphone as display would lower the costs.
I think that for city riding is ok to use the smartphone and if you want to avoid the risk to damage it while riding, you can keep it in your pocket and see the data or do any configuration, at start or and of your trip.
For MTB, Bikepacking, etc, I want to keep my phone safe with me for my own security reasons and use another rugged device that is specific for cycling - this must be Garmin Edge because for what I saw, are the only GPS cycling computers that support users developed apps (by the way, I past I developed an app for a Garmin watch that communicated with a mobile phone app).
raw said:
- one feature i have in mind is a "virtual temperature sensor". users with a temperature sensor can collect data using their smartphone (motor temperature, movement speed, environment temperature, weather from an weather api and used motor power). from that data it should be possible to approximate the motor heating, so overheating can be prevented just using software.
- maybe temperature and acceleration/tilt sensors can be added directly to the PCB.
I think it is easier to install a temperature sensor on the board, because it has some free analog pins. Then the throttle, I think it will be possible to be a wireless throttle.
I am curious for IMU, maybe with some machine learning on NRF52 and IMU we could change automatically the assist level as on commercial ebikes. For developing, then the Arduino version with NRF52 and IMU can be a good option.
Some notes:
- Like Bluetooth, ANT needs licensing. My interpretation is that if we do not sell and do not use Bluetooth and ANT logos, and do not use the trademark words, we can use it with paying the fees, which are a LOT because it also needs a lot of work and costs for certification.
- ANT has a specific profile for Ebikes, scooters, etc. We just need to implement it and be just like any other commercial ebike.
- other projects that we can learn from, for Bluetooth TSDZ2 and KT motor controllers OpenSource firmware:
https://github.com/stancecoke/BMSBattery_S_controllers_firmware/wiki/05-The-BluOSEC-Android-App
https://github.com/wptm/tsdz2_bluetooth
NRF SDK includes many working examples for ANT: