Wiring an encoder to count rev/min

Status
Not open for further replies.

tommyflynn

New Member
Hi,

I am looking for help with wiring a Hengstler Incremental Encoder to a National Instruments myRIO and a power source as part of a university project. The NI myRIO will be connected back to a PC using USB. The LabVIEW program will be used to to initially count the pulses/sec and then in turn the rev/min of a separate motor shaft.

Help with both the wiring and maybe the input on the LabVIEW program would be greatly appreciated.

I have attached a photo of the encoder and the NI myRIO.



Thanks.
 
You may not need both channels A /A & B /B just say A or the B , unless you can get away with just the one-per-rev reference pulse Z /Z.
It looks however you have a 10v to 30v encoder instead of the more popular 5v versions. Often these require a pull up resistor on the output, check the info sheet on the encoder.
I have no knowledge of the NI myRIO however.
Max.
 
See the encoder data here - the top left table on the second page gives wire colours, it looks like your is the "PVC" type:

And Myrio data here - page 6 for the screw terminal connections:

Connect black (GND) to the DGND (terminal 19).
Connect red (+10 to 30V) to +15V (Terminal 1).

You then, with power on, need to carefully measure the voltage on the white or green relative to black as you very slowly turn the encoder.
If you ever get anything above 5V, you need to add a diode and resistor to each connection.

If you do not get any voltage readings, it should be OK to connect white (A) to 11 (Enc A) and green (B) to 13 (Enc B).

If there is any voltage, or you just want to be safe, connect a schottky diode in series with each of those connections with the cathode to the encoder.
Add 1K resistors from terminals 11 & 13 to terminal 20 (+5V).

The software configuration is up to you!
 
If only counting pulses/sec without concern for direction, then the dual channel is not required
Just use either A or B, I see they use N instead of the usual Z for marker pulse.
Max.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…