Short Range Personal Radar
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Subhashish,
The servo motor is not necessary, but without it you will only have 1 line of radar, not a field of view.
Vcc or Vdd are tied to the same +5v power. The GND connections all go to the same ground.
If you're not using the servo motor, then you have to change the code for that case, otherwise the output on the LEDs will be variable and wrong.
The blue line is an 8 bit bus, if you look in the source code firmware you will see how these 8 bits from the PIC are sent to each 373 latch to update the LED status. RD0 is connected to D0 on all latched up to RD7 to D7.
If your 5v voltage regulator is outputting 2.3 volts, either [a] you are not supplying the minimum input voltage Vin or [b] the part is broken.
It seems there are many issues with what you have and want to do, you need to start at the beginning and resolve the issues one by one. Then the circuit will work.
The servo motor is not necessary, but without it you will only have 1 line of radar, not a field of view.
Vcc or Vdd are tied to the same +5v power. The GND connections all go to the same ground.
If you're not using the servo motor, then you have to change the code for that case, otherwise the output on the LEDs will be variable and wrong.
The blue line is an 8 bit bus, if you look in the source code firmware you will see how these 8 bits from the PIC are sent to each 373 latch to update the LED status. RD0 is connected to D0 on all latched up to RD7 to D7.
If your 5v voltage regulator is outputting 2.3 volts, either [a] you are not supplying the minimum input voltage Vin or [b] the part is broken.
It seems there are many issues with what you have and want to do, you need to start at the beginning and resolve the issues one by one. Then the circuit will work.
Hello again,
after sometime giving the project a rest, I recommenced in hope that it would work. Unfortunately, while the servo pans right and left, the LED's remain turned off. However, if I disconnect the LE, then the first 5 LED's light up from bottom to top, while the other two in each column do nothing. Actually, the LS373 outputs as following: Q2, Q1, Q0, Q1, Q2, Q3, Q4,Q3, Q2, Q1, Q0... and so on. It seems as though I would need 7 LS373 and connect each of them to the 5 LED's of each horizontal row. What could the problem be? Would it have anything to do with the fact that I have connected only one LS373 and not all of them, or maybe the rest of them would do exactly the same?
Thank you very much for your assistance.
after sometime giving the project a rest, I recommenced in hope that it would work. Unfortunately, while the servo pans right and left, the LED's remain turned off. However, if I disconnect the LE, then the first 5 LED's light up from bottom to top, while the other two in each column do nothing. Actually, the LS373 outputs as following: Q2, Q1, Q0, Q1, Q2, Q3, Q4,Q3, Q2, Q1, Q0... and so on. It seems as though I would need 7 LS373 and connect each of them to the 5 LED's of each horizontal row. What could the problem be? Would it have anything to do with the fact that I have connected only one LS373 and not all of them, or maybe the rest of them would do exactly the same?
Thank you very much for your assistance.
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Hi madjim,
Sorry for the last response.
I think it would be a good idea if you took one of the 74LS373's and tested it with some wires and LEDs on a breadboard. This way you can get a better understanding of how they work and what they do.
I don't exactly understand what you are asking, but if you only have 1 74LS373 wired up to the project, only 8 LEDs will be able to light up. The way they light up should be dependent on the Infrared Sensor's input to the Analog to Digital converter.
Sorry for the last response.
I think it would be a good idea if you took one of the 74LS373's and tested it with some wires and LEDs on a breadboard. This way you can get a better understanding of how they work and what they do.
I don't exactly understand what you are asking, but if you only have 1 74LS373 wired up to the project, only 8 LEDs will be able to light up. The way they light up should be dependent on the Infrared Sensor's input to the Analog to Digital converter.
Re: Short Range Personal Radar
i want to make lookup table for ir sensor ,, but i have problem i.e when i measured the distance of target at 15 cm the vo = 1.29 and at same distance but move the target horizontal-i.e at angle 50- ( i think the shape of wave transmitted core) it generate vo the same as 10 com for example ,, how i can avoid this overlap ????????
Re: Short Range Personal Radar
int Ir_Data_Eval(int ir_data, int isCHIP0)
{
// @ 70cm+
if(ir_data > 0x171 && ir_data <= 0x19E){
if(isCHIP0)
return 0xC0;
else
return 0x40;
}
// @ 60cm+
else if(ir_data > 0x19E && ir_data <= 0x1C3 ){
if(isCHIP0)
return 0xA0;
else
return 0x20;
}
// @ 50cm+
else if(ir_data > 0x1C3 && ir_data <= 0x1EB ){
if(isCHIP0)
return 0x90;
else
return 0x10;
}
// @ 40cm+
else if(ir_data > 0x1EB && ir_data <= 0x20D ){
if(isCHIP0)
return 0x88;
else
return 0x08;
}
// @ 30cm+
else if(ir_data > 0x20D && ir_data <= 0x262 ){
if(isCHIP0)
return 0x84;
else
return 0x04;
}
// @ 20cm+
else if(ir_data > 0x262 && ir_data <= 0x2C6 ){
if(isCHIP0)
return 0x82;
else
return 0x02;
}
// @ 10cm+
else if(ir_data > 0x2DA){
if(isCHIP0)
return 0x81;
else
return 0x01;
}
//If chip 0 make sure to turn on the very first led
if(isCHIP0)
return 0x80;
return 0x00;
}
in this section of code i guess you check the distance of ir sensor and return the output voltage from the datasheet of ir,i'm confused because in code description you say " // 70+ ,//@ 60+...... so which ir sensor did you use??? i'm interested in use of this GP2Y0A21YK0F 10 to 80 cm .do i have to change
something in the code? thanks in advance
{
// @ 70cm+
if(ir_data > 0x171 && ir_data <= 0x19E){
if(isCHIP0)
return 0xC0;
else
return 0x40;
}
// @ 60cm+
else if(ir_data > 0x19E && ir_data <= 0x1C3 ){
if(isCHIP0)
return 0xA0;
else
return 0x20;
}
// @ 50cm+
else if(ir_data > 0x1C3 && ir_data <= 0x1EB ){
if(isCHIP0)
return 0x90;
else
return 0x10;
}
// @ 40cm+
else if(ir_data > 0x1EB && ir_data <= 0x20D ){
if(isCHIP0)
return 0x88;
else
return 0x08;
}
// @ 30cm+
else if(ir_data > 0x20D && ir_data <= 0x262 ){
if(isCHIP0)
return 0x84;
else
return 0x04;
}
// @ 20cm+
else if(ir_data > 0x262 && ir_data <= 0x2C6 ){
if(isCHIP0)
return 0x82;
else
return 0x02;
}
// @ 10cm+
else if(ir_data > 0x2DA){
if(isCHIP0)
return 0x81;
else
return 0x01;
}
//If chip 0 make sure to turn on the very first led
if(isCHIP0)
return 0x80;
return 0x00;
}
in this section of code i guess you check the distance of ir sensor and return the output voltage from the datasheet of ir,i'm confused because in code description you say " // 70+ ,//@ 60+...... so which ir sensor did you use??? i'm interested in use of this GP2Y0A21YK0F 10 to 80 cm .do i have to change
something in the code? thanks in advance
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Re: Short Range Personal Radar
Partakias wrote:int Ir_Data_Eval(int ir_data, int isCHIP0)
{
// @ 70cm+
if(ir_data > 0x171 && ir_data <= 0x19E){
if(isCHIP0)
return 0xC0;
else
return 0x40;
...
..
..
return 0x00;
}
in this section of code i guess you check the distance of ir sensor and return the output voltage from the datasheet of ir,i'm confused because in code description you say " // 70+ ,//@ 60+...... so which ir sensor did you use??? i'm interested in use of this GP2Y0A21YK0F 10 to 80 cm .do i have to change
something in the code? thanks in advance
Hello!
I used different sensors with that project, because it's very easy to swap them out and they all follow the same pattern with their analog output. The software as I left it online was meant to work for the GP2Y0A21, 10-80cm. However, as many people have re-built this project I've found that you will need to calibrate your if(ir_data > 250 && ir_data <= 350) statements to get similar results like I had. Things like ambient infrared light and other environmental factors make it so that this 'personal radar' doesn't work equally as well in all locations.
Good luck!
-
- Newbie Pyro
- Posts: 2
- Joined: Sun Feb 10, 2013 10:44 pm
Re: Short Range Personal Radar
Sir, I had quite a few doubts!!
Firstly, i've used a basic IR sensor made from LM358 instead of GP2D120
https://sites.google.com/site/welcome2r ... roject-4-1
Its range is also similar to GP2D120!! So is it gonna work??
Also can i know d changes in code for this sensor in this range??
Another question is, are you sure the schematic and the program match for Port B n Port D??
Please reply asap!! Thanx

Firstly, i've used a basic IR sensor made from LM358 instead of GP2D120
https://sites.google.com/site/welcome2r ... roject-4-1
Its range is also similar to GP2D120!! So is it gonna work??
Also can i know d changes in code for this sensor in this range??
Another question is, are you sure the schematic and the program match for Port B n Port D??
Please reply asap!! Thanx


-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Re: Short Range Personal Radar
stephenjaroza wrote:Sir, I had quite a few doubts!!
Firstly, i've used a basic IR sensor made from LM358 instead of GP2D120
https://sites.google.com/site/welcome2r ... roject-4-1
Its range is also similar to GP2D120!! So is it gonna work??
Also can i know d changes in code for this sensor in this range??
Another question is, are you sure the schematic and the program match for Port B n Port D??
Please reply asap!! Thanx![]()
Hi,
You can't use that IR sensor made from LM358 because it is digital output, not analog voltage output. The person who built that is using a trimpot as reference for the op-amp comparator voltage. You can see that he varies the reference trimpot in the video to set the distance that the sensor should trigger.
The GP2D120 has dynamic analog voltage output that correlates to how far away an object is from the sensor.
-
- Newbie Pyro
- Posts: 2
- Joined: Sun Feb 10, 2013 10:44 pm
Re: Short Range Personal Radar
ThePyroElectro wrote:stephenjaroza wrote:Sir, I had quite a few doubts!!
Firstly, i've used a basic IR sensor made from LM358 instead of GP2D120
https://sites.google.com/site/welcome2r ... roject-4-1
Its range is also similar to GP2D120!! So is it gonna work??
Also can i know d changes in code for this sensor in this range??
Another question is, are you sure the schematic and the program match for Port B n Port D??
Please reply asap!! Thanx![]()
Hi,
You can't use that IR sensor made from LM358 because it is digital output, not analog voltage output. The person who built that is using a trimpot as reference for the op-amp comparator voltage. You can see that he varies the reference trimpot in the video to set the distance that the sensor should trigger.
The GP2D120 has dynamic analog voltage output that correlates to how far away an object is from the sensor.
Sir, u din answer my other question though!! abt d Port B n Port D confusion!!
And can i use this servo motor??
http://www.nex-robotics.com/products/mo ... motor.html
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Re: Short Range Personal Radar
stephenjaroza wrote:ThePyroElectro wrote:stephenjaroza wrote:Sir, I had quite a few doubts!!
Firstly, i've used a basic IR sensor made from LM358 instead of GP2D120
https://sites.google.com/site/welcome2r ... roject-4-1
Its range is also similar to GP2D120!! So is it gonna work??
Also can i know d changes in code for this sensor in this range??
Another question is, are you sure the schematic and the program match for Port B n Port D??
Please reply asap!! Thanx![]()
Hi,
You can't use that IR sensor made from LM358 because it is digital output, not analog voltage output. The person who built that is using a trimpot as reference for the op-amp comparator voltage. You can see that he varies the reference trimpot in the video to set the distance that the sensor should trigger.
The GP2D120 has dynamic analog voltage output that correlates to how far away an object is from the sensor.
Sir, u din answer my other question though!! abt d Port B n Port D confusion!!
And can i use this servo motor??
http://www.nex-robotics.com/products/mo ... motor.html
Hi,
Yes. Portd and Portb are swapped around in the code. How confusing...sorry.
That servo motor looks like it would work, however I could not find a proper datasheet. There should be a link to a place where you can buy the servo motor I used in the article's parts section.
-
- Newbie Pyro
- Posts: 1
- Joined: Thu Mar 07, 2013 8:49 am
Re: Short Range Personal Radar
hello sir,
i am getting a compile time error in mplab saying linker scripts no found.
what should i do?
i am getting a compile time error in mplab saying linker scripts no found.
what should i do?
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Re: Short Range Personal Radar
studentextc3 wrote:hello sir,
i am getting a compile time error in mplab saying linker scripts no found.
what should i do?
Hi,
It depends on your exact error. You could manually add the linker scripts to your project, but you shouldn't have to do that.
Make sure you are using the mplab C18 compiler to compile that program, make sure you have selected the correct Target PIC when you setup your project, make sure you have included the correct header file >> #include <p18F _ _ _.h> << and make sure your part configuration bits are set.
One of all of those things should fix your problem.
-
- Newbie Pyro
- Posts: 1
- Joined: Fri Jun 07, 2013 9:48 am
Re: Short Range Personal Radar
its same thing happen in my compiler. in mikroC
error: Can't open include file "p18f452.h"
error: Can't open include file "timers.h"
error: Can't open include file "delays.h"
error: Can't open include file "adc.h"
error: Can't open include file "stdlib.h"
pls.. ur project
error: Can't open include file "p18f452.h"
error: Can't open include file "timers.h"
error: Can't open include file "delays.h"
error: Can't open include file "adc.h"
error: Can't open include file "stdlib.h"
pls.. ur project
Re: Short Range Personal Radar
im doing the Short Range Personal Radar for mini project,
i just wanted to know the software works need for the project in detail.help ASAP
i just wanted to know the software works need for the project in detail.help ASAP
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Re: Short Range Personal Radar
vighnesh wrote:im doing the Short Range Personal Radar for mini project,
i just wanted to know the software works need for the project in detail.help ASAP
Software works, but you sometimes have to calibrate the values associated for turning on the different 'levels' of the radar as some IR sensors work differently than others.
Who is online
Users browsing this forum: No registered users and 1 guest