any chance you can get a picture of the different stuff you had to add? i'm guessing the zener diode is placed so the input to the microcontroller never goes higher than the zener voltage? and then the 2.2k resistor would be used as a current limiter into the pin? i think your code would work perfect for my controller, as my speed sensor is already attached to the motor and supplies two pules per revolution. (it's currently being fed to the BMS to display speed and watthours/mile, but i should be able to splice this line to the motor controller no problem)
|