I understand and could definitely help develop a custom version that works for her. Also, if the solution adds value to others it might even end up in the official firmware with Casainho's approval.perryscope wrote: ↑May 02 2019 8:19amBefore I ask about this I totally understand this is quite a bespoke requirement and I very much doubt anyone else would be interested in this feature so I don't expect it to be discussed in reference to the main development path. However I just want to ask if an idea I have would in theory be possible or not. I would like to be able to work on a specific build for this myself if i can workout the build chain correctly under windows.
As you may know i have been working on a trike installation and having some issues that are specific to a rider who has a prosthetic leg. She applies about 80% force on her left leg and only 20% on her right, the right prosthetic leg also has a significantly shorter crank and so this results in a very uneven torque curve left to right. As a result on any incline the motor hunts as it detects force only on the left leg push, so you don't get a steady power applied, this is very annoying and stops the motor from giving its full penitential, and she struggles up any hill without using the throttle to override.
I am happy to experiment with my own specific build and have basic coding skills but I have not yet managed to compile a successful hex file that's the size i am expecting using the src for a specific beta for example ( I am using the release.bat file to generate the files). I am always around 20KB smaller that i expect so i haven't yet tried uploading it to test. I am trying to use SDCC on windows maybe that makes the difference? Is anyone compiling under windows that can confirm the process in more detail?
If you or anyone else wishes to build the firmware on Windows the easiest way is to install SDCC and use a text editor with some add ons for programming. Make the changes in the files via the text editor and save. Then use the bat files (simply double click them) to either compile, clean or compile and flash.
The main.ihx created is the one you want. You can rename it and also convert it to a hex file with packihx:
https://sourceforge.net/p/sdcc/mailman/ ... /23870265/
The file you now have can be uploaded to the controller or display as usual.
Sorry for the absolutely lacking tutorial/explanation!
Would be possible but your worries are correct: it will always cause a greater delay. The delay can be minimized with more complex algorithms.perryscope wrote: ↑May 02 2019 8:19amI have thought of two potential ways to maybe resolve this.
1. Somehow change the torque measurements to average over at least a full rotation so to help even out the hunting. However I worry that this may cause an issue when slowing down adding a delay to remove power? they do have ebrakes that will help. Also it may be difficult to add this into the code as its would need to keep a running average for many cycles of the main loop? I'm not an expert here?
That is also possible. No major drawback except that the torque sensor is not used. This could benefit others as well. I have not heard of anyone having a torque sensor malfunction but if that is the case it would be beneficial to the whole community to be able to override the torque sensor and just use the PAS. This could be implemented in the soon to be released 0.19.0 version.perryscope wrote: ↑May 02 2019 8:19am2. Change the motor from being controlled by the toque sensor but instead use the cadence reading as the input to control the motor power. This would in effect turn it into a standard PAS mode found on standard wheel motor systems which she used to have on the trike and I know would work. I appreciate this is the last thing you would usually want to do but in this case would work better.
Question to the community: anyone ever experienced a malfunction on the torque sensor?
Cool!perryscope wrote: ↑May 02 2019 8:19amIf anyone isinterest in the trike build the latest write-up is here https://empoweredpeople.co.uk/2019/04/2 ... -update-2/.