Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Problems with rotary encoder project

Status
Not open for further replies.

2000

Member level 5
Joined
May 14, 2001
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
764
Encoder problems

Hello friends,

Once more I need your help. I´m working on a rotary encoder that generates 50 pulses/turn. One of the direction signals is conected directly to the interruption of the 8051 and the other is connected to the P0^3 port, in such a way that when an interruption is generated by a falling edge the P0^3 is checked to see if its 1 or 0 to determine the direction of rotation.
The problem is, when spinning fast the 8051 interprets well the signals and works fine, but when spinning slow it doesn´t know the direction and get lost. What could be wrong? I´ve already looked the signals in a LA and there is no bouncing or glitches. Should I use any logic?

regards,

2000
 

gelly

Junior Member level 2
Joined
May 17, 2001
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
138
encoder

hi 2000,

i finally uploadet an image of quadrature encoder.
hope this image is clearing up a bit.
( i'ts just a scratch draw of principle )

hxxp://www.angelfire.com/freak/gelly/encoder_mouse.jpg

about the problem u just having...
cant say mutch, because of too less info on whole project.

gelly.
 

nebisman

Full Member level 4
Joined
Apr 13, 2002
Messages
226
Helped
10
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,849
The problem could be a slow transition for low velocity. Remember that
the external INT sources are edge triggered. Then maybe you never generates a trigger at low vel. Try connecting an schmitt trigger gate as the 4106 not gate, it compares level voltage and generates steep pulses

Also I recommned you to introduce a little delay after the lecture of port to make sure that cuadrature pulse has arrived.

Please tell more details if problem persist


NEBISMAN
 

bunalmis

Full Member level 5
Joined
Jan 3, 2003
Messages
268
Helped
19
Reputation
38
Reaction score
11
Trophy points
1,298
Location
Ireland
Activity points
2,147
Re: Encoder problems

Did you look at the A and B channel by scop ?

Signals are good at all speed?
 

ash

Full Member level 3
Joined
Dec 25, 2002
Messages
151
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Location
Europe
Activity points
1,051
Try it:
Connect encoder's clock pulse to 8051's interrupt input. When clock pulse trigged low scan direction bit.
I think it will work.
 

year

Member level 3
Joined
Feb 21, 2002
Messages
62
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
441
You can try...

- Using Counter Mode

Count limit sets to '1' and input

If counted and interupt.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top