Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 8th August 2004, 08:00 PM   (permalink)
Default min. distance in ultrasonic distance meter

hello,
I am workng on an ultrasonic distance meter.it is based on this project:
http://www.eb.uah.edu/~wells/cpe437_sp_00/hrf/index.htm
the minimum distance that my circuit shows is 279mm,I changed the delay of minimum distance in software but I still have 279mm min distance instead of a smaller output .
now my question is:
Is this limitation due to hardware(my ultra sonic sensors) or I should change my software in order to measure shorter distances?
Maryam is offline  
Old 9th August 2004, 06:47 AM   (permalink)
Default Re: min. distance in ultrasonic distance meter

Quote:
Originally Posted by Maryam
hello,
I am workng on an ultrasonic distance meter.it is based on this project:
http://www.eb.uah.edu/~wells/cpe437_sp_00/hrf/index.htm
the minimum distance that my circuit shows is 279mm,I changed the delay of minimum distance in software but I still have 279mm min distance instead of a smaller output .
now my question is:
Is this limitation due to hardware(my ultra sonic sensors) or I should change my software in order to measure shorter distances?
It's a bit of both really, when the ultrasonic transducer transmits it has two bad effects, one it carries on ringing for a little while, and secondly it overloads the receiver. So the minimum distance is governed by waiting for the transducer to stop ringing, and waiting for the overloaded receiver to recover.

But both of these conditions will cause false triggering if the delay is too short, I suspect your minimum distance may well be set elsewhere in the software.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 9th August 2004, 11:18 AM   (permalink)
Default

Hello

Thanks for your reply.

This is part of my codes whitch defines the value of delay in receiving signal,I changed the value of 240 to a lower one but I didn't see any difference.
Code:
RECEIVE  movf MASK,W
         btfsc STATUS,Z
         goto DEFMASK          ;if mask 0 do default delay
         movf MASK,W
         movwf LOOPB
         goto MASK1            ;perform mask delay

DEFMASK  movlw D'240'
         movwf ANSA1
         movlw D'2'
         movwf ANSA2
DEFMLP   decfsz ANSA1,F
         goto DEFMLP
         decfsz ANSA2,F
         goto DEFMLP
         goto MASK0

MASK1    movlw D'2'               ;masking delays
         movwf ANSA2
         movlw D'48'
         movwf ANSA1

MASK2    movlw D'4'
         movwf ANSA3
MASK3    decfsz ANSA3,F
         goto MASK3

         decfsz ANSA1,F
         goto MASK2
         decfsz ANSA2,F
         goto MASK2
         decfsz LOOPB,F
         goto MASK1

MASK0    bcf INTCON,RBIF       ;clear RB4-RB7 interrupt change flag
         bcf ZERO,0
am I doing true correction on the program?
Maryam is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:39 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker