Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PANASONIC Rotary Encoder Switch ( EVEQ-DBRL416B )

Status
Not open for further replies.

jmur

New Member
I have connected up more then one of these as per the datasheet connection diagram but the output is not as expected, I observed the signals of A and B on my scope, both just toggle for a dedent (click) in either direction, so both are either high or low.

Does anyone have experience with these?


**broken link removed**

Datasheet
 
hi,
You have to test for an edge or a change of state on A/B when you move the indent
 
Hi eric,
Thanks for your reply.

From what I understand of the of the diagram from datasheet it is a change of state that I have to test for.
00, 01, 11, 10 is the (grey code) state sequence for clockwise rotation and the same in reverse for anticlockwise.
This is confirmed by this blog post.
But all im getting is both toggling at the same time so the output is either 00 or 11.
 
Last edited:
Which signal is your scope set to trigger on? One signal should lead the other by 90 degrees depending on direction of rotation. However, your triggering figures into this.

Ron
 
The A & B difference could be so small as to appear simultaneous. I'd try a 74LS00 quad NAND as an R-S flip-flop with falling edges of A & B as inputs. The output should be stable after each move indicating direction. You may have to build 2: one for each stable state of 00 & 11 then combine them.

I use this with 1 LED & 2 photo-NPNs to make a direction indicating optocoupler. It gives a long state & a short pulse whose levels are set by the direction the interrupting tab breaks each NPNs input. G.H. <<<)))
 
Last edited:
Thanks for your replys reloadron and OlPhart,

Got it now, I had expected to have four dc states 00, 01, 11, 10 which is not really the case. The phase difference between A & B is very small though, about 18 degrees..

Another thing, is there really a need for the 4 resistors as shown in the datasheet diagram?
most other encoders just seem to require a pull-up on each signal pin, I was hoping to be able to use the the weak internal pull-ups on the PIC im using
 
I would use the circuit as drawn. Here is why. The weak pull up in the uC is designed to be easily overcome by an input going low and this is your case. The additional A&B output lines use an RC combination to eliminate switch bounce I believe. I would use it as drawn but that is just my opinion.

Ron
 
Thanks for your opinion ron :)

I think Ill evaluate both setups and see if I can get away with using a software debounce and the internal pullup.
 
Well as it turns out, I dont have any free port pins with pull-ups! but I tried with just an external pull-up (no RC debounce) and a software debounce and it works fine.
 
Last edited:
Good deal and glad it is working out for you.

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top