Page 4 of 8

Laser Range Finder

Posted: Tue Mar 23, 2010 7:16 pm
by polymath
First off, thanks for the project. This setup is pretty sweet. I was just curious to know if it was possible to use a laser range finder? Like out of a laser tape measure. I was thinking of increasing the range to 100'+. This would be an excellent tool for anyone driving a long vehicle, like a 1 ton truck and horse trailer.

I'd also like to know if anyone has gotten this to display on a computer. It'd be pretty sweet to have an old school sweep screen mounted on the dash.

Question for Sharp IR range finder

Posted: Wed Mar 24, 2010 6:22 am
by jsn8610
I'm interested in using Sharp IR range finder sensor in my robot. Is there any C programming example as reference?
Because i'm new in writting ADC in C programming for my microcontroller PIC18F452. Meanwhile, i'm not very understand the code's comment admin post in range finder tutorial.
If there has any simple ADC C programming code in interfacing SHARP IR range finder sensor with microcontroller PIC18F452 as reference, i would very appreciate it. :D

Posted: Wed Nov 10, 2010 7:51 am
by solidus
ISIS simulates the program and LEDs are not ok.LE signal is coming to all 373's pin 11 but nothing happen. RD0...RD7 is always low. RB0..RB4 logic states changing every 1 sec. (1sec high,1sec low), but nothing happen. Help me !!!

Posted: Thu Nov 11, 2010 6:41 am
by ThePyroElectro
Simulators are only so good....things work differently in the real world. Haha, sorry it's just I have no experience with ISIS so I'm not sure how to reply.

I would say, try to program the PIC with your code and slowly build the project until it all works. Simulators are only so helpful, especially with a small project like this.

Posted: Thu Nov 11, 2010 5:23 pm
by solidus
Ok Pyro.. I'll do it. How am I calibrate the sensor ?

Posted: Sat Nov 13, 2010 12:24 am
by ThePyroElectro
The datasheet for the GP2D120 or whatever IR proximity sensor you are using tells you how it operates.

Since the sensor detects reflected Infrared Light, you will only need to calibrate the sensor when you are using it where other sources of infrared light are present (like from the sun). If you connect the V_output from the sensor to a DMM voltmeter and test the sensor in different places and conditions you will see when calibration is necessary (usually if operating outdoors or around bright incandescent light).

Posted: Sat Dec 18, 2010 10:43 pm
by solidus
Hello again Pyro..
I built the circuit an programmed chip..Everything is controlled but, when I aplly the power all the leds are ON and servomotor does nothing.Just LEDs are lit. Suggest me something to do. if not I'll be a personal radar!

Posted: Sat Dec 18, 2010 11:34 pm
by ThePyroElectro
@solidus I'll upload the .hex file for the ir radar project however I have a concern that if you can't even compile the project on your own having the hex file may not be very helpful to you as you'll run into other problems.

IR Hex Download:

It sounds like either (a) you're going to need to go through the code and change something so that your setup works or (b) the led drivers (74_373) are not wired up correctly, and never change their output state.

It really just sounds like the PIC isn't doing anything, some leds should be turning off and on. I would look around the PIC's pins (look for state changes) as well, and make sure it is on and executing instructions.

Posted: Thu Dec 30, 2010 9:55 am
by robert khanal
hello! thanks a lot for the concept. i am new in using pic mc. how can i convert given source code for this project to hex.

Posted: Thu Dec 30, 2010 6:14 pm
by ThePyroElectro
The hex file can be found here:

As I've warned other users. Simply programming the PIC without getting everything to compile yourself through MPLAB is a recipe for disaster if you eventually have to debug the project. I strongly urge you to try to get the project to compile inside MPLAB and use the hex file from there to program the pic.

Best of luck.

Posted: Sat Jan 01, 2011 3:53 pm
by robert khanal
thank you very much admin.
can i use p18f4520 for this project. if yes would you please provide me the hex file. and what does 6pin header do in the circuit can we replace it with something else and if you dont mind please help me.

Posted: Sun Jan 09, 2011 9:55 pm
by ThePyroElectro

The 18F4520 could be used, but you would have to change the code. The 6-pin header is the standard ICSP programming/debugging interace for PIC microcontrollers.

Posted: Sat Feb 05, 2011 8:04 pm
thank you for this project i which to know if i can make the range up to 180 insted of 90 with stepper motor, can GP2D12 cover this range (beamwidth is up to 5 cm ) ,can you advised me please. :?: :!:

Posted: Sat Feb 05, 2011 9:44 pm
by ThePyroElectro

A stepper motor can do 360 if you want, hobby servo motors are typically limited to 90 degrees.

I'm not sure what you mean by 5cm beam-width. The beam-width is narrow for these sensors because they are trying for pin-point accuracy for proximity, that's why you have to move the sensor back and forth across a field of view. Check the data sheet for the various GP2D sensors for those specifics.

Posted: Mon Feb 07, 2011 4:35 pm

Thank you PyroElectro; stepper motor I think it will need abrush to rotate with 360 and this will make the connection more comlex .

About beam-width it just as you please in fact sonar can be used for longer range ( more than 80 cm ) but it less accuracy than IR , if you don't mind I will need your help when it comes time to work thank you very much again.