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.

Microcontroller based distance counter

Status
Not open for further replies.

aman_nagi

Newbie level 2
Newbie level 2
Joined
Aug 4, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,294
Hello,
I am making a project to calculate the distance using the revolutions of the pulley so tell me how to count the pulses from the proximity sensor.
 

the logic shown is not related to distance counter.
and you have not specify what controller you are using .
 

the logic is i want to judge the position of a lift stucked in a shaft. So for that i am using atmega16 microcontroller and IR sensor. The sensor will measure the no of revolution of the pulley and by using that i will convert it into distance and then corres to that distance floor no will be displayed. so i want to know what can be logic to measure the pulses measured by the IR sensor.
 

A correctly positioned mirror and reflective optocoupler will give one pulse per rotation of the pulley. If you use more mirrors you can get greater accuracy by producing more frequent pulses.

You need a reference point to tell you when the lift (elevator) is at a particular position, this might be at bottom or top of the shaft. Use this to zero your position counter then count the pulses that have been produced to calculate the new position.

There is a flaw in this logic which is easy to fix. With just pulses from the pulley it is impossible to work out which way it is rotating. The solution is to use a second mirror and sensor, positioned one half mirror width away from the first one. Obviously it will have to be nearer or further out from the axis so they don't overlap. Now you can tell which way it is rotating by seeing which sensor picks up the pulse first. You still need a reference point but now you can find the new position by either counting up or down at each pulley rotation.

For more information, look up how a wheel mouse works or look at quadrature encoders, they will explain the principle in more detail.

Brian.
 

    aman_nagi

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top