Page 5 of 8

personal radar

Posted: Sun Feb 13, 2011 8:48 am
by madjim
Hello I'm kind of new to electronics but i want to make the personal radar project. I believe i have understood most of it but i am confused about the LS373. I would like to know which LS373 controls which LED, the LS373 connected to RB0, will control the LED's on the left or on the right? Which pin will control which LED? Also, should I connect the OE with the GND?

Thank you very much.

Posted: Sat Feb 19, 2011 8:37 am
by ThePyroElectro
Hi madjim,

The 8-bits of PortD (RD0 ~> RD7) are connected to all of the 373's in a data-bus style. This means the data put on these wires is seen by all of the 373's.

However, the 373's won't use the data unless the 373's LE pin is enabled. PORTB is in charge of allowing data to be set into the 373's.

As to which 373 is connected to which LEDs. That's really up to you. I didn't put that in the schematic. So you'll have to make a conscious effort to remember which chips control which LEDs when you wire it up.

I would suggest connecting OE to ground, this way the 373's are always outputting. It saves you from writing more software and wiring up the extra control lines.

servo problem

Posted: Sat Feb 19, 2011 5:58 pm
by madjim
Hello again, i have connected the PIC to the power and the servo to the power and the signal pin. unfortunately, even though there is power in all the circuit, the servo does not move. The program i have downloaded to the PIC (with MPlab IDE) is the one on your site and when i programmed it it showed "successful programming". what could be wrong? is it a connection problem? how can I find out how to repair it? Could it be the 8MHZ oscillator instead of 4, or that i have not connected the rest circuit (LEDs, LS373s)? the only time the servo made a sound was when i accidentally touched the signal cable with one end of a LED.
I wish to build this project successfully,
Thank you a lot

Posted: Sat Feb 19, 2011 7:19 pm
by ThePyroElectro

It could be any of those problems. It's extremely hard for me to help debug your project without being there with you.

First I would check to make sure the configuration bits in MPLAB are set correctly. The 8 MHz oscillator is double the speed of what I used, so the software for the servo control will need to be updated to reflect that change.

The way you find out what's wrong is by going through and checking things one-by-one to make sure they are all connected and running. Use your digital multi-meter to make sure there is power going to the PIC, power going to the Servo. Use an oscilloscope to make sure a signal is going to the Servo. Those are some key things that I can think of off the top my head.

Debug, debug! It's part of the process unfortunately.

Posted: Thu Mar 03, 2011 8:55 pm
by solidus
Hi again pyro..
I can't see the 18f452 fuses configurations. And when I power up the circuit the LEDs are all shining. There is nothing happen.. What do you suggest me ?

SHort range radar

Posted: Thu Mar 17, 2011 12:02 pm
by Subhashish
can you please tell me what is the cost of this radar
if you can tell for each material it will be good.
Approximate if not sure.

Thanks in advance

Posted: Fri Mar 18, 2011 5:01 pm
by ThePyroElectro
Parts used in the project in total should not cost more than USD $30.

However, this assumes you already have the tools used to build the project...solder/soldering iron, PIC programmer, oscilloscope (for testing), wire-wrap tool...etc.

Short Range Radar

Posted: Fri Mar 18, 2011 5:35 pm
by Subhashish
Thanks a lot for replying, and you were right in assuming that i have few of the materials you mentioned.

one more help:
If i start from beginning for making this RADAR, how many days it might take?(Assume i am totally new to this micro controller based projects)

I am really interested in making this, also suggest some ideas for improvising it.
Reply soon

Posted: Fri Mar 18, 2011 7:50 pm
by ThePyroElectro

Building this project with little or no previous microcontroller knowledge will be difficult, and when you get it 'working' it will probably not work as well as mine due to many factors.

I don't want to discourage you, but I would suggest working on easier projects first...for example: blinking LEDs at known timing, using the A/D converters to understand various voltage levels....

However, if you insist that you want to build this project from the start, my estimate is it will take you anywhere from 2-3 weeks (a few hours a day) to get it in 'working' shape. By 'working', I mean you will get some expected results on the LED outputs.


Posted: Sat Mar 19, 2011 7:21 am
by madjim
Hello again, i am still trying to debug the project and i wanted to make sure if i am programming correctly the PIC. I am doing exactly what is described in the tutorial :"Programming the PIC:program it" and then i remove the PIC from the development board and i connect it with the servo, power and the 4MHZ oscillator. Am i programming correctly? Should the servo be working, or should i connect everything else (LED's and 373's) and see again?
Thank you.

-EDIT: I have reprogrammed the PIC with Bits configurations: XT oscillator
oscillator system clock switch enabled
WDT disabled
low voltage enabled.

I have not connected everything yet, but the servo turns once or twice (once it made more than 3 turns) but less than 40 degrees. After that, the servo "shakes" and then does nothing.
What could be wrong? I would appreciate some help
Thank you very much.

Posted: Sat Mar 19, 2011 8:42 pm
by ThePyroElectro
You should be using:

low voltage programming disabled.

With what you described, it's pretty darn difficult to diagnose the exact problem. It sounds like some version of the program made it onto the PIC but is not quite correct. All I can really do is guide you in the debug direction with the following....

The hardware debug process is to first look at the power supply, make sure all Vdd and Vss connections are connected to Power and Ground, second make sure MCLR (Pin 1) is connected to Power.

The next step is to make sure your oscillator is connected properly.

If these two things are done right, then your software should be running properly. So if you still have a problem at this point, it is best to try running a simple LED flashing program and see if it runs:

Something Like This From The PIC Prototyping Tutorial:

Code: Select all

Written by: Chris
Date: 11/23/2007
Purpose & Description: This program turns Bit 0 of PORTA
off and on (0 and 1, 0v and 5v) at 0.3 Second intervals.
For this specific Development Board it will turn the LED
off and on.
#include <p18f452.h>
#include <delays.h>
void main(void){
TRISA = 0x00;
PORTA = 0x00;

        PORTA = 0x01;
        PORTA = 0x00;

At this point, if the program does not run properly turning Pin 2 of the PIC off and on (0v and 5v) then either [a] you still have power/ground/mclr not wired correctly or [b] the bit configurations (XT/HS, Watchdog Timer, Low Voltage Programming) are not setup correctly or [c] the chip is faulty. If the chip is indeed faulty you wouldn't be able to program it either.


Posted: Sun Mar 20, 2011 8:36 am
by madjim
Thank you very much for your reply. I connected the MPCLR and changed the oscillator to 8MHZ, HS and the servo works wonderfully.
Thank you very much.

IR SEnsor

Posted: Mon Mar 21, 2011 2:25 pm
by Subhashish
I got all the components as in the part list, but the IR SENSOR version available here is GP2Y120 - IR Sensor instead of GP2D120 - IR Sensor.
Should i take it? Will it be compatible?

Please respond at the earliest because i am going to buy it tomorrow.

Re: IR SEnsor

Posted: Mon Mar 21, 2011 4:41 pm
by ThePyroElectro
Subhashish wrote:I got all the components as in the part list, but the IR SENSOR version available here is GP2Y120 - IR Sensor instead of GP2D120 - IR Sensor.
Should i take it? Will it be compatible?

Please respond at the earliest because i am going to buy it tomorrow.

I couldn't find any documentation for a device with the GP2Y120 part number.

If you could direct me to the website with a datasheet for this IR sensor I could give you a definite answer.

I believe this website ships the GP2D120 internationally if it interests you: ... 2D120.html

Posted: Tue Mar 22, 2011 5:39 pm
by Subhashish
I have bought OCTOB 16/18F PIC Development Board as OLIMEX was not available. This needed 12 v adapter.
Can you tell me whether this will work with PIC 18F452 Microcontroller you specified in parts list?:(

Also i was wrong in asking about the IR Sensor, it was GP2Y0A21YK which i bought. So is it ok? :roll:

Please suggest :idea: the proceedings :arrow: .
Thanks :D