CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

changing range for sonar range finder srf08

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
csshah



Joined: 28 Feb 2005
Posts: 24

View user's profile Send private message

changing range for sonar range finder srf08
PostPosted: Thu Sep 01, 2005 7:15 pm     Reply with quote

hi all
for my project I am using devantech SRF08 with PIc 18f8720. I wanted to fire sonar range finder at faster rate because for my application I m using only 3 meter distance. So if anybody of you know what are the optimal values for range register and gain register??

thanks in advance
cs
Ttelmah
Guest







PostPosted: Fri Sep 02, 2005 9:15 am     Reply with quote

Try 70 decimal for the range register. the gain register unfortunately, requires you to experiment. The value will depend on what you want to detect, how the unit is mounted, how fast you actually try to read, etc..
The response is not linear, but I'd suggest a binary search to get close to the optimal value. If you set it down to 0x10, and see how the range goes, false readings, imply it is too high for the given sampling rate, while not detecting an object implies you need to go higher. You will fnd it hard to lower the sampling time by a lot, while giving 3m range, without getting spurious readings if there are flat objects beyond this range...

Best Wishes
csshah



Joined: 28 Feb 2005
Posts: 24

View user's profile Send private message

sonar prob
PostPosted: Fri Sep 02, 2005 9:49 am     Reply with quote

hey ttelmah

thanks for reply. actually i fixed the range register at 0x44 by formula given in datasheet. I did lots of experiments by reducing the response time(reading time) from 65ms and changing the gain register. but most of the time I am getting spurious readings or no detection at all. after spending 3 days on it. i thought of shooting my problem on board. if somebody has already worked on it and came up with some useful relation between read time and gain register value then it'll be very useful to me
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group