Hey guys! I asked a while ago about using Uncle Ardu to handle BLDC commutation, now the project is in its last steps (here http://endless-sphere.com/forums/viewtopic.php?f=30&t=26386 the main topic on EV forum and herehttp://code.google.com/p/dc-brushless-open-source-controller/ on google projects).
Now, I have two issues:
1) the analog read takes way too long. In this quote from the other forum you get an idea of it
no gas reading and no output rewriting: 20 000 ns per loop
gas reading and no output writing: 150 000 ns per loop ===>analo gread is SLOW!
no gas reading but output writing: 60 000 ns per loop
gas reading and output writing: 190 000 ns per loop
target was 40 000 ns per loop to go to 6 000 rpm with a 5% commutation delay
m perfectly fine with the output writing time but not with the analog read time. It is ok for first testing but too slow to be implemented every 5 loops or so to do real time current control (curr sensor gives analog value). ive been told there is a way to get analog reading way way faster, how to?? 130 000 ns for one analog read is not ok.
2) I need to slow dowm the Ardu`s PWM output to something between 8 and 16 kHz, how to?
PS: the project is open source (Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License), so if you want to join you are welcome!