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.

Project on measuring angle using IR LED and photodiode

Status
Not open for further replies.

Arun@007

Newbie level 1
Joined
Jan 3, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
I have a with holes in particular angle (i.e 15* each) in a circular plate and i have IR led and photodiode fixed at one end and if the photodiode is sensed once then count value has to increase to 1 and angle should be indicated as 15* for this i need a 8051 assembly program and i also need program for displaying rpm and direction of rotation using assembly language for clear idea see the link given below
Incremental Optical Encoders
 

Measuring RPM would mean simply measuring the period between pulses from your photodiode, then some clever maths (once you know how many pulses per rotation, and your CPU's osc frequency) to convert this revolutions-per-minute. However, in order to measure direction, you'll need a second LED/photodiode pair, perhaps with its own set of holes in the plate. The holes should be at the same raduis (well, close..) but 90 degree's out of phase. In terms of your project this means that they should be 15+(15*90/360) degree increments. So if your holes are 0,15,30,45,60 degrees, the second set should be 3.75,18.75, 33.75, 48.75 etc..

The exact offset angle isn't particularly critical though, you could get away with 3,18,33,48.. degrees, because whilst you measure RPM with one set of holes, the other set is just there to provide a phase difference, so it simply has to be offset by an angle that is less than half of the original hole angle. (ie: with your 15 degree increments, you'll need 15+ something thats less than 15/2 = 7.5, so <3-5 degree's would be a good offset).

If you don't want to add more holes then the placement of your second photodiode is just as important, it must be 1/4 the distance between the holes on your plate. That is:

Raduis at which holes are drilled on plate = r = example 40mm.
Angle at which holes are drilled = 15
Number of holes = N = 360/15 = 24
Distance between holes = (2*pi*r)/ N

your photodiodes should be placed 1/4 of this distance apart..

Sounds complicated but here's a link that explains it well:
http://thedenneys.org/pub/robot/encoders/

Drilling holes is quite straight forward for building an encoder, the only downside being is, because the holes are small compared to the plate, you have very narrow pulse widths. The phase relationship can usually be as simple as an XOR function, but with short pulses, you would have to measure the time between the two different photodiode pulses, as well as each ones period. Doable with a small micro, but a bit fiddly.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top