LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate distance using SRF08 (ultrasonic sensor) and I2C Bus in labview

Hi Friends!

 

I would like to calculte distance using ultrasonic sensor SRF08  ( http://coecsl.ece.illinois.edu/ge423/DevantechSRF08UltraSonicRanger.pdf ) by using I2C bus in labview. Can some one help me in this regard?

 

*Please remember for addressing srf08 (help from data sheet of srf08) e.g if the address is "xE6" (1 long flash and 3 short flashes of on board LED) which is = b1110 0110== >> shift to right one bit and  the actual address will be== b 0111 0011 or x73. 

0 Kudos
Message 1 of 6
(4,756 Views)

The following White Paper explains how to communicate with a I2C bus in labview.

 

https://www.ni.com/en/support/documentation/supplemental/21/using-i2c-with-labview-and-the-usb-8451....

 

I haven't found any specifics for this particular sensor being used in labview, or calculating distance in a similar way. At the moment this is a bit of a broad question, we might be able to give you better answers if you  have more specific questions about this , or if you have doubts how to do something in specific.

 

Regards

Message 2 of 6
(4,700 Views)

First thanks for quick reply, i beg perdon to do not explain my aim/task correctly.

well i am using embedded system MyRIO 1900.
I want to get distance calculation using ultrasonic sensor (srf08) by using Bus (MXP port A or B of MyRIO,Pin DIO14 and DIO15).
U r right there is no such example on internet using LabView + MyRIO and Ultrasonic srf08.
There r some bilten examples on SRF08 in FRC (First robotics Competition) by National instrument but not on Labview +MyRIo+SRF08.

Spoiler
Spoiler
Smiley Frustrated

 

0 Kudos
Message 3 of 6
(4,679 Views)

Which part exactly do you need help understanding. Is it the communicating the SRF08, or how to get the distance using the ultrasonic sensor?

0 Kudos
Message 4 of 6
(4,653 Views)

I need help regarding distance CALCULATION using srf08 sensor only. Can u tell me how to read specific number of bytes for example i set a value to i2c-Vi to read only 4 bytes. After that i had to compare 3rd and 4th byte and their difference and devision by 2 will be my actual distance (d). 😞

0 Kudos
Message 5 of 6
(4,615 Views)

Hi again!
I successfully get my distance calculation using Srf08, but need some calibration as im facing problem between certain amount of range. My sensor give some random and wrong readings for example less than 40cm its start distortion. Hope i will get some solution. If some one have an idea, can help me in this regard?

0 Kudos
Message 6 of 6
(4,590 Views)