Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Ultrasonic Range Finder (95% done,need your 5%.;ref. inside)

Status
Not open for further replies.

di@ne

New Member
Hi guys, im currently doing a displayed ultrasonic range finder,i got my diagram from here,

https://www.electro-tech-online.com/custompdfs/2008/06/pic-sonar.pdf

A PIC sonar (ultrasonic) range finding project. (the main site)

I've finished breadboarding everything (triple checked it)
alas, nothig turned out on my display. (pic. attached)

I program my PIC with a generic PIC kit (pic. attached) with a given code from the site. But i think that i may have done something wrong in the programming part ( i just directly inputted the hex. file ) and im very bad at programming..If someone could tell me how should i 'properly' input the .hex file, i would be really happy.


i really apreciate your guys help.
 

Attachments

  • DSC01442.JPG
    DSC01442.JPG
    489.9 KB · Views: 422
  • DSC01443.JPG
    DSC01443.JPG
    462 KB · Views: 347
  • 16F88_Ultrasonic_ranger.zip
    2.7 KB · Views: 394
Did you set the configuration bits correctly when you programmed it ?

If you haven't set the oscillator type/watchdog/etc etc in the config bits then it won't work properly (if at all).
 
Also, how are you powering it ? I see you have at least 4 cells. If you are driving the PIC with those without a voltage regulator and they are fresh cells then you are going to have more than 6 volts going into the PIC. This is out of spec and could damage the PIC.

If you are using a voltage regulator in the circuit then you might find that unless its a very low dropout regulator, you won't be getting 5 volts out of it unless you use at least 7-8 volts at its input.
 
And finally - are you sure your PIC is in the right place in that programming socket and the right orientation ?
 
1. Dear Picbits, i am not sure how to set the configuration bits, is it possible to tell me more or send me a link where i can study more about it? :)

For the oscillator, i believe it has been set in 4Mhz the stock source code given where i just "simply" programmed it.
2.
A direct reading from my cell is going 4.78+- volts but from your suggestion i am going to fix a 5 V voltage regulator soon to prevent any complication.
I am not that experience,but i guess that my PIC is still
functioning properly since i still can erase and reprogrammed any given .hex

3. for the programming sockets, i followed the instruction from the data sheets given for an 18 pin (attached)..Is it any difference to programmed it with my socket model then a direct ICSP type programming from the diagram? :confused: and for the wiring orientation from my PIC to the display and others,i checked everything and it seems to be correct, i checked every pin from 1 to 18.


4. and for my ultrasonic (attached) im not sure how i connect it but i guess it is correct, is there any polarity where + - goes to?

thanks.

-------------------------------------------------------------
on something else that is not related, for all of this problem i would ussually have an assistance from my course coordinator, but as you can see ( www.shienandy.com - Welcome ) ; i haven't have the chance to have a proper communication with him for a month since his gettting married and all other things his going thru...and basically i am doing most of the things with the help of people around me and the net.:eek:
 

Attachments

  • UIC00A & UIC-S V1.6 Downloaded Online.pdf
    1.5 MB · Views: 1,105
  • DSC01444.JPG
    DSC01444.JPG
    429.8 KB · Views: 273
Hi Di@ne,

Did you ever get this working? I'm trying to get teh same circuit working as well and having difficulties. Like you I just programmed the 16F88 with the supplied .hex file. I do see activity in the circuit - se attached scope shots. Only problem is that the range is only 10cm.

I have attached two scope shots - TX_pulses shows the 40Khz pulses from RB3. I think these look OK.
The second scope shot shows RB0 and RB3 when I have an object about 10cm from the sonars. If I go beyond 10cm the display's lsb just shows a random number and RB0 and RB3 look like attachment 1meter.png.

Any ideas as to what I have wrong? I have been over the circuit about 5 times and can't see any connection errors. I also used the .hex file as opposed to recompiling. I'm using the 16F88 as well. ..

I'm really lost and appreciate your help.
 

Attachments

  • TX_pulses.png
    TX_pulses.png
    54.3 KB · Views: 214
  • 1meter.png
    1meter.png
    51.4 KB · Views: 229
  • 10cm.png
    10cm.png
    42.6 KB · Views: 212
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top