I'm designing a new encoder pulses counter for my project, my encoder HE50B uses a 12-24 VDC Input, and it has 1,000 pulses per each revolution. also the maximum permissible speed is 5,000 RPM.
Now I want to count the output pulses of this encoder by my micro-controller ATMEGA-32 which has 5 VDC input ports, so I have to buck the output voltage of the encoder to reach this value.
My question is: which is better to do that (taking in consideration the output frequency of the encoder)?
- using a 2-stage inverting op-amp to buck the voltage from 12VDC to 5VDC or
- use a regular voltage regulator such as 7805 and it will work fine with that high frequency switching.