Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Tools
Old 17th August 2009, 05:48 PM   #1
Default Rotary Encoder not working as expected...

I purchased a couple quadrature incremental rotatory encoders (ACZ16NBR1E-20KQA1-12C) and they're not responding as I had expected.

To test them, I connected phases A & B to 5V through LEDs and Common to ground. Yes, I know it'll damage my LEDs, but I just wanted to see the encoder work for the first time. I expected to see each LED light up 2 times for every 4 positions of the dial.

Instead, I see very erratic behavior. Typically the LED only lights up half-way through a position change. Sometimes the LED will stay on after I reached a position, but it occurs much less often than 50% of the time.

This is my first encoder experience. Please help!
ignisuti is offline  
Old 17th August 2009, 05:52 PM   #2
Default

Quote:
Originally Posted by ignisuti View Post
I purchased a couple quadrature incremental rotatory encoders (ACZ16NBR1E-20KQA1-12C) and they're not responding as I had expected.

To test them, I connected phases A & B to 5V through LEDs and Common to ground. Yes, I know it'll damage my LEDs, but I just wanted to see the encoder work for the first time. I expected to see each LED light up 2 times for every 4 positions of the dial.

Instead, I see very erratic behavior. Typically the LED only lights up half-way through a position change. Sometimes the LED will stay on after I reached a position, but it occurs much less often than 50% of the time.

This is my first encoder experience. Please help!
hi,
Have you a sketch showing how you have wired the encoder.?

Using a 5v supply, you MUST use a series resistor to limit the current thru the LED and switch contacts!

EDIT: look at this image
Attached Thumbnails
Rotary Encoder not working as expected...-aaesp02.gif  
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 17th August 2009 at 05:58 PM.
ericgibbs is offline  
Old 17th August 2009, 05:58 PM   #3
Default

I've just connected them like this as a temporary setup so that I can verify the operation of the rotary encoder. 5V through the LED will GREATLY reduce the LEDs life, but it should last long enough for me to finish this quick test. As for the contacts of the switch, it should handle 5V just fine.

I don't have a schematic, but it's simple enough to explain. Pins A & B are connected to 5V through an LED and the common pin on the encoder is connected to ground. So as the quadrature encoder moves 4 positions, I expect to see each LED light up twice.

EDIT,
Eric, I see the diagram you posted. My setup is just like that minus the resistors.

Last edited by ignisuti; 17th August 2009 at 06:00 PM.
ignisuti is offline  
Old 17th August 2009, 06:01 PM   #4
Default

Quote:
Originally Posted by ignisuti View Post
I've just connected them like this as a temporary setup so that I can verify the operation of the rotary encoder. 5V through the LED will GREATLY reduce the LEDs life, but it should last long enough for me to finish this quick test. As for the contacts of the switch, it should handle 5V just fine.

I don't have a schematic, but it's simple enough to explain. Pins A & B are connected to 5V through an LED and the common pin on the encoder is connected to ground. So as the quadrature encoder moves 4 positions, I expect to see each LED light up twice.
hi,
OK.
Its NOT the 5V thats concerns me, its the current thru the encoder contacts!
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 17th August 2009 at 06:01 PM.
ericgibbs is offline  
Old 17th August 2009, 06:12 PM   #5
Default

Quote:
Originally Posted by ericgibbs View Post
hi,
OK.
Its NOT the 5V thats concerns me, its the current thru the encoder contacts!
So, are you saying that my setup is invalid for verifying that the rotary encoder works the way I expect it to? If so, please explain.
ignisuti is offline  
Old 17th August 2009, 06:18 PM   #6
Default

Quote:
Originally Posted by ignisuti View Post
So, are you saying that my setup is invalid for verifying that the rotary encoder works the way I expect it to? If so, please explain.
Have you looked at that image I posted.?

The switching pattern of the encoder is taken from the datasheet of the type you have posted. I added the small diagram how it should be connected.

Is your circuit the same as the image, also be sure that you have correctly identified the 'C' pin.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 17th August 2009, 06:40 PM   #7
Default

Quote:
Originally Posted by ericgibbs View Post
Have you looked at that image I posted.?

The switching pattern of the encoder is taken from the datasheet of the type you have posted. I added the small diagram how it should be connected.

Is your circuit the same as the image, also be sure that you have correctly identified the 'C' pin.
Yes, my setup is the same minus the resistors. I would have to disagree if you argue that the resistors are critical for me to see what I'm trying to see.

Now, you may be onto something by questioning the C pin. I'm very confused if the C pin is on the left or right side. The datasheet shows the pinout with the switch positioned upside down which I find very odd. Eitherway, I've tested with Common being on both left and right and the results seemed the same.

Hmmm.... Maybe the datasheet is completely wrong and the Common is in the middle!? I'll have to test and report back...
ignisuti is offline  
Old 17th August 2009, 06:53 PM   #8
Default

Quote:
Originally Posted by ignisuti View Post
Yes, my setup is the same minus the resistors. I would have to disagree if you argue that the resistors are critical for me to see what I'm trying to see.
I'll have to test and report back...
If you read my posts I have not said that the fact you are not using a current limiting resistor will stop seeing what you are trying to see.!

What I keep repeating is, without a limiting resistor and the fact that you are using a 5v supply, if an LED fails short circuit you will most likely damage the encoder contacts.

I am puzzled why you dont want to fit a simple resistor in series with each LED, say 470R.

Perhaps some other member will help you with this problem.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 17th August 2009 at 06:53 PM.
ericgibbs is offline  
Old 17th August 2009, 07:09 PM   #9
Default

I've always wondered why some folks just don't like resistors.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 17th August 2009, 07:28 PM   #10
Default

Resistors are fine. I just made the decision that I'd rather throw away $0.20 worth of LED's versus spend the extra 30 seconds to add resistors for my quick one-time test.

I don't see how 5V would damage these contacts. They're rated for 5V.
ignisuti is offline  
Old 17th August 2009, 07:30 PM   #11
Default

Quote:
Originally Posted by ignisuti View Post
Resistors are fine. I just made the decision that I'd rather throw away $0.20 worth of LED's versus spend the extra 30 seconds to add resistors for my quick one-time test.

I don't see how 5V would damage these contacts. They're rated for 5V.
Your NOT listening, its NOT the voltage thats the problem its the possible high current!
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 18th August 2009, 04:44 AM   #12
Default

There probably not meant handle more then 10ma of power
He just knocking off part of his 100,000 cycles maybe have 10 left.
Rated for 5V don't mean it can can sink a amp
be80be is offline  
Old 18th August 2009, 05:42 AM   #13
Default

I think I had the pinout right. Maybe I did do some damage as my results just aren't turning out right.

I added the resistors as suggested and am now seeing both lights light up with EVERY position change. They only light up during the transition and don't stay lit afterwards. Now I did notice that one light #1 lights up a moment before light #2 while spinning clockwise and light #2 lights up a moment before light #1 while spinning counter-clockwise.

Although I could write some code to handle this situation, I don't think it's the expected behavior. Am I wrong?

I ordered a 2nd encoder just incase, but can't seem to find it now!
ignisuti is offline  
Old 18th August 2009, 08:54 AM   #14
Default

hi,
Look at this image to see the sequence you should observe.

The design of the quadrature signal phasing is so that its possible to determine which way the shaft is being turned and by how many indentations. [steps]

Quadrature of the two signals means they are shifted in phase by 90deg relative to each other.

The 'detent' stability points on the signals are where the mechanical indents in the switch mechanism are located,, ie: at rest.

A point to remember is that if switch contacts are subject to switching currents higher than the maximum rated value the contacts can be damaged.
This damage will cause intermittent closures creating multiple signals to the external equipment.
Attached Thumbnails
Rotary Encoder not working as expected...-aaesp02.gif  
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 18th August 2009, 01:35 PM   #15
Default

Eric, Thanks. I found your post very helpful.

This is consistent with my previous understanding. So, looks like I must have damaged the encoder.

Now if I could only find the backup encoder that I ordered, or I might have a downtime of a few days...
ignisuti is offline  
Reply

Tags
encoder, expected, rotary, working

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Identifying and using a rotary encoder, help! dec_lan General Electronics Chat 3 11th August 2009 04:55 AM
Rotary Encoder vk6kci Electronic Projects Design/Ideas/Reviews 6 21st May 2009 12:57 AM
PPR for rotary encoder engkeat Robotics Chat 0 23rd December 2008 05:03 PM
Rotary Encoder with Switch Mike, K8LH Datasheet/Parts Requests 3 24th March 2005 03:28 PM
Magnetic rotary Encoder sarang1_in Datasheet/Parts Requests 1 28th February 2005 04:13 AM



All times are GMT. The time now is 04:29 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker