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.

[SOLVED] Distance meter using PIC16F877A

Status
Not open for further replies.

Jahm

Newbie level 5
Joined
Mar 15, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
Good day all.

I need help with a model that will display its distance travelled using PIC16F877A and a sensor. It doesn't matter what sensor this will be. What are my requirements to make this work? Hoping to hear from you soon. Thank you all.
 

OK, how about using a wheel with a magnet on the rim, and a reed relay fixed so that the magnet passes it and turns it on momentarily.

The PIC can count the pulses from the relay and, by knowing the circumference of the wheel, one can simply calculate how far the wheel has rolled. As a bonus, you could time the pulses and obtain an average speed.

Requirements: PIC, Wheel and something like a pole to mount it on, reed relay and magnet, LCD display (I imagine that you want to display the results), and a few basic components to tie them all together. Oh, and some simple programming!

Perhaps your 'model' already has a wheel that could be used...
 

Is it possible not to use a wheel? That means you'll manually drag it from point a to point b.
 

It's certainly possible - you'll need to define your requirements and constraints more fully. Like, what resolution of measurement, what is the environment... There are inertial sensors (solid-state or old-fashioned spinning gyroscopes), satellite-assisted location, etc.

Take a look at the MEMS inertia sensors here:

https://www.analog.com/en/mems-sensors/mems-inertial-sensors/products/index.html
 

Somewhat it should work like this, but it doesn't have to look like this. I'll be using a PIC16F877A, soldered together with the LCD, sensors, buttons and etc.



---------- Post added at 21:27 ---------- Previous post was at 20:39 ----------

It should work like that of an optical mouse, drag the whole thing from point A to point B and displays the distance covered.
 

Is the 'model' going to be dragged only in a straight line perpendicular to the marked distance lines, so that it crosses them?
 

Yes. It should work that way.
 

Use time of flight with ultrasonic or laser technology
 

Man I can't afford that thing.
 

i want a circuit of an rf rc car,motor is of 300rpm n plz gve me full details abt the circuit ,im a enngg student i knw how to connect bt want a circuit diagram of the cr of rx n tx of 434mhz
 

@varunnayak, may I respectfully suggest that you don't use unnecessary, non-electronic, abbreviations, and that you start a new post for your request?

---

Back to the topic...

Jahm, you really need to give proper specifications at the start, otherwise people come up with suggestions that are a waste of effort because they don't meet your requirements.

Most likely you can use an infrared LED and a photodiode, carefully aligned underneath your model. The photodiode will detect the reflection from the surface, and this will drop when a dark line is passed. That current drop can be detected and used as your distance pulse, if each line passed is all you need to measure.

If you need higher resolution, then Klystron's suggestion is what you need. Ultrasonic ranging is not expensive to implement, and it's probably easier to set up than trying to align the LED and photodiode.
 

Thank you sir for the input!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top