Go Down

Topic: Encoders and Arduino (Read 5869 times) previous topic - next topic

aerosam

Hi

I have an encoder that takes an input of 5V.
I don't want to power the encoder using the Arduino, as i will be using 3 such encoders.
I want to power the encoders with a separate DC power supply(that will also be powering some motors).
This is were my confusion begins
1)Do i need to ensure the Arduino and the encoders have a common ground?
2)Can i power the Arduino via USB and power the encoders with an external DC power supply?
2)The encoder outputs a high of 2V. If i connect it to a digital I/O pin, will the Arduino detect it?

Thanks
Sam


RuggedCircuits

Quote
)Do i need to ensure the Arduino and the encoders have a common ground?


Yes.

Quote
Can i power the Arduino via USB and power the encoders with an external DC power supply?


Yes.

Quote
The encoder outputs a high of 2V. If i connect it to a digital I/O pin, will the Arduino detect it?


No. That's a surprising number. Are you sure it isn't just an "open collector" output that floats to around 2V? Do you have a part number? You can check it easily by connecting a 10k resistor from the output to +5V. If it's still 2V then it really is 2V, but my guess is you will measure 5V.

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

aerosam

Thanks Rugged Circuits
Quote

No. That's a surprising number. Are you sure it isn't just an "open collector" output that floats to around 2V? Do you have a part number? You can check it easily by connecting a 10k resistor from the output to +5V. If it's still 2V then it really is 2V, but my guess is you will measure 5V.

This is the encoder, i am looking at
http://www.delta.com.tw/product/em/motion/motion_encoder/motion_encoder_product.asp?pid=2&cid=2&itid=2

I haven't bought it yet, so i can choose another one, if you have any suggestions.
I want to measure rotation angle precisely (for clockwise and ccw rotations).
So i would like it to output a high number of pulses per revolution.
What is the maximum number of pulses per second, that could be detected by an Arduino?

Quote

Do i need to ensure the Arduino and the encoders have a common ground?

Do i just connect the DC power source ground to the Arduino ground with a wire? Or Should i have some resistor in between?

RuggedCircuits

Quote
This is the encoder, i am looking at


I'm not entirely sure which part number you're looking at. The datasheet lists a whole bunch but looking at the possible circuit outputs there is at least one that is open-collector. Maybe you have that.

The maximum number of pulses per second is limited to 20 kHz according to the product web site you mentioned.

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

aerosam

I was looking at the ROE-C series, on the last page(10) of the catalogue with open collector output.
http://www.delta.com.tw/product/em/motion/motion_encoder/download/catalogue/ROE_catalouge_en.pdf

I need to choose an encoder that doesn't have many wires
I am not keen on having so many wires, as it will consume pins on the Arduino. So could you suggest some other brand/make of encoder?

Shouldn't an encoder have just 4 wires?
1 for ground
2 for power
3 for angle increment
4 for sign(direction of rotation)

RuggedCircuits

Quote
I was looking at the ROE-C series, on the last page(10) of the catalogue with open collector output.


Getting kind of confused...there is no -C series (did you mean CS?) and the last page of the catalog is 18.

Page 3 of the catalog shows their part numbering scheme (e.g., ES5-05CN8942F). What part number did you have in mind?

These types of encoders are fine and they generally do have 4 wires:
1. Ground
2. Power
3. A
4. B

Some have a 5th wire called Z (homing index). I'm not familiar with an "angle/sign" encoder. The output possibilities are shown on page 6 of the datasheet.

--
The Aussie Shield: breakout all 28 pins to quick-connect terminals

aerosam

Looking again at page-3 of the catalog again, i am thoroughly confused.
I think i should order
ES5-25VB551AF
E-incremental
S-Solid shaft
5-50mm outer dia
25-2500 pulses/revolution
V-Output form(Voltage)
B-A and B channel without Z channel
5-5mm bore dia
5-5V DC input
1-Benign operating environment
A-300mm wire
F-Flange
How many input and output wires will this encoder have?
My guess is inputs- (Gnd,Vin) and outputs- (A,B)
If you look at the E-series of encoders
Output voltage is given as Vin-2V or VCC-2V
So does this mean there are 3 inputs(Ground, Vin, VCC?)


What is a open collector or line-driver output?

Thanks
Sam

RuggedCircuits

Quote
How many input and output wires will this encoder have?


4 wires: Vcc, GND, A, B.

Quote
If you look at the E-series of encoders
Output voltage is given as Vin-2V or VCC-2V
So does this mean there are 3 inputs(Ground, Vin, VCC?)


Nope, with an open collector driver you apply an external voltage Vin of your choosing (<30VDC) to the A/B wires through a resistor and the encoder pulls it to 0V when "active" (LOW) and lets it float up to your Vin voltage when "inactive" (HIGH).

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

bubulindo

So we get something clear...

There are usually two types of output signals on the encoders. The A - B kind are actually the Signal - Direction kind. If B comes up before A, it's moving forward and vice-versa.
Then you have gray code output. In this case the precision is dependant on the number of outputs as this encoder tells you the angle at which the rotor is at.

If you don't want to mess about with connections, get an encoder with internal pull-up. They have them.

Last but not least, just because an encoder has 30 wires, doesn't mean you have to use all of them. You can use as many as your application needs. So, for your application, my guess is that an incremental encoder is your best bet. That one will have the A-B kind of output and you can use one wire. 

Get the internal pull-up one. ;)
This... is a hobby.

Go Up