Ultrasonic Distance Sensor/ Module

Post all your hardware and software upgrades/projects here.

Re: Ultrasonic Distance Sensor/ Module

Postby wokman10 » Wed Aug 28, 2013 5:45 pm

Ok So I put in the beginning #define ARCPING() and I still get the same error.
What do I do?

Thanks
Walker
Thanks
Walker
wokman10
 
Posts: 15
Joined: Tue Aug 27, 2013 6:10 pm

Re: Ultrasonic Distance Sensor/ Module

Postby scoachby » Sun Dec 15, 2013 6:57 am

Hello,

Thanks for the edit.
I didn't notice the "code" control until after I saw the post and then I didn't know that I could repair it.
scoachby
 
Posts: 3
Joined: Tue Dec 10, 2013 11:23 am

Re: Ultrasonic Distance Sensor/ Module

Postby mrmacro » Wed Jan 01, 2014 9:22 pm

This is an update on my last post here regarding the repeatability of the sensor.
The first thing that I did was to modify the ping() routine to stop returning zero when it detects something funny. I used negative values to indicate each of the three detected problems. I also removed the "return 0" before the break what the distance reads excessively high. This was just to let me know if the routine was detecting anything funny.

Note that I am using the new command processor that I have posted on github.

Next I positioned Hexy about 40cm from a door at the end of a narrow hall. There was more than 6.5m to the other end behind Hexy so there there should not be much multi-path reflection. I expect this situation to provide a reasonably repeatable reading in the range of 30-50cm.

I then issued the command: #1mMMMMM a few different times. This causes 5 successive ping results to be reported. The first set of readings was:
10.17, 32.41, 85.17, 31.55, 31.55 which would have resulted in a multi-ping result of 31.55cm.
The second set returned a similar pattern of results. Interesting to note is the very low first reading. Future commands did not repeat this low first reading, but the readings continued to span 30 to 100cm.

I then tried #5mMMMMMMMMMM to take 10, 5-point, multi-ping readings. The results were:
19.31, 31.55, 87.93, 19.48, 75.52, 5.17, 13.62, 32.93, 32.93, 31.55

I acknowledge that I do not know exactly the correct reading, my ruler could be off by as much as a full CM, due to lack of knowledge of the exact location of the reference plane.

Looking at the readings I expect that the correct readings would be 31.5cm. I moved to about 100cm and got something that looked more like 70cm but the variation was still very significant.

Does anybody else see this type of variation in repeatability?
mrmacro
 
Posts: 12
Joined: Fri Jul 12, 2013 12:16 am

Re: Ultrasonic Distance Sensor/ Module

Postby cem » Mon Jan 06, 2014 3:11 pm

Hi,
Can you post your full coding for the UDS module, so I can attempt to embed it into some coding.

Thanks,
Chris.
cem
 
Posts: 17
Joined: Tue Nov 05, 2013 11:22 am

Re: Ultrasonic Distance Sensor/ Module

Postby mrmacro » Fri Jan 24, 2014 12:25 am

What I did to the UDS logic is of no importance. All I did was to provide negative numbers for the various error conditions in order to be able to tell when the routine was exiting early. It never did.

What is more important is the new command syntax to make this easier to test. That is a lot more invasive since it spans the 2 Servotor32 files along with the .ino sketch. I suggest that you go to github to obtain the version that I am testing with.
The page is at https://github.com/ArcBotics/Servotor32/network and my branch is by Fran-B.

Alternatively, you can email me and I will provide you with a ZIP containing the three files.
mrmacro
 
Posts: 12
Joined: Fri Jul 12, 2013 12:16 am

Previous

Return to Projects and Upgrades

Who is online

Users browsing this forum: No registered users and 2 guests

cron