Hi,
I would like to ask you how can I connect incremental encoder(5V) with outputs open-collector pnp to arduino uno ? I am a little bit green in it that's why I ask you, because I don't want to damage components.
Greetings,
TraCerT
Hi,
I would like to ask you how can I connect incremental encoder(5V) with outputs open-collector pnp to arduino uno ? I am a little bit green in it that's why I ask you, because I don't want to damage components.
Greetings,
TraCerT
Please post a data sheet for the encoder.
There are attachments with picture of this encoder:
On web store writes Outputs: - A - A / B - B / Z - Z - Open-Collector PNP
That part number is for an encoder with both single-ended and line-driver outputs as options.
You picture alas doesn't show how many leads it has.
You simply need to investigate the outputs with a 1k resistor and a multimeter - if the output
changes from rail-to-rail as the shaft is turned slowly, its a push-pull output. If you need
to add the 1k resistor from gnd to the output or from the supply to the output to get a
varying output, its open-collector.
If there are 3 pairs of outputs, they will be push-pull and in pairs forming differential line-driver
signals.
It should be something like this ?
You only need the pull-downs if powered from the Arduino 5V, and you only need to look at
one signal of each pair.
and one more question - it should be pull-down resistors or pull-up for PNP ?
You need pull downs for open collector PNP, when the output is active it's HIGH, near VCC, when not it's open or "floating" so you need to pull it down to (near) 0V, 4.7 to 10k should work. Also if the encoder supply is more than 5V, you will need voltage dividers to keep it below 5. And, don't use pin 1, thats the serial TX pin used for communication with computer.