Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

encoder to measure motor speed.how to specify the direction?

Status
Not open for further replies.

m_mansour2005

Newbie level 5
Joined
Apr 2, 2009
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
egypt>>mansoura
Activity points
1,355
measuring motor speed

i've an optical encoder to measure the motor speed
2 wires o/p from this sensor
1stwire>>>>>to count pulses
2nd wire>>>>specify the direction right or left


i can count pulses.
sensor has no name.i try to know how to specify the direction but i can't .
any one know how those sensors work?? how to specify the direction?? i think all types of this sensors has one idea. any one know it?
 

motor speed encoder

I assume you have a quadrature encoder. If two counters are placed on both wires simultaneously the count will be within +/- 1 if this is true.

The two clock streams are phase shifted by 90 degrees. In X1 mode you use A clock to count and the B clock to determine direction. On the rising edge of the A clock if B is Low we count in one direction (say Up) else if on the rising edge of the A clock B is High we count in the opposite direction (down). There are other modes X2, X4. Just google them.
 

motor encoder

practical questions???
after encoder testing...
this is the result

turn right
wireA wireB
0 0
0 1
1 1
1 0

turn left
wireA wireB
0 0
1 0
1 1
0 1

although wireA -0011- from 0 to 1 count as pulse & from 0 To 0 also count as pulse.

i think from 0 to 0 >>>> convert from 0 to 1 to 0 rapidly . 1 senses only by timer0 but can't be seen by a LED for example?

the question?
what's the optimal way to specify the direction???
 

measuring speed from encoder pulses

001100110011001100110 <--A (Rotating right)
011001100110011001100 <--B

011001100110011001100 <--A (Rotating left)
001100110011001100110 <--B

If all you are after is the direction, use something like a D Flip Flop, connect A to Clock, B to Data. On Rising of A edge it will latch the B clock (Direction). giving a Q state output of that direction updated on every rising edge of A clock. This should be implemented as an IC package or FPGA/CPLD due to speed. Seems a waste not to use the positioning / speed data as well, but if your application doesn't require it...
 

measure motor speed

Maybe u can can try to use the hall sensor.There is a mode used in the BLDC motor.It can be test the speed and direction.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top