stancecoke said:
casainho said:
It is like you know already, not using 6 steps:
1. start with no interpolation sinewave (just using 6 points of the sinewave)
so this are 6 steps! :wink:
OK, I just tested your recent master branch with my testbench. (For a test on the bicycle the weather is too bad, rain and just 5°C in Munich)
Your code doesn't work as it is for me, just no reaction to the throttle signal. I've modified the code and put the mapped throttle value directly to the duty cycle, now the motor runs, but of course with no control loop working. The switch from 6 step to 60° interpolation works good with your values and the efficiency is OK.
Note that I tested on S12S and I guess you did you S06S

-- if so, look at main.h. Sonce I remember, the main difference is that S12S can handle more current.
I think we can't call it 6 steps, as on that way would have 1 phase without energy everytime bit ot has the 3 phases energized with sinewave values, but just 6 different points over the 360 degrees.
A lot of sun here in Portugal and that results in a severe lack of water :-( :-( climate change problems for us :-(
I wish to test my ebike next monday, with S12S on Q85 with 24V and on the other EBike with Q100 with 48V (isn't this motor failing??), and I need to use a fuse
Then I need to implement that startup with motor max current and test, if ok, I can close for now the motor code. I will be away mostly next week but I plan to be back on the next other.
I should also receive my new components as the torque sensor and try make it working on the firmware
As I am highly motivated to develop motor firmware for motor electric vehicles to help our planet, I will be traveling to German next week as I was invited by a company that develop electric light personal vehicles like eskates, ebikes, escooters, etc. I am really happy but that will mean I will have less time to this project. Let's see what happens but I wish to finalize a good working firmware!!
Also I am happy because I did read some news saying that Europe is pushing for electric cars not because of Tesla but because of China, because Chinese are ahead!! I want to keep participating by continue providing OpenSource knowledge and tecnhology

I came from my own startup about desktop 3D Printing using OpenSource technology like RepRap project that shaped the 3D Printers and is very relevant on the market.