View Single Post
Old 11-04-2016, 01:19 PM   #2871 (permalink)
EcoModding Lurker
Join Date: Jul 2011
Location: Slovenia
Posts: 70
Thanks: 0
Thanked 19 Times in 13 Posts
Originally Posted by MPaulHolmes View Post
encoder-ticks is one of the variables you can set, so it's not a big deal no matter what you pick. I think 256 ticks is plenty. That would turn into 1024 ticks per revolution after the dspic got a hold of it. And with an open collector, wouldn't it take a little time to get pulled up or down? I would err on the side of fewer ticks. I would go with 256 or 512 rather than 1024 or 2048. I'm just thinking about at 10,000 RPM. That's a lot of dang ticks. haha. That's more ticks than my old dog had. Hmm... pwm output based on RPM? I don't think that would be very hard under certain constraints (if it was in the 10KHZ loop). Just as an example, if the RPM was 1Hz, it could be a duty of 10/10000, and 100Hz would be 10000/10000 duty, or whatever. Then, it's just a matter of toggling the port. It's always 5-10 times harder than you would think, but I think this time it would only be 2 times harder. haha
That is good idea. Since my motor should rotate at more than 10Krpm that would also be a 1:1 divider so whichever chip would transform function to RPM indicator it would have real time signal. Since it has a fixed gear ratio it would also be a simple matter to calculate car speed. Tire size and gear ration etc... That would be done by Arduino DUE chip that would act as CAN bus controller to VCU.

Huh... Paul, since you already have serial interface done, would it be possible to use CAN interface to make dump of all variable parameters in universal format. That way VCU could get correct data to drive dashboard and maybe i wouldnt have to recalculate anything??? Reverse would have to move to a different pin, pin 10 and motor temperature would only be shown on dash. I dont expect anyone would be oblivious to red light on dash when temperature would go across 100C.

By no means am i fixed to this. Feel free to suggest your solution.

  Reply With Quote